1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
2 // source: metrics.proto
3 
4 #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
5 #include "metrics.pb.h"
6 
7 #include <algorithm>
8 
9 #include <google/protobuf/stubs/common.h>
10 #include <google/protobuf/stubs/once.h>
11 #include <google/protobuf/io/coded_stream.h>
12 #include <google/protobuf/wire_format_lite_inl.h>
13 #include <google/protobuf/descriptor.h>
14 #include <google/protobuf/generated_message_reflection.h>
15 #include <google/protobuf/reflection_ops.h>
16 #include <google/protobuf/wire_format.h>
17 // @@protoc_insertion_point(includes)
18 
19 namespace io {
20 namespace prometheus {
21 namespace client {
22 
23 namespace {
24 
25 const ::google::protobuf::Descriptor* LabelPair_descriptor_ = NULL;
26 const ::google::protobuf::internal::GeneratedMessageReflection*
27   LabelPair_reflection_ = NULL;
28 const ::google::protobuf::Descriptor* Gauge_descriptor_ = NULL;
29 const ::google::protobuf::internal::GeneratedMessageReflection*
30   Gauge_reflection_ = NULL;
31 const ::google::protobuf::Descriptor* Counter_descriptor_ = NULL;
32 const ::google::protobuf::internal::GeneratedMessageReflection*
33   Counter_reflection_ = NULL;
34 const ::google::protobuf::Descriptor* Quantile_descriptor_ = NULL;
35 const ::google::protobuf::internal::GeneratedMessageReflection*
36   Quantile_reflection_ = NULL;
37 const ::google::protobuf::Descriptor* Summary_descriptor_ = NULL;
38 const ::google::protobuf::internal::GeneratedMessageReflection*
39   Summary_reflection_ = NULL;
40 const ::google::protobuf::Descriptor* Untyped_descriptor_ = NULL;
41 const ::google::protobuf::internal::GeneratedMessageReflection*
42   Untyped_reflection_ = NULL;
43 const ::google::protobuf::Descriptor* Histogram_descriptor_ = NULL;
44 const ::google::protobuf::internal::GeneratedMessageReflection*
45   Histogram_reflection_ = NULL;
46 const ::google::protobuf::Descriptor* Bucket_descriptor_ = NULL;
47 const ::google::protobuf::internal::GeneratedMessageReflection*
48   Bucket_reflection_ = NULL;
49 const ::google::protobuf::Descriptor* Metric_descriptor_ = NULL;
50 const ::google::protobuf::internal::GeneratedMessageReflection*
51   Metric_reflection_ = NULL;
52 const ::google::protobuf::Descriptor* MetricFamily_descriptor_ = NULL;
53 const ::google::protobuf::internal::GeneratedMessageReflection*
54   MetricFamily_reflection_ = NULL;
55 const ::google::protobuf::EnumDescriptor* MetricType_descriptor_ = NULL;
56 
57 }  // namespace
58 
59 
protobuf_AssignDesc_metrics_2eproto()60 void protobuf_AssignDesc_metrics_2eproto() {
61   protobuf_AddDesc_metrics_2eproto();
62   const ::google::protobuf::FileDescriptor* file =
63     ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
64       "metrics.proto");
65   GOOGLE_CHECK(file != NULL);
66   LabelPair_descriptor_ = file->message_type(0);
67   static const int LabelPair_offsets_[2] = {
68     GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LabelPair, name_),
69     GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LabelPair, value_),
70   };
71   LabelPair_reflection_ =
72     new ::google::protobuf::internal::GeneratedMessageReflection(
73       LabelPair_descriptor_,
74       LabelPair::default_instance_,
75       LabelPair_offsets_,
76       GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LabelPair, _has_bits_[0]),
77       GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LabelPair, _unknown_fields_),
78       -1,
79       ::google::protobuf::DescriptorPool::generated_pool(),
80       ::google::protobuf::MessageFactory::generated_factory(),
81       sizeof(LabelPair));
82   Gauge_descriptor_ = file->message_type(1);
83   static const int Gauge_offsets_[1] = {
84     GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Gauge, value_),
85   };
86   Gauge_reflection_ =
87     new ::google::protobuf::internal::GeneratedMessageReflection(
88       Gauge_descriptor_,
89       Gauge::default_instance_,
90       Gauge_offsets_,
91       GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Gauge, _has_bits_[0]),
92       GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Gauge, _unknown_fields_),
93       -1,
94       ::google::protobuf::DescriptorPool::generated_pool(),
95       ::google::protobuf::MessageFactory::generated_factory(),
96       sizeof(Gauge));
97   Counter_descriptor_ = file->message_type(2);
98   static const int Counter_offsets_[1] = {
99     GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Counter, value_),
100   };
101   Counter_reflection_ =
102     new ::google::protobuf::internal::GeneratedMessageReflection(
103       Counter_descriptor_,
104       Counter::default_instance_,
105       Counter_offsets_,
106       GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Counter, _has_bits_[0]),
107       GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Counter, _unknown_fields_),
108       -1,
109       ::google::protobuf::DescriptorPool::generated_pool(),
110       ::google::protobuf::MessageFactory::generated_factory(),
111       sizeof(Counter));
112   Quantile_descriptor_ = file->message_type(3);
113   static const int Quantile_offsets_[2] = {
114     GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Quantile, quantile_),
115     GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Quantile, value_),
116   };
117   Quantile_reflection_ =
118     new ::google::protobuf::internal::GeneratedMessageReflection(
119       Quantile_descriptor_,
120       Quantile::default_instance_,
121       Quantile_offsets_,
122       GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Quantile, _has_bits_[0]),
123       GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Quantile, _unknown_fields_),
124       -1,
125       ::google::protobuf::DescriptorPool::generated_pool(),
126       ::google::protobuf::MessageFactory::generated_factory(),
127       sizeof(Quantile));
128   Summary_descriptor_ = file->message_type(4);
129   static const int Summary_offsets_[3] = {
130     GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Summary, sample_count_),
131     GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Summary, sample_sum_),
132     GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Summary, quantile_),
133   };
134   Summary_reflection_ =
135     new ::google::protobuf::internal::GeneratedMessageReflection(
136       Summary_descriptor_,
137       Summary::default_instance_,
138       Summary_offsets_,
139       GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Summary, _has_bits_[0]),
140       GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Summary, _unknown_fields_),
141       -1,
142       ::google::protobuf::DescriptorPool::generated_pool(),
143       ::google::protobuf::MessageFactory::generated_factory(),
144       sizeof(Summary));
145   Untyped_descriptor_ = file->message_type(5);
146   static const int Untyped_offsets_[1] = {
147     GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Untyped, value_),
148   };
149   Untyped_reflection_ =
150     new ::google::protobuf::internal::GeneratedMessageReflection(
151       Untyped_descriptor_,
152       Untyped::default_instance_,
153       Untyped_offsets_,
154       GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Untyped, _has_bits_[0]),
155       GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Untyped, _unknown_fields_),
156       -1,
157       ::google::protobuf::DescriptorPool::generated_pool(),
158       ::google::protobuf::MessageFactory::generated_factory(),
159       sizeof(Untyped));
160   Histogram_descriptor_ = file->message_type(6);
161   static const int Histogram_offsets_[3] = {
162     GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Histogram, sample_count_),
163     GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Histogram, sample_sum_),
164     GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Histogram, bucket_),
165   };
166   Histogram_reflection_ =
167     new ::google::protobuf::internal::GeneratedMessageReflection(
168       Histogram_descriptor_,
169       Histogram::default_instance_,
170       Histogram_offsets_,
171       GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Histogram, _has_bits_[0]),
172       GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Histogram, _unknown_fields_),
173       -1,
174       ::google::protobuf::DescriptorPool::generated_pool(),
175       ::google::protobuf::MessageFactory::generated_factory(),
176       sizeof(Histogram));
177   Bucket_descriptor_ = file->message_type(7);
178   static const int Bucket_offsets_[2] = {
179     GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Bucket, cumulative_count_),
180     GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Bucket, upper_bound_),
181   };
182   Bucket_reflection_ =
183     new ::google::protobuf::internal::GeneratedMessageReflection(
184       Bucket_descriptor_,
185       Bucket::default_instance_,
186       Bucket_offsets_,
187       GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Bucket, _has_bits_[0]),
188       GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Bucket, _unknown_fields_),
189       -1,
190       ::google::protobuf::DescriptorPool::generated_pool(),
191       ::google::protobuf::MessageFactory::generated_factory(),
192       sizeof(Bucket));
193   Metric_descriptor_ = file->message_type(8);
194   static const int Metric_offsets_[7] = {
195     GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Metric, label_),
196     GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Metric, gauge_),
197     GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Metric, counter_),
198     GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Metric, summary_),
199     GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Metric, untyped_),
200     GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Metric, histogram_),
201     GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Metric, timestamp_ms_),
202   };
203   Metric_reflection_ =
204     new ::google::protobuf::internal::GeneratedMessageReflection(
205       Metric_descriptor_,
206       Metric::default_instance_,
207       Metric_offsets_,
208       GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Metric, _has_bits_[0]),
209       GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Metric, _unknown_fields_),
210       -1,
211       ::google::protobuf::DescriptorPool::generated_pool(),
212       ::google::protobuf::MessageFactory::generated_factory(),
213       sizeof(Metric));
214   MetricFamily_descriptor_ = file->message_type(9);
215   static const int MetricFamily_offsets_[4] = {
216     GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MetricFamily, name_),
217     GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MetricFamily, help_),
218     GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MetricFamily, type_),
219     GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MetricFamily, metric_),
220   };
221   MetricFamily_reflection_ =
222     new ::google::protobuf::internal::GeneratedMessageReflection(
223       MetricFamily_descriptor_,
224       MetricFamily::default_instance_,
225       MetricFamily_offsets_,
226       GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MetricFamily, _has_bits_[0]),
227       GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MetricFamily, _unknown_fields_),
228       -1,
229       ::google::protobuf::DescriptorPool::generated_pool(),
230       ::google::protobuf::MessageFactory::generated_factory(),
231       sizeof(MetricFamily));
232   MetricType_descriptor_ = file->enum_type(0);
233 }
234 
235 namespace {
236 
237 GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
protobuf_AssignDescriptorsOnce()238 inline void protobuf_AssignDescriptorsOnce() {
239   ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
240                  &protobuf_AssignDesc_metrics_2eproto);
241 }
242 
protobuf_RegisterTypes(const::std::string &)243 void protobuf_RegisterTypes(const ::std::string&) {
244   protobuf_AssignDescriptorsOnce();
245   ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
246     LabelPair_descriptor_, &LabelPair::default_instance());
247   ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
248     Gauge_descriptor_, &Gauge::default_instance());
249   ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
250     Counter_descriptor_, &Counter::default_instance());
251   ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
252     Quantile_descriptor_, &Quantile::default_instance());
253   ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
254     Summary_descriptor_, &Summary::default_instance());
255   ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
256     Untyped_descriptor_, &Untyped::default_instance());
257   ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
258     Histogram_descriptor_, &Histogram::default_instance());
259   ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
260     Bucket_descriptor_, &Bucket::default_instance());
261   ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
262     Metric_descriptor_, &Metric::default_instance());
263   ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
264     MetricFamily_descriptor_, &MetricFamily::default_instance());
265 }
266 
267 }  // namespace
268 
protobuf_ShutdownFile_metrics_2eproto()269 void protobuf_ShutdownFile_metrics_2eproto() {
270   delete LabelPair::default_instance_;
271   delete LabelPair_reflection_;
272   delete Gauge::default_instance_;
273   delete Gauge_reflection_;
274   delete Counter::default_instance_;
275   delete Counter_reflection_;
276   delete Quantile::default_instance_;
277   delete Quantile_reflection_;
278   delete Summary::default_instance_;
279   delete Summary_reflection_;
280   delete Untyped::default_instance_;
281   delete Untyped_reflection_;
282   delete Histogram::default_instance_;
283   delete Histogram_reflection_;
284   delete Bucket::default_instance_;
285   delete Bucket_reflection_;
286   delete Metric::default_instance_;
287   delete Metric_reflection_;
288   delete MetricFamily::default_instance_;
289   delete MetricFamily_reflection_;
290 }
291 
protobuf_AddDesc_metrics_2eproto()292 void protobuf_AddDesc_metrics_2eproto() {
293   static bool already_here = false;
294   if (already_here) return;
295   already_here = true;
296   GOOGLE_PROTOBUF_VERIFY_VERSION;
297 
298   ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
299     "\n\rmetrics.proto\022\024io.prometheus.client\"(\n"
300     "\tLabelPair\022\014\n\004name\030\001 \001(\t\022\r\n\005value\030\002 \001(\t\""
301     "\026\n\005Gauge\022\r\n\005value\030\001 \001(\001\"\030\n\007Counter\022\r\n\005va"
302     "lue\030\001 \001(\001\"+\n\010Quantile\022\020\n\010quantile\030\001 \001(\001\022"
303     "\r\n\005value\030\002 \001(\001\"e\n\007Summary\022\024\n\014sample_coun"
304     "t\030\001 \001(\004\022\022\n\nsample_sum\030\002 \001(\001\0220\n\010quantile\030"
305     "\003 \003(\0132\036.io.prometheus.client.Quantile\"\030\n"
306     "\007Untyped\022\r\n\005value\030\001 \001(\001\"c\n\tHistogram\022\024\n\014"
307     "sample_count\030\001 \001(\004\022\022\n\nsample_sum\030\002 \001(\001\022,"
308     "\n\006bucket\030\003 \003(\0132\034.io.prometheus.client.Bu"
309     "cket\"7\n\006Bucket\022\030\n\020cumulative_count\030\001 \001(\004"
310     "\022\023\n\013upper_bound\030\002 \001(\001\"\276\002\n\006Metric\022.\n\005labe"
311     "l\030\001 \003(\0132\037.io.prometheus.client.LabelPair"
312     "\022*\n\005gauge\030\002 \001(\0132\033.io.prometheus.client.G"
313     "auge\022.\n\007counter\030\003 \001(\0132\035.io.prometheus.cl"
314     "ient.Counter\022.\n\007summary\030\004 \001(\0132\035.io.prome"
315     "theus.client.Summary\022.\n\007untyped\030\005 \001(\0132\035."
316     "io.prometheus.client.Untyped\0222\n\thistogra"
317     "m\030\007 \001(\0132\037.io.prometheus.client.Histogram"
318     "\022\024\n\014timestamp_ms\030\006 \001(\003\"\210\001\n\014MetricFamily\022"
319     "\014\n\004name\030\001 \001(\t\022\014\n\004help\030\002 \001(\t\022.\n\004type\030\003 \001("
320     "\0162 .io.prometheus.client.MetricType\022,\n\006m"
321     "etric\030\004 \003(\0132\034.io.prometheus.client.Metri"
322     "c*M\n\nMetricType\022\013\n\007COUNTER\020\000\022\t\n\005GAUGE\020\001\022"
323     "\013\n\007SUMMARY\020\002\022\013\n\007UNTYPED\020\003\022\r\n\tHISTOGRAM\020\004"
324     "B\026\n\024io.prometheus.client", 1024);
325   ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
326     "metrics.proto", &protobuf_RegisterTypes);
327   LabelPair::default_instance_ = new LabelPair();
328   Gauge::default_instance_ = new Gauge();
329   Counter::default_instance_ = new Counter();
330   Quantile::default_instance_ = new Quantile();
331   Summary::default_instance_ = new Summary();
332   Untyped::default_instance_ = new Untyped();
333   Histogram::default_instance_ = new Histogram();
334   Bucket::default_instance_ = new Bucket();
335   Metric::default_instance_ = new Metric();
336   MetricFamily::default_instance_ = new MetricFamily();
337   LabelPair::default_instance_->InitAsDefaultInstance();
338   Gauge::default_instance_->InitAsDefaultInstance();
339   Counter::default_instance_->InitAsDefaultInstance();
340   Quantile::default_instance_->InitAsDefaultInstance();
341   Summary::default_instance_->InitAsDefaultInstance();
342   Untyped::default_instance_->InitAsDefaultInstance();
343   Histogram::default_instance_->InitAsDefaultInstance();
344   Bucket::default_instance_->InitAsDefaultInstance();
345   Metric::default_instance_->InitAsDefaultInstance();
346   MetricFamily::default_instance_->InitAsDefaultInstance();
347   ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_metrics_2eproto);
348 }
349 
350 // Force AddDescriptors() to be called at static initialization time.
351 struct StaticDescriptorInitializer_metrics_2eproto {
StaticDescriptorInitializer_metrics_2eprotoio::prometheus::client::StaticDescriptorInitializer_metrics_2eproto352   StaticDescriptorInitializer_metrics_2eproto() {
353     protobuf_AddDesc_metrics_2eproto();
354   }
355 } static_descriptor_initializer_metrics_2eproto_;
MetricType_descriptor()356 const ::google::protobuf::EnumDescriptor* MetricType_descriptor() {
357   protobuf_AssignDescriptorsOnce();
358   return MetricType_descriptor_;
359 }
MetricType_IsValid(int value)360 bool MetricType_IsValid(int value) {
361   switch(value) {
362     case 0:
363     case 1:
364     case 2:
365     case 3:
366     case 4:
367       return true;
368     default:
369       return false;
370   }
371 }
372 
373 
374 // ===================================================================
375 
376 #ifndef _MSC_VER
377 const int LabelPair::kNameFieldNumber;
378 const int LabelPair::kValueFieldNumber;
379 #endif  // !_MSC_VER
380 
LabelPair()381 LabelPair::LabelPair()
382   : ::google::protobuf::Message() {
383   SharedCtor();
384   // @@protoc_insertion_point(constructor:io.prometheus.client.LabelPair)
385 }
386 
InitAsDefaultInstance()387 void LabelPair::InitAsDefaultInstance() {
388 }
389 
LabelPair(const LabelPair & from)390 LabelPair::LabelPair(const LabelPair& from)
391   : ::google::protobuf::Message() {
392   SharedCtor();
393   MergeFrom(from);
394   // @@protoc_insertion_point(copy_constructor:io.prometheus.client.LabelPair)
395 }
396 
SharedCtor()397 void LabelPair::SharedCtor() {
398   ::google::protobuf::internal::GetEmptyString();
399   _cached_size_ = 0;
400   name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
401   value_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
402   ::memset(_has_bits_, 0, sizeof(_has_bits_));
403 }
404 
~LabelPair()405 LabelPair::~LabelPair() {
406   // @@protoc_insertion_point(destructor:io.prometheus.client.LabelPair)
407   SharedDtor();
408 }
409 
SharedDtor()410 void LabelPair::SharedDtor() {
411   if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
412     delete name_;
413   }
414   if (value_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
415     delete value_;
416   }
417   if (this != default_instance_) {
418   }
419 }
420 
SetCachedSize(int size) const421 void LabelPair::SetCachedSize(int size) const {
422   GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
423   _cached_size_ = size;
424   GOOGLE_SAFE_CONCURRENT_WRITES_END();
425 }
descriptor()426 const ::google::protobuf::Descriptor* LabelPair::descriptor() {
427   protobuf_AssignDescriptorsOnce();
428   return LabelPair_descriptor_;
429 }
430 
default_instance()431 const LabelPair& LabelPair::default_instance() {
432   if (default_instance_ == NULL) protobuf_AddDesc_metrics_2eproto();
433   return *default_instance_;
434 }
435 
436 LabelPair* LabelPair::default_instance_ = NULL;
437 
New() const438 LabelPair* LabelPair::New() const {
439   return new LabelPair;
440 }
441 
Clear()442 void LabelPair::Clear() {
443   if (_has_bits_[0 / 32] & 3) {
444     if (has_name()) {
445       if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
446         name_->clear();
447       }
448     }
449     if (has_value()) {
450       if (value_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
451         value_->clear();
452       }
453     }
454   }
455   ::memset(_has_bits_, 0, sizeof(_has_bits_));
456   mutable_unknown_fields()->Clear();
457 }
458 
MergePartialFromCodedStream(::google::protobuf::io::CodedInputStream * input)459 bool LabelPair::MergePartialFromCodedStream(
460     ::google::protobuf::io::CodedInputStream* input) {
461 #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
462   ::google::protobuf::uint32 tag;
463   // @@protoc_insertion_point(parse_start:io.prometheus.client.LabelPair)
464   for (;;) {
465     ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
466     tag = p.first;
467     if (!p.second) goto handle_unusual;
468     switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
469       // optional string name = 1;
470       case 1: {
471         if (tag == 10) {
472           DO_(::google::protobuf::internal::WireFormatLite::ReadString(
473                 input, this->mutable_name()));
474           ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
475             this->name().data(), this->name().length(),
476             ::google::protobuf::internal::WireFormat::PARSE,
477             "name");
478         } else {
479           goto handle_unusual;
480         }
481         if (input->ExpectTag(18)) goto parse_value;
482         break;
483       }
484 
485       // optional string value = 2;
486       case 2: {
487         if (tag == 18) {
488          parse_value:
489           DO_(::google::protobuf::internal::WireFormatLite::ReadString(
490                 input, this->mutable_value()));
491           ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
492             this->value().data(), this->value().length(),
493             ::google::protobuf::internal::WireFormat::PARSE,
494             "value");
495         } else {
496           goto handle_unusual;
497         }
498         if (input->ExpectAtEnd()) goto success;
499         break;
500       }
501 
502       default: {
503       handle_unusual:
504         if (tag == 0 ||
505             ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
506             ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
507           goto success;
508         }
509         DO_(::google::protobuf::internal::WireFormat::SkipField(
510               input, tag, mutable_unknown_fields()));
511         break;
512       }
513     }
514   }
515 success:
516   // @@protoc_insertion_point(parse_success:io.prometheus.client.LabelPair)
517   return true;
518 failure:
519   // @@protoc_insertion_point(parse_failure:io.prometheus.client.LabelPair)
520   return false;
521 #undef DO_
522 }
523 
SerializeWithCachedSizes(::google::protobuf::io::CodedOutputStream * output) const524 void LabelPair::SerializeWithCachedSizes(
525     ::google::protobuf::io::CodedOutputStream* output) const {
526   // @@protoc_insertion_point(serialize_start:io.prometheus.client.LabelPair)
527   // optional string name = 1;
528   if (has_name()) {
529     ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
530       this->name().data(), this->name().length(),
531       ::google::protobuf::internal::WireFormat::SERIALIZE,
532       "name");
533     ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
534       1, this->name(), output);
535   }
536 
537   // optional string value = 2;
538   if (has_value()) {
539     ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
540       this->value().data(), this->value().length(),
541       ::google::protobuf::internal::WireFormat::SERIALIZE,
542       "value");
543     ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
544       2, this->value(), output);
545   }
546 
547   if (!unknown_fields().empty()) {
548     ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
549         unknown_fields(), output);
550   }
551   // @@protoc_insertion_point(serialize_end:io.prometheus.client.LabelPair)
552 }
553 
SerializeWithCachedSizesToArray(::google::protobuf::uint8 * target) const554 ::google::protobuf::uint8* LabelPair::SerializeWithCachedSizesToArray(
555     ::google::protobuf::uint8* target) const {
556   // @@protoc_insertion_point(serialize_to_array_start:io.prometheus.client.LabelPair)
557   // optional string name = 1;
558   if (has_name()) {
559     ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
560       this->name().data(), this->name().length(),
561       ::google::protobuf::internal::WireFormat::SERIALIZE,
562       "name");
563     target =
564       ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
565         1, this->name(), target);
566   }
567 
568   // optional string value = 2;
569   if (has_value()) {
570     ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
571       this->value().data(), this->value().length(),
572       ::google::protobuf::internal::WireFormat::SERIALIZE,
573       "value");
574     target =
575       ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
576         2, this->value(), target);
577   }
578 
579   if (!unknown_fields().empty()) {
580     target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
581         unknown_fields(), target);
582   }
583   // @@protoc_insertion_point(serialize_to_array_end:io.prometheus.client.LabelPair)
584   return target;
585 }
586 
ByteSize() const587 int LabelPair::ByteSize() const {
588   int total_size = 0;
589 
590   if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
591     // optional string name = 1;
592     if (has_name()) {
593       total_size += 1 +
594         ::google::protobuf::internal::WireFormatLite::StringSize(
595           this->name());
596     }
597 
598     // optional string value = 2;
599     if (has_value()) {
600       total_size += 1 +
601         ::google::protobuf::internal::WireFormatLite::StringSize(
602           this->value());
603     }
604 
605   }
606   if (!unknown_fields().empty()) {
607     total_size +=
608       ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
609         unknown_fields());
610   }
611   GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
612   _cached_size_ = total_size;
613   GOOGLE_SAFE_CONCURRENT_WRITES_END();
614   return total_size;
615 }
616 
MergeFrom(const::google::protobuf::Message & from)617 void LabelPair::MergeFrom(const ::google::protobuf::Message& from) {
618   GOOGLE_CHECK_NE(&from, this);
619   const LabelPair* source =
620     ::google::protobuf::internal::dynamic_cast_if_available<const LabelPair*>(
621       &from);
622   if (source == NULL) {
623     ::google::protobuf::internal::ReflectionOps::Merge(from, this);
624   } else {
625     MergeFrom(*source);
626   }
627 }
628 
MergeFrom(const LabelPair & from)629 void LabelPair::MergeFrom(const LabelPair& from) {
630   GOOGLE_CHECK_NE(&from, this);
631   if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
632     if (from.has_name()) {
633       set_name(from.name());
634     }
635     if (from.has_value()) {
636       set_value(from.value());
637     }
638   }
639   mutable_unknown_fields()->MergeFrom(from.unknown_fields());
640 }
641 
CopyFrom(const::google::protobuf::Message & from)642 void LabelPair::CopyFrom(const ::google::protobuf::Message& from) {
643   if (&from == this) return;
644   Clear();
645   MergeFrom(from);
646 }
647 
CopyFrom(const LabelPair & from)648 void LabelPair::CopyFrom(const LabelPair& from) {
649   if (&from == this) return;
650   Clear();
651   MergeFrom(from);
652 }
653 
IsInitialized() const654 bool LabelPair::IsInitialized() const {
655 
656   return true;
657 }
658 
Swap(LabelPair * other)659 void LabelPair::Swap(LabelPair* other) {
660   if (other != this) {
661     std::swap(name_, other->name_);
662     std::swap(value_, other->value_);
663     std::swap(_has_bits_[0], other->_has_bits_[0]);
664     _unknown_fields_.Swap(&other->_unknown_fields_);
665     std::swap(_cached_size_, other->_cached_size_);
666   }
667 }
668 
GetMetadata() const669 ::google::protobuf::Metadata LabelPair::GetMetadata() const {
670   protobuf_AssignDescriptorsOnce();
671   ::google::protobuf::Metadata metadata;
672   metadata.descriptor = LabelPair_descriptor_;
673   metadata.reflection = LabelPair_reflection_;
674   return metadata;
675 }
676 
677 
678 // ===================================================================
679 
680 #ifndef _MSC_VER
681 const int Gauge::kValueFieldNumber;
682 #endif  // !_MSC_VER
683 
Gauge()684 Gauge::Gauge()
685   : ::google::protobuf::Message() {
686   SharedCtor();
687   // @@protoc_insertion_point(constructor:io.prometheus.client.Gauge)
688 }
689 
InitAsDefaultInstance()690 void Gauge::InitAsDefaultInstance() {
691 }
692 
Gauge(const Gauge & from)693 Gauge::Gauge(const Gauge& from)
694   : ::google::protobuf::Message() {
695   SharedCtor();
696   MergeFrom(from);
697   // @@protoc_insertion_point(copy_constructor:io.prometheus.client.Gauge)
698 }
699 
SharedCtor()700 void Gauge::SharedCtor() {
701   _cached_size_ = 0;
702   value_ = 0;
703   ::memset(_has_bits_, 0, sizeof(_has_bits_));
704 }
705 
~Gauge()706 Gauge::~Gauge() {
707   // @@protoc_insertion_point(destructor:io.prometheus.client.Gauge)
708   SharedDtor();
709 }
710 
SharedDtor()711 void Gauge::SharedDtor() {
712   if (this != default_instance_) {
713   }
714 }
715 
SetCachedSize(int size) const716 void Gauge::SetCachedSize(int size) const {
717   GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
718   _cached_size_ = size;
719   GOOGLE_SAFE_CONCURRENT_WRITES_END();
720 }
descriptor()721 const ::google::protobuf::Descriptor* Gauge::descriptor() {
722   protobuf_AssignDescriptorsOnce();
723   return Gauge_descriptor_;
724 }
725 
default_instance()726 const Gauge& Gauge::default_instance() {
727   if (default_instance_ == NULL) protobuf_AddDesc_metrics_2eproto();
728   return *default_instance_;
729 }
730 
731 Gauge* Gauge::default_instance_ = NULL;
732 
New() const733 Gauge* Gauge::New() const {
734   return new Gauge;
735 }
736 
Clear()737 void Gauge::Clear() {
738   value_ = 0;
739   ::memset(_has_bits_, 0, sizeof(_has_bits_));
740   mutable_unknown_fields()->Clear();
741 }
742 
MergePartialFromCodedStream(::google::protobuf::io::CodedInputStream * input)743 bool Gauge::MergePartialFromCodedStream(
744     ::google::protobuf::io::CodedInputStream* input) {
745 #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
746   ::google::protobuf::uint32 tag;
747   // @@protoc_insertion_point(parse_start:io.prometheus.client.Gauge)
748   for (;;) {
749     ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
750     tag = p.first;
751     if (!p.second) goto handle_unusual;
752     switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
753       // optional double value = 1;
754       case 1: {
755         if (tag == 9) {
756           DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
757                    double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
758                  input, &value_)));
759           set_has_value();
760         } else {
761           goto handle_unusual;
762         }
763         if (input->ExpectAtEnd()) goto success;
764         break;
765       }
766 
767       default: {
768       handle_unusual:
769         if (tag == 0 ||
770             ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
771             ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
772           goto success;
773         }
774         DO_(::google::protobuf::internal::WireFormat::SkipField(
775               input, tag, mutable_unknown_fields()));
776         break;
777       }
778     }
779   }
780 success:
781   // @@protoc_insertion_point(parse_success:io.prometheus.client.Gauge)
782   return true;
783 failure:
784   // @@protoc_insertion_point(parse_failure:io.prometheus.client.Gauge)
785   return false;
786 #undef DO_
787 }
788 
SerializeWithCachedSizes(::google::protobuf::io::CodedOutputStream * output) const789 void Gauge::SerializeWithCachedSizes(
790     ::google::protobuf::io::CodedOutputStream* output) const {
791   // @@protoc_insertion_point(serialize_start:io.prometheus.client.Gauge)
792   // optional double value = 1;
793   if (has_value()) {
794     ::google::protobuf::internal::WireFormatLite::WriteDouble(1, this->value(), output);
795   }
796 
797   if (!unknown_fields().empty()) {
798     ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
799         unknown_fields(), output);
800   }
801   // @@protoc_insertion_point(serialize_end:io.prometheus.client.Gauge)
802 }
803 
SerializeWithCachedSizesToArray(::google::protobuf::uint8 * target) const804 ::google::protobuf::uint8* Gauge::SerializeWithCachedSizesToArray(
805     ::google::protobuf::uint8* target) const {
806   // @@protoc_insertion_point(serialize_to_array_start:io.prometheus.client.Gauge)
807   // optional double value = 1;
808   if (has_value()) {
809     target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(1, this->value(), target);
810   }
811 
812   if (!unknown_fields().empty()) {
813     target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
814         unknown_fields(), target);
815   }
816   // @@protoc_insertion_point(serialize_to_array_end:io.prometheus.client.Gauge)
817   return target;
818 }
819 
ByteSize() const820 int Gauge::ByteSize() const {
821   int total_size = 0;
822 
823   if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
824     // optional double value = 1;
825     if (has_value()) {
826       total_size += 1 + 8;
827     }
828 
829   }
830   if (!unknown_fields().empty()) {
831     total_size +=
832       ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
833         unknown_fields());
834   }
835   GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
836   _cached_size_ = total_size;
837   GOOGLE_SAFE_CONCURRENT_WRITES_END();
838   return total_size;
839 }
840 
MergeFrom(const::google::protobuf::Message & from)841 void Gauge::MergeFrom(const ::google::protobuf::Message& from) {
842   GOOGLE_CHECK_NE(&from, this);
843   const Gauge* source =
844     ::google::protobuf::internal::dynamic_cast_if_available<const Gauge*>(
845       &from);
846   if (source == NULL) {
847     ::google::protobuf::internal::ReflectionOps::Merge(from, this);
848   } else {
849     MergeFrom(*source);
850   }
851 }
852 
MergeFrom(const Gauge & from)853 void Gauge::MergeFrom(const Gauge& from) {
854   GOOGLE_CHECK_NE(&from, this);
855   if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
856     if (from.has_value()) {
857       set_value(from.value());
858     }
859   }
860   mutable_unknown_fields()->MergeFrom(from.unknown_fields());
861 }
862 
CopyFrom(const::google::protobuf::Message & from)863 void Gauge::CopyFrom(const ::google::protobuf::Message& from) {
864   if (&from == this) return;
865   Clear();
866   MergeFrom(from);
867 }
868 
CopyFrom(const Gauge & from)869 void Gauge::CopyFrom(const Gauge& from) {
870   if (&from == this) return;
871   Clear();
872   MergeFrom(from);
873 }
874 
IsInitialized() const875 bool Gauge::IsInitialized() const {
876 
877   return true;
878 }
879 
Swap(Gauge * other)880 void Gauge::Swap(Gauge* other) {
881   if (other != this) {
882     std::swap(value_, other->value_);
883     std::swap(_has_bits_[0], other->_has_bits_[0]);
884     _unknown_fields_.Swap(&other->_unknown_fields_);
885     std::swap(_cached_size_, other->_cached_size_);
886   }
887 }
888 
GetMetadata() const889 ::google::protobuf::Metadata Gauge::GetMetadata() const {
890   protobuf_AssignDescriptorsOnce();
891   ::google::protobuf::Metadata metadata;
892   metadata.descriptor = Gauge_descriptor_;
893   metadata.reflection = Gauge_reflection_;
894   return metadata;
895 }
896 
897 
898 // ===================================================================
899 
900 #ifndef _MSC_VER
901 const int Counter::kValueFieldNumber;
902 #endif  // !_MSC_VER
903 
Counter()904 Counter::Counter()
905   : ::google::protobuf::Message() {
906   SharedCtor();
907   // @@protoc_insertion_point(constructor:io.prometheus.client.Counter)
908 }
909 
InitAsDefaultInstance()910 void Counter::InitAsDefaultInstance() {
911 }
912 
Counter(const Counter & from)913 Counter::Counter(const Counter& from)
914   : ::google::protobuf::Message() {
915   SharedCtor();
916   MergeFrom(from);
917   // @@protoc_insertion_point(copy_constructor:io.prometheus.client.Counter)
918 }
919 
SharedCtor()920 void Counter::SharedCtor() {
921   _cached_size_ = 0;
922   value_ = 0;
923   ::memset(_has_bits_, 0, sizeof(_has_bits_));
924 }
925 
~Counter()926 Counter::~Counter() {
927   // @@protoc_insertion_point(destructor:io.prometheus.client.Counter)
928   SharedDtor();
929 }
930 
SharedDtor()931 void Counter::SharedDtor() {
932   if (this != default_instance_) {
933   }
934 }
935 
SetCachedSize(int size) const936 void Counter::SetCachedSize(int size) const {
937   GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
938   _cached_size_ = size;
939   GOOGLE_SAFE_CONCURRENT_WRITES_END();
940 }
descriptor()941 const ::google::protobuf::Descriptor* Counter::descriptor() {
942   protobuf_AssignDescriptorsOnce();
943   return Counter_descriptor_;
944 }
945 
default_instance()946 const Counter& Counter::default_instance() {
947   if (default_instance_ == NULL) protobuf_AddDesc_metrics_2eproto();
948   return *default_instance_;
949 }
950 
951 Counter* Counter::default_instance_ = NULL;
952 
New() const953 Counter* Counter::New() const {
954   return new Counter;
955 }
956 
Clear()957 void Counter::Clear() {
958   value_ = 0;
959   ::memset(_has_bits_, 0, sizeof(_has_bits_));
960   mutable_unknown_fields()->Clear();
961 }
962 
MergePartialFromCodedStream(::google::protobuf::io::CodedInputStream * input)963 bool Counter::MergePartialFromCodedStream(
964     ::google::protobuf::io::CodedInputStream* input) {
965 #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
966   ::google::protobuf::uint32 tag;
967   // @@protoc_insertion_point(parse_start:io.prometheus.client.Counter)
968   for (;;) {
969     ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
970     tag = p.first;
971     if (!p.second) goto handle_unusual;
972     switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
973       // optional double value = 1;
974       case 1: {
975         if (tag == 9) {
976           DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
977                    double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
978                  input, &value_)));
979           set_has_value();
980         } else {
981           goto handle_unusual;
982         }
983         if (input->ExpectAtEnd()) goto success;
984         break;
985       }
986 
987       default: {
988       handle_unusual:
989         if (tag == 0 ||
990             ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
991             ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
992           goto success;
993         }
994         DO_(::google::protobuf::internal::WireFormat::SkipField(
995               input, tag, mutable_unknown_fields()));
996         break;
997       }
998     }
999   }
1000 success:
1001   // @@protoc_insertion_point(parse_success:io.prometheus.client.Counter)
1002   return true;
1003 failure:
1004   // @@protoc_insertion_point(parse_failure:io.prometheus.client.Counter)
1005   return false;
1006 #undef DO_
1007 }
1008 
SerializeWithCachedSizes(::google::protobuf::io::CodedOutputStream * output) const1009 void Counter::SerializeWithCachedSizes(
1010     ::google::protobuf::io::CodedOutputStream* output) const {
1011   // @@protoc_insertion_point(serialize_start:io.prometheus.client.Counter)
1012   // optional double value = 1;
1013   if (has_value()) {
1014     ::google::protobuf::internal::WireFormatLite::WriteDouble(1, this->value(), output);
1015   }
1016 
1017   if (!unknown_fields().empty()) {
1018     ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
1019         unknown_fields(), output);
1020   }
1021   // @@protoc_insertion_point(serialize_end:io.prometheus.client.Counter)
1022 }
1023 
SerializeWithCachedSizesToArray(::google::protobuf::uint8 * target) const1024 ::google::protobuf::uint8* Counter::SerializeWithCachedSizesToArray(
1025     ::google::protobuf::uint8* target) const {
1026   // @@protoc_insertion_point(serialize_to_array_start:io.prometheus.client.Counter)
1027   // optional double value = 1;
1028   if (has_value()) {
1029     target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(1, this->value(), target);
1030   }
1031 
1032   if (!unknown_fields().empty()) {
1033     target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
1034         unknown_fields(), target);
1035   }
1036   // @@protoc_insertion_point(serialize_to_array_end:io.prometheus.client.Counter)
1037   return target;
1038 }
1039 
ByteSize() const1040 int Counter::ByteSize() const {
1041   int total_size = 0;
1042 
1043   if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
1044     // optional double value = 1;
1045     if (has_value()) {
1046       total_size += 1 + 8;
1047     }
1048 
1049   }
1050   if (!unknown_fields().empty()) {
1051     total_size +=
1052       ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
1053         unknown_fields());
1054   }
1055   GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
1056   _cached_size_ = total_size;
1057   GOOGLE_SAFE_CONCURRENT_WRITES_END();
1058   return total_size;
1059 }
1060 
MergeFrom(const::google::protobuf::Message & from)1061 void Counter::MergeFrom(const ::google::protobuf::Message& from) {
1062   GOOGLE_CHECK_NE(&from, this);
1063   const Counter* source =
1064     ::google::protobuf::internal::dynamic_cast_if_available<const Counter*>(
1065       &from);
1066   if (source == NULL) {
1067     ::google::protobuf::internal::ReflectionOps::Merge(from, this);
1068   } else {
1069     MergeFrom(*source);
1070   }
1071 }
1072 
MergeFrom(const Counter & from)1073 void Counter::MergeFrom(const Counter& from) {
1074   GOOGLE_CHECK_NE(&from, this);
1075   if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
1076     if (from.has_value()) {
1077       set_value(from.value());
1078     }
1079   }
1080   mutable_unknown_fields()->MergeFrom(from.unknown_fields());
1081 }
1082 
CopyFrom(const::google::protobuf::Message & from)1083 void Counter::CopyFrom(const ::google::protobuf::Message& from) {
1084   if (&from == this) return;
1085   Clear();
1086   MergeFrom(from);
1087 }
1088 
CopyFrom(const Counter & from)1089 void Counter::CopyFrom(const Counter& from) {
1090   if (&from == this) return;
1091   Clear();
1092   MergeFrom(from);
1093 }
1094 
IsInitialized() const1095 bool Counter::IsInitialized() const {
1096 
1097   return true;
1098 }
1099 
Swap(Counter * other)1100 void Counter::Swap(Counter* other) {
1101   if (other != this) {
1102     std::swap(value_, other->value_);
1103     std::swap(_has_bits_[0], other->_has_bits_[0]);
1104     _unknown_fields_.Swap(&other->_unknown_fields_);
1105     std::swap(_cached_size_, other->_cached_size_);
1106   }
1107 }
1108 
GetMetadata() const1109 ::google::protobuf::Metadata Counter::GetMetadata() const {
1110   protobuf_AssignDescriptorsOnce();
1111   ::google::protobuf::Metadata metadata;
1112   metadata.descriptor = Counter_descriptor_;
1113   metadata.reflection = Counter_reflection_;
1114   return metadata;
1115 }
1116 
1117 
1118 // ===================================================================
1119 
1120 #ifndef _MSC_VER
1121 const int Quantile::kQuantileFieldNumber;
1122 const int Quantile::kValueFieldNumber;
1123 #endif  // !_MSC_VER
1124 
Quantile()1125 Quantile::Quantile()
1126   : ::google::protobuf::Message() {
1127   SharedCtor();
1128   // @@protoc_insertion_point(constructor:io.prometheus.client.Quantile)
1129 }
1130 
InitAsDefaultInstance()1131 void Quantile::InitAsDefaultInstance() {
1132 }
1133 
Quantile(const Quantile & from)1134 Quantile::Quantile(const Quantile& from)
1135   : ::google::protobuf::Message() {
1136   SharedCtor();
1137   MergeFrom(from);
1138   // @@protoc_insertion_point(copy_constructor:io.prometheus.client.Quantile)
1139 }
1140 
SharedCtor()1141 void Quantile::SharedCtor() {
1142   _cached_size_ = 0;
1143   quantile_ = 0;
1144   value_ = 0;
1145   ::memset(_has_bits_, 0, sizeof(_has_bits_));
1146 }
1147 
~Quantile()1148 Quantile::~Quantile() {
1149   // @@protoc_insertion_point(destructor:io.prometheus.client.Quantile)
1150   SharedDtor();
1151 }
1152 
SharedDtor()1153 void Quantile::SharedDtor() {
1154   if (this != default_instance_) {
1155   }
1156 }
1157 
SetCachedSize(int size) const1158 void Quantile::SetCachedSize(int size) const {
1159   GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
1160   _cached_size_ = size;
1161   GOOGLE_SAFE_CONCURRENT_WRITES_END();
1162 }
descriptor()1163 const ::google::protobuf::Descriptor* Quantile::descriptor() {
1164   protobuf_AssignDescriptorsOnce();
1165   return Quantile_descriptor_;
1166 }
1167 
default_instance()1168 const Quantile& Quantile::default_instance() {
1169   if (default_instance_ == NULL) protobuf_AddDesc_metrics_2eproto();
1170   return *default_instance_;
1171 }
1172 
1173 Quantile* Quantile::default_instance_ = NULL;
1174 
New() const1175 Quantile* Quantile::New() const {
1176   return new Quantile;
1177 }
1178 
Clear()1179 void Quantile::Clear() {
1180 #define OFFSET_OF_FIELD_(f) (reinterpret_cast<char*>(      \
1181   &reinterpret_cast<Quantile*>(16)->f) - \
1182    reinterpret_cast<char*>(16))
1183 
1184 #define ZR_(first, last) do {                              \
1185     size_t f = OFFSET_OF_FIELD_(first);                    \
1186     size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last);  \
1187     ::memset(&first, 0, n);                                \
1188   } while (0)
1189 
1190   ZR_(quantile_, value_);
1191 
1192 #undef OFFSET_OF_FIELD_
1193 #undef ZR_
1194 
1195   ::memset(_has_bits_, 0, sizeof(_has_bits_));
1196   mutable_unknown_fields()->Clear();
1197 }
1198 
MergePartialFromCodedStream(::google::protobuf::io::CodedInputStream * input)1199 bool Quantile::MergePartialFromCodedStream(
1200     ::google::protobuf::io::CodedInputStream* input) {
1201 #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
1202   ::google::protobuf::uint32 tag;
1203   // @@protoc_insertion_point(parse_start:io.prometheus.client.Quantile)
1204   for (;;) {
1205     ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
1206     tag = p.first;
1207     if (!p.second) goto handle_unusual;
1208     switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
1209       // optional double quantile = 1;
1210       case 1: {
1211         if (tag == 9) {
1212           DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
1213                    double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
1214                  input, &quantile_)));
1215           set_has_quantile();
1216         } else {
1217           goto handle_unusual;
1218         }
1219         if (input->ExpectTag(17)) goto parse_value;
1220         break;
1221       }
1222 
1223       // optional double value = 2;
1224       case 2: {
1225         if (tag == 17) {
1226          parse_value:
1227           DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
1228                    double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
1229                  input, &value_)));
1230           set_has_value();
1231         } else {
1232           goto handle_unusual;
1233         }
1234         if (input->ExpectAtEnd()) goto success;
1235         break;
1236       }
1237 
1238       default: {
1239       handle_unusual:
1240         if (tag == 0 ||
1241             ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
1242             ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
1243           goto success;
1244         }
1245         DO_(::google::protobuf::internal::WireFormat::SkipField(
1246               input, tag, mutable_unknown_fields()));
1247         break;
1248       }
1249     }
1250   }
1251 success:
1252   // @@protoc_insertion_point(parse_success:io.prometheus.client.Quantile)
1253   return true;
1254 failure:
1255   // @@protoc_insertion_point(parse_failure:io.prometheus.client.Quantile)
1256   return false;
1257 #undef DO_
1258 }
1259 
SerializeWithCachedSizes(::google::protobuf::io::CodedOutputStream * output) const1260 void Quantile::SerializeWithCachedSizes(
1261     ::google::protobuf::io::CodedOutputStream* output) const {
1262   // @@protoc_insertion_point(serialize_start:io.prometheus.client.Quantile)
1263   // optional double quantile = 1;
1264   if (has_quantile()) {
1265     ::google::protobuf::internal::WireFormatLite::WriteDouble(1, this->quantile(), output);
1266   }
1267 
1268   // optional double value = 2;
1269   if (has_value()) {
1270     ::google::protobuf::internal::WireFormatLite::WriteDouble(2, this->value(), output);
1271   }
1272 
1273   if (!unknown_fields().empty()) {
1274     ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
1275         unknown_fields(), output);
1276   }
1277   // @@protoc_insertion_point(serialize_end:io.prometheus.client.Quantile)
1278 }
1279 
SerializeWithCachedSizesToArray(::google::protobuf::uint8 * target) const1280 ::google::protobuf::uint8* Quantile::SerializeWithCachedSizesToArray(
1281     ::google::protobuf::uint8* target) const {
1282   // @@protoc_insertion_point(serialize_to_array_start:io.prometheus.client.Quantile)
1283   // optional double quantile = 1;
1284   if (has_quantile()) {
1285     target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(1, this->quantile(), target);
1286   }
1287 
1288   // optional double value = 2;
1289   if (has_value()) {
1290     target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(2, this->value(), target);
1291   }
1292 
1293   if (!unknown_fields().empty()) {
1294     target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
1295         unknown_fields(), target);
1296   }
1297   // @@protoc_insertion_point(serialize_to_array_end:io.prometheus.client.Quantile)
1298   return target;
1299 }
1300 
ByteSize() const1301 int Quantile::ByteSize() const {
1302   int total_size = 0;
1303 
1304   if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
1305     // optional double quantile = 1;
1306     if (has_quantile()) {
1307       total_size += 1 + 8;
1308     }
1309 
1310     // optional double value = 2;
1311     if (has_value()) {
1312       total_size += 1 + 8;
1313     }
1314 
1315   }
1316   if (!unknown_fields().empty()) {
1317     total_size +=
1318       ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
1319         unknown_fields());
1320   }
1321   GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
1322   _cached_size_ = total_size;
1323   GOOGLE_SAFE_CONCURRENT_WRITES_END();
1324   return total_size;
1325 }
1326 
MergeFrom(const::google::protobuf::Message & from)1327 void Quantile::MergeFrom(const ::google::protobuf::Message& from) {
1328   GOOGLE_CHECK_NE(&from, this);
1329   const Quantile* source =
1330     ::google::protobuf::internal::dynamic_cast_if_available<const Quantile*>(
1331       &from);
1332   if (source == NULL) {
1333     ::google::protobuf::internal::ReflectionOps::Merge(from, this);
1334   } else {
1335     MergeFrom(*source);
1336   }
1337 }
1338 
MergeFrom(const Quantile & from)1339 void Quantile::MergeFrom(const Quantile& from) {
1340   GOOGLE_CHECK_NE(&from, this);
1341   if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
1342     if (from.has_quantile()) {
1343       set_quantile(from.quantile());
1344     }
1345     if (from.has_value()) {
1346       set_value(from.value());
1347     }
1348   }
1349   mutable_unknown_fields()->MergeFrom(from.unknown_fields());
1350 }
1351 
CopyFrom(const::google::protobuf::Message & from)1352 void Quantile::CopyFrom(const ::google::protobuf::Message& from) {
1353   if (&from == this) return;
1354   Clear();
1355   MergeFrom(from);
1356 }
1357 
CopyFrom(const Quantile & from)1358 void Quantile::CopyFrom(const Quantile& from) {
1359   if (&from == this) return;
1360   Clear();
1361   MergeFrom(from);
1362 }
1363 
IsInitialized() const1364 bool Quantile::IsInitialized() const {
1365 
1366   return true;
1367 }
1368 
Swap(Quantile * other)1369 void Quantile::Swap(Quantile* other) {
1370   if (other != this) {
1371     std::swap(quantile_, other->quantile_);
1372     std::swap(value_, other->value_);
1373     std::swap(_has_bits_[0], other->_has_bits_[0]);
1374     _unknown_fields_.Swap(&other->_unknown_fields_);
1375     std::swap(_cached_size_, other->_cached_size_);
1376   }
1377 }
1378 
GetMetadata() const1379 ::google::protobuf::Metadata Quantile::GetMetadata() const {
1380   protobuf_AssignDescriptorsOnce();
1381   ::google::protobuf::Metadata metadata;
1382   metadata.descriptor = Quantile_descriptor_;
1383   metadata.reflection = Quantile_reflection_;
1384   return metadata;
1385 }
1386 
1387 
1388 // ===================================================================
1389 
1390 #ifndef _MSC_VER
1391 const int Summary::kSampleCountFieldNumber;
1392 const int Summary::kSampleSumFieldNumber;
1393 const int Summary::kQuantileFieldNumber;
1394 #endif  // !_MSC_VER
1395 
Summary()1396 Summary::Summary()
1397   : ::google::protobuf::Message() {
1398   SharedCtor();
1399   // @@protoc_insertion_point(constructor:io.prometheus.client.Summary)
1400 }
1401 
InitAsDefaultInstance()1402 void Summary::InitAsDefaultInstance() {
1403 }
1404 
Summary(const Summary & from)1405 Summary::Summary(const Summary& from)
1406   : ::google::protobuf::Message() {
1407   SharedCtor();
1408   MergeFrom(from);
1409   // @@protoc_insertion_point(copy_constructor:io.prometheus.client.Summary)
1410 }
1411 
SharedCtor()1412 void Summary::SharedCtor() {
1413   _cached_size_ = 0;
1414   sample_count_ = GOOGLE_ULONGLONG(0);
1415   sample_sum_ = 0;
1416   ::memset(_has_bits_, 0, sizeof(_has_bits_));
1417 }
1418 
~Summary()1419 Summary::~Summary() {
1420   // @@protoc_insertion_point(destructor:io.prometheus.client.Summary)
1421   SharedDtor();
1422 }
1423 
SharedDtor()1424 void Summary::SharedDtor() {
1425   if (this != default_instance_) {
1426   }
1427 }
1428 
SetCachedSize(int size) const1429 void Summary::SetCachedSize(int size) const {
1430   GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
1431   _cached_size_ = size;
1432   GOOGLE_SAFE_CONCURRENT_WRITES_END();
1433 }
descriptor()1434 const ::google::protobuf::Descriptor* Summary::descriptor() {
1435   protobuf_AssignDescriptorsOnce();
1436   return Summary_descriptor_;
1437 }
1438 
default_instance()1439 const Summary& Summary::default_instance() {
1440   if (default_instance_ == NULL) protobuf_AddDesc_metrics_2eproto();
1441   return *default_instance_;
1442 }
1443 
1444 Summary* Summary::default_instance_ = NULL;
1445 
New() const1446 Summary* Summary::New() const {
1447   return new Summary;
1448 }
1449 
Clear()1450 void Summary::Clear() {
1451 #define OFFSET_OF_FIELD_(f) (reinterpret_cast<char*>(      \
1452   &reinterpret_cast<Summary*>(16)->f) - \
1453    reinterpret_cast<char*>(16))
1454 
1455 #define ZR_(first, last) do {                              \
1456     size_t f = OFFSET_OF_FIELD_(first);                    \
1457     size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last);  \
1458     ::memset(&first, 0, n);                                \
1459   } while (0)
1460 
1461   ZR_(sample_count_, sample_sum_);
1462 
1463 #undef OFFSET_OF_FIELD_
1464 #undef ZR_
1465 
1466   quantile_.Clear();
1467   ::memset(_has_bits_, 0, sizeof(_has_bits_));
1468   mutable_unknown_fields()->Clear();
1469 }
1470 
MergePartialFromCodedStream(::google::protobuf::io::CodedInputStream * input)1471 bool Summary::MergePartialFromCodedStream(
1472     ::google::protobuf::io::CodedInputStream* input) {
1473 #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
1474   ::google::protobuf::uint32 tag;
1475   // @@protoc_insertion_point(parse_start:io.prometheus.client.Summary)
1476   for (;;) {
1477     ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
1478     tag = p.first;
1479     if (!p.second) goto handle_unusual;
1480     switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
1481       // optional uint64 sample_count = 1;
1482       case 1: {
1483         if (tag == 8) {
1484           DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
1485                    ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
1486                  input, &sample_count_)));
1487           set_has_sample_count();
1488         } else {
1489           goto handle_unusual;
1490         }
1491         if (input->ExpectTag(17)) goto parse_sample_sum;
1492         break;
1493       }
1494 
1495       // optional double sample_sum = 2;
1496       case 2: {
1497         if (tag == 17) {
1498          parse_sample_sum:
1499           DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
1500                    double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
1501                  input, &sample_sum_)));
1502           set_has_sample_sum();
1503         } else {
1504           goto handle_unusual;
1505         }
1506         if (input->ExpectTag(26)) goto parse_quantile;
1507         break;
1508       }
1509 
1510       // repeated .io.prometheus.client.Quantile quantile = 3;
1511       case 3: {
1512         if (tag == 26) {
1513          parse_quantile:
1514           DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
1515                 input, add_quantile()));
1516         } else {
1517           goto handle_unusual;
1518         }
1519         if (input->ExpectTag(26)) goto parse_quantile;
1520         if (input->ExpectAtEnd()) goto success;
1521         break;
1522       }
1523 
1524       default: {
1525       handle_unusual:
1526         if (tag == 0 ||
1527             ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
1528             ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
1529           goto success;
1530         }
1531         DO_(::google::protobuf::internal::WireFormat::SkipField(
1532               input, tag, mutable_unknown_fields()));
1533         break;
1534       }
1535     }
1536   }
1537 success:
1538   // @@protoc_insertion_point(parse_success:io.prometheus.client.Summary)
1539   return true;
1540 failure:
1541   // @@protoc_insertion_point(parse_failure:io.prometheus.client.Summary)
1542   return false;
1543 #undef DO_
1544 }
1545 
SerializeWithCachedSizes(::google::protobuf::io::CodedOutputStream * output) const1546 void Summary::SerializeWithCachedSizes(
1547     ::google::protobuf::io::CodedOutputStream* output) const {
1548   // @@protoc_insertion_point(serialize_start:io.prometheus.client.Summary)
1549   // optional uint64 sample_count = 1;
1550   if (has_sample_count()) {
1551     ::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->sample_count(), output);
1552   }
1553 
1554   // optional double sample_sum = 2;
1555   if (has_sample_sum()) {
1556     ::google::protobuf::internal::WireFormatLite::WriteDouble(2, this->sample_sum(), output);
1557   }
1558 
1559   // repeated .io.prometheus.client.Quantile quantile = 3;
1560   for (int i = 0; i < this->quantile_size(); i++) {
1561     ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1562       3, this->quantile(i), output);
1563   }
1564 
1565   if (!unknown_fields().empty()) {
1566     ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
1567         unknown_fields(), output);
1568   }
1569   // @@protoc_insertion_point(serialize_end:io.prometheus.client.Summary)
1570 }
1571 
SerializeWithCachedSizesToArray(::google::protobuf::uint8 * target) const1572 ::google::protobuf::uint8* Summary::SerializeWithCachedSizesToArray(
1573     ::google::protobuf::uint8* target) const {
1574   // @@protoc_insertion_point(serialize_to_array_start:io.prometheus.client.Summary)
1575   // optional uint64 sample_count = 1;
1576   if (has_sample_count()) {
1577     target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(1, this->sample_count(), target);
1578   }
1579 
1580   // optional double sample_sum = 2;
1581   if (has_sample_sum()) {
1582     target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(2, this->sample_sum(), target);
1583   }
1584 
1585   // repeated .io.prometheus.client.Quantile quantile = 3;
1586   for (int i = 0; i < this->quantile_size(); i++) {
1587     target = ::google::protobuf::internal::WireFormatLite::
1588       WriteMessageNoVirtualToArray(
1589         3, this->quantile(i), target);
1590   }
1591 
1592   if (!unknown_fields().empty()) {
1593     target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
1594         unknown_fields(), target);
1595   }
1596   // @@protoc_insertion_point(serialize_to_array_end:io.prometheus.client.Summary)
1597   return target;
1598 }
1599 
ByteSize() const1600 int Summary::ByteSize() const {
1601   int total_size = 0;
1602 
1603   if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
1604     // optional uint64 sample_count = 1;
1605     if (has_sample_count()) {
1606       total_size += 1 +
1607         ::google::protobuf::internal::WireFormatLite::UInt64Size(
1608           this->sample_count());
1609     }
1610 
1611     // optional double sample_sum = 2;
1612     if (has_sample_sum()) {
1613       total_size += 1 + 8;
1614     }
1615 
1616   }
1617   // repeated .io.prometheus.client.Quantile quantile = 3;
1618   total_size += 1 * this->quantile_size();
1619   for (int i = 0; i < this->quantile_size(); i++) {
1620     total_size +=
1621       ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
1622         this->quantile(i));
1623   }
1624 
1625   if (!unknown_fields().empty()) {
1626     total_size +=
1627       ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
1628         unknown_fields());
1629   }
1630   GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
1631   _cached_size_ = total_size;
1632   GOOGLE_SAFE_CONCURRENT_WRITES_END();
1633   return total_size;
1634 }
1635 
MergeFrom(const::google::protobuf::Message & from)1636 void Summary::MergeFrom(const ::google::protobuf::Message& from) {
1637   GOOGLE_CHECK_NE(&from, this);
1638   const Summary* source =
1639     ::google::protobuf::internal::dynamic_cast_if_available<const Summary*>(
1640       &from);
1641   if (source == NULL) {
1642     ::google::protobuf::internal::ReflectionOps::Merge(from, this);
1643   } else {
1644     MergeFrom(*source);
1645   }
1646 }
1647 
MergeFrom(const Summary & from)1648 void Summary::MergeFrom(const Summary& from) {
1649   GOOGLE_CHECK_NE(&from, this);
1650   quantile_.MergeFrom(from.quantile_);
1651   if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
1652     if (from.has_sample_count()) {
1653       set_sample_count(from.sample_count());
1654     }
1655     if (from.has_sample_sum()) {
1656       set_sample_sum(from.sample_sum());
1657     }
1658   }
1659   mutable_unknown_fields()->MergeFrom(from.unknown_fields());
1660 }
1661 
CopyFrom(const::google::protobuf::Message & from)1662 void Summary::CopyFrom(const ::google::protobuf::Message& from) {
1663   if (&from == this) return;
1664   Clear();
1665   MergeFrom(from);
1666 }
1667 
CopyFrom(const Summary & from)1668 void Summary::CopyFrom(const Summary& from) {
1669   if (&from == this) return;
1670   Clear();
1671   MergeFrom(from);
1672 }
1673 
IsInitialized() const1674 bool Summary::IsInitialized() const {
1675 
1676   return true;
1677 }
1678 
Swap(Summary * other)1679 void Summary::Swap(Summary* other) {
1680   if (other != this) {
1681     std::swap(sample_count_, other->sample_count_);
1682     std::swap(sample_sum_, other->sample_sum_);
1683     quantile_.Swap(&other->quantile_);
1684     std::swap(_has_bits_[0], other->_has_bits_[0]);
1685     _unknown_fields_.Swap(&other->_unknown_fields_);
1686     std::swap(_cached_size_, other->_cached_size_);
1687   }
1688 }
1689 
GetMetadata() const1690 ::google::protobuf::Metadata Summary::GetMetadata() const {
1691   protobuf_AssignDescriptorsOnce();
1692   ::google::protobuf::Metadata metadata;
1693   metadata.descriptor = Summary_descriptor_;
1694   metadata.reflection = Summary_reflection_;
1695   return metadata;
1696 }
1697 
1698 
1699 // ===================================================================
1700 
1701 #ifndef _MSC_VER
1702 const int Untyped::kValueFieldNumber;
1703 #endif  // !_MSC_VER
1704 
Untyped()1705 Untyped::Untyped()
1706   : ::google::protobuf::Message() {
1707   SharedCtor();
1708   // @@protoc_insertion_point(constructor:io.prometheus.client.Untyped)
1709 }
1710 
InitAsDefaultInstance()1711 void Untyped::InitAsDefaultInstance() {
1712 }
1713 
Untyped(const Untyped & from)1714 Untyped::Untyped(const Untyped& from)
1715   : ::google::protobuf::Message() {
1716   SharedCtor();
1717   MergeFrom(from);
1718   // @@protoc_insertion_point(copy_constructor:io.prometheus.client.Untyped)
1719 }
1720 
SharedCtor()1721 void Untyped::SharedCtor() {
1722   _cached_size_ = 0;
1723   value_ = 0;
1724   ::memset(_has_bits_, 0, sizeof(_has_bits_));
1725 }
1726 
~Untyped()1727 Untyped::~Untyped() {
1728   // @@protoc_insertion_point(destructor:io.prometheus.client.Untyped)
1729   SharedDtor();
1730 }
1731 
SharedDtor()1732 void Untyped::SharedDtor() {
1733   if (this != default_instance_) {
1734   }
1735 }
1736 
SetCachedSize(int size) const1737 void Untyped::SetCachedSize(int size) const {
1738   GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
1739   _cached_size_ = size;
1740   GOOGLE_SAFE_CONCURRENT_WRITES_END();
1741 }
descriptor()1742 const ::google::protobuf::Descriptor* Untyped::descriptor() {
1743   protobuf_AssignDescriptorsOnce();
1744   return Untyped_descriptor_;
1745 }
1746 
default_instance()1747 const Untyped& Untyped::default_instance() {
1748   if (default_instance_ == NULL) protobuf_AddDesc_metrics_2eproto();
1749   return *default_instance_;
1750 }
1751 
1752 Untyped* Untyped::default_instance_ = NULL;
1753 
New() const1754 Untyped* Untyped::New() const {
1755   return new Untyped;
1756 }
1757 
Clear()1758 void Untyped::Clear() {
1759   value_ = 0;
1760   ::memset(_has_bits_, 0, sizeof(_has_bits_));
1761   mutable_unknown_fields()->Clear();
1762 }
1763 
MergePartialFromCodedStream(::google::protobuf::io::CodedInputStream * input)1764 bool Untyped::MergePartialFromCodedStream(
1765     ::google::protobuf::io::CodedInputStream* input) {
1766 #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
1767   ::google::protobuf::uint32 tag;
1768   // @@protoc_insertion_point(parse_start:io.prometheus.client.Untyped)
1769   for (;;) {
1770     ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
1771     tag = p.first;
1772     if (!p.second) goto handle_unusual;
1773     switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
1774       // optional double value = 1;
1775       case 1: {
1776         if (tag == 9) {
1777           DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
1778                    double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
1779                  input, &value_)));
1780           set_has_value();
1781         } else {
1782           goto handle_unusual;
1783         }
1784         if (input->ExpectAtEnd()) goto success;
1785         break;
1786       }
1787 
1788       default: {
1789       handle_unusual:
1790         if (tag == 0 ||
1791             ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
1792             ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
1793           goto success;
1794         }
1795         DO_(::google::protobuf::internal::WireFormat::SkipField(
1796               input, tag, mutable_unknown_fields()));
1797         break;
1798       }
1799     }
1800   }
1801 success:
1802   // @@protoc_insertion_point(parse_success:io.prometheus.client.Untyped)
1803   return true;
1804 failure:
1805   // @@protoc_insertion_point(parse_failure:io.prometheus.client.Untyped)
1806   return false;
1807 #undef DO_
1808 }
1809 
SerializeWithCachedSizes(::google::protobuf::io::CodedOutputStream * output) const1810 void Untyped::SerializeWithCachedSizes(
1811     ::google::protobuf::io::CodedOutputStream* output) const {
1812   // @@protoc_insertion_point(serialize_start:io.prometheus.client.Untyped)
1813   // optional double value = 1;
1814   if (has_value()) {
1815     ::google::protobuf::internal::WireFormatLite::WriteDouble(1, this->value(), output);
1816   }
1817 
1818   if (!unknown_fields().empty()) {
1819     ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
1820         unknown_fields(), output);
1821   }
1822   // @@protoc_insertion_point(serialize_end:io.prometheus.client.Untyped)
1823 }
1824 
SerializeWithCachedSizesToArray(::google::protobuf::uint8 * target) const1825 ::google::protobuf::uint8* Untyped::SerializeWithCachedSizesToArray(
1826     ::google::protobuf::uint8* target) const {
1827   // @@protoc_insertion_point(serialize_to_array_start:io.prometheus.client.Untyped)
1828   // optional double value = 1;
1829   if (has_value()) {
1830     target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(1, this->value(), target);
1831   }
1832 
1833   if (!unknown_fields().empty()) {
1834     target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
1835         unknown_fields(), target);
1836   }
1837   // @@protoc_insertion_point(serialize_to_array_end:io.prometheus.client.Untyped)
1838   return target;
1839 }
1840 
ByteSize() const1841 int Untyped::ByteSize() const {
1842   int total_size = 0;
1843 
1844   if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
1845     // optional double value = 1;
1846     if (has_value()) {
1847       total_size += 1 + 8;
1848     }
1849 
1850   }
1851   if (!unknown_fields().empty()) {
1852     total_size +=
1853       ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
1854         unknown_fields());
1855   }
1856   GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
1857   _cached_size_ = total_size;
1858   GOOGLE_SAFE_CONCURRENT_WRITES_END();
1859   return total_size;
1860 }
1861 
MergeFrom(const::google::protobuf::Message & from)1862 void Untyped::MergeFrom(const ::google::protobuf::Message& from) {
1863   GOOGLE_CHECK_NE(&from, this);
1864   const Untyped* source =
1865     ::google::protobuf::internal::dynamic_cast_if_available<const Untyped*>(
1866       &from);
1867   if (source == NULL) {
1868     ::google::protobuf::internal::ReflectionOps::Merge(from, this);
1869   } else {
1870     MergeFrom(*source);
1871   }
1872 }
1873 
MergeFrom(const Untyped & from)1874 void Untyped::MergeFrom(const Untyped& from) {
1875   GOOGLE_CHECK_NE(&from, this);
1876   if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
1877     if (from.has_value()) {
1878       set_value(from.value());
1879     }
1880   }
1881   mutable_unknown_fields()->MergeFrom(from.unknown_fields());
1882 }
1883 
CopyFrom(const::google::protobuf::Message & from)1884 void Untyped::CopyFrom(const ::google::protobuf::Message& from) {
1885   if (&from == this) return;
1886   Clear();
1887   MergeFrom(from);
1888 }
1889 
CopyFrom(const Untyped & from)1890 void Untyped::CopyFrom(const Untyped& from) {
1891   if (&from == this) return;
1892   Clear();
1893   MergeFrom(from);
1894 }
1895 
IsInitialized() const1896 bool Untyped::IsInitialized() const {
1897 
1898   return true;
1899 }
1900 
Swap(Untyped * other)1901 void Untyped::Swap(Untyped* other) {
1902   if (other != this) {
1903     std::swap(value_, other->value_);
1904     std::swap(_has_bits_[0], other->_has_bits_[0]);
1905     _unknown_fields_.Swap(&other->_unknown_fields_);
1906     std::swap(_cached_size_, other->_cached_size_);
1907   }
1908 }
1909 
GetMetadata() const1910 ::google::protobuf::Metadata Untyped::GetMetadata() const {
1911   protobuf_AssignDescriptorsOnce();
1912   ::google::protobuf::Metadata metadata;
1913   metadata.descriptor = Untyped_descriptor_;
1914   metadata.reflection = Untyped_reflection_;
1915   return metadata;
1916 }
1917 
1918 
1919 // ===================================================================
1920 
1921 #ifndef _MSC_VER
1922 const int Histogram::kSampleCountFieldNumber;
1923 const int Histogram::kSampleSumFieldNumber;
1924 const int Histogram::kBucketFieldNumber;
1925 #endif  // !_MSC_VER
1926 
Histogram()1927 Histogram::Histogram()
1928   : ::google::protobuf::Message() {
1929   SharedCtor();
1930   // @@protoc_insertion_point(constructor:io.prometheus.client.Histogram)
1931 }
1932 
InitAsDefaultInstance()1933 void Histogram::InitAsDefaultInstance() {
1934 }
1935 
Histogram(const Histogram & from)1936 Histogram::Histogram(const Histogram& from)
1937   : ::google::protobuf::Message() {
1938   SharedCtor();
1939   MergeFrom(from);
1940   // @@protoc_insertion_point(copy_constructor:io.prometheus.client.Histogram)
1941 }
1942 
SharedCtor()1943 void Histogram::SharedCtor() {
1944   _cached_size_ = 0;
1945   sample_count_ = GOOGLE_ULONGLONG(0);
1946   sample_sum_ = 0;
1947   ::memset(_has_bits_, 0, sizeof(_has_bits_));
1948 }
1949 
~Histogram()1950 Histogram::~Histogram() {
1951   // @@protoc_insertion_point(destructor:io.prometheus.client.Histogram)
1952   SharedDtor();
1953 }
1954 
SharedDtor()1955 void Histogram::SharedDtor() {
1956   if (this != default_instance_) {
1957   }
1958 }
1959 
SetCachedSize(int size) const1960 void Histogram::SetCachedSize(int size) const {
1961   GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
1962   _cached_size_ = size;
1963   GOOGLE_SAFE_CONCURRENT_WRITES_END();
1964 }
descriptor()1965 const ::google::protobuf::Descriptor* Histogram::descriptor() {
1966   protobuf_AssignDescriptorsOnce();
1967   return Histogram_descriptor_;
1968 }
1969 
default_instance()1970 const Histogram& Histogram::default_instance() {
1971   if (default_instance_ == NULL) protobuf_AddDesc_metrics_2eproto();
1972   return *default_instance_;
1973 }
1974 
1975 Histogram* Histogram::default_instance_ = NULL;
1976 
New() const1977 Histogram* Histogram::New() const {
1978   return new Histogram;
1979 }
1980 
Clear()1981 void Histogram::Clear() {
1982 #define OFFSET_OF_FIELD_(f) (reinterpret_cast<char*>(      \
1983   &reinterpret_cast<Histogram*>(16)->f) - \
1984    reinterpret_cast<char*>(16))
1985 
1986 #define ZR_(first, last) do {                              \
1987     size_t f = OFFSET_OF_FIELD_(first);                    \
1988     size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last);  \
1989     ::memset(&first, 0, n);                                \
1990   } while (0)
1991 
1992   ZR_(sample_count_, sample_sum_);
1993 
1994 #undef OFFSET_OF_FIELD_
1995 #undef ZR_
1996 
1997   bucket_.Clear();
1998   ::memset(_has_bits_, 0, sizeof(_has_bits_));
1999   mutable_unknown_fields()->Clear();
2000 }
2001 
MergePartialFromCodedStream(::google::protobuf::io::CodedInputStream * input)2002 bool Histogram::MergePartialFromCodedStream(
2003     ::google::protobuf::io::CodedInputStream* input) {
2004 #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
2005   ::google::protobuf::uint32 tag;
2006   // @@protoc_insertion_point(parse_start:io.prometheus.client.Histogram)
2007   for (;;) {
2008     ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
2009     tag = p.first;
2010     if (!p.second) goto handle_unusual;
2011     switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
2012       // optional uint64 sample_count = 1;
2013       case 1: {
2014         if (tag == 8) {
2015           DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
2016                    ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
2017                  input, &sample_count_)));
2018           set_has_sample_count();
2019         } else {
2020           goto handle_unusual;
2021         }
2022         if (input->ExpectTag(17)) goto parse_sample_sum;
2023         break;
2024       }
2025 
2026       // optional double sample_sum = 2;
2027       case 2: {
2028         if (tag == 17) {
2029          parse_sample_sum:
2030           DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
2031                    double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
2032                  input, &sample_sum_)));
2033           set_has_sample_sum();
2034         } else {
2035           goto handle_unusual;
2036         }
2037         if (input->ExpectTag(26)) goto parse_bucket;
2038         break;
2039       }
2040 
2041       // repeated .io.prometheus.client.Bucket bucket = 3;
2042       case 3: {
2043         if (tag == 26) {
2044          parse_bucket:
2045           DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
2046                 input, add_bucket()));
2047         } else {
2048           goto handle_unusual;
2049         }
2050         if (input->ExpectTag(26)) goto parse_bucket;
2051         if (input->ExpectAtEnd()) goto success;
2052         break;
2053       }
2054 
2055       default: {
2056       handle_unusual:
2057         if (tag == 0 ||
2058             ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
2059             ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
2060           goto success;
2061         }
2062         DO_(::google::protobuf::internal::WireFormat::SkipField(
2063               input, tag, mutable_unknown_fields()));
2064         break;
2065       }
2066     }
2067   }
2068 success:
2069   // @@protoc_insertion_point(parse_success:io.prometheus.client.Histogram)
2070   return true;
2071 failure:
2072   // @@protoc_insertion_point(parse_failure:io.prometheus.client.Histogram)
2073   return false;
2074 #undef DO_
2075 }
2076 
SerializeWithCachedSizes(::google::protobuf::io::CodedOutputStream * output) const2077 void Histogram::SerializeWithCachedSizes(
2078     ::google::protobuf::io::CodedOutputStream* output) const {
2079   // @@protoc_insertion_point(serialize_start:io.prometheus.client.Histogram)
2080   // optional uint64 sample_count = 1;
2081   if (has_sample_count()) {
2082     ::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->sample_count(), output);
2083   }
2084 
2085   // optional double sample_sum = 2;
2086   if (has_sample_sum()) {
2087     ::google::protobuf::internal::WireFormatLite::WriteDouble(2, this->sample_sum(), output);
2088   }
2089 
2090   // repeated .io.prometheus.client.Bucket bucket = 3;
2091   for (int i = 0; i < this->bucket_size(); i++) {
2092     ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
2093       3, this->bucket(i), output);
2094   }
2095 
2096   if (!unknown_fields().empty()) {
2097     ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
2098         unknown_fields(), output);
2099   }
2100   // @@protoc_insertion_point(serialize_end:io.prometheus.client.Histogram)
2101 }
2102 
SerializeWithCachedSizesToArray(::google::protobuf::uint8 * target) const2103 ::google::protobuf::uint8* Histogram::SerializeWithCachedSizesToArray(
2104     ::google::protobuf::uint8* target) const {
2105   // @@protoc_insertion_point(serialize_to_array_start:io.prometheus.client.Histogram)
2106   // optional uint64 sample_count = 1;
2107   if (has_sample_count()) {
2108     target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(1, this->sample_count(), target);
2109   }
2110 
2111   // optional double sample_sum = 2;
2112   if (has_sample_sum()) {
2113     target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(2, this->sample_sum(), target);
2114   }
2115 
2116   // repeated .io.prometheus.client.Bucket bucket = 3;
2117   for (int i = 0; i < this->bucket_size(); i++) {
2118     target = ::google::protobuf::internal::WireFormatLite::
2119       WriteMessageNoVirtualToArray(
2120         3, this->bucket(i), target);
2121   }
2122 
2123   if (!unknown_fields().empty()) {
2124     target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
2125         unknown_fields(), target);
2126   }
2127   // @@protoc_insertion_point(serialize_to_array_end:io.prometheus.client.Histogram)
2128   return target;
2129 }
2130 
ByteSize() const2131 int Histogram::ByteSize() const {
2132   int total_size = 0;
2133 
2134   if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
2135     // optional uint64 sample_count = 1;
2136     if (has_sample_count()) {
2137       total_size += 1 +
2138         ::google::protobuf::internal::WireFormatLite::UInt64Size(
2139           this->sample_count());
2140     }
2141 
2142     // optional double sample_sum = 2;
2143     if (has_sample_sum()) {
2144       total_size += 1 + 8;
2145     }
2146 
2147   }
2148   // repeated .io.prometheus.client.Bucket bucket = 3;
2149   total_size += 1 * this->bucket_size();
2150   for (int i = 0; i < this->bucket_size(); i++) {
2151     total_size +=
2152       ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
2153         this->bucket(i));
2154   }
2155 
2156   if (!unknown_fields().empty()) {
2157     total_size +=
2158       ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
2159         unknown_fields());
2160   }
2161   GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
2162   _cached_size_ = total_size;
2163   GOOGLE_SAFE_CONCURRENT_WRITES_END();
2164   return total_size;
2165 }
2166 
MergeFrom(const::google::protobuf::Message & from)2167 void Histogram::MergeFrom(const ::google::protobuf::Message& from) {
2168   GOOGLE_CHECK_NE(&from, this);
2169   const Histogram* source =
2170     ::google::protobuf::internal::dynamic_cast_if_available<const Histogram*>(
2171       &from);
2172   if (source == NULL) {
2173     ::google::protobuf::internal::ReflectionOps::Merge(from, this);
2174   } else {
2175     MergeFrom(*source);
2176   }
2177 }
2178 
MergeFrom(const Histogram & from)2179 void Histogram::MergeFrom(const Histogram& from) {
2180   GOOGLE_CHECK_NE(&from, this);
2181   bucket_.MergeFrom(from.bucket_);
2182   if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
2183     if (from.has_sample_count()) {
2184       set_sample_count(from.sample_count());
2185     }
2186     if (from.has_sample_sum()) {
2187       set_sample_sum(from.sample_sum());
2188     }
2189   }
2190   mutable_unknown_fields()->MergeFrom(from.unknown_fields());
2191 }
2192 
CopyFrom(const::google::protobuf::Message & from)2193 void Histogram::CopyFrom(const ::google::protobuf::Message& from) {
2194   if (&from == this) return;
2195   Clear();
2196   MergeFrom(from);
2197 }
2198 
CopyFrom(const Histogram & from)2199 void Histogram::CopyFrom(const Histogram& from) {
2200   if (&from == this) return;
2201   Clear();
2202   MergeFrom(from);
2203 }
2204 
IsInitialized() const2205 bool Histogram::IsInitialized() const {
2206 
2207   return true;
2208 }
2209 
Swap(Histogram * other)2210 void Histogram::Swap(Histogram* other) {
2211   if (other != this) {
2212     std::swap(sample_count_, other->sample_count_);
2213     std::swap(sample_sum_, other->sample_sum_);
2214     bucket_.Swap(&other->bucket_);
2215     std::swap(_has_bits_[0], other->_has_bits_[0]);
2216     _unknown_fields_.Swap(&other->_unknown_fields_);
2217     std::swap(_cached_size_, other->_cached_size_);
2218   }
2219 }
2220 
GetMetadata() const2221 ::google::protobuf::Metadata Histogram::GetMetadata() const {
2222   protobuf_AssignDescriptorsOnce();
2223   ::google::protobuf::Metadata metadata;
2224   metadata.descriptor = Histogram_descriptor_;
2225   metadata.reflection = Histogram_reflection_;
2226   return metadata;
2227 }
2228 
2229 
2230 // ===================================================================
2231 
2232 #ifndef _MSC_VER
2233 const int Bucket::kCumulativeCountFieldNumber;
2234 const int Bucket::kUpperBoundFieldNumber;
2235 #endif  // !_MSC_VER
2236 
Bucket()2237 Bucket::Bucket()
2238   : ::google::protobuf::Message() {
2239   SharedCtor();
2240   // @@protoc_insertion_point(constructor:io.prometheus.client.Bucket)
2241 }
2242 
InitAsDefaultInstance()2243 void Bucket::InitAsDefaultInstance() {
2244 }
2245 
Bucket(const Bucket & from)2246 Bucket::Bucket(const Bucket& from)
2247   : ::google::protobuf::Message() {
2248   SharedCtor();
2249   MergeFrom(from);
2250   // @@protoc_insertion_point(copy_constructor:io.prometheus.client.Bucket)
2251 }
2252 
SharedCtor()2253 void Bucket::SharedCtor() {
2254   _cached_size_ = 0;
2255   cumulative_count_ = GOOGLE_ULONGLONG(0);
2256   upper_bound_ = 0;
2257   ::memset(_has_bits_, 0, sizeof(_has_bits_));
2258 }
2259 
~Bucket()2260 Bucket::~Bucket() {
2261   // @@protoc_insertion_point(destructor:io.prometheus.client.Bucket)
2262   SharedDtor();
2263 }
2264 
SharedDtor()2265 void Bucket::SharedDtor() {
2266   if (this != default_instance_) {
2267   }
2268 }
2269 
SetCachedSize(int size) const2270 void Bucket::SetCachedSize(int size) const {
2271   GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
2272   _cached_size_ = size;
2273   GOOGLE_SAFE_CONCURRENT_WRITES_END();
2274 }
descriptor()2275 const ::google::protobuf::Descriptor* Bucket::descriptor() {
2276   protobuf_AssignDescriptorsOnce();
2277   return Bucket_descriptor_;
2278 }
2279 
default_instance()2280 const Bucket& Bucket::default_instance() {
2281   if (default_instance_ == NULL) protobuf_AddDesc_metrics_2eproto();
2282   return *default_instance_;
2283 }
2284 
2285 Bucket* Bucket::default_instance_ = NULL;
2286 
New() const2287 Bucket* Bucket::New() const {
2288   return new Bucket;
2289 }
2290 
Clear()2291 void Bucket::Clear() {
2292 #define OFFSET_OF_FIELD_(f) (reinterpret_cast<char*>(      \
2293   &reinterpret_cast<Bucket*>(16)->f) - \
2294    reinterpret_cast<char*>(16))
2295 
2296 #define ZR_(first, last) do {                              \
2297     size_t f = OFFSET_OF_FIELD_(first);                    \
2298     size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last);  \
2299     ::memset(&first, 0, n);                                \
2300   } while (0)
2301 
2302   ZR_(cumulative_count_, upper_bound_);
2303 
2304 #undef OFFSET_OF_FIELD_
2305 #undef ZR_
2306 
2307   ::memset(_has_bits_, 0, sizeof(_has_bits_));
2308   mutable_unknown_fields()->Clear();
2309 }
2310 
MergePartialFromCodedStream(::google::protobuf::io::CodedInputStream * input)2311 bool Bucket::MergePartialFromCodedStream(
2312     ::google::protobuf::io::CodedInputStream* input) {
2313 #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
2314   ::google::protobuf::uint32 tag;
2315   // @@protoc_insertion_point(parse_start:io.prometheus.client.Bucket)
2316   for (;;) {
2317     ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
2318     tag = p.first;
2319     if (!p.second) goto handle_unusual;
2320     switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
2321       // optional uint64 cumulative_count = 1;
2322       case 1: {
2323         if (tag == 8) {
2324           DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
2325                    ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
2326                  input, &cumulative_count_)));
2327           set_has_cumulative_count();
2328         } else {
2329           goto handle_unusual;
2330         }
2331         if (input->ExpectTag(17)) goto parse_upper_bound;
2332         break;
2333       }
2334 
2335       // optional double upper_bound = 2;
2336       case 2: {
2337         if (tag == 17) {
2338          parse_upper_bound:
2339           DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
2340                    double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
2341                  input, &upper_bound_)));
2342           set_has_upper_bound();
2343         } else {
2344           goto handle_unusual;
2345         }
2346         if (input->ExpectAtEnd()) goto success;
2347         break;
2348       }
2349 
2350       default: {
2351       handle_unusual:
2352         if (tag == 0 ||
2353             ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
2354             ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
2355           goto success;
2356         }
2357         DO_(::google::protobuf::internal::WireFormat::SkipField(
2358               input, tag, mutable_unknown_fields()));
2359         break;
2360       }
2361     }
2362   }
2363 success:
2364   // @@protoc_insertion_point(parse_success:io.prometheus.client.Bucket)
2365   return true;
2366 failure:
2367   // @@protoc_insertion_point(parse_failure:io.prometheus.client.Bucket)
2368   return false;
2369 #undef DO_
2370 }
2371 
SerializeWithCachedSizes(::google::protobuf::io::CodedOutputStream * output) const2372 void Bucket::SerializeWithCachedSizes(
2373     ::google::protobuf::io::CodedOutputStream* output) const {
2374   // @@protoc_insertion_point(serialize_start:io.prometheus.client.Bucket)
2375   // optional uint64 cumulative_count = 1;
2376   if (has_cumulative_count()) {
2377     ::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->cumulative_count(), output);
2378   }
2379 
2380   // optional double upper_bound = 2;
2381   if (has_upper_bound()) {
2382     ::google::protobuf::internal::WireFormatLite::WriteDouble(2, this->upper_bound(), output);
2383   }
2384 
2385   if (!unknown_fields().empty()) {
2386     ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
2387         unknown_fields(), output);
2388   }
2389   // @@protoc_insertion_point(serialize_end:io.prometheus.client.Bucket)
2390 }
2391 
SerializeWithCachedSizesToArray(::google::protobuf::uint8 * target) const2392 ::google::protobuf::uint8* Bucket::SerializeWithCachedSizesToArray(
2393     ::google::protobuf::uint8* target) const {
2394   // @@protoc_insertion_point(serialize_to_array_start:io.prometheus.client.Bucket)
2395   // optional uint64 cumulative_count = 1;
2396   if (has_cumulative_count()) {
2397     target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(1, this->cumulative_count(), target);
2398   }
2399 
2400   // optional double upper_bound = 2;
2401   if (has_upper_bound()) {
2402     target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(2, this->upper_bound(), target);
2403   }
2404 
2405   if (!unknown_fields().empty()) {
2406     target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
2407         unknown_fields(), target);
2408   }
2409   // @@protoc_insertion_point(serialize_to_array_end:io.prometheus.client.Bucket)
2410   return target;
2411 }
2412 
ByteSize() const2413 int Bucket::ByteSize() const {
2414   int total_size = 0;
2415 
2416   if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
2417     // optional uint64 cumulative_count = 1;
2418     if (has_cumulative_count()) {
2419       total_size += 1 +
2420         ::google::protobuf::internal::WireFormatLite::UInt64Size(
2421           this->cumulative_count());
2422     }
2423 
2424     // optional double upper_bound = 2;
2425     if (has_upper_bound()) {
2426       total_size += 1 + 8;
2427     }
2428 
2429   }
2430   if (!unknown_fields().empty()) {
2431     total_size +=
2432       ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
2433         unknown_fields());
2434   }
2435   GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
2436   _cached_size_ = total_size;
2437   GOOGLE_SAFE_CONCURRENT_WRITES_END();
2438   return total_size;
2439 }
2440 
MergeFrom(const::google::protobuf::Message & from)2441 void Bucket::MergeFrom(const ::google::protobuf::Message& from) {
2442   GOOGLE_CHECK_NE(&from, this);
2443   const Bucket* source =
2444     ::google::protobuf::internal::dynamic_cast_if_available<const Bucket*>(
2445       &from);
2446   if (source == NULL) {
2447     ::google::protobuf::internal::ReflectionOps::Merge(from, this);
2448   } else {
2449     MergeFrom(*source);
2450   }
2451 }
2452 
MergeFrom(const Bucket & from)2453 void Bucket::MergeFrom(const Bucket& from) {
2454   GOOGLE_CHECK_NE(&from, this);
2455   if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
2456     if (from.has_cumulative_count()) {
2457       set_cumulative_count(from.cumulative_count());
2458     }
2459     if (from.has_upper_bound()) {
2460       set_upper_bound(from.upper_bound());
2461     }
2462   }
2463   mutable_unknown_fields()->MergeFrom(from.unknown_fields());
2464 }
2465 
CopyFrom(const::google::protobuf::Message & from)2466 void Bucket::CopyFrom(const ::google::protobuf::Message& from) {
2467   if (&from == this) return;
2468   Clear();
2469   MergeFrom(from);
2470 }
2471 
CopyFrom(const Bucket & from)2472 void Bucket::CopyFrom(const Bucket& from) {
2473   if (&from == this) return;
2474   Clear();
2475   MergeFrom(from);
2476 }
2477 
IsInitialized() const2478 bool Bucket::IsInitialized() const {
2479 
2480   return true;
2481 }
2482 
Swap(Bucket * other)2483 void Bucket::Swap(Bucket* other) {
2484   if (other != this) {
2485     std::swap(cumulative_count_, other->cumulative_count_);
2486     std::swap(upper_bound_, other->upper_bound_);
2487     std::swap(_has_bits_[0], other->_has_bits_[0]);
2488     _unknown_fields_.Swap(&other->_unknown_fields_);
2489     std::swap(_cached_size_, other->_cached_size_);
2490   }
2491 }
2492 
GetMetadata() const2493 ::google::protobuf::Metadata Bucket::GetMetadata() const {
2494   protobuf_AssignDescriptorsOnce();
2495   ::google::protobuf::Metadata metadata;
2496   metadata.descriptor = Bucket_descriptor_;
2497   metadata.reflection = Bucket_reflection_;
2498   return metadata;
2499 }
2500 
2501 
2502 // ===================================================================
2503 
2504 #ifndef _MSC_VER
2505 const int Metric::kLabelFieldNumber;
2506 const int Metric::kGaugeFieldNumber;
2507 const int Metric::kCounterFieldNumber;
2508 const int Metric::kSummaryFieldNumber;
2509 const int Metric::kUntypedFieldNumber;
2510 const int Metric::kHistogramFieldNumber;
2511 const int Metric::kTimestampMsFieldNumber;
2512 #endif  // !_MSC_VER
2513 
Metric()2514 Metric::Metric()
2515   : ::google::protobuf::Message() {
2516   SharedCtor();
2517   // @@protoc_insertion_point(constructor:io.prometheus.client.Metric)
2518 }
2519 
InitAsDefaultInstance()2520 void Metric::InitAsDefaultInstance() {
2521   gauge_ = const_cast< ::io::prometheus::client::Gauge*>(&::io::prometheus::client::Gauge::default_instance());
2522   counter_ = const_cast< ::io::prometheus::client::Counter*>(&::io::prometheus::client::Counter::default_instance());
2523   summary_ = const_cast< ::io::prometheus::client::Summary*>(&::io::prometheus::client::Summary::default_instance());
2524   untyped_ = const_cast< ::io::prometheus::client::Untyped*>(&::io::prometheus::client::Untyped::default_instance());
2525   histogram_ = const_cast< ::io::prometheus::client::Histogram*>(&::io::prometheus::client::Histogram::default_instance());
2526 }
2527 
Metric(const Metric & from)2528 Metric::Metric(const Metric& from)
2529   : ::google::protobuf::Message() {
2530   SharedCtor();
2531   MergeFrom(from);
2532   // @@protoc_insertion_point(copy_constructor:io.prometheus.client.Metric)
2533 }
2534 
SharedCtor()2535 void Metric::SharedCtor() {
2536   _cached_size_ = 0;
2537   gauge_ = NULL;
2538   counter_ = NULL;
2539   summary_ = NULL;
2540   untyped_ = NULL;
2541   histogram_ = NULL;
2542   timestamp_ms_ = GOOGLE_LONGLONG(0);
2543   ::memset(_has_bits_, 0, sizeof(_has_bits_));
2544 }
2545 
~Metric()2546 Metric::~Metric() {
2547   // @@protoc_insertion_point(destructor:io.prometheus.client.Metric)
2548   SharedDtor();
2549 }
2550 
SharedDtor()2551 void Metric::SharedDtor() {
2552   if (this != default_instance_) {
2553     delete gauge_;
2554     delete counter_;
2555     delete summary_;
2556     delete untyped_;
2557     delete histogram_;
2558   }
2559 }
2560 
SetCachedSize(int size) const2561 void Metric::SetCachedSize(int size) const {
2562   GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
2563   _cached_size_ = size;
2564   GOOGLE_SAFE_CONCURRENT_WRITES_END();
2565 }
descriptor()2566 const ::google::protobuf::Descriptor* Metric::descriptor() {
2567   protobuf_AssignDescriptorsOnce();
2568   return Metric_descriptor_;
2569 }
2570 
default_instance()2571 const Metric& Metric::default_instance() {
2572   if (default_instance_ == NULL) protobuf_AddDesc_metrics_2eproto();
2573   return *default_instance_;
2574 }
2575 
2576 Metric* Metric::default_instance_ = NULL;
2577 
New() const2578 Metric* Metric::New() const {
2579   return new Metric;
2580 }
2581 
Clear()2582 void Metric::Clear() {
2583   if (_has_bits_[0 / 32] & 126) {
2584     if (has_gauge()) {
2585       if (gauge_ != NULL) gauge_->::io::prometheus::client::Gauge::Clear();
2586     }
2587     if (has_counter()) {
2588       if (counter_ != NULL) counter_->::io::prometheus::client::Counter::Clear();
2589     }
2590     if (has_summary()) {
2591       if (summary_ != NULL) summary_->::io::prometheus::client::Summary::Clear();
2592     }
2593     if (has_untyped()) {
2594       if (untyped_ != NULL) untyped_->::io::prometheus::client::Untyped::Clear();
2595     }
2596     if (has_histogram()) {
2597       if (histogram_ != NULL) histogram_->::io::prometheus::client::Histogram::Clear();
2598     }
2599     timestamp_ms_ = GOOGLE_LONGLONG(0);
2600   }
2601   label_.Clear();
2602   ::memset(_has_bits_, 0, sizeof(_has_bits_));
2603   mutable_unknown_fields()->Clear();
2604 }
2605 
MergePartialFromCodedStream(::google::protobuf::io::CodedInputStream * input)2606 bool Metric::MergePartialFromCodedStream(
2607     ::google::protobuf::io::CodedInputStream* input) {
2608 #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
2609   ::google::protobuf::uint32 tag;
2610   // @@protoc_insertion_point(parse_start:io.prometheus.client.Metric)
2611   for (;;) {
2612     ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
2613     tag = p.first;
2614     if (!p.second) goto handle_unusual;
2615     switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
2616       // repeated .io.prometheus.client.LabelPair label = 1;
2617       case 1: {
2618         if (tag == 10) {
2619          parse_label:
2620           DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
2621                 input, add_label()));
2622         } else {
2623           goto handle_unusual;
2624         }
2625         if (input->ExpectTag(10)) goto parse_label;
2626         if (input->ExpectTag(18)) goto parse_gauge;
2627         break;
2628       }
2629 
2630       // optional .io.prometheus.client.Gauge gauge = 2;
2631       case 2: {
2632         if (tag == 18) {
2633          parse_gauge:
2634           DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
2635                input, mutable_gauge()));
2636         } else {
2637           goto handle_unusual;
2638         }
2639         if (input->ExpectTag(26)) goto parse_counter;
2640         break;
2641       }
2642 
2643       // optional .io.prometheus.client.Counter counter = 3;
2644       case 3: {
2645         if (tag == 26) {
2646          parse_counter:
2647           DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
2648                input, mutable_counter()));
2649         } else {
2650           goto handle_unusual;
2651         }
2652         if (input->ExpectTag(34)) goto parse_summary;
2653         break;
2654       }
2655 
2656       // optional .io.prometheus.client.Summary summary = 4;
2657       case 4: {
2658         if (tag == 34) {
2659          parse_summary:
2660           DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
2661                input, mutable_summary()));
2662         } else {
2663           goto handle_unusual;
2664         }
2665         if (input->ExpectTag(42)) goto parse_untyped;
2666         break;
2667       }
2668 
2669       // optional .io.prometheus.client.Untyped untyped = 5;
2670       case 5: {
2671         if (tag == 42) {
2672          parse_untyped:
2673           DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
2674                input, mutable_untyped()));
2675         } else {
2676           goto handle_unusual;
2677         }
2678         if (input->ExpectTag(48)) goto parse_timestamp_ms;
2679         break;
2680       }
2681 
2682       // optional int64 timestamp_ms = 6;
2683       case 6: {
2684         if (tag == 48) {
2685          parse_timestamp_ms:
2686           DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
2687                    ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
2688                  input, &timestamp_ms_)));
2689           set_has_timestamp_ms();
2690         } else {
2691           goto handle_unusual;
2692         }
2693         if (input->ExpectTag(58)) goto parse_histogram;
2694         break;
2695       }
2696 
2697       // optional .io.prometheus.client.Histogram histogram = 7;
2698       case 7: {
2699         if (tag == 58) {
2700          parse_histogram:
2701           DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
2702                input, mutable_histogram()));
2703         } else {
2704           goto handle_unusual;
2705         }
2706         if (input->ExpectAtEnd()) goto success;
2707         break;
2708       }
2709 
2710       default: {
2711       handle_unusual:
2712         if (tag == 0 ||
2713             ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
2714             ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
2715           goto success;
2716         }
2717         DO_(::google::protobuf::internal::WireFormat::SkipField(
2718               input, tag, mutable_unknown_fields()));
2719         break;
2720       }
2721     }
2722   }
2723 success:
2724   // @@protoc_insertion_point(parse_success:io.prometheus.client.Metric)
2725   return true;
2726 failure:
2727   // @@protoc_insertion_point(parse_failure:io.prometheus.client.Metric)
2728   return false;
2729 #undef DO_
2730 }
2731 
SerializeWithCachedSizes(::google::protobuf::io::CodedOutputStream * output) const2732 void Metric::SerializeWithCachedSizes(
2733     ::google::protobuf::io::CodedOutputStream* output) const {
2734   // @@protoc_insertion_point(serialize_start:io.prometheus.client.Metric)
2735   // repeated .io.prometheus.client.LabelPair label = 1;
2736   for (int i = 0; i < this->label_size(); i++) {
2737     ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
2738       1, this->label(i), output);
2739   }
2740 
2741   // optional .io.prometheus.client.Gauge gauge = 2;
2742   if (has_gauge()) {
2743     ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
2744       2, this->gauge(), output);
2745   }
2746 
2747   // optional .io.prometheus.client.Counter counter = 3;
2748   if (has_counter()) {
2749     ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
2750       3, this->counter(), output);
2751   }
2752 
2753   // optional .io.prometheus.client.Summary summary = 4;
2754   if (has_summary()) {
2755     ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
2756       4, this->summary(), output);
2757   }
2758 
2759   // optional .io.prometheus.client.Untyped untyped = 5;
2760   if (has_untyped()) {
2761     ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
2762       5, this->untyped(), output);
2763   }
2764 
2765   // optional int64 timestamp_ms = 6;
2766   if (has_timestamp_ms()) {
2767     ::google::protobuf::internal::WireFormatLite::WriteInt64(6, this->timestamp_ms(), output);
2768   }
2769 
2770   // optional .io.prometheus.client.Histogram histogram = 7;
2771   if (has_histogram()) {
2772     ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
2773       7, this->histogram(), output);
2774   }
2775 
2776   if (!unknown_fields().empty()) {
2777     ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
2778         unknown_fields(), output);
2779   }
2780   // @@protoc_insertion_point(serialize_end:io.prometheus.client.Metric)
2781 }
2782 
SerializeWithCachedSizesToArray(::google::protobuf::uint8 * target) const2783 ::google::protobuf::uint8* Metric::SerializeWithCachedSizesToArray(
2784     ::google::protobuf::uint8* target) const {
2785   // @@protoc_insertion_point(serialize_to_array_start:io.prometheus.client.Metric)
2786   // repeated .io.prometheus.client.LabelPair label = 1;
2787   for (int i = 0; i < this->label_size(); i++) {
2788     target = ::google::protobuf::internal::WireFormatLite::
2789       WriteMessageNoVirtualToArray(
2790         1, this->label(i), target);
2791   }
2792 
2793   // optional .io.prometheus.client.Gauge gauge = 2;
2794   if (has_gauge()) {
2795     target = ::google::protobuf::internal::WireFormatLite::
2796       WriteMessageNoVirtualToArray(
2797         2, this->gauge(), target);
2798   }
2799 
2800   // optional .io.prometheus.client.Counter counter = 3;
2801   if (has_counter()) {
2802     target = ::google::protobuf::internal::WireFormatLite::
2803       WriteMessageNoVirtualToArray(
2804         3, this->counter(), target);
2805   }
2806 
2807   // optional .io.prometheus.client.Summary summary = 4;
2808   if (has_summary()) {
2809     target = ::google::protobuf::internal::WireFormatLite::
2810       WriteMessageNoVirtualToArray(
2811         4, this->summary(), target);
2812   }
2813 
2814   // optional .io.prometheus.client.Untyped untyped = 5;
2815   if (has_untyped()) {
2816     target = ::google::protobuf::internal::WireFormatLite::
2817       WriteMessageNoVirtualToArray(
2818         5, this->untyped(), target);
2819   }
2820 
2821   // optional int64 timestamp_ms = 6;
2822   if (has_timestamp_ms()) {
2823     target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(6, this->timestamp_ms(), target);
2824   }
2825 
2826   // optional .io.prometheus.client.Histogram histogram = 7;
2827   if (has_histogram()) {
2828     target = ::google::protobuf::internal::WireFormatLite::
2829       WriteMessageNoVirtualToArray(
2830         7, this->histogram(), target);
2831   }
2832 
2833   if (!unknown_fields().empty()) {
2834     target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
2835         unknown_fields(), target);
2836   }
2837   // @@protoc_insertion_point(serialize_to_array_end:io.prometheus.client.Metric)
2838   return target;
2839 }
2840 
ByteSize() const2841 int Metric::ByteSize() const {
2842   int total_size = 0;
2843 
2844   if (_has_bits_[1 / 32] & (0xffu << (1 % 32))) {
2845     // optional .io.prometheus.client.Gauge gauge = 2;
2846     if (has_gauge()) {
2847       total_size += 1 +
2848         ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
2849           this->gauge());
2850     }
2851 
2852     // optional .io.prometheus.client.Counter counter = 3;
2853     if (has_counter()) {
2854       total_size += 1 +
2855         ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
2856           this->counter());
2857     }
2858 
2859     // optional .io.prometheus.client.Summary summary = 4;
2860     if (has_summary()) {
2861       total_size += 1 +
2862         ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
2863           this->summary());
2864     }
2865 
2866     // optional .io.prometheus.client.Untyped untyped = 5;
2867     if (has_untyped()) {
2868       total_size += 1 +
2869         ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
2870           this->untyped());
2871     }
2872 
2873     // optional .io.prometheus.client.Histogram histogram = 7;
2874     if (has_histogram()) {
2875       total_size += 1 +
2876         ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
2877           this->histogram());
2878     }
2879 
2880     // optional int64 timestamp_ms = 6;
2881     if (has_timestamp_ms()) {
2882       total_size += 1 +
2883         ::google::protobuf::internal::WireFormatLite::Int64Size(
2884           this->timestamp_ms());
2885     }
2886 
2887   }
2888   // repeated .io.prometheus.client.LabelPair label = 1;
2889   total_size += 1 * this->label_size();
2890   for (int i = 0; i < this->label_size(); i++) {
2891     total_size +=
2892       ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
2893         this->label(i));
2894   }
2895 
2896   if (!unknown_fields().empty()) {
2897     total_size +=
2898       ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
2899         unknown_fields());
2900   }
2901   GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
2902   _cached_size_ = total_size;
2903   GOOGLE_SAFE_CONCURRENT_WRITES_END();
2904   return total_size;
2905 }
2906 
MergeFrom(const::google::protobuf::Message & from)2907 void Metric::MergeFrom(const ::google::protobuf::Message& from) {
2908   GOOGLE_CHECK_NE(&from, this);
2909   const Metric* source =
2910     ::google::protobuf::internal::dynamic_cast_if_available<const Metric*>(
2911       &from);
2912   if (source == NULL) {
2913     ::google::protobuf::internal::ReflectionOps::Merge(from, this);
2914   } else {
2915     MergeFrom(*source);
2916   }
2917 }
2918 
MergeFrom(const Metric & from)2919 void Metric::MergeFrom(const Metric& from) {
2920   GOOGLE_CHECK_NE(&from, this);
2921   label_.MergeFrom(from.label_);
2922   if (from._has_bits_[1 / 32] & (0xffu << (1 % 32))) {
2923     if (from.has_gauge()) {
2924       mutable_gauge()->::io::prometheus::client::Gauge::MergeFrom(from.gauge());
2925     }
2926     if (from.has_counter()) {
2927       mutable_counter()->::io::prometheus::client::Counter::MergeFrom(from.counter());
2928     }
2929     if (from.has_summary()) {
2930       mutable_summary()->::io::prometheus::client::Summary::MergeFrom(from.summary());
2931     }
2932     if (from.has_untyped()) {
2933       mutable_untyped()->::io::prometheus::client::Untyped::MergeFrom(from.untyped());
2934     }
2935     if (from.has_histogram()) {
2936       mutable_histogram()->::io::prometheus::client::Histogram::MergeFrom(from.histogram());
2937     }
2938     if (from.has_timestamp_ms()) {
2939       set_timestamp_ms(from.timestamp_ms());
2940     }
2941   }
2942   mutable_unknown_fields()->MergeFrom(from.unknown_fields());
2943 }
2944 
CopyFrom(const::google::protobuf::Message & from)2945 void Metric::CopyFrom(const ::google::protobuf::Message& from) {
2946   if (&from == this) return;
2947   Clear();
2948   MergeFrom(from);
2949 }
2950 
CopyFrom(const Metric & from)2951 void Metric::CopyFrom(const Metric& from) {
2952   if (&from == this) return;
2953   Clear();
2954   MergeFrom(from);
2955 }
2956 
IsInitialized() const2957 bool Metric::IsInitialized() const {
2958 
2959   return true;
2960 }
2961 
Swap(Metric * other)2962 void Metric::Swap(Metric* other) {
2963   if (other != this) {
2964     label_.Swap(&other->label_);
2965     std::swap(gauge_, other->gauge_);
2966     std::swap(counter_, other->counter_);
2967     std::swap(summary_, other->summary_);
2968     std::swap(untyped_, other->untyped_);
2969     std::swap(histogram_, other->histogram_);
2970     std::swap(timestamp_ms_, other->timestamp_ms_);
2971     std::swap(_has_bits_[0], other->_has_bits_[0]);
2972     _unknown_fields_.Swap(&other->_unknown_fields_);
2973     std::swap(_cached_size_, other->_cached_size_);
2974   }
2975 }
2976 
GetMetadata() const2977 ::google::protobuf::Metadata Metric::GetMetadata() const {
2978   protobuf_AssignDescriptorsOnce();
2979   ::google::protobuf::Metadata metadata;
2980   metadata.descriptor = Metric_descriptor_;
2981   metadata.reflection = Metric_reflection_;
2982   return metadata;
2983 }
2984 
2985 
2986 // ===================================================================
2987 
2988 #ifndef _MSC_VER
2989 const int MetricFamily::kNameFieldNumber;
2990 const int MetricFamily::kHelpFieldNumber;
2991 const int MetricFamily::kTypeFieldNumber;
2992 const int MetricFamily::kMetricFieldNumber;
2993 #endif  // !_MSC_VER
2994 
MetricFamily()2995 MetricFamily::MetricFamily()
2996   : ::google::protobuf::Message() {
2997   SharedCtor();
2998   // @@protoc_insertion_point(constructor:io.prometheus.client.MetricFamily)
2999 }
3000 
InitAsDefaultInstance()3001 void MetricFamily::InitAsDefaultInstance() {
3002 }
3003 
MetricFamily(const MetricFamily & from)3004 MetricFamily::MetricFamily(const MetricFamily& from)
3005   : ::google::protobuf::Message() {
3006   SharedCtor();
3007   MergeFrom(from);
3008   // @@protoc_insertion_point(copy_constructor:io.prometheus.client.MetricFamily)
3009 }
3010 
SharedCtor()3011 void MetricFamily::SharedCtor() {
3012   ::google::protobuf::internal::GetEmptyString();
3013   _cached_size_ = 0;
3014   name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
3015   help_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
3016   type_ = 0;
3017   ::memset(_has_bits_, 0, sizeof(_has_bits_));
3018 }
3019 
~MetricFamily()3020 MetricFamily::~MetricFamily() {
3021   // @@protoc_insertion_point(destructor:io.prometheus.client.MetricFamily)
3022   SharedDtor();
3023 }
3024 
SharedDtor()3025 void MetricFamily::SharedDtor() {
3026   if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
3027     delete name_;
3028   }
3029   if (help_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
3030     delete help_;
3031   }
3032   if (this != default_instance_) {
3033   }
3034 }
3035 
SetCachedSize(int size) const3036 void MetricFamily::SetCachedSize(int size) const {
3037   GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
3038   _cached_size_ = size;
3039   GOOGLE_SAFE_CONCURRENT_WRITES_END();
3040 }
descriptor()3041 const ::google::protobuf::Descriptor* MetricFamily::descriptor() {
3042   protobuf_AssignDescriptorsOnce();
3043   return MetricFamily_descriptor_;
3044 }
3045 
default_instance()3046 const MetricFamily& MetricFamily::default_instance() {
3047   if (default_instance_ == NULL) protobuf_AddDesc_metrics_2eproto();
3048   return *default_instance_;
3049 }
3050 
3051 MetricFamily* MetricFamily::default_instance_ = NULL;
3052 
New() const3053 MetricFamily* MetricFamily::New() const {
3054   return new MetricFamily;
3055 }
3056 
Clear()3057 void MetricFamily::Clear() {
3058   if (_has_bits_[0 / 32] & 7) {
3059     if (has_name()) {
3060       if (name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
3061         name_->clear();
3062       }
3063     }
3064     if (has_help()) {
3065       if (help_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
3066         help_->clear();
3067       }
3068     }
3069     type_ = 0;
3070   }
3071   metric_.Clear();
3072   ::memset(_has_bits_, 0, sizeof(_has_bits_));
3073   mutable_unknown_fields()->Clear();
3074 }
3075 
MergePartialFromCodedStream(::google::protobuf::io::CodedInputStream * input)3076 bool MetricFamily::MergePartialFromCodedStream(
3077     ::google::protobuf::io::CodedInputStream* input) {
3078 #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
3079   ::google::protobuf::uint32 tag;
3080   // @@protoc_insertion_point(parse_start:io.prometheus.client.MetricFamily)
3081   for (;;) {
3082     ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
3083     tag = p.first;
3084     if (!p.second) goto handle_unusual;
3085     switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
3086       // optional string name = 1;
3087       case 1: {
3088         if (tag == 10) {
3089           DO_(::google::protobuf::internal::WireFormatLite::ReadString(
3090                 input, this->mutable_name()));
3091           ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
3092             this->name().data(), this->name().length(),
3093             ::google::protobuf::internal::WireFormat::PARSE,
3094             "name");
3095         } else {
3096           goto handle_unusual;
3097         }
3098         if (input->ExpectTag(18)) goto parse_help;
3099         break;
3100       }
3101 
3102       // optional string help = 2;
3103       case 2: {
3104         if (tag == 18) {
3105          parse_help:
3106           DO_(::google::protobuf::internal::WireFormatLite::ReadString(
3107                 input, this->mutable_help()));
3108           ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
3109             this->help().data(), this->help().length(),
3110             ::google::protobuf::internal::WireFormat::PARSE,
3111             "help");
3112         } else {
3113           goto handle_unusual;
3114         }
3115         if (input->ExpectTag(24)) goto parse_type;
3116         break;
3117       }
3118 
3119       // optional .io.prometheus.client.MetricType type = 3;
3120       case 3: {
3121         if (tag == 24) {
3122          parse_type:
3123           int value;
3124           DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
3125                    int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
3126                  input, &value)));
3127           if (::io::prometheus::client::MetricType_IsValid(value)) {
3128             set_type(static_cast< ::io::prometheus::client::MetricType >(value));
3129           } else {
3130             mutable_unknown_fields()->AddVarint(3, value);
3131           }
3132         } else {
3133           goto handle_unusual;
3134         }
3135         if (input->ExpectTag(34)) goto parse_metric;
3136         break;
3137       }
3138 
3139       // repeated .io.prometheus.client.Metric metric = 4;
3140       case 4: {
3141         if (tag == 34) {
3142          parse_metric:
3143           DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
3144                 input, add_metric()));
3145         } else {
3146           goto handle_unusual;
3147         }
3148         if (input->ExpectTag(34)) goto parse_metric;
3149         if (input->ExpectAtEnd()) goto success;
3150         break;
3151       }
3152 
3153       default: {
3154       handle_unusual:
3155         if (tag == 0 ||
3156             ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
3157             ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
3158           goto success;
3159         }
3160         DO_(::google::protobuf::internal::WireFormat::SkipField(
3161               input, tag, mutable_unknown_fields()));
3162         break;
3163       }
3164     }
3165   }
3166 success:
3167   // @@protoc_insertion_point(parse_success:io.prometheus.client.MetricFamily)
3168   return true;
3169 failure:
3170   // @@protoc_insertion_point(parse_failure:io.prometheus.client.MetricFamily)
3171   return false;
3172 #undef DO_
3173 }
3174 
SerializeWithCachedSizes(::google::protobuf::io::CodedOutputStream * output) const3175 void MetricFamily::SerializeWithCachedSizes(
3176     ::google::protobuf::io::CodedOutputStream* output) const {
3177   // @@protoc_insertion_point(serialize_start:io.prometheus.client.MetricFamily)
3178   // optional string name = 1;
3179   if (has_name()) {
3180     ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
3181       this->name().data(), this->name().length(),
3182       ::google::protobuf::internal::WireFormat::SERIALIZE,
3183       "name");
3184     ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
3185       1, this->name(), output);
3186   }
3187 
3188   // optional string help = 2;
3189   if (has_help()) {
3190     ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
3191       this->help().data(), this->help().length(),
3192       ::google::protobuf::internal::WireFormat::SERIALIZE,
3193       "help");
3194     ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
3195       2, this->help(), output);
3196   }
3197 
3198   // optional .io.prometheus.client.MetricType type = 3;
3199   if (has_type()) {
3200     ::google::protobuf::internal::WireFormatLite::WriteEnum(
3201       3, this->type(), output);
3202   }
3203 
3204   // repeated .io.prometheus.client.Metric metric = 4;
3205   for (int i = 0; i < this->metric_size(); i++) {
3206     ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
3207       4, this->metric(i), output);
3208   }
3209 
3210   if (!unknown_fields().empty()) {
3211     ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
3212         unknown_fields(), output);
3213   }
3214   // @@protoc_insertion_point(serialize_end:io.prometheus.client.MetricFamily)
3215 }
3216 
SerializeWithCachedSizesToArray(::google::protobuf::uint8 * target) const3217 ::google::protobuf::uint8* MetricFamily::SerializeWithCachedSizesToArray(
3218     ::google::protobuf::uint8* target) const {
3219   // @@protoc_insertion_point(serialize_to_array_start:io.prometheus.client.MetricFamily)
3220   // optional string name = 1;
3221   if (has_name()) {
3222     ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
3223       this->name().data(), this->name().length(),
3224       ::google::protobuf::internal::WireFormat::SERIALIZE,
3225       "name");
3226     target =
3227       ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
3228         1, this->name(), target);
3229   }
3230 
3231   // optional string help = 2;
3232   if (has_help()) {
3233     ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
3234       this->help().data(), this->help().length(),
3235       ::google::protobuf::internal::WireFormat::SERIALIZE,
3236       "help");
3237     target =
3238       ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
3239         2, this->help(), target);
3240   }
3241 
3242   // optional .io.prometheus.client.MetricType type = 3;
3243   if (has_type()) {
3244     target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
3245       3, this->type(), target);
3246   }
3247 
3248   // repeated .io.prometheus.client.Metric metric = 4;
3249   for (int i = 0; i < this->metric_size(); i++) {
3250     target = ::google::protobuf::internal::WireFormatLite::
3251       WriteMessageNoVirtualToArray(
3252         4, this->metric(i), target);
3253   }
3254 
3255   if (!unknown_fields().empty()) {
3256     target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
3257         unknown_fields(), target);
3258   }
3259   // @@protoc_insertion_point(serialize_to_array_end:io.prometheus.client.MetricFamily)
3260   return target;
3261 }
3262 
ByteSize() const3263 int MetricFamily::ByteSize() const {
3264   int total_size = 0;
3265 
3266   if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
3267     // optional string name = 1;
3268     if (has_name()) {
3269       total_size += 1 +
3270         ::google::protobuf::internal::WireFormatLite::StringSize(
3271           this->name());
3272     }
3273 
3274     // optional string help = 2;
3275     if (has_help()) {
3276       total_size += 1 +
3277         ::google::protobuf::internal::WireFormatLite::StringSize(
3278           this->help());
3279     }
3280 
3281     // optional .io.prometheus.client.MetricType type = 3;
3282     if (has_type()) {
3283       total_size += 1 +
3284         ::google::protobuf::internal::WireFormatLite::EnumSize(this->type());
3285     }
3286 
3287   }
3288   // repeated .io.prometheus.client.Metric metric = 4;
3289   total_size += 1 * this->metric_size();
3290   for (int i = 0; i < this->metric_size(); i++) {
3291     total_size +=
3292       ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
3293         this->metric(i));
3294   }
3295 
3296   if (!unknown_fields().empty()) {
3297     total_size +=
3298       ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
3299         unknown_fields());
3300   }
3301   GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
3302   _cached_size_ = total_size;
3303   GOOGLE_SAFE_CONCURRENT_WRITES_END();
3304   return total_size;
3305 }
3306 
MergeFrom(const::google::protobuf::Message & from)3307 void MetricFamily::MergeFrom(const ::google::protobuf::Message& from) {
3308   GOOGLE_CHECK_NE(&from, this);
3309   const MetricFamily* source =
3310     ::google::protobuf::internal::dynamic_cast_if_available<const MetricFamily*>(
3311       &from);
3312   if (source == NULL) {
3313     ::google::protobuf::internal::ReflectionOps::Merge(from, this);
3314   } else {
3315     MergeFrom(*source);
3316   }
3317 }
3318 
MergeFrom(const MetricFamily & from)3319 void MetricFamily::MergeFrom(const MetricFamily& from) {
3320   GOOGLE_CHECK_NE(&from, this);
3321   metric_.MergeFrom(from.metric_);
3322   if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
3323     if (from.has_name()) {
3324       set_name(from.name());
3325     }
3326     if (from.has_help()) {
3327       set_help(from.help());
3328     }
3329     if (from.has_type()) {
3330       set_type(from.type());
3331     }
3332   }
3333   mutable_unknown_fields()->MergeFrom(from.unknown_fields());
3334 }
3335 
CopyFrom(const::google::protobuf::Message & from)3336 void MetricFamily::CopyFrom(const ::google::protobuf::Message& from) {
3337   if (&from == this) return;
3338   Clear();
3339   MergeFrom(from);
3340 }
3341 
CopyFrom(const MetricFamily & from)3342 void MetricFamily::CopyFrom(const MetricFamily& from) {
3343   if (&from == this) return;
3344   Clear();
3345   MergeFrom(from);
3346 }
3347 
IsInitialized() const3348 bool MetricFamily::IsInitialized() const {
3349 
3350   return true;
3351 }
3352 
Swap(MetricFamily * other)3353 void MetricFamily::Swap(MetricFamily* other) {
3354   if (other != this) {
3355     std::swap(name_, other->name_);
3356     std::swap(help_, other->help_);
3357     std::swap(type_, other->type_);
3358     metric_.Swap(&other->metric_);
3359     std::swap(_has_bits_[0], other->_has_bits_[0]);
3360     _unknown_fields_.Swap(&other->_unknown_fields_);
3361     std::swap(_cached_size_, other->_cached_size_);
3362   }
3363 }
3364 
GetMetadata() const3365 ::google::protobuf::Metadata MetricFamily::GetMetadata() const {
3366   protobuf_AssignDescriptorsOnce();
3367   ::google::protobuf::Metadata metadata;
3368   metadata.descriptor = MetricFamily_descriptor_;
3369   metadata.reflection = MetricFamily_reflection_;
3370   return metadata;
3371 }
3372 
3373 
3374 // @@protoc_insertion_point(namespace_scope)
3375 
3376 }  // namespace client
3377 }  // namespace prometheus
3378 }  // namespace io
3379 
3380 // @@protoc_insertion_point(global_scope)
3381