// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: prometheus/remote/types.proto

#include "prometheus/remote/types.pb.h"

#include <algorithm>

#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/extension_set.h>
#include <google/protobuf/wire_format_lite.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>

PROTOBUF_PRAGMA_INIT_SEG

namespace _pb = ::PROTOBUF_NAMESPACE_ID;
namespace _pbi = _pb::internal;

namespace prometheus {
PROTOBUF_CONSTEXPR MetricMetadata::MetricMetadata(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.metric_family_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.help_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.unit_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.type_)*/0
  , /*decltype(_impl_._cached_size_)*/{}} {}
struct MetricMetadataDefaultTypeInternal {
  PROTOBUF_CONSTEXPR MetricMetadataDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~MetricMetadataDefaultTypeInternal() {}
  union {
    MetricMetadata _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MetricMetadataDefaultTypeInternal _MetricMetadata_default_instance_;
PROTOBUF_CONSTEXPR Sample::Sample(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.value_)*/0
  , /*decltype(_impl_.timestamp_)*/int64_t{0}
  , /*decltype(_impl_._cached_size_)*/{}} {}
struct SampleDefaultTypeInternal {
  PROTOBUF_CONSTEXPR SampleDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~SampleDefaultTypeInternal() {}
  union {
    Sample _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SampleDefaultTypeInternal _Sample_default_instance_;
PROTOBUF_CONSTEXPR Exemplar::Exemplar(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.labels_)*/{}
  , /*decltype(_impl_.value_)*/0
  , /*decltype(_impl_.timestamp_)*/int64_t{0}
  , /*decltype(_impl_._cached_size_)*/{}} {}
struct ExemplarDefaultTypeInternal {
  PROTOBUF_CONSTEXPR ExemplarDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~ExemplarDefaultTypeInternal() {}
  union {
    Exemplar _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ExemplarDefaultTypeInternal _Exemplar_default_instance_;
PROTOBUF_CONSTEXPR TimeSeries::TimeSeries(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.labels_)*/{}
  , /*decltype(_impl_.samples_)*/{}
  , /*decltype(_impl_.exemplars_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}} {}
struct TimeSeriesDefaultTypeInternal {
  PROTOBUF_CONSTEXPR TimeSeriesDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~TimeSeriesDefaultTypeInternal() {}
  union {
    TimeSeries _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TimeSeriesDefaultTypeInternal _TimeSeries_default_instance_;
PROTOBUF_CONSTEXPR Label::Label(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.value_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_._cached_size_)*/{}} {}
struct LabelDefaultTypeInternal {
  PROTOBUF_CONSTEXPR LabelDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~LabelDefaultTypeInternal() {}
  union {
    Label _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 LabelDefaultTypeInternal _Label_default_instance_;
PROTOBUF_CONSTEXPR Labels::Labels(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.labels_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}} {}
struct LabelsDefaultTypeInternal {
  PROTOBUF_CONSTEXPR LabelsDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~LabelsDefaultTypeInternal() {}
  union {
    Labels _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 LabelsDefaultTypeInternal _Labels_default_instance_;
PROTOBUF_CONSTEXPR LabelMatcher::LabelMatcher(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.value_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.type_)*/0
  , /*decltype(_impl_._cached_size_)*/{}} {}
struct LabelMatcherDefaultTypeInternal {
  PROTOBUF_CONSTEXPR LabelMatcherDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~LabelMatcherDefaultTypeInternal() {}
  union {
    LabelMatcher _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 LabelMatcherDefaultTypeInternal _LabelMatcher_default_instance_;
PROTOBUF_CONSTEXPR ReadHints::ReadHints(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.grouping_)*/{}
  , /*decltype(_impl_.func_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.step_ms_)*/int64_t{0}
  , /*decltype(_impl_.start_ms_)*/int64_t{0}
  , /*decltype(_impl_.end_ms_)*/int64_t{0}
  , /*decltype(_impl_.range_ms_)*/int64_t{0}
  , /*decltype(_impl_.by_)*/false
  , /*decltype(_impl_._cached_size_)*/{}} {}
struct ReadHintsDefaultTypeInternal {
  PROTOBUF_CONSTEXPR ReadHintsDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~ReadHintsDefaultTypeInternal() {}
  union {
    ReadHints _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ReadHintsDefaultTypeInternal _ReadHints_default_instance_;
PROTOBUF_CONSTEXPR Chunk::Chunk(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.data_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.min_time_ms_)*/int64_t{0}
  , /*decltype(_impl_.max_time_ms_)*/int64_t{0}
  , /*decltype(_impl_.type_)*/0
  , /*decltype(_impl_._cached_size_)*/{}} {}
struct ChunkDefaultTypeInternal {
  PROTOBUF_CONSTEXPR ChunkDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~ChunkDefaultTypeInternal() {}
  union {
    Chunk _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ChunkDefaultTypeInternal _Chunk_default_instance_;
PROTOBUF_CONSTEXPR ChunkedSeries::ChunkedSeries(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.labels_)*/{}
  , /*decltype(_impl_.chunks_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}} {}
struct ChunkedSeriesDefaultTypeInternal {
  PROTOBUF_CONSTEXPR ChunkedSeriesDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~ChunkedSeriesDefaultTypeInternal() {}
  union {
    ChunkedSeries _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ChunkedSeriesDefaultTypeInternal _ChunkedSeries_default_instance_;
}  // namespace prometheus
static ::_pb::Metadata file_level_metadata_prometheus_2fremote_2ftypes_2eproto[10];
static const ::_pb::EnumDescriptor* file_level_enum_descriptors_prometheus_2fremote_2ftypes_2eproto[3];
static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_prometheus_2fremote_2ftypes_2eproto = nullptr;

const uint32_t TableStruct_prometheus_2fremote_2ftypes_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::prometheus::MetricMetadata, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::prometheus::MetricMetadata, _impl_.type_),
  PROTOBUF_FIELD_OFFSET(::prometheus::MetricMetadata, _impl_.metric_family_name_),
  PROTOBUF_FIELD_OFFSET(::prometheus::MetricMetadata, _impl_.help_),
  PROTOBUF_FIELD_OFFSET(::prometheus::MetricMetadata, _impl_.unit_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::prometheus::Sample, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::prometheus::Sample, _impl_.value_),
  PROTOBUF_FIELD_OFFSET(::prometheus::Sample, _impl_.timestamp_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::prometheus::Exemplar, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::prometheus::Exemplar, _impl_.labels_),
  PROTOBUF_FIELD_OFFSET(::prometheus::Exemplar, _impl_.value_),
  PROTOBUF_FIELD_OFFSET(::prometheus::Exemplar, _impl_.timestamp_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::prometheus::TimeSeries, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::prometheus::TimeSeries, _impl_.labels_),
  PROTOBUF_FIELD_OFFSET(::prometheus::TimeSeries, _impl_.samples_),
  PROTOBUF_FIELD_OFFSET(::prometheus::TimeSeries, _impl_.exemplars_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::prometheus::Label, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::prometheus::Label, _impl_.name_),
  PROTOBUF_FIELD_OFFSET(::prometheus::Label, _impl_.value_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::prometheus::Labels, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::prometheus::Labels, _impl_.labels_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::prometheus::LabelMatcher, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::prometheus::LabelMatcher, _impl_.type_),
  PROTOBUF_FIELD_OFFSET(::prometheus::LabelMatcher, _impl_.name_),
  PROTOBUF_FIELD_OFFSET(::prometheus::LabelMatcher, _impl_.value_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::prometheus::ReadHints, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::prometheus::ReadHints, _impl_.step_ms_),
  PROTOBUF_FIELD_OFFSET(::prometheus::ReadHints, _impl_.func_),
  PROTOBUF_FIELD_OFFSET(::prometheus::ReadHints, _impl_.start_ms_),
  PROTOBUF_FIELD_OFFSET(::prometheus::ReadHints, _impl_.end_ms_),
  PROTOBUF_FIELD_OFFSET(::prometheus::ReadHints, _impl_.grouping_),
  PROTOBUF_FIELD_OFFSET(::prometheus::ReadHints, _impl_.by_),
  PROTOBUF_FIELD_OFFSET(::prometheus::ReadHints, _impl_.range_ms_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::prometheus::Chunk, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::prometheus::Chunk, _impl_.min_time_ms_),
  PROTOBUF_FIELD_OFFSET(::prometheus::Chunk, _impl_.max_time_ms_),
  PROTOBUF_FIELD_OFFSET(::prometheus::Chunk, _impl_.type_),
  PROTOBUF_FIELD_OFFSET(::prometheus::Chunk, _impl_.data_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::prometheus::ChunkedSeries, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::prometheus::ChunkedSeries, _impl_.labels_),
  PROTOBUF_FIELD_OFFSET(::prometheus::ChunkedSeries, _impl_.chunks_),
};
static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  { 0, -1, -1, sizeof(::prometheus::MetricMetadata)},
  { 10, -1, -1, sizeof(::prometheus::Sample)},
  { 18, -1, -1, sizeof(::prometheus::Exemplar)},
  { 27, -1, -1, sizeof(::prometheus::TimeSeries)},
  { 36, -1, -1, sizeof(::prometheus::Label)},
  { 44, -1, -1, sizeof(::prometheus::Labels)},
  { 51, -1, -1, sizeof(::prometheus::LabelMatcher)},
  { 60, -1, -1, sizeof(::prometheus::ReadHints)},
  { 73, -1, -1, sizeof(::prometheus::Chunk)},
  { 83, -1, -1, sizeof(::prometheus::ChunkedSeries)},
};

static const ::_pb::Message* const file_default_instances[] = {
  &::prometheus::_MetricMetadata_default_instance_._instance,
  &::prometheus::_Sample_default_instance_._instance,
  &::prometheus::_Exemplar_default_instance_._instance,
  &::prometheus::_TimeSeries_default_instance_._instance,
  &::prometheus::_Label_default_instance_._instance,
  &::prometheus::_Labels_default_instance_._instance,
  &::prometheus::_LabelMatcher_default_instance_._instance,
  &::prometheus::_ReadHints_default_instance_._instance,
  &::prometheus::_Chunk_default_instance_._instance,
  &::prometheus::_ChunkedSeries_default_instance_._instance,
};

const char descriptor_table_protodef_prometheus_2fremote_2ftypes_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
  "\n\035prometheus/remote/types.proto\022\nprometh"
  "eus\"\370\001\n\016MetricMetadata\0223\n\004type\030\001 \001(\0162%.p"
  "rometheus.MetricMetadata.MetricType\022\032\n\022m"
  "etric_family_name\030\002 \001(\t\022\014\n\004help\030\004 \001(\t\022\014\n"
  "\004unit\030\005 \001(\t\"y\n\nMetricType\022\013\n\007UNKNOWN\020\000\022\013"
  "\n\007COUNTER\020\001\022\t\n\005GAUGE\020\002\022\r\n\tHISTOGRAM\020\003\022\022\n"
  "\016GAUGEHISTOGRAM\020\004\022\013\n\007SUMMARY\020\005\022\010\n\004INFO\020\006"
  "\022\014\n\010STATESET\020\007\"*\n\006Sample\022\r\n\005value\030\001 \001(\001\022"
  "\021\n\ttimestamp\030\002 \001(\003\"O\n\010Exemplar\022!\n\006labels"
  "\030\001 \003(\0132\021.prometheus.Label\022\r\n\005value\030\002 \001(\001"
  "\022\021\n\ttimestamp\030\003 \001(\003\"}\n\nTimeSeries\022!\n\006lab"
  "els\030\001 \003(\0132\021.prometheus.Label\022#\n\007samples\030"
  "\002 \003(\0132\022.prometheus.Sample\022\'\n\texemplars\030\003"
  " \003(\0132\024.prometheus.Exemplar\"$\n\005Label\022\014\n\004n"
  "ame\030\001 \001(\t\022\r\n\005value\030\002 \001(\t\"+\n\006Labels\022!\n\006la"
  "bels\030\001 \003(\0132\021.prometheus.Label\"\202\001\n\014LabelM"
  "atcher\022+\n\004type\030\001 \001(\0162\035.prometheus.LabelM"
  "atcher.Type\022\014\n\004name\030\002 \001(\t\022\r\n\005value\030\003 \001(\t"
  "\"(\n\004Type\022\006\n\002EQ\020\000\022\007\n\003NEQ\020\001\022\006\n\002RE\020\002\022\007\n\003NRE"
  "\020\003\"|\n\tReadHints\022\017\n\007step_ms\030\001 \001(\003\022\014\n\004func"
  "\030\002 \001(\t\022\020\n\010start_ms\030\003 \001(\003\022\016\n\006end_ms\030\004 \001(\003"
  "\022\020\n\010grouping\030\005 \003(\t\022\n\n\002by\030\006 \001(\010\022\020\n\010range_"
  "ms\030\007 \001(\003\"\213\001\n\005Chunk\022\023\n\013min_time_ms\030\001 \001(\003\022"
  "\023\n\013max_time_ms\030\002 \001(\003\022(\n\004type\030\003 \001(\0162\032.pro"
  "metheus.Chunk.Encoding\022\014\n\004data\030\004 \001(\014\" \n\010"
  "Encoding\022\013\n\007UNKNOWN\020\000\022\007\n\003XOR\020\001\"U\n\rChunke"
  "dSeries\022!\n\006labels\030\001 \003(\0132\021.prometheus.Lab"
  "el\022!\n\006chunks\030\002 \003(\0132\021.prometheus.ChunkB=Z"
  ";github.com/GreptimeTeam/greptime-proto/"
  "go/prometheus/remoteb\006proto3"
  ;
static ::_pbi::once_flag descriptor_table_prometheus_2fremote_2ftypes_2eproto_once;
const ::_pbi::DescriptorTable descriptor_table_prometheus_2fremote_2ftypes_2eproto = {
    false, false, 1188, descriptor_table_protodef_prometheus_2fremote_2ftypes_2eproto,
    "prometheus/remote/types.proto",
    &descriptor_table_prometheus_2fremote_2ftypes_2eproto_once, nullptr, 0, 10,
    schemas, file_default_instances, TableStruct_prometheus_2fremote_2ftypes_2eproto::offsets,
    file_level_metadata_prometheus_2fremote_2ftypes_2eproto, file_level_enum_descriptors_prometheus_2fremote_2ftypes_2eproto,
    file_level_service_descriptors_prometheus_2fremote_2ftypes_2eproto,
};
PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_prometheus_2fremote_2ftypes_2eproto_getter() {
  return &descriptor_table_prometheus_2fremote_2ftypes_2eproto;
}

// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_prometheus_2fremote_2ftypes_2eproto(&descriptor_table_prometheus_2fremote_2ftypes_2eproto);
namespace prometheus {
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* MetricMetadata_MetricType_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_prometheus_2fremote_2ftypes_2eproto);
  return file_level_enum_descriptors_prometheus_2fremote_2ftypes_2eproto[0];
}
bool MetricMetadata_MetricType_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
    case 6:
    case 7:
      return true;
    default:
      return false;
  }
}

#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr MetricMetadata_MetricType MetricMetadata::UNKNOWN;
constexpr MetricMetadata_MetricType MetricMetadata::COUNTER;
constexpr MetricMetadata_MetricType MetricMetadata::GAUGE;
constexpr MetricMetadata_MetricType MetricMetadata::HISTOGRAM;
constexpr MetricMetadata_MetricType MetricMetadata::GAUGEHISTOGRAM;
constexpr MetricMetadata_MetricType MetricMetadata::SUMMARY;
constexpr MetricMetadata_MetricType MetricMetadata::INFO;
constexpr MetricMetadata_MetricType MetricMetadata::STATESET;
constexpr MetricMetadata_MetricType MetricMetadata::MetricType_MIN;
constexpr MetricMetadata_MetricType MetricMetadata::MetricType_MAX;
constexpr int MetricMetadata::MetricType_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* LabelMatcher_Type_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_prometheus_2fremote_2ftypes_2eproto);
  return file_level_enum_descriptors_prometheus_2fremote_2ftypes_2eproto[1];
}
bool LabelMatcher_Type_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
    case 3:
      return true;
    default:
      return false;
  }
}

#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr LabelMatcher_Type LabelMatcher::EQ;
constexpr LabelMatcher_Type LabelMatcher::NEQ;
constexpr LabelMatcher_Type LabelMatcher::RE;
constexpr LabelMatcher_Type LabelMatcher::NRE;
constexpr LabelMatcher_Type LabelMatcher::Type_MIN;
constexpr LabelMatcher_Type LabelMatcher::Type_MAX;
constexpr int LabelMatcher::Type_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Chunk_Encoding_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_prometheus_2fremote_2ftypes_2eproto);
  return file_level_enum_descriptors_prometheus_2fremote_2ftypes_2eproto[2];
}
bool Chunk_Encoding_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
      return true;
    default:
      return false;
  }
}

#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr Chunk_Encoding Chunk::UNKNOWN;
constexpr Chunk_Encoding Chunk::XOR;
constexpr Chunk_Encoding Chunk::Encoding_MIN;
constexpr Chunk_Encoding Chunk::Encoding_MAX;
constexpr int Chunk::Encoding_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))

// ===================================================================

class MetricMetadata::_Internal {
 public:
};

MetricMetadata::MetricMetadata(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor(arena, is_message_owned);
  // @@protoc_insertion_point(arena_constructor:prometheus.MetricMetadata)
}
MetricMetadata::MetricMetadata(const MetricMetadata& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  MetricMetadata* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.metric_family_name_){}
    , decltype(_impl_.help_){}
    , decltype(_impl_.unit_){}
    , decltype(_impl_.type_){}
    , /*decltype(_impl_._cached_size_)*/{}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _impl_.metric_family_name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.metric_family_name_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_metric_family_name().empty()) {
    _this->_impl_.metric_family_name_.Set(from._internal_metric_family_name(), 
      _this->GetArenaForAllocation());
  }
  _impl_.help_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.help_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_help().empty()) {
    _this->_impl_.help_.Set(from._internal_help(), 
      _this->GetArenaForAllocation());
  }
  _impl_.unit_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.unit_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_unit().empty()) {
    _this->_impl_.unit_.Set(from._internal_unit(), 
      _this->GetArenaForAllocation());
  }
  _this->_impl_.type_ = from._impl_.type_;
  // @@protoc_insertion_point(copy_constructor:prometheus.MetricMetadata)
}

inline void MetricMetadata::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_.metric_family_name_){}
    , decltype(_impl_.help_){}
    , decltype(_impl_.unit_){}
    , decltype(_impl_.type_){0}
    , /*decltype(_impl_._cached_size_)*/{}
  };
  _impl_.metric_family_name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.metric_family_name_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.help_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.help_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.unit_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.unit_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

MetricMetadata::~MetricMetadata() {
  // @@protoc_insertion_point(destructor:prometheus.MetricMetadata)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void MetricMetadata::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.metric_family_name_.Destroy();
  _impl_.help_.Destroy();
  _impl_.unit_.Destroy();
}

void MetricMetadata::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void MetricMetadata::Clear() {
// @@protoc_insertion_point(message_clear_start:prometheus.MetricMetadata)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.metric_family_name_.ClearToEmpty();
  _impl_.help_.ClearToEmpty();
  _impl_.unit_.ClearToEmpty();
  _impl_.type_ = 0;
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* MetricMetadata::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .prometheus.MetricMetadata.MetricType type = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          _internal_set_type(static_cast<::prometheus::MetricMetadata_MetricType>(val));
        } else
          goto handle_unusual;
        continue;
      // string metric_family_name = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_metric_family_name();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, "prometheus.MetricMetadata.metric_family_name"));
        } else
          goto handle_unusual;
        continue;
      // string help = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
          auto str = _internal_mutable_help();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, "prometheus.MetricMetadata.help"));
        } else
          goto handle_unusual;
        continue;
      // string unit = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
          auto str = _internal_mutable_unit();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, "prometheus.MetricMetadata.unit"));
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* MetricMetadata::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:prometheus.MetricMetadata)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .prometheus.MetricMetadata.MetricType type = 1;
  if (this->_internal_type() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
      1, this->_internal_type(), target);
  }

  // string metric_family_name = 2;
  if (!this->_internal_metric_family_name().empty()) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_metric_family_name().data(), static_cast<int>(this->_internal_metric_family_name().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "prometheus.MetricMetadata.metric_family_name");
    target = stream->WriteStringMaybeAliased(
        2, this->_internal_metric_family_name(), target);
  }

  // string help = 4;
  if (!this->_internal_help().empty()) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_help().data(), static_cast<int>(this->_internal_help().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "prometheus.MetricMetadata.help");
    target = stream->WriteStringMaybeAliased(
        4, this->_internal_help(), target);
  }

  // string unit = 5;
  if (!this->_internal_unit().empty()) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_unit().data(), static_cast<int>(this->_internal_unit().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "prometheus.MetricMetadata.unit");
    target = stream->WriteStringMaybeAliased(
        5, this->_internal_unit(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:prometheus.MetricMetadata)
  return target;
}

