github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/util/metric/metric.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: util/metric/metric.proto
     3  
     4  package metric
     5  
     6  import proto "github.com/gogo/protobuf/proto"
     7  import fmt "fmt"
     8  import math "math"
     9  import _go "github.com/prometheus/client_model/go"
    10  
    11  import io "io"
    12  
    13  import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto"
    14  
    15  // Reference imports to suppress errors if they are not otherwise used.
    16  var _ = proto.Marshal
    17  var _ = fmt.Errorf
    18  var _ = math.Inf
    19  
    20  // This is a compile-time assertion to ensure that this generated file
    21  // is compatible with the proto package it is being compiled against.
    22  // A compilation error at this line likely means your copy of the
    23  // proto package needs to be updated.
    24  const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
    25  
    26  // DisplayUnit describes how the metric's units should be displayed in charts.
    27  type Unit int32
    28  
    29  const (
    30  	// UNSET expresses that the metric's DisplayUnit wasn't explicitly set.
    31  	Unit_UNSET Unit = 0
    32  	// BYTES expresses that the metric's measurement is in bytes.
    33  	Unit_BYTES Unit = 1
    34  	// CONST expresses that the metric's measurement is a constant value.
    35  	Unit_CONST Unit = 2
    36  	// COUNT expresses that the metric's measurement is a count.
    37  	Unit_COUNT Unit = 3
    38  	// NANOSECONDS expresses that the metric's measurement is in nanoseconds.
    39  	Unit_NANOSECONDS Unit = 4
    40  	// PERCENT expresses that the metric's measurement is a percentage value.
    41  	Unit_PERCENT Unit = 5
    42  	// SECONDS expresses that the metric's measurement is in seconds.
    43  	Unit_SECONDS Unit = 6
    44  	// TIMESTAMP_NS expresses that the metric's measurement is a time since the
    45  	// Unix epoch in nanoseconds.
    46  	Unit_TIMESTAMP_NS Unit = 7
    47  	// TIMESTAMP_SEC expresses that the metric's measurement is a time since the
    48  	// Unix epoch in seconds.
    49  	Unit_TIMESTAMP_SEC Unit = 8
    50  )
    51  
    52  var Unit_name = map[int32]string{
    53  	0: "UNSET",
    54  	1: "BYTES",
    55  	2: "CONST",
    56  	3: "COUNT",
    57  	4: "NANOSECONDS",
    58  	5: "PERCENT",
    59  	6: "SECONDS",
    60  	7: "TIMESTAMP_NS",
    61  	8: "TIMESTAMP_SEC",
    62  }
    63  var Unit_value = map[string]int32{
    64  	"UNSET":         0,
    65  	"BYTES":         1,
    66  	"CONST":         2,
    67  	"COUNT":         3,
    68  	"NANOSECONDS":   4,
    69  	"PERCENT":       5,
    70  	"SECONDS":       6,
    71  	"TIMESTAMP_NS":  7,
    72  	"TIMESTAMP_SEC": 8,
    73  }
    74  
    75  func (x Unit) Enum() *Unit {
    76  	p := new(Unit)
    77  	*p = x
    78  	return p
    79  }
    80  func (x Unit) String() string {
    81  	return proto.EnumName(Unit_name, int32(x))
    82  }
    83  func (x *Unit) UnmarshalJSON(data []byte) error {
    84  	value, err := proto.UnmarshalJSONEnum(Unit_value, data, "Unit")
    85  	if err != nil {
    86  		return err
    87  	}
    88  	*x = Unit(value)
    89  	return nil
    90  }
    91  func (Unit) EnumDescriptor() ([]byte, []int) {
    92  	return fileDescriptor_metric_b503c306ceb5c7a7, []int{0}
    93  }
    94  
    95  // metric.LabelPair is a proxy for io.prometheus.client.LabelPair.
    96  // io.prometheus.client.LabelPair doesn't support gogoproto.marshaler
    97  // and gogoproto.unmarshaler which are required by gRPC. metric.LabelPair
    98  // stores information that is similarly structured, supports the requisite
    99  // gogoproto options, and is convertible to io.prometheus.client.LabelPair
   100  // to satisfy PrometheusExportable's GetLabels method.
   101  type LabelPair struct {
   102  	Name  *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
   103  	Value *string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
   104  }
   105  
   106  func (m *LabelPair) Reset()         { *m = LabelPair{} }
   107  func (m *LabelPair) String() string { return proto.CompactTextString(m) }
   108  func (*LabelPair) ProtoMessage()    {}
   109  func (*LabelPair) Descriptor() ([]byte, []int) {
   110  	return fileDescriptor_metric_b503c306ceb5c7a7, []int{0}
   111  }
   112  func (m *LabelPair) XXX_Unmarshal(b []byte) error {
   113  	return m.Unmarshal(b)
   114  }
   115  func (m *LabelPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   116  	b = b[:cap(b)]
   117  	n, err := m.MarshalTo(b)
   118  	if err != nil {
   119  		return nil, err
   120  	}
   121  	return b[:n], nil
   122  }
   123  func (dst *LabelPair) XXX_Merge(src proto.Message) {
   124  	xxx_messageInfo_LabelPair.Merge(dst, src)
   125  }
   126  func (m *LabelPair) XXX_Size() int {
   127  	return m.Size()
   128  }
   129  func (m *LabelPair) XXX_DiscardUnknown() {
   130  	xxx_messageInfo_LabelPair.DiscardUnknown(m)
   131  }
   132  
   133  var xxx_messageInfo_LabelPair proto.InternalMessageInfo
   134  
   135  // Metadata holds metadata about a metric. It must be embedded in
   136  // each metric object. It's used to export information about the
   137  // metric to Prometheus and for Admin UI charts.
   138  type Metadata struct {
   139  	Name        string         `protobuf:"bytes,1,req,name=name" json:"name"`
   140  	Help        string         `protobuf:"bytes,2,req,name=help" json:"help"`
   141  	Measurement string         `protobuf:"bytes,3,req,name=measurement" json:"measurement"`
   142  	Unit        Unit           `protobuf:"varint,4,req,name=unit,enum=cockroach.util.metric.Unit" json:"unit"`
   143  	MetricType  _go.MetricType `protobuf:"varint,5,opt,name=metricType,enum=io.prometheus.client.MetricType" json:"metricType"`
   144  	Labels      []*LabelPair   `protobuf:"bytes,6,rep,name=labels" json:"labels,omitempty"`
   145  }
   146  
   147  func (m *Metadata) Reset()         { *m = Metadata{} }
   148  func (m *Metadata) String() string { return proto.CompactTextString(m) }
   149  func (*Metadata) ProtoMessage()    {}
   150  func (*Metadata) Descriptor() ([]byte, []int) {
   151  	return fileDescriptor_metric_b503c306ceb5c7a7, []int{1}
   152  }
   153  func (m *Metadata) XXX_Unmarshal(b []byte) error {
   154  	return m.Unmarshal(b)
   155  }
   156  func (m *Metadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   157  	b = b[:cap(b)]
   158  	n, err := m.MarshalTo(b)
   159  	if err != nil {
   160  		return nil, err
   161  	}
   162  	return b[:n], nil
   163  }
   164  func (dst *Metadata) XXX_Merge(src proto.Message) {
   165  	xxx_messageInfo_Metadata.Merge(dst, src)
   166  }
   167  func (m *Metadata) XXX_Size() int {
   168  	return m.Size()
   169  }
   170  func (m *Metadata) XXX_DiscardUnknown() {
   171  	xxx_messageInfo_Metadata.DiscardUnknown(m)
   172  }
   173  
   174  var xxx_messageInfo_Metadata proto.InternalMessageInfo
   175  
   176  func init() {
   177  	proto.RegisterType((*LabelPair)(nil), "cockroach.util.metric.LabelPair")
   178  	proto.RegisterType((*Metadata)(nil), "cockroach.util.metric.Metadata")
   179  	proto.RegisterEnum("cockroach.util.metric.Unit", Unit_name, Unit_value)
   180  }
   181  func (m *LabelPair) Marshal() (dAtA []byte, err error) {
   182  	size := m.Size()
   183  	dAtA = make([]byte, size)
   184  	n, err := m.MarshalTo(dAtA)
   185  	if err != nil {
   186  		return nil, err
   187  	}
   188  	return dAtA[:n], nil
   189  }
   190  
   191  func (m *LabelPair) MarshalTo(dAtA []byte) (int, error) {
   192  	var i int
   193  	_ = i
   194  	var l int
   195  	_ = l
   196  	if m.Name != nil {
   197  		dAtA[i] = 0xa
   198  		i++
   199  		i = encodeVarintMetric(dAtA, i, uint64(len(*m.Name)))
   200  		i += copy(dAtA[i:], *m.Name)
   201  	}
   202  	if m.Value != nil {
   203  		dAtA[i] = 0x12
   204  		i++
   205  		i = encodeVarintMetric(dAtA, i, uint64(len(*m.Value)))
   206  		i += copy(dAtA[i:], *m.Value)
   207  	}
   208  	return i, nil
   209  }
   210  
   211  func (m *Metadata) Marshal() (dAtA []byte, err error) {
   212  	size := m.Size()
   213  	dAtA = make([]byte, size)
   214  	n, err := m.MarshalTo(dAtA)
   215  	if err != nil {
   216  		return nil, err
   217  	}
   218  	return dAtA[:n], nil
   219  }
   220  
   221  func (m *Metadata) MarshalTo(dAtA []byte) (int, error) {
   222  	var i int
   223  	_ = i
   224  	var l int
   225  	_ = l
   226  	dAtA[i] = 0xa
   227  	i++
   228  	i = encodeVarintMetric(dAtA, i, uint64(len(m.Name)))
   229  	i += copy(dAtA[i:], m.Name)
   230  	dAtA[i] = 0x12
   231  	i++
   232  	i = encodeVarintMetric(dAtA, i, uint64(len(m.Help)))
   233  	i += copy(dAtA[i:], m.Help)
   234  	dAtA[i] = 0x1a
   235  	i++
   236  	i = encodeVarintMetric(dAtA, i, uint64(len(m.Measurement)))
   237  	i += copy(dAtA[i:], m.Measurement)
   238  	dAtA[i] = 0x20
   239  	i++
   240  	i = encodeVarintMetric(dAtA, i, uint64(m.Unit))
   241  	dAtA[i] = 0x28
   242  	i++
   243  	i = encodeVarintMetric(dAtA, i, uint64(m.MetricType))
   244  	if len(m.Labels) > 0 {
   245  		for _, msg := range m.Labels {
   246  			dAtA[i] = 0x32
   247  			i++
   248  			i = encodeVarintMetric(dAtA, i, uint64(msg.Size()))
   249  			n, err := msg.MarshalTo(dAtA[i:])
   250  			if err != nil {
   251  				return 0, err
   252  			}
   253  			i += n
   254  		}
   255  	}
   256  	return i, nil
   257  }
   258  
   259  func encodeVarintMetric(dAtA []byte, offset int, v uint64) int {
   260  	for v >= 1<<7 {
   261  		dAtA[offset] = uint8(v&0x7f | 0x80)
   262  		v >>= 7
   263  		offset++
   264  	}
   265  	dAtA[offset] = uint8(v)
   266  	return offset + 1
   267  }
   268  func (m *LabelPair) Size() (n int) {
   269  	if m == nil {
   270  		return 0
   271  	}
   272  	var l int
   273  	_ = l
   274  	if m.Name != nil {
   275  		l = len(*m.Name)
   276  		n += 1 + l + sovMetric(uint64(l))
   277  	}
   278  	if m.Value != nil {
   279  		l = len(*m.Value)
   280  		n += 1 + l + sovMetric(uint64(l))
   281  	}
   282  	return n
   283  }
   284  
   285  func (m *Metadata) Size() (n int) {
   286  	if m == nil {
   287  		return 0
   288  	}
   289  	var l int
   290  	_ = l
   291  	l = len(m.Name)
   292  	n += 1 + l + sovMetric(uint64(l))
   293  	l = len(m.Help)
   294  	n += 1 + l + sovMetric(uint64(l))
   295  	l = len(m.Measurement)
   296  	n += 1 + l + sovMetric(uint64(l))
   297  	n += 1 + sovMetric(uint64(m.Unit))
   298  	n += 1 + sovMetric(uint64(m.MetricType))
   299  	if len(m.Labels) > 0 {
   300  		for _, e := range m.Labels {
   301  			l = e.Size()
   302  			n += 1 + l + sovMetric(uint64(l))
   303  		}
   304  	}
   305  	return n
   306  }
   307  
   308  func sovMetric(x uint64) (n int) {
   309  	for {
   310  		n++
   311  		x >>= 7
   312  		if x == 0 {
   313  			break
   314  		}
   315  	}
   316  	return n
   317  }
   318  func sozMetric(x uint64) (n int) {
   319  	return sovMetric(uint64((x << 1) ^ uint64((int64(x) >> 63))))
   320  }
   321  func (m *LabelPair) Unmarshal(dAtA []byte) error {
   322  	l := len(dAtA)
   323  	iNdEx := 0
   324  	for iNdEx < l {
   325  		preIndex := iNdEx
   326  		var wire uint64
   327  		for shift := uint(0); ; shift += 7 {
   328  			if shift >= 64 {
   329  				return ErrIntOverflowMetric
   330  			}
   331  			if iNdEx >= l {
   332  				return io.ErrUnexpectedEOF
   333  			}
   334  			b := dAtA[iNdEx]
   335  			iNdEx++
   336  			wire |= (uint64(b) & 0x7F) << shift
   337  			if b < 0x80 {
   338  				break
   339  			}
   340  		}
   341  		fieldNum := int32(wire >> 3)
   342  		wireType := int(wire & 0x7)
   343  		if wireType == 4 {
   344  			return fmt.Errorf("proto: LabelPair: wiretype end group for non-group")
   345  		}
   346  		if fieldNum <= 0 {
   347  			return fmt.Errorf("proto: LabelPair: illegal tag %d (wire type %d)", fieldNum, wire)
   348  		}
   349  		switch fieldNum {
   350  		case 1:
   351  			if wireType != 2 {
   352  				return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
   353  			}
   354  			var stringLen uint64
   355  			for shift := uint(0); ; shift += 7 {
   356  				if shift >= 64 {
   357  					return ErrIntOverflowMetric
   358  				}
   359  				if iNdEx >= l {
   360  					return io.ErrUnexpectedEOF
   361  				}
   362  				b := dAtA[iNdEx]
   363  				iNdEx++
   364  				stringLen |= (uint64(b) & 0x7F) << shift
   365  				if b < 0x80 {
   366  					break
   367  				}
   368  			}
   369  			intStringLen := int(stringLen)
   370  			if intStringLen < 0 {
   371  				return ErrInvalidLengthMetric
   372  			}
   373  			postIndex := iNdEx + intStringLen
   374  			if postIndex > l {
   375  				return io.ErrUnexpectedEOF
   376  			}
   377  			s := string(dAtA[iNdEx:postIndex])
   378  			m.Name = &s
   379  			iNdEx = postIndex
   380  		case 2:
   381  			if wireType != 2 {
   382  				return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
   383  			}
   384  			var stringLen uint64
   385  			for shift := uint(0); ; shift += 7 {
   386  				if shift >= 64 {
   387  					return ErrIntOverflowMetric
   388  				}
   389  				if iNdEx >= l {
   390  					return io.ErrUnexpectedEOF
   391  				}
   392  				b := dAtA[iNdEx]
   393  				iNdEx++
   394  				stringLen |= (uint64(b) & 0x7F) << shift
   395  				if b < 0x80 {
   396  					break
   397  				}
   398  			}
   399  			intStringLen := int(stringLen)
   400  			if intStringLen < 0 {
   401  				return ErrInvalidLengthMetric
   402  			}
   403  			postIndex := iNdEx + intStringLen
   404  			if postIndex > l {
   405  				return io.ErrUnexpectedEOF
   406  			}
   407  			s := string(dAtA[iNdEx:postIndex])
   408  			m.Value = &s
   409  			iNdEx = postIndex
   410  		default:
   411  			iNdEx = preIndex
   412  			skippy, err := skipMetric(dAtA[iNdEx:])
   413  			if err != nil {
   414  				return err
   415  			}
   416  			if skippy < 0 {
   417  				return ErrInvalidLengthMetric
   418  			}
   419  			if (iNdEx + skippy) > l {
   420  				return io.ErrUnexpectedEOF
   421  			}
   422  			iNdEx += skippy
   423  		}
   424  	}
   425  
   426  	if iNdEx > l {
   427  		return io.ErrUnexpectedEOF
   428  	}
   429  	return nil
   430  }
   431  func (m *Metadata) Unmarshal(dAtA []byte) error {
   432  	var hasFields [1]uint64
   433  	l := len(dAtA)
   434  	iNdEx := 0
   435  	for iNdEx < l {
   436  		preIndex := iNdEx
   437  		var wire uint64
   438  		for shift := uint(0); ; shift += 7 {
   439  			if shift >= 64 {
   440  				return ErrIntOverflowMetric
   441  			}
   442  			if iNdEx >= l {
   443  				return io.ErrUnexpectedEOF
   444  			}
   445  			b := dAtA[iNdEx]
   446  			iNdEx++
   447  			wire |= (uint64(b) & 0x7F) << shift
   448  			if b < 0x80 {
   449  				break
   450  			}
   451  		}
   452  		fieldNum := int32(wire >> 3)
   453  		wireType := int(wire & 0x7)
   454  		if wireType == 4 {
   455  			return fmt.Errorf("proto: Metadata: wiretype end group for non-group")
   456  		}
   457  		if fieldNum <= 0 {
   458  			return fmt.Errorf("proto: Metadata: illegal tag %d (wire type %d)", fieldNum, wire)
   459  		}
   460  		switch fieldNum {
   461  		case 1:
   462  			if wireType != 2 {
   463  				return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
   464  			}
   465  			var stringLen uint64
   466  			for shift := uint(0); ; shift += 7 {
   467  				if shift >= 64 {
   468  					return ErrIntOverflowMetric
   469  				}
   470  				if iNdEx >= l {
   471  					return io.ErrUnexpectedEOF
   472  				}
   473  				b := dAtA[iNdEx]
   474  				iNdEx++
   475  				stringLen |= (uint64(b) & 0x7F) << shift
   476  				if b < 0x80 {
   477  					break
   478  				}
   479  			}
   480  			intStringLen := int(stringLen)
   481  			if intStringLen < 0 {
   482  				return ErrInvalidLengthMetric
   483  			}
   484  			postIndex := iNdEx + intStringLen
   485  			if postIndex > l {
   486  				return io.ErrUnexpectedEOF
   487  			}
   488  			m.Name = string(dAtA[iNdEx:postIndex])
   489  			iNdEx = postIndex
   490  			hasFields[0] |= uint64(0x00000001)
   491  		case 2:
   492  			if wireType != 2 {
   493  				return fmt.Errorf("proto: wrong wireType = %d for field Help", wireType)
   494  			}
   495  			var stringLen uint64
   496  			for shift := uint(0); ; shift += 7 {
   497  				if shift >= 64 {
   498  					return ErrIntOverflowMetric
   499  				}
   500  				if iNdEx >= l {
   501  					return io.ErrUnexpectedEOF
   502  				}
   503  				b := dAtA[iNdEx]
   504  				iNdEx++
   505  				stringLen |= (uint64(b) & 0x7F) << shift
   506  				if b < 0x80 {
   507  					break
   508  				}
   509  			}
   510  			intStringLen := int(stringLen)
   511  			if intStringLen < 0 {
   512  				return ErrInvalidLengthMetric
   513  			}
   514  			postIndex := iNdEx + intStringLen
   515  			if postIndex > l {
   516  				return io.ErrUnexpectedEOF
   517  			}
   518  			m.Help = string(dAtA[iNdEx:postIndex])
   519  			iNdEx = postIndex
   520  			hasFields[0] |= uint64(0x00000002)
   521  		case 3:
   522  			if wireType != 2 {
   523  				return fmt.Errorf("proto: wrong wireType = %d for field Measurement", wireType)
   524  			}
   525  			var stringLen uint64
   526  			for shift := uint(0); ; shift += 7 {
   527  				if shift >= 64 {
   528  					return ErrIntOverflowMetric
   529  				}
   530  				if iNdEx >= l {
   531  					return io.ErrUnexpectedEOF
   532  				}
   533  				b := dAtA[iNdEx]
   534  				iNdEx++
   535  				stringLen |= (uint64(b) & 0x7F) << shift
   536  				if b < 0x80 {
   537  					break
   538  				}
   539  			}
   540  			intStringLen := int(stringLen)
   541  			if intStringLen < 0 {
   542  				return ErrInvalidLengthMetric
   543  			}
   544  			postIndex := iNdEx + intStringLen
   545  			if postIndex > l {
   546  				return io.ErrUnexpectedEOF
   547  			}
   548  			m.Measurement = string(dAtA[iNdEx:postIndex])
   549  			iNdEx = postIndex
   550  			hasFields[0] |= uint64(0x00000004)
   551  		case 4:
   552  			if wireType != 0 {
   553  				return fmt.Errorf("proto: wrong wireType = %d for field Unit", wireType)
   554  			}
   555  			m.Unit = 0
   556  			for shift := uint(0); ; shift += 7 {
   557  				if shift >= 64 {
   558  					return ErrIntOverflowMetric
   559  				}
   560  				if iNdEx >= l {
   561  					return io.ErrUnexpectedEOF
   562  				}
   563  				b := dAtA[iNdEx]
   564  				iNdEx++
   565  				m.Unit |= (Unit(b) & 0x7F) << shift
   566  				if b < 0x80 {
   567  					break
   568  				}
   569  			}
   570  			hasFields[0] |= uint64(0x00000008)
   571  		case 5:
   572  			if wireType != 0 {
   573  				return fmt.Errorf("proto: wrong wireType = %d for field MetricType", wireType)
   574  			}
   575  			m.MetricType = 0
   576  			for shift := uint(0); ; shift += 7 {
   577  				if shift >= 64 {
   578  					return ErrIntOverflowMetric
   579  				}
   580  				if iNdEx >= l {
   581  					return io.ErrUnexpectedEOF
   582  				}
   583  				b := dAtA[iNdEx]
   584  				iNdEx++
   585  				m.MetricType |= (_go.MetricType(b) & 0x7F) << shift
   586  				if b < 0x80 {
   587  					break
   588  				}
   589  			}
   590  		case 6:
   591  			if wireType != 2 {
   592  				return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType)
   593  			}
   594  			var msglen int
   595  			for shift := uint(0); ; shift += 7 {
   596  				if shift >= 64 {
   597  					return ErrIntOverflowMetric
   598  				}
   599  				if iNdEx >= l {
   600  					return io.ErrUnexpectedEOF
   601  				}
   602  				b := dAtA[iNdEx]
   603  				iNdEx++
   604  				msglen |= (int(b) & 0x7F) << shift
   605  				if b < 0x80 {
   606  					break
   607  				}
   608  			}
   609  			if msglen < 0 {
   610  				return ErrInvalidLengthMetric
   611  			}
   612  			postIndex := iNdEx + msglen
   613  			if postIndex > l {
   614  				return io.ErrUnexpectedEOF
   615  			}
   616  			m.Labels = append(m.Labels, &LabelPair{})
   617  			if err := m.Labels[len(m.Labels)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   618  				return err
   619  			}
   620  			iNdEx = postIndex
   621  		default:
   622  			iNdEx = preIndex
   623  			skippy, err := skipMetric(dAtA[iNdEx:])
   624  			if err != nil {
   625  				return err
   626  			}
   627  			if skippy < 0 {
   628  				return ErrInvalidLengthMetric
   629  			}
   630  			if (iNdEx + skippy) > l {
   631  				return io.ErrUnexpectedEOF
   632  			}
   633  			iNdEx += skippy
   634  		}
   635  	}
   636  	if hasFields[0]&uint64(0x00000001) == 0 {
   637  		return github_com_gogo_protobuf_proto.NewRequiredNotSetError("name")
   638  	}
   639  	if hasFields[0]&uint64(0x00000002) == 0 {
   640  		return github_com_gogo_protobuf_proto.NewRequiredNotSetError("help")
   641  	}
   642  	if hasFields[0]&uint64(0x00000004) == 0 {
   643  		return github_com_gogo_protobuf_proto.NewRequiredNotSetError("measurement")
   644  	}
   645  	if hasFields[0]&uint64(0x00000008) == 0 {
   646  		return github_com_gogo_protobuf_proto.NewRequiredNotSetError("unit")
   647  	}
   648  
   649  	if iNdEx > l {
   650  		return io.ErrUnexpectedEOF
   651  	}
   652  	return nil
   653  }
   654  func skipMetric(dAtA []byte) (n int, err error) {
   655  	l := len(dAtA)
   656  	iNdEx := 0
   657  	for iNdEx < l {
   658  		var wire uint64
   659  		for shift := uint(0); ; shift += 7 {
   660  			if shift >= 64 {
   661  				return 0, ErrIntOverflowMetric
   662  			}
   663  			if iNdEx >= l {
   664  				return 0, io.ErrUnexpectedEOF
   665  			}
   666  			b := dAtA[iNdEx]
   667  			iNdEx++
   668  			wire |= (uint64(b) & 0x7F) << shift
   669  			if b < 0x80 {
   670  				break
   671  			}
   672  		}
   673  		wireType := int(wire & 0x7)
   674  		switch wireType {
   675  		case 0:
   676  			for shift := uint(0); ; shift += 7 {
   677  				if shift >= 64 {
   678  					return 0, ErrIntOverflowMetric
   679  				}
   680  				if iNdEx >= l {
   681  					return 0, io.ErrUnexpectedEOF
   682  				}
   683  				iNdEx++
   684  				if dAtA[iNdEx-1] < 0x80 {
   685  					break
   686  				}
   687  			}
   688  			return iNdEx, nil
   689  		case 1:
   690  			iNdEx += 8
   691  			return iNdEx, nil
   692  		case 2:
   693  			var length int
   694  			for shift := uint(0); ; shift += 7 {
   695  				if shift >= 64 {
   696  					return 0, ErrIntOverflowMetric
   697  				}
   698  				if iNdEx >= l {
   699  					return 0, io.ErrUnexpectedEOF
   700  				}
   701  				b := dAtA[iNdEx]
   702  				iNdEx++
   703  				length |= (int(b) & 0x7F) << shift
   704  				if b < 0x80 {
   705  					break
   706  				}
   707  			}
   708  			iNdEx += length
   709  			if length < 0 {
   710  				return 0, ErrInvalidLengthMetric
   711  			}
   712  			return iNdEx, nil
   713  		case 3:
   714  			for {
   715  				var innerWire uint64
   716  				var start int = iNdEx
   717  				for shift := uint(0); ; shift += 7 {
   718  					if shift >= 64 {
   719  						return 0, ErrIntOverflowMetric
   720  					}
   721  					if iNdEx >= l {
   722  						return 0, io.ErrUnexpectedEOF
   723  					}
   724  					b := dAtA[iNdEx]
   725  					iNdEx++
   726  					innerWire |= (uint64(b) & 0x7F) << shift
   727  					if b < 0x80 {
   728  						break
   729  					}
   730  				}
   731  				innerWireType := int(innerWire & 0x7)
   732  				if innerWireType == 4 {
   733  					break
   734  				}
   735  				next, err := skipMetric(dAtA[start:])
   736  				if err != nil {
   737  					return 0, err
   738  				}
   739  				iNdEx = start + next
   740  			}
   741  			return iNdEx, nil
   742  		case 4:
   743  			return iNdEx, nil
   744  		case 5:
   745  			iNdEx += 4
   746  			return iNdEx, nil
   747  		default:
   748  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
   749  		}
   750  	}
   751  	panic("unreachable")
   752  }
   753  
   754  var (
   755  	ErrInvalidLengthMetric = fmt.Errorf("proto: negative length found during unmarshaling")
   756  	ErrIntOverflowMetric   = fmt.Errorf("proto: integer overflow")
   757  )
   758  
   759  func init() { proto.RegisterFile("util/metric/metric.proto", fileDescriptor_metric_b503c306ceb5c7a7) }
   760  
   761  var fileDescriptor_metric_b503c306ceb5c7a7 = []byte{
   762  	// 429 bytes of a gzipped FileDescriptorProto
   763  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x90, 0x41, 0x8b, 0xd3, 0x40,
   764  	0x14, 0xc7, 0x33, 0x69, 0xda, 0xdd, 0xbe, 0xea, 0x3a, 0x0e, 0x2b, 0x0c, 0x2b, 0xc4, 0xb0, 0xa0,
   765  	0x04, 0x0f, 0x29, 0x14, 0x16, 0xbc, 0x6e, 0x6b, 0x04, 0xc1, 0xa6, 0xa5, 0x99, 0x1e, 0xf4, 0xb2,
   766  	0x8c, 0xd9, 0x61, 0x1b, 0x4c, 0x32, 0x25, 0x9d, 0x08, 0x5e, 0xfd, 0x04, 0x7e, 0x03, 0xbf, 0x4e,
   767  	0x8f, 0x7b, 0xec, 0x49, 0xb4, 0xfd, 0x22, 0x32, 0x9d, 0xb4, 0xe6, 0xe0, 0x9e, 0xe6, 0xff, 0xde,
   768  	0xff, 0xf7, 0x1e, 0x6f, 0xfe, 0x40, 0x2b, 0x95, 0x66, 0xfd, 0x5c, 0xa8, 0x32, 0x4d, 0xea, 0x27,
   769  	0x58, 0x96, 0x52, 0x49, 0xf2, 0x2c, 0x91, 0xc9, 0x97, 0x52, 0xf2, 0x64, 0x11, 0x68, 0x26, 0x30,
   770  	0xe6, 0xc5, 0xf9, 0x9d, 0xbc, 0x93, 0x7b, 0xa2, 0xaf, 0x95, 0x81, 0x2f, 0x5e, 0x2e, 0x4b, 0x99,
   771  	0x0b, 0xb5, 0x10, 0xd5, 0xaa, 0x9f, 0x64, 0xa9, 0x28, 0xd4, 0x4d, 0x2e, 0x6f, 0xc5, 0x61, 0xf3,
   772  	0xca, 0x60, 0x97, 0x57, 0xd0, 0xfd, 0xc0, 0x3f, 0x8b, 0x6c, 0xca, 0xd3, 0x92, 0x10, 0x70, 0x0a,
   773  	0x9e, 0x0b, 0x8a, 0x3c, 0xe4, 0x77, 0x67, 0x7b, 0x4d, 0xce, 0xa1, 0xfd, 0x95, 0x67, 0x95, 0xa0,
   774  	0xf6, 0xbe, 0x69, 0x8a, 0xcb, 0x9f, 0x36, 0x9c, 0x8e, 0x85, 0xe2, 0xb7, 0x5c, 0x71, 0x42, 0x8f,
   775  	0x63, 0xb6, 0xdf, 0x1d, 0x3a, 0xeb, 0x5f, 0x2f, 0xac, 0x7a, 0x98, 0x82, 0xb3, 0x10, 0xd9, 0x92,
   776  	0xda, 0x4d, 0x47, 0x77, 0xc8, 0x2b, 0xe8, 0xe5, 0x82, 0xaf, 0xaa, 0x52, 0xe4, 0xa2, 0x50, 0xb4,
   777  	0xd5, 0x00, 0x9a, 0x06, 0xb9, 0x02, 0xa7, 0x2a, 0x52, 0x45, 0x1d, 0xcf, 0xf6, 0xcf, 0x06, 0xcf,
   778  	0x83, 0xff, 0x46, 0x10, 0xcc, 0x8b, 0x54, 0x1d, 0xd6, 0x6b, 0x9c, 0xbc, 0x03, 0x30, 0x16, 0xfb,
   779  	0xb6, 0x14, 0xb4, 0xed, 0x21, 0xff, 0x6c, 0xe0, 0x05, 0xe9, 0x3e, 0x9c, 0x3a, 0x95, 0xc0, 0xa4,
   780  	0x12, 0x8c, 0x8f, 0x5c, 0xbd, 0xa1, 0x31, 0x49, 0xde, 0x40, 0x27, 0xd3, 0xf1, 0xac, 0x68, 0xc7,
   781  	0x6b, 0xf9, 0xbd, 0x81, 0xf7, 0xc0, 0x01, 0xc7, 0x0c, 0x67, 0x35, 0xff, 0xfa, 0x3b, 0x02, 0x47,
   782  	0x9f, 0x45, 0xba, 0xd0, 0x9e, 0x47, 0x71, 0xc8, 0xb0, 0xa5, 0xe5, 0xf0, 0x23, 0x0b, 0x63, 0x8c,
   783  	0xb4, 0x1c, 0x4d, 0xa2, 0x98, 0x61, 0xdb, 0xc8, 0x79, 0xc4, 0x70, 0x8b, 0x3c, 0x81, 0x5e, 0x74,
   784  	0x1d, 0x4d, 0xe2, 0x70, 0x34, 0x89, 0xde, 0xc6, 0xd8, 0x21, 0x3d, 0x38, 0x99, 0x86, 0xb3, 0x51,
   785  	0x18, 0x31, 0xdc, 0xd6, 0xc5, 0xc1, 0xe9, 0x10, 0x0c, 0x8f, 0xd8, 0xfb, 0x71, 0x18, 0xb3, 0xeb,
   786  	0xf1, 0xf4, 0x26, 0x8a, 0xf1, 0x09, 0x79, 0x0a, 0x8f, 0xff, 0x75, 0xe2, 0x70, 0x84, 0x4f, 0x87,
   787  	0xfe, 0xfa, 0x8f, 0x6b, 0xad, 0xb7, 0x2e, 0xba, 0xdf, 0xba, 0x68, 0xb3, 0x75, 0xd1, 0xef, 0xad,
   788  	0x8b, 0x7e, 0xec, 0x5c, 0xeb, 0x7e, 0xe7, 0x5a, 0x9b, 0x9d, 0x6b, 0x7d, 0xea, 0x98, 0x0f, 0xfc,
   789  	0x0d, 0x00, 0x00, 0xff, 0xff, 0x0e, 0x8f, 0x03, 0x28, 0x76, 0x02, 0x00, 0x00,
   790  }