size_t MetricMetadata::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:prometheus.MetricMetadata)
  size_t total_size = 0;

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // string metric_family_name = 2;
  if (!this->_internal_metric_family_name().empty()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_metric_family_name());
  }

  // string help = 4;
  if (!this->_internal_help().empty()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_help());
  }

  // string unit = 5;
  if (!this->_internal_unit().empty()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_unit());
  }

  // .prometheus.MetricMetadata.MetricType type = 1;
  if (this->_internal_type() != 0) {
    total_size += 1 +
      ::_pbi::WireFormatLite::EnumSize(this->_internal_type());
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData MetricMetadata::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    MetricMetadata::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*MetricMetadata::GetClassData() const { return &_class_data_; }


void MetricMetadata::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<MetricMetadata*>(&to_msg);
  auto& from = static_cast<const MetricMetadata&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:prometheus.MetricMetadata)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (!from._internal_metric_family_name().empty()) {
    _this->_internal_set_metric_family_name(from._internal_metric_family_name());
  }
  if (!from._internal_help().empty()) {
    _this->_internal_set_help(from._internal_help());
  }
  if (!from._internal_unit().empty()) {
    _this->_internal_set_unit(from._internal_unit());
  }
  if (from._internal_type() != 0) {
    _this->_internal_set_type(from._internal_type());
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void MetricMetadata::CopyFrom(const MetricMetadata& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:prometheus.MetricMetadata)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool MetricMetadata::IsInitialized() const {
  return true;
}

void MetricMetadata::InternalSwap(MetricMetadata* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.metric_family_name_, lhs_arena,
      &other->_impl_.metric_family_name_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.help_, lhs_arena,
      &other->_impl_.help_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.unit_, lhs_arena,
      &other->_impl_.unit_, rhs_arena
  );
  swap(_impl_.type_, other->_impl_.type_);
}

::PROTOBUF_NAMESPACE_ID::Metadata MetricMetadata::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_prometheus_2fremote_2ftypes_2eproto_getter, &descriptor_table_prometheus_2fremote_2ftypes_2eproto_once,
      file_level_metadata_prometheus_2fremote_2ftypes_2eproto[0]);
}

// ===================================================================

class Sample::_Internal {
 public:
};

Sample::Sample(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor(arena, is_message_owned);
  // @@protoc_insertion_point(arena_constructor:prometheus.Sample)
}
Sample::Sample(const Sample& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  Sample* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.value_){}
    , decltype(_impl_.timestamp_){}
    , /*decltype(_impl_._cached_size_)*/{}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&_impl_.value_, &from._impl_.value_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.timestamp_) -
    reinterpret_cast<char*>(&_impl_.value_)) + sizeof(_impl_.timestamp_));
  // @@protoc_insertion_point(copy_constructor:prometheus.Sample)
}

inline void Sample::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_.value_){0}
    , decltype(_impl_.timestamp_){int64_t{0}}
    , /*decltype(_impl_._cached_size_)*/{}
  };
}

Sample::~Sample() {
  // @@protoc_insertion_point(destructor:prometheus.Sample)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void Sample::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}

void Sample::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void Sample::Clear() {
// @@protoc_insertion_point(message_clear_start:prometheus.Sample)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  ::memset(&_impl_.value_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&_impl_.timestamp_) -
      reinterpret_cast<char*>(&_impl_.value_)) + sizeof(_impl_.timestamp_));
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* Sample::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // double value = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 9)) {
          _impl_.value_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
          ptr += sizeof(double);
        } else
          goto handle_unusual;
        continue;
      // int64 timestamp = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _impl_.timestamp_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* Sample::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:prometheus.Sample)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // double value = 1;
  static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
  double tmp_value = this->_internal_value();
  uint64_t raw_value;
  memcpy(&raw_value, &tmp_value, sizeof(tmp_value));
  if (raw_value != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteDoubleToArray(1, this->_internal_value(), target);
  }

  // int64 timestamp = 2;
  if (this->_internal_timestamp() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt64ToArray(2, this->_internal_timestamp(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:prometheus.Sample)
  return target;
}

size_t Sample::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:prometheus.Sample)
  size_t total_size = 0;

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // double value = 1;
  static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
  double tmp_value = this->_internal_value();
  uint64_t raw_value;
  memcpy(&raw_value, &tmp_value, sizeof(tmp_value));
  if (raw_value != 0) {
    total_size += 1 + 8;
  }

  // int64 timestamp = 2;
  if (this->_internal_timestamp() != 0) {
    total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_timestamp());
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Sample::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    Sample::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Sample::GetClassData() const { return &_class_data_; }


void Sample::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<Sample*>(&to_msg);
  auto& from = static_cast<const Sample&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:prometheus.Sample)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
  double tmp_value = from._internal_value();
  uint64_t raw_value;
  memcpy(&raw_value, &tmp_value, sizeof(tmp_value));
  if (raw_value != 0) {
    _this->_internal_set_value(from._internal_value());
  }
  if (from._internal_timestamp() != 0) {
    _this->_internal_set_timestamp(from._internal_timestamp());
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void Sample::CopyFrom(const Sample& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:prometheus.Sample)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool Sample::IsInitialized() const {
  return true;
}

void Sample::InternalSwap(Sample* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(Sample, _impl_.timestamp_)
      + sizeof(Sample::_impl_.timestamp_)
      - PROTOBUF_FIELD_OFFSET(Sample, _impl_.value_)>(
          reinterpret_cast<char*>(&_impl_.value_),
          reinterpret_cast<char*>(&other->_impl_.value_));
}

::PROTOBUF_NAMESPACE_ID::Metadata Sample::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_prometheus_2fremote_2ftypes_2eproto_getter, &descriptor_table_prometheus_2fremote_2ftypes_2eproto_once,
      file_level_metadata_prometheus_2fremote_2ftypes_2eproto[1]);
}

// ===================================================================

class Exemplar::_Internal {
 public:
};

Exemplar::Exemplar(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor(arena, is_message_owned);
  // @@protoc_insertion_point(arena_constructor:prometheus.Exemplar)
}
Exemplar::Exemplar(const Exemplar& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  Exemplar* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.labels_){from._impl_.labels_}
    , decltype(_impl_.value_){}
    , decltype(_impl_.timestamp_){}
    , /*decltype(_impl_._cached_size_)*/{}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&_impl_.value_, &from._impl_.value_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.timestamp_) -
    reinterpret_cast<char*>(&_impl_.value_)) + sizeof(_impl_.timestamp_));
  // @@protoc_insertion_point(copy_constructor:prometheus.Exemplar)
}

inline void Exemplar::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_.labels_){arena}
    , decltype(_impl_.value_){0}
    , decltype(_impl_.timestamp_){int64_t{0}}
    , /*decltype(_impl_._cached_size_)*/{}
  };
}

Exemplar::~Exemplar() {
  // @@protoc_insertion_point(destructor:prometheus.Exemplar)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void Exemplar::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.labels_.~RepeatedPtrField();
}

void Exemplar::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void Exemplar::Clear() {
// @@protoc_insertion_point(message_clear_start:prometheus.Exemplar)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.labels_.Clear();
  ::memset(&_impl_.value_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&_impl_.timestamp_) -
      reinterpret_cast<char*>(&_impl_.value_)) + sizeof(_impl_.timestamp_));
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* Exemplar::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // repeated .prometheus.Label labels = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_labels(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
        } else
          goto handle_unusual;
        continue;
      // double value = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 17)) {
          _impl_.value_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
          ptr += sizeof(double);
        } else
          goto handle_unusual;
        continue;
      // int64 timestamp = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          _impl_.timestamp_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* Exemplar::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:prometheus.Exemplar)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .prometheus.Label labels = 1;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_labels_size()); i < n; i++) {
    const auto& repfield = this->_internal_labels(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
  }

  // double value = 2;
  static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
  double tmp_value = this->_internal_value();
  uint64_t raw_value;
  memcpy(&raw_value, &tmp_value, sizeof(tmp_value));
  if (raw_value != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteDoubleToArray(2, this->_internal_value(), target);
  }

  // int64 timestamp = 3;
  if (this->_internal_timestamp() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt64ToArray(3, this->_internal_timestamp(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:prometheus.Exemplar)
  return target;
}

size_t Exemplar::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:prometheus.Exemplar)
  size_t total_size = 0;

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated .prometheus.Label labels = 1;
  total_size += 1UL * this->_internal_labels_size();
  for (const auto& msg : this->_impl_.labels_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // double value = 2;
  static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
  double tmp_value = this->_internal_value();
  uint64_t raw_value;
  memcpy(&raw_value, &tmp_value, sizeof(tmp_value));
  if (raw_value != 0) {
    total_size += 1 + 8;
  }

  // int64 timestamp = 3;
  if (this->_internal_timestamp() != 0) {
    total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_timestamp());
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Exemplar::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    Exemplar::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Exemplar::GetClassData() const { return &_class_data_; }


void Exemplar::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<Exemplar*>(&to_msg);
  auto& from = static_cast<const Exemplar&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:prometheus.Exemplar)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  _this->_impl_.labels_.MergeFrom(from._impl_.labels_);
  static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
  double tmp_value = from._internal_value();
  uint64_t raw_value;
  memcpy(&raw_value, &tmp_value, sizeof(tmp_value));
  if (raw_value != 0) {
    _this->_internal_set_value(from._internal_value());
  }
  if (from._internal_timestamp() != 0) {
    _this->_internal_set_timestamp(from._internal_timestamp());
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void Exemplar::CopyFrom(const Exemplar& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:prometheus.Exemplar)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool Exemplar::IsInitialized() const {
  return true;
}

void Exemplar::InternalSwap(Exemplar* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  _impl_.labels_.InternalSwap(&other->_impl_.labels_);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(Exemplar, _impl_.timestamp_)
      + sizeof(Exemplar::_impl_.timestamp_)
      - PROTOBUF_FIELD_OFFSET(Exemplar, _impl_.value_)>(
          reinterpret_cast<char*>(&_impl_.value_),
          reinterpret_cast<char*>(&other->_impl_.value_));
}

::PROTOBUF_NAMESPACE_ID::Metadata Exemplar::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_prometheus_2fremote_2ftypes_2eproto_getter, &descriptor_table_prometheus_2fremote_2ftypes_2eproto_once,
      file_level_metadata_prometheus_2fremote_2ftypes_2eproto[2]);
}

// ===================================================================

class TimeSeries::_Internal {
 public:
};

TimeSeries::TimeSeries(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor(arena, is_message_owned);
  // @@protoc_insertion_point(arena_constructor:prometheus.TimeSeries)
}
TimeSeries::TimeSeries(const TimeSeries& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  TimeSeries* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.labels_){from._impl_.labels_}
    , decltype(_impl_.samples_){from._impl_.samples_}
    , decltype(_impl_.exemplars_){from._impl_.exemplars_}
    , /*decltype(_impl_._cached_size_)*/{}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:prometheus.TimeSeries)
}

inline void TimeSeries::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_.labels_){arena}
    , decltype(_impl_.samples_){arena}
    , decltype(_impl_.exemplars_){arena}
    , /*decltype(_impl_._cached_size_)*/{}
  };
}

TimeSeries::~TimeSeries() {
  // @@protoc_insertion_point(destructor:prometheus.TimeSeries)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void TimeSeries::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.labels_.~RepeatedPtrField();
  _impl_.samples_.~RepeatedPtrField();
  _impl_.exemplars_.~RepeatedPtrField();
}

void TimeSeries::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void TimeSeries::Clear() {
// @@protoc_insertion_point(message_clear_start:prometheus.TimeSeries)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.labels_.Clear();
  _impl_.samples_.Clear();
  _impl_.exemplars_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* TimeSeries::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // repeated .prometheus.Label labels = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_labels(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
        } else
          goto handle_unusual;
        continue;
      // repeated .prometheus.Sample samples = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_samples(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
        } else
          goto handle_unusual;
        continue;
      // repeated .prometheus.Exemplar exemplars = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_exemplars(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* TimeSeries::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:prometheus.TimeSeries)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .prometheus.Label labels = 1;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_labels_size()); i < n; i++) {
    const auto& repfield = this->_internal_labels(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
  }

  // repeated .prometheus.Sample samples = 2;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_samples_size()); i < n; i++) {
    const auto& repfield = this->_internal_samples(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream);
  }

  // repeated .prometheus.Exemplar exemplars = 3;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_exemplars_size()); i < n; i++) {
    const auto& repfield = this->_internal_exemplars(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(3, repfield, repfield.GetCachedSize(), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:prometheus.TimeSeries)
  return target;
}

size_t TimeSeries::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:prometheus.TimeSeries)
  size_t total_size = 0;

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated .prometheus.Label labels = 1;
  total_size += 1UL * this->_internal_labels_size();
  for (const auto& msg : this->_impl_.labels_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // repeated .prometheus.Sample samples = 2;
  total_size += 1UL * this->_internal_samples_size();
  for (const auto& msg : this->_impl_.samples_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // repeated .prometheus.Exemplar exemplars = 3;
  total_size += 1UL * this->_internal_exemplars_size();
  for (const auto& msg : this->_impl_.exemplars_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData TimeSeries::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    TimeSeries::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*TimeSeries::GetClassData() const { return &_class_data_; }


void TimeSeries::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<TimeSeries*>(&to_msg);
  auto& from = static_cast<const TimeSeries&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:prometheus.TimeSeries)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  _this->_impl_.labels_.MergeFrom(from._impl_.labels_);
  _this->_impl_.samples_.MergeFrom(from._impl_.samples_);
  _this->_impl_.exemplars_.MergeFrom(from._impl_.exemplars_);
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void TimeSeries::CopyFrom(const TimeSeries& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:prometheus.TimeSeries)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool TimeSeries::IsInitialized() const {
  return true;
}

void TimeSeries::InternalSwap(TimeSeries* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  _impl_.labels_.InternalSwap(&other->_impl_.labels_);
  _impl_.samples_.InternalSwap(&other->_impl_.samples_);
  _impl_.exemplars_.InternalSwap(&other->_impl_.exemplars_);
}

::PROTOBUF_NAMESPACE_ID::Metadata TimeSeries::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_prometheus_2fremote_2ftypes_2eproto_getter, &descriptor_table_prometheus_2fremote_2ftypes_2eproto_once,
      file_level_metadata_prometheus_2fremote_2ftypes_2eproto[3]);
}

// ===================================================================

class Label::_Internal {
 public:
};

Label::Label(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor(arena, is_message_owned);
  // @@protoc_insertion_point(arena_constructor:prometheus.Label)
}
Label::Label(const Label& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  Label* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.name_){}
    , decltype(_impl_.value_){}
    , /*decltype(_impl_._cached_size_)*/{}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _impl_.name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.name_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_name().empty()) {
    _this->_impl_.name_.Set(from._internal_name(), 
      _this->GetArenaForAllocation());
  }
  _impl_.value_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.value_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_value().empty()) {
    _this->_impl_.value_.Set(from._internal_value(), 
      _this->GetArenaForAllocation());
  }
  // @@protoc_insertion_point(copy_constructor:prometheus.Label)
}

inline void Label::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_.name_){}
    , decltype(_impl_.value_){}
    , /*decltype(_impl_._cached_size_)*/{}
  };
  _impl_.name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.name_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.value_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.value_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

Label::~Label() {
  // @@protoc_insertion_point(destructor:prometheus.Label)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void Label::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.name_.Destroy();
  _impl_.value_.Destroy();
}

void Label::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void Label::Clear() {
// @@protoc_insertion_point(message_clear_start:prometheus.Label)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.name_.ClearToEmpty();
  _impl_.value_.ClearToEmpty();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* Label::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // string name = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_name();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, "prometheus.Label.name"));
        } else
          goto handle_unusual;
        continue;
      // string value = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_value();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, "prometheus.Label.value"));
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* Label::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:prometheus.Label)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // string name = 1;
  if (!this->_internal_name().empty()) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "prometheus.Label.name");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_name(), target);
  }

  // string value = 2;
  if (!this->_internal_value().empty()) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_value().data(), static_cast<int>(this->_internal_value().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "prometheus.Label.value");
    target = stream->WriteStringMaybeAliased(
        2, this->_internal_value(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:prometheus.Label)
  return target;
}

size_t Label::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:prometheus.Label)
  size_t total_size = 0;

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // string name = 1;
  if (!this->_internal_name().empty()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_name());
  }

  // string value = 2;
  if (!this->_internal_value().empty()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_value());
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Label::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    Label::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Label::GetClassData() const { return &_class_data_; }


void Label::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<Label*>(&to_msg);
  auto& from = static_cast<const Label&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:prometheus.Label)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (!from._internal_name().empty()) {
    _this->_internal_set_name(from._internal_name());
  }
  if (!from._internal_value().empty()) {
    _this->_internal_set_value(from._internal_value());
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void Label::CopyFrom(const Label& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:prometheus.Label)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool Label::IsInitialized() const {
  return true;
}

void Label::InternalSwap(Label* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.name_, lhs_arena,
      &other->_impl_.name_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.value_, lhs_arena,
      &other->_impl_.value_, rhs_arena
  );
}

::PROTOBUF_NAMESPACE_ID::Metadata Label::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_prometheus_2fremote_2ftypes_2eproto_getter, &descriptor_table_prometheus_2fremote_2ftypes_2eproto_once,
      file_level_metadata_prometheus_2fremote_2ftypes_2eproto[4]);
}

// ===================================================================

class Labels::_Internal {
 public:
};

Labels::Labels(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor(arena, is_message_owned);
  // @@protoc_insertion_point(arena_constructor:prometheus.Labels)
}
Labels::Labels(const Labels& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  Labels* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.labels_){from._impl_.labels_}
    , /*decltype(_impl_._cached_size_)*/{}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:prometheus.Labels)
}

inline void Labels::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_.labels_){arena}
    , /*decltype(_impl_._cached_size_)*/{}
  };
}

Labels::~Labels() {
  // @@protoc_insertion_point(destructor:prometheus.Labels)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void Labels::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.labels_.~RepeatedPtrField();
}

void Labels::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void Labels::Clear() {
// @@protoc_insertion_point(message_clear_start:prometheus.Labels)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.labels_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* Labels::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // repeated .prometheus.Label labels = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_labels(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* Labels::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:prometheus.Labels)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .prometheus.Label labels = 1;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_labels_size()); i < n; i++) {
    const auto& repfield = this->_internal_labels(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:prometheus.Labels)
  return target;
}

size_t Labels::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:prometheus.Labels)
  size_t total_size = 0;

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated .prometheus.Label labels = 1;
  total_size += 1UL * this->_internal_labels_size();
  for (const auto& msg : this->_impl_.labels_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Labels::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    Labels::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Labels::GetClassData() const { return &_class_data_; }


void Labels::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<Labels*>(&to_msg);
  auto& from = static_cast<const Labels&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:prometheus.Labels)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  _this->_impl_.labels_.MergeFrom(from._impl_.labels_);
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void Labels::CopyFrom(const Labels& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:prometheus.Labels)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool Labels::IsInitialized() const {
  return true;
}

void Labels::InternalSwap(Labels* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  _impl_.labels_.InternalSwap(&other->_impl_.labels_);
}

::PROTOBUF_NAMESPACE_ID::Metadata Labels::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_prometheus_2fremote_2ftypes_2eproto_getter, &descriptor_table_prometheus_2fremote_2ftypes_2eproto_once,
      file_level_metadata_prometheus_2fremote_2ftypes_2eproto[5]);
}

// ===================================================================

class LabelMatcher::_Internal {
 public:
};

LabelMatcher::LabelMatcher(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor(arena, is_message_owned);
  // @@protoc_insertion_point(arena_constructor:prometheus.LabelMatcher)
}
LabelMatcher::LabelMatcher(const LabelMatcher& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  LabelMatcher* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.name_){}
    , decltype(_impl_.value_){}
    , decltype(_impl_.type_){}
    , /*decltype(_impl_._cached_size_)*/{}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _impl_.name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.name_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_name().empty()) {
    _this->_impl_.name_.Set(from._internal_name(), 
      _this->GetArenaForAllocation());
  }
  _impl_.value_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.value_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_value().empty()) {
    _this->_impl_.value_.Set(from._internal_value(), 
      _this->GetArenaForAllocation());
  }
  _this->_impl_.type_ = from._impl_.type_;
  // @@protoc_insertion_point(copy_constructor:prometheus.LabelMatcher)
}

inline void LabelMatcher::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_.name_){}
    , decltype(_impl_.value_){}
    , decltype(_impl_.type_){0}
    , /*decltype(_impl_._cached_size_)*/{}
  };
  _impl_.name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.name_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.value_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.value_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

LabelMatcher::~LabelMatcher() {
  // @@protoc_insertion_point(destructor:prometheus.LabelMatcher)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void LabelMatcher::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.name_.Destroy();
  _impl_.value_.Destroy();
}

void LabelMatcher::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void LabelMatcher::Clear() {
// @@protoc_insertion_point(message_clear_start:prometheus.LabelMatcher)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.name_.ClearToEmpty();
  _impl_.value_.ClearToEmpty();
  _impl_.type_ = 0;
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* LabelMatcher::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .prometheus.LabelMatcher.Type type = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          _internal_set_type(static_cast<::prometheus::LabelMatcher_Type>(val));
        } else
          goto handle_unusual;
        continue;
      // string name = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_name();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, "prometheus.LabelMatcher.name"));
        } else
          goto handle_unusual;
        continue;
      // string value = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          auto str = _internal_mutable_value();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, "prometheus.LabelMatcher.value"));
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* LabelMatcher::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:prometheus.LabelMatcher)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .prometheus.LabelMatcher.Type type = 1;
  if (this->_internal_type() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
      1, this->_internal_type(), target);
  }

  // string name = 2;
  if (!this->_internal_name().empty()) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "prometheus.LabelMatcher.name");
    target = stream->WriteStringMaybeAliased(
        2, this->_internal_name(), target);
  }

  // string value = 3;
  if (!this->_internal_value().empty()) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_value().data(), static_cast<int>(this->_internal_value().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "prometheus.LabelMatcher.value");
    target = stream->WriteStringMaybeAliased(
        3, this->_internal_value(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:prometheus.LabelMatcher)
  return target;
}

size_t LabelMatcher::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:prometheus.LabelMatcher)
  size_t total_size = 0;

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // string name = 2;
  if (!this->_internal_name().empty()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_name());
  }

  // string value = 3;
  if (!this->_internal_value().empty()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_value());
  }

  // .prometheus.LabelMatcher.Type type = 1;
  if (this->_internal_type() != 0) {
    total_size += 1 +
      ::_pbi::WireFormatLite::EnumSize(this->_internal_type());
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData LabelMatcher::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    LabelMatcher::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*LabelMatcher::GetClassData() const { return &_class_data_; }


void LabelMatcher::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<LabelMatcher*>(&to_msg);
  auto& from = static_cast<const LabelMatcher&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:prometheus.LabelMatcher)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (!from._internal_name().empty()) {
    _this->_internal_set_name(from._internal_name());
  }
  if (!from._internal_value().empty()) {
    _this->_internal_set_value(from._internal_value());
  }
  if (from._internal_type() != 0) {
    _this->_internal_set_type(from._internal_type());
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void LabelMatcher::CopyFrom(const LabelMatcher& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:prometheus.LabelMatcher)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool LabelMatcher::IsInitialized() const {
  return true;
}

void LabelMatcher::InternalSwap(LabelMatcher* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.name_, lhs_arena,
      &other->_impl_.name_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.value_, lhs_arena,
      &other->_impl_.value_, rhs_arena
  );
  swap(_impl_.type_, other->_impl_.type_);
}

::PROTOBUF_NAMESPACE_ID::Metadata LabelMatcher::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_prometheus_2fremote_2ftypes_2eproto_getter, &descriptor_table_prometheus_2fremote_2ftypes_2eproto_once,
      file_level_metadata_prometheus_2fremote_2ftypes_2eproto[6]);
}

// ===================================================================

class ReadHints::_Internal {
 public:
};

ReadHints::ReadHints(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor(arena, is_message_owned);
  // @@protoc_insertion_point(arena_constructor:prometheus.ReadHints)
}
ReadHints::ReadHints(const ReadHints& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  ReadHints* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.grouping_){from._impl_.grouping_}
    , decltype(_impl_.func_){}
    , decltype(_impl_.step_ms_){}
    , decltype(_impl_.start_ms_){}
    , decltype(_impl_.end_ms_){}
    , decltype(_impl_.range_ms_){}
    , decltype(_impl_.by_){}
    , /*decltype(_impl_._cached_size_)*/{}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _impl_.func_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.func_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_func().empty()) {
    _this->_impl_.func_.Set(from._internal_func(), 
      _this->GetArenaForAllocation());
  }
  ::memcpy(&_impl_.step_ms_, &from._impl_.step_ms_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.by_) -
    reinterpret_cast<char*>(&_impl_.step_ms_)) + sizeof(_impl_.by_));
  // @@protoc_insertion_point(copy_constructor:prometheus.ReadHints)
}

inline void ReadHints::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_.grouping_){arena}
    , decltype(_impl_.func_){}
    , decltype(_impl_.step_ms_){int64_t{0}}
    , decltype(_impl_.start_ms_){int64_t{0}}
    , decltype(_impl_.end_ms_){int64_t{0}}
    , decltype(_impl_.range_ms_){int64_t{0}}
    , decltype(_impl_.by_){false}
    , /*decltype(_impl_._cached_size_)*/{}
  };
  _impl_.func_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.func_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

ReadHints::~ReadHints() {
  // @@protoc_insertion_point(destructor:prometheus.ReadHints)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void ReadHints::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.grouping_.~RepeatedPtrField();
  _impl_.func_.Destroy();
}

void ReadHints::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void ReadHints::Clear() {
// @@protoc_insertion_point(message_clear_start:prometheus.ReadHints)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.grouping_.Clear();
  _impl_.func_.ClearToEmpty();
  ::memset(&_impl_.step_ms_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&_impl_.by_) -
      reinterpret_cast<char*>(&_impl_.step_ms_)) + sizeof(_impl_.by_));
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* ReadHints::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // int64 step_ms = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _impl_.step_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // string func = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_func();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, "prometheus.ReadHints.func"));
        } else
          goto handle_unusual;
        continue;
      // int64 start_ms = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          _impl_.start_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // int64 end_ms = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          _impl_.end_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated string grouping = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
          ptr -= 1;
          do {
            ptr += 1;
            auto str = _internal_add_grouping();
            ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
            CHK_(ptr);
            CHK_(::_pbi::VerifyUTF8(str, "prometheus.ReadHints.grouping"));
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<42>(ptr));
        } else
          goto handle_unusual;
        continue;
      // bool by = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
          _impl_.by_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // int64 range_ms = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
          _impl_.range_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* ReadHints::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:prometheus.ReadHints)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // int64 step_ms = 1;
  if (this->_internal_step_ms() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt64ToArray(1, this->_internal_step_ms(), target);
  }

  // string func = 2;
  if (!this->_internal_func().empty()) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_func().data(), static_cast<int>(this->_internal_func().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "prometheus.ReadHints.func");
    target = stream->WriteStringMaybeAliased(
        2, this->_internal_func(), target);
  }

  // int64 start_ms = 3;
  if (this->_internal_start_ms() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt64ToArray(3, this->_internal_start_ms(), target);
  }

  // int64 end_ms = 4;
  if (this->_internal_end_ms() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt64ToArray(4, this->_internal_end_ms(), target);
  }

  // repeated string grouping = 5;
  for (int i = 0, n = this->_internal_grouping_size(); i < n; i++) {
    const auto& s = this->_internal_grouping(i);
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      s.data(), static_cast<int>(s.length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "prometheus.ReadHints.grouping");
    target = stream->WriteString(5, s, target);
  }

  // bool by = 6;
  if (this->_internal_by() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(6, this->_internal_by(), target);
  }

  // int64 range_ms = 7;
  if (this->_internal_range_ms() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt64ToArray(7, this->_internal_range_ms(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:prometheus.ReadHints)
  return target;
}

size_t ReadHints::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:prometheus.ReadHints)
  size_t total_size = 0;

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated string grouping = 5;
  total_size += 1 *
      ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.grouping_.size());
  for (int i = 0, n = _impl_.grouping_.size(); i < n; i++) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
      _impl_.grouping_.Get(i));
  }

  // string func = 2;
  if (!this->_internal_func().empty()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_func());
  }

  // int64 step_ms = 1;
  if (this->_internal_step_ms() != 0) {
    total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_step_ms());
  }

  // int64 start_ms = 3;
  if (this->_internal_start_ms() != 0) {
    total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_start_ms());
  }

  // int64 end_ms = 4;
  if (this->_internal_end_ms() != 0) {
    total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_end_ms());
  }

  // int64 range_ms = 7;
  if (this->_internal_range_ms() != 0) {
    total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_range_ms());
  }

  // bool by = 6;
  if (this->_internal_by() != 0) {
    total_size += 1 + 1;
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ReadHints::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    ReadHints::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ReadHints::GetClassData() const { return &_class_data_; }


void ReadHints::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<ReadHints*>(&to_msg);
  auto& from = static_cast<const ReadHints&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:prometheus.ReadHints)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  _this->_impl_.grouping_.MergeFrom(from._impl_.grouping_);
  if (!from._internal_func().empty()) {
    _this->_internal_set_func(from._internal_func());
  }
  if (from._internal_step_ms() != 0) {
    _this->_internal_set_step_ms(from._internal_step_ms());
  }
  if (from._internal_start_ms() != 0) {
    _this->_internal_set_start_ms(from._internal_start_ms());
  }
  if (from._internal_end_ms() != 0) {
    _this->_internal_set_end_ms(from._internal_end_ms());
  }
  if (from._internal_range_ms() != 0) {
    _this->_internal_set_range_ms(from._internal_range_ms());
  }
  if (from._internal_by() != 0) {
    _this->_internal_set_by(from._internal_by());
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void ReadHints::CopyFrom(const ReadHints& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:prometheus.ReadHints)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool ReadHints::IsInitialized() const {
  return true;
}

void ReadHints::InternalSwap(ReadHints* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  _impl_.grouping_.InternalSwap(&other->_impl_.grouping_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.func_, lhs_arena,
      &other->_impl_.func_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(ReadHints, _impl_.by_)
      + sizeof(ReadHints::_impl_.by_)
      - PROTOBUF_FIELD_OFFSET(ReadHints, _impl_.step_ms_)>(
          reinterpret_cast<char*>(&_impl_.step_ms_),
          reinterpret_cast<char*>(&other->_impl_.step_ms_));
}

::PROTOBUF_NAMESPACE_ID::Metadata ReadHints::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_prometheus_2fremote_2ftypes_2eproto_getter, &descriptor_table_prometheus_2fremote_2ftypes_2eproto_once,
      file_level_metadata_prometheus_2fremote_2ftypes_2eproto[7]);
}

// ===================================================================

class Chunk::_Internal {
 public:
};

Chunk::Chunk(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor(arena, is_message_owned);
  // @@protoc_insertion_point(arena_constructor:prometheus.Chunk)
}
Chunk::Chunk(const Chunk& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  Chunk* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.data_){}
    , decltype(_impl_.min_time_ms_){}
    , decltype(_impl_.max_time_ms_){}
    , decltype(_impl_.type_){}
    , /*decltype(_impl_._cached_size_)*/{}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _impl_.data_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.data_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_data().empty()) {
    _this->_impl_.data_.Set(from._internal_data(), 
      _this->GetArenaForAllocation());
  }
  ::memcpy(&_impl_.min_time_ms_, &from._impl_.min_time_ms_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.type_) -
    reinterpret_cast<char*>(&_impl_.min_time_ms_)) + sizeof(_impl_.type_));
  // @@protoc_insertion_point(copy_constructor:prometheus.Chunk)
}

inline void Chunk::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_.data_){}
    , decltype(_impl_.min_time_ms_){int64_t{0}}
    , decltype(_impl_.max_time_ms_){int64_t{0}}
    , decltype(_impl_.type_){0}
    , /*decltype(_impl_._cached_size_)*/{}
  };
  _impl_.data_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.data_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

Chunk::~Chunk() {
  // @@protoc_insertion_point(destructor:prometheus.Chunk)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void Chunk::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.data_.Destroy();
}

void Chunk::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void Chunk::Clear() {
// @@protoc_insertion_point(message_clear_start:prometheus.Chunk)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.data_.ClearToEmpty();
  ::memset(&_impl_.min_time_ms_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&_impl_.type_) -
      reinterpret_cast<char*>(&_impl_.min_time_ms_)) + sizeof(_impl_.type_));
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* Chunk::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // int64 min_time_ms = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _impl_.min_time_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // int64 max_time_ms = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _impl_.max_time_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .prometheus.Chunk.Encoding type = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          _internal_set_type(static_cast<::prometheus::Chunk_Encoding>(val));
        } else
          goto handle_unusual;
        continue;
      // bytes data = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
          auto str = _internal_mutable_data();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* Chunk::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:prometheus.Chunk)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // int64 min_time_ms = 1;
  if (this->_internal_min_time_ms() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt64ToArray(1, this->_internal_min_time_ms(), target);
  }

  // int64 max_time_ms = 2;
  if (this->_internal_max_time_ms() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt64ToArray(2, this->_internal_max_time_ms(), target);
  }

  // .prometheus.Chunk.Encoding type = 3;
  if (this->_internal_type() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
      3, this->_internal_type(), target);
  }

  // bytes data = 4;
  if (!this->_internal_data().empty()) {
    target = stream->WriteBytesMaybeAliased(
        4, this->_internal_data(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:prometheus.Chunk)
  return target;
}

size_t Chunk::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:prometheus.Chunk)
  size_t total_size = 0;

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // bytes data = 4;
  if (!this->_internal_data().empty()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
        this->_internal_data());
  }

  // int64 min_time_ms = 1;
  if (this->_internal_min_time_ms() != 0) {
    total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_min_time_ms());
  }

  // int64 max_time_ms = 2;
  if (this->_internal_max_time_ms() != 0) {
    total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_max_time_ms());
  }

  // .prometheus.Chunk.Encoding type = 3;
  if (this->_internal_type() != 0) {
    total_size += 1 +
      ::_pbi::WireFormatLite::EnumSize(this->_internal_type());
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Chunk::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    Chunk::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Chunk::GetClassData() const { return &_class_data_; }


void Chunk::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<Chunk*>(&to_msg);
  auto& from = static_cast<const Chunk&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:prometheus.Chunk)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (!from._internal_data().empty()) {
    _this->_internal_set_data(from._internal_data());
  }
  if (from._internal_min_time_ms() != 0) {
    _this->_internal_set_min_time_ms(from._internal_min_time_ms());
  }
  if (from._internal_max_time_ms() != 0) {
    _this->_internal_set_max_time_ms(from._internal_max_time_ms());
  }
  if (from._internal_type() != 0) {
    _this->_internal_set_type(from._internal_type());
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void Chunk::CopyFrom(const Chunk& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:prometheus.Chunk)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool Chunk::IsInitialized() const {
  return true;
}

void Chunk::InternalSwap(Chunk* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.data_, lhs_arena,
      &other->_impl_.data_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(Chunk, _impl_.type_)
      + sizeof(Chunk::_impl_.type_)
      - PROTOBUF_FIELD_OFFSET(Chunk, _impl_.min_time_ms_)>(
          reinterpret_cast<char*>(&_impl_.min_time_ms_),
          reinterpret_cast<char*>(&other->_impl_.min_time_ms_));
}

::PROTOBUF_NAMESPACE_ID::Metadata Chunk::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_prometheus_2fremote_2ftypes_2eproto_getter, &descriptor_table_prometheus_2fremote_2ftypes_2eproto_once,
      file_level_metadata_prometheus_2fremote_2ftypes_2eproto[8]);
}

// ===================================================================

class ChunkedSeries::_Internal {
 public:
};

ChunkedSeries::ChunkedSeries(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor(arena, is_message_owned);
  // @@protoc_insertion_point(arena_constructor:prometheus.ChunkedSeries)
}
ChunkedSeries::ChunkedSeries(const ChunkedSeries& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  ChunkedSeries* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.labels_){from._impl_.labels_}
    , decltype(_impl_.chunks_){from._impl_.chunks_}
    , /*decltype(_impl_._cached_size_)*/{}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:prometheus.ChunkedSeries)
}

inline void ChunkedSeries::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_.labels_){arena}
    , decltype(_impl_.chunks_){arena}
    , /*decltype(_impl_._cached_size_)*/{}
  };
}

ChunkedSeries::~ChunkedSeries() {
  // @@protoc_insertion_point(destructor:prometheus.ChunkedSeries)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void ChunkedSeries::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.labels_.~RepeatedPtrField();
  _impl_.chunks_.~RepeatedPtrField();
}

void ChunkedSeries::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void ChunkedSeries::Clear() {
// @@protoc_insertion_point(message_clear_start:prometheus.ChunkedSeries)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.labels_.Clear();
  _impl_.chunks_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* ChunkedSeries::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // repeated .prometheus.Label labels = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_labels(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
        } else
          goto handle_unusual;
        continue;
      // repeated .prometheus.Chunk chunks = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_chunks(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* ChunkedSeries::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:prometheus.ChunkedSeries)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .prometheus.Label labels = 1;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_labels_size()); i < n; i++) {
    const auto& repfield = this->_internal_labels(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
  }

  // repeated .prometheus.Chunk chunks = 2;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_chunks_size()); i < n; i++) {
    const auto& repfield = this->_internal_chunks(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:prometheus.ChunkedSeries)
  return target;
}

size_t ChunkedSeries::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:prometheus.ChunkedSeries)
  size_t total_size = 0;

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated .prometheus.Label labels = 1;
  total_size += 1UL * this->_internal_labels_size();
  for (const auto& msg : this->_impl_.labels_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // repeated .prometheus.Chunk chunks = 2;
  total_size += 1UL * this->_internal_chunks_size();
  for (const auto& msg : this->_impl_.chunks_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ChunkedSeries::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    ChunkedSeries::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ChunkedSeries::GetClassData() const { return &_class_data_; }


void ChunkedSeries::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<ChunkedSeries*>(&to_msg);
  auto& from = static_cast<const ChunkedSeries&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:prometheus.ChunkedSeries)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  _this->_impl_.labels_.MergeFrom(from._impl_.labels_);
  _this->_impl_.chunks_.MergeFrom(from._impl_.chunks_);
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void ChunkedSeries::CopyFrom(const ChunkedSeries& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:prometheus.ChunkedSeries)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool ChunkedSeries::IsInitialized() const {
  return true;
}

void ChunkedSeries::InternalSwap(ChunkedSeries* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  _impl_.labels_.InternalSwap(&other->_impl_.labels_);
  _impl_.chunks_.InternalSwap(&other->_impl_.chunks_);
}

::PROTOBUF_NAMESPACE_ID::Metadata ChunkedSeries::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_prometheus_2fremote_2ftypes_2eproto_getter, &descriptor_table_prometheus_2fremote_2ftypes_2eproto_once,
      file_level_metadata_prometheus_2fremote_2ftypes_2eproto[9]);
}

// @@protoc_insertion_point(namespace_scope)
}  // namespace prometheus
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::prometheus::MetricMetadata*
Arena::CreateMaybeMessage< ::prometheus::MetricMetadata >(Arena* arena) {
  return Arena::CreateMessageInternal< ::prometheus::MetricMetadata >(arena);
}
template<> PROTOBUF_NOINLINE ::prometheus::Sample*
Arena::CreateMaybeMessage< ::prometheus::Sample >(Arena* arena) {
  return Arena::CreateMessageInternal< ::prometheus::Sample >(arena);
}
template<> PROTOBUF_NOINLINE ::prometheus::Exemplar*
Arena::CreateMaybeMessage< ::prometheus::Exemplar >(Arena* arena) {
  return Arena::CreateMessageInternal< ::prometheus::Exemplar >(arena);
}
template<> PROTOBUF_NOINLINE ::prometheus::TimeSeries*
Arena::CreateMaybeMessage< ::prometheus::TimeSeries >(Arena* arena) {
  return Arena::CreateMessageInternal< ::prometheus::TimeSeries >(arena);
}
template<> PROTOBUF_NOINLINE ::prometheus::Label*
Arena::CreateMaybeMessage< ::prometheus::Label >(Arena* arena) {
  return Arena::CreateMessageInternal< ::prometheus::Label >(arena);
}
template<> PROTOBUF_NOINLINE ::prometheus::Labels*
Arena::CreateMaybeMessage< ::prometheus::Labels >(Arena* arena) {
  return Arena::CreateMessageInternal< ::prometheus::Labels >(arena);
}
template<> PROTOBUF_NOINLINE ::prometheus::LabelMatcher*
Arena::CreateMaybeMessage< ::prometheus::LabelMatcher >(Arena* arena) {
  return Arena::CreateMessageInternal< ::prometheus::LabelMatcher >(arena);
}
template<> PROTOBUF_NOINLINE ::prometheus::ReadHints*
Arena::CreateMaybeMessage< ::prometheus::ReadHints >(Arena* arena) {
  return Arena::CreateMessageInternal< ::prometheus::ReadHints >(arena);
}
template<> PROTOBUF_NOINLINE ::prometheus::Chunk*
Arena::CreateMaybeMessage< ::prometheus::Chunk >(Arena* arena) {
  return Arena::CreateMessageInternal< ::prometheus::Chunk >(arena);
}
template<> PROTOBUF_NOINLINE ::prometheus::ChunkedSeries*
Arena::CreateMaybeMessage< ::prometheus::ChunkedSeries >(Arena* arena) {
  return Arena::CreateMessageInternal< ::prometheus::ChunkedSeries >(arena);
}
PROTOBUF_NAMESPACE_CLOSE

// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
