// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: mixer/adapter/statsd/config/config.proto

// The `statsd` adapter enables Istio to deliver metric data to a
// [StatsD](https://github.com/etsy/statsd) monitoring backend.
//
// This adapter supports the [metric template](https://istio.io/docs/reference/config/policy-and-telemetry/templates/metric/).

package config

import (
	encoding_binary "encoding/binary"
	fmt "fmt"
	_ "github.com/gogo/protobuf/gogoproto"
	proto "github.com/gogo/protobuf/proto"
	github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
	_ "github.com/gogo/protobuf/types"
	github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
	io "io"
	math "math"
	math_bits "math/bits"
	reflect "reflect"
	strconv "strconv"
	strings "strings"
	time "time"
)

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
var _ = time.Kitchen

// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package

// The type of metric.
type Params_MetricInfo_Type int32

const (
	UNKNOWN      Params_MetricInfo_Type = 0
	COUNTER      Params_MetricInfo_Type = 1
	GAUGE        Params_MetricInfo_Type = 2
	DISTRIBUTION Params_MetricInfo_Type = 3
)

var Params_MetricInfo_Type_name = map[int32]string{
	0: "UNKNOWN",
	1: "COUNTER",
	2: "GAUGE",
	3: "DISTRIBUTION",
}

var Params_MetricInfo_Type_value = map[string]int32{
	"UNKNOWN":      0,
	"COUNTER":      1,
	"GAUGE":        2,
	"DISTRIBUTION": 3,
}

func (Params_MetricInfo_Type) EnumDescriptor() ([]byte, []int) {
	return fileDescriptor_ff30cbfcd304f9cd, []int{0, 0, 0}
}

// Configuration format for the `statsd` adapter.
type Params struct {
	// Address of the statsd server, e.g. localhost:8125
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// Metric prefix, do not specify for no prefix
	Prefix string `protobuf:"bytes,2,opt,name=prefix,proto3" json:"prefix,omitempty"`
	// FlushDuration controls the maximum amount of time between sending metrics to the statsd collection server.
	// Metrics are reported when either flush_bytes is full or flush_duration time has elapsed since the last report.
	FlushDuration time.Duration `protobuf:"bytes,3,opt,name=flush_duration,json=flushDuration,proto3,stdduration" json:"flush_duration"`
	// Maximum UDP packet size to send; if not specified defaults to 512 bytes. If the statsd server is running on the
	// same (private) network 1432 bytes is recommended for better performance.
	FlushBytes int32 `protobuf:"varint,4,opt,name=flush_bytes,json=flushBytes,proto3" json:"flush_bytes,omitempty"`
	// Chance that any particular metric is sampled when incremented; can take the range [0, 1], defaults to 1 if unspecified.
	SamplingRate float32 `protobuf:"fixed32,5,opt,name=sampling_rate,json=samplingRate,proto3" json:"sampling_rate,omitempty"`
	// Map of metric name -> info. If a metric's name is not in the map then the metric will not be exported to statsd.
	Metrics map[string]*Params_MetricInfo `protobuf:"bytes,6,rep,name=metrics,proto3" json:"metrics,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}

func (m *Params) Reset()      { *m = Params{} }
func (*Params) ProtoMessage() {}
func (*Params) Descriptor() ([]byte, []int) {
	return fileDescriptor_ff30cbfcd304f9cd, []int{0}
}
func (m *Params) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_Params.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *Params) XXX_Merge(src proto.Message) {
	xxx_messageInfo_Params.Merge(m, src)
}
func (m *Params) XXX_Size() int {
	return m.Size()
}
func (m *Params) XXX_DiscardUnknown() {
	xxx_messageInfo_Params.DiscardUnknown(m)
}

var xxx_messageInfo_Params proto.InternalMessageInfo

// Describes how to represent this metric in statsd
type Params_MetricInfo struct {
	Type Params_MetricInfo_Type `protobuf:"varint,1,opt,name=type,proto3,enum=adapter.statsd.config.Params_MetricInfo_Type" json:"type,omitempty"`
	// The template will be filled with values from the metric's labels and the resulting string will be used as
	// the statsd metric name. This allows easier creation of statsd metrics like `action_name-response_code`.
	// The template strings must conform to go's text/template syntax. For the example of `action_name-response_code`,
	// we use the template:
	//    `{{.apiMethod}}-{{.responseCode}}`
	//
	// If name_template is the empty string the Istio metric name will be used for statsd metric's name.
	NameTemplate string `protobuf:"bytes,2,opt,name=name_template,json=nameTemplate,proto3" json:"name_template,omitempty"`
}

func (m *Params_MetricInfo) Reset()      { *m = Params_MetricInfo{} }
func (*Params_MetricInfo) ProtoMessage() {}
func (*Params_MetricInfo) Descriptor() ([]byte, []int) {
	return fileDescriptor_ff30cbfcd304f9cd, []int{0, 0}
}
func (m *Params_MetricInfo) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *Params_MetricInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_Params_MetricInfo.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *Params_MetricInfo) XXX_Merge(src proto.Message) {
	xxx_messageInfo_Params_MetricInfo.Merge(m, src)
}
func (m *Params_MetricInfo) XXX_Size() int {
	return m.Size()
}
func (m *Params_MetricInfo) XXX_DiscardUnknown() {
	xxx_messageInfo_Params_MetricInfo.DiscardUnknown(m)
}

var xxx_messageInfo_Params_MetricInfo proto.InternalMessageInfo

func init() {
	proto.RegisterEnum("adapter.statsd.config.Params_MetricInfo_Type", Params_MetricInfo_Type_name, Params_MetricInfo_Type_value)
	proto.RegisterType((*Params)(nil), "adapter.statsd.config.Params")
	proto.RegisterMapType((map[string]*Params_MetricInfo)(nil), "adapter.statsd.config.Params.MetricsEntry")
	proto.RegisterType((*Params_MetricInfo)(nil), "adapter.statsd.config.Params.MetricInfo")
}

func init() {
	proto.RegisterFile("mixer/adapter/statsd/config/config.proto", fileDescriptor_ff30cbfcd304f9cd)
}

var fileDescriptor_ff30cbfcd304f9cd = []byte{
	// 501 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0xbd, 0x8e, 0xd3, 0x40,
	0x10, 0xde, 0xcd, 0x2f, 0xb7, 0xc9, 0x9d, 0xac, 0x15, 0x20, 0x93, 0x62, 0x13, 0x1d, 0x8d, 0x85,
	0xc4, 0x5a, 0x0a, 0x0d, 0x42, 0x02, 0x71, 0x21, 0xd1, 0x29, 0x20, 0x12, 0xb4, 0x24, 0x42, 0xa2,
	0x89, 0x36, 0xe7, 0x8d, 0xb1, 0x88, 0x7f, 0xb4, 0xde, 0xa0, 0x73, 0xc7, 0x23, 0x50, 0xf2, 0x08,
	0x54, 0x34, 0xbc, 0x44, 0xca, 0x94, 0x57, 0x01, 0x71, 0x1a, 0xca, 0x7b, 0x04, 0x64, 0xaf, 0x2d,
	0x51, 0x50, 0x5c, 0xe5, 0x99, 0x6f, 0xbe, 0x6f, 0xe6, 0x9b, 0xf1, 0x22, 0xcb, 0xf7, 0x2e, 0x85,
	0xb4, 0xb9, 0xc3, 0x23, 0x25, 0xa4, 0x1d, 0x2b, 0xae, 0x62, 0xc7, 0xbe, 0x08, 0x83, 0x95, 0xe7,
	0x16, 0x1f, 0x1a, 0xc9, 0x50, 0x85, 0xf8, 0x4e, 0xc1, 0xa1, 0x9a, 0x43, 0x75, 0xb1, 0x43, 0xdc,
	0x30, 0x74, 0xd7, 0xc2, 0xce, 0x49, 0xcb, 0xcd, 0xca, 0x76, 0x36, 0x92, 0x2b, 0x2f, 0x0c, 0xb4,
	0xac, 0x73, 0xdb, 0x0d, 0xdd, 0x30, 0x0f, 0xed, 0x2c, 0xd2, 0xe8, 0xe9, 0xf7, 0x1a, 0x6a, 0xbc,
	0xe1, 0x92, 0xfb, 0x31, 0x36, 0x51, 0x93, 0x3b, 0x8e, 0x14, 0x71, 0x6c, 0xc2, 0x1e, 0xb4, 0x8e,
	0x58, 0x99, 0xe2, 0xbb, 0xa8, 0x11, 0x49, 0xb1, 0xf2, 0x2e, 0xcd, 0x4a, 0x5e, 0x28, 0x32, 0xfc,
	0x12, 0x9d, 0xac, 0xd6, 0x9b, 0xf8, 0xc3, 0xa2, 0x1c, 0x65, 0x56, 0x7b, 0xd0, 0x6a, 0xf5, 0xef,
	0x51, 0xed, 0x85, 0x96, 0x5e, 0xe8, 0xb0, 0x20, 0x0c, 0x6e, 0x6d, 0x7f, 0x76, 0xc1, 0xd7, 0x5f,
	0x5d, 0xc8, 0x8e, 0x73, 0x69, 0x59, 0xc0, 0x5d, 0xd4, 0xd2, 0xbd, 0x96, 0x89, 0x12, 0xb1, 0x59,
	0xeb, 0x41, 0xab, 0xce, 0x50, 0x0e, 0x0d, 0x32, 0x04, 0xdf, 0x47, 0xc7, 0x31, 0xf7, 0xa3, 0xb5,
	0x17, 0xb8, 0x0b, 0xc9, 0x95, 0x30, 0xeb, 0x3d, 0x68, 0x55, 0x58, 0xbb, 0x04, 0x19, 0x57, 0x02,
	0x0f, 0x51, 0xd3, 0x17, 0x4a, 0x7a, 0x17, 0xb1, 0xd9, 0xe8, 0x55, 0xad, 0x56, 0xff, 0x01, 0xfd,
	0xef, 0xb5, 0xa8, 0xde, 0x99, 0xbe, 0xd6, 0xe4, 0x51, 0xa0, 0x64, 0xc2, 0x4a, 0x69, 0xe7, 0x07,
	0x44, 0x48, 0x57, 0xc6, 0xc1, 0x2a, 0xc4, 0x67, 0xa8, 0xa6, 0x92, 0x48, 0xe4, 0x57, 0x39, 0xe9,
	0x3f, 0xbc, 0x49, 0xc7, 0x4c, 0x47, 0x67, 0x49, 0x24, 0x58, 0x2e, 0xcd, 0xcc, 0x07, 0xdc, 0x17,
	0x0b, 0x25, 0xfc, 0x68, 0x9d, 0x99, 0xd7, 0x87, 0x6c, 0x67, 0xe0, 0xac, 0xc0, 0x4e, 0x9f, 0xa2,
	0x5a, 0x26, 0xc1, 0x2d, 0xd4, 0x9c, 0x4f, 0x5e, 0x4d, 0xa6, 0xef, 0x26, 0x06, 0xc8, 0x92, 0x17,
	0xd3, 0xf9, 0x64, 0x36, 0x62, 0x06, 0xc4, 0x47, 0xa8, 0x7e, 0x7e, 0x36, 0x3f, 0x1f, 0x19, 0x15,
	0x6c, 0xa0, 0xf6, 0x70, 0xfc, 0x76, 0xc6, 0xc6, 0x83, 0xf9, 0x6c, 0x3c, 0x9d, 0x18, 0xd5, 0x8e,
	0x83, 0xda, 0xff, 0xae, 0x83, 0x0d, 0x54, 0xfd, 0x28, 0x92, 0xe2, 0x5f, 0x66, 0x21, 0x7e, 0x86,
	0xea, 0x9f, 0xf8, 0x7a, 0xa3, 0xa7, 0xb7, 0xfa, 0xd6, 0x4d, 0x37, 0x61, 0x5a, 0xf6, 0xa4, 0xf2,
	0x18, 0x0e, 0x9e, 0x6f, 0xf7, 0x04, 0xec, 0xf6, 0x04, 0x5c, 0xed, 0x09, 0xb8, 0xde, 0x13, 0xf0,
	0x39, 0x25, 0xf0, 0x5b, 0x4a, 0xc0, 0x36, 0x25, 0x70, 0x97, 0x12, 0xf8, 0x3b, 0x25, 0xf0, 0x4f,
	0x4a, 0xc0, 0x75, 0x4a, 0xe0, 0x97, 0x03, 0x01, 0xbb, 0x03, 0x01, 0x57, 0x07, 0x02, 0xde, 0x37,
	0x74, 0xfb, 0x65, 0x23, 0x7f, 0x15, 0x8f, 0xfe, 0x06, 0x00, 0x00, 0xff, 0xff, 0x49, 0x63, 0xdc,
	0x5a, 0xf2, 0x02, 0x00, 0x00,
}

func (x Params_MetricInfo_Type) String() string {
	s, ok := Params_MetricInfo_Type_name[int32(x)]
	if ok {
		return s
	}
	return strconv.Itoa(int(x))
}
func (m *Params) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *Params) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if len(m.Metrics) > 0 {
		for k := range m.Metrics {
			v := m.Metrics[k]
			baseI := i
			if v != nil {
				{
					size, err := v.MarshalToSizedBuffer(dAtA[:i])
					if err != nil {
						return 0, err
					}
					i -= size
					i = encodeVarintConfig(dAtA, i, uint64(size))
				}
				i--
				dAtA[i] = 0x12
			}
			i -= len(k)
			copy(dAtA[i:], k)
			i = encodeVarintConfig(dAtA, i, uint64(len(k)))
			i--
			dAtA[i] = 0xa
			i = encodeVarintConfig(dAtA, i, uint64(baseI-i))
			i--
			dAtA[i] = 0x32
		}
	}
	if m.SamplingRate != 0 {
		i -= 4
		encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.SamplingRate))))
		i--
		dAtA[i] = 0x2d
	}
	if m.FlushBytes != 0 {
		i = encodeVarintConfig(dAtA, i, uint64(m.FlushBytes))
		i--
		dAtA[i] = 0x20
	}
	n2, err2 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.FlushDuration, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.FlushDuration):])
	if err2 != nil {
		return 0, err2
	}
	i -= n2
	i = encodeVarintConfig(dAtA, i, uint64(n2))
	i--
	dAtA[i] = 0x1a
	if len(m.Prefix) > 0 {
		i -= len(m.Prefix)
		copy(dAtA[i:], m.Prefix)
		i = encodeVarintConfig(dAtA, i, uint64(len(m.Prefix)))
		i--
		dAtA[i] = 0x12
	}
	if len(m.Address) > 0 {
		i -= len(m.Address)
		copy(dAtA[i:], m.Address)
		i = encodeVarintConfig(dAtA, i, uint64(len(m.Address)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func (m *Params_MetricInfo) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *Params_MetricInfo) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *Params_MetricInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if len(m.NameTemplate) > 0 {
		i -= len(m.NameTemplate)
		copy(dAtA[i:], m.NameTemplate)
		i = encodeVarintConfig(dAtA, i, uint64(len(m.NameTemplate)))
		i--
		dAtA[i] = 0x12
	}
	if m.Type != 0 {
		i = encodeVarintConfig(dAtA, i, uint64(m.Type))
		i--
		dAtA[i] = 0x8
	}
	return len(dAtA) - i, nil
}

func encodeVarintConfig(dAtA []byte, offset int, v uint64) int {
	offset -= sovConfig(v)
	base := offset
	for v >= 1<<7 {
		dAtA[offset] = uint8(v&0x7f | 0x80)
		v >>= 7
		offset++
	}
	dAtA[offset] = uint8(v)
	return base
}
func (m *Params) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.Address)
	if l > 0 {
		n += 1 + l + sovConfig(uint64(l))
	}
	l = len(m.Prefix)
	if l > 0 {
		n += 1 + l + sovConfig(uint64(l))
	}
	l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.FlushDuration)
	n += 1 + l + sovConfig(uint64(l))
	if m.FlushBytes != 0 {
		n += 1 + sovConfig(uint64(m.FlushBytes))
	}
	if m.SamplingRate != 0 {
		n += 5
	}
	if len(m.Metrics) > 0 {
		for k, v := range m.Metrics {
			_ = k
			_ = v
			l = 0
			if v != nil {
				l = v.Size()
				l += 1 + sovConfig(uint64(l))
			}
			mapEntrySize := 1 + len(k) + sovConfig(uint64(len(k))) + l
			n += mapEntrySize + 1 + sovConfig(uint64(mapEntrySize))
		}
	}
	return n
}

func (m *Params_MetricInfo) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Type != 0 {
		n += 1 + sovConfig(uint64(m.Type))
	}
	l = len(m.NameTemplate)
	if l > 0 {
		n += 1 + l + sovConfig(uint64(l))
	}
	return n
}

func sovConfig(x uint64) (n int) {
	return (math_bits.Len64(x|1) + 6) / 7
}
func sozConfig(x uint64) (n int) {
	return sovConfig(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (this *Params) String() string {
	if this == nil {
		return "nil"
	}
	keysForMetrics := make([]string, 0, len(this.Metrics))
	for k, _ := range this.Metrics {
		keysForMetrics = append(keysForMetrics, k)
	}
	github_com_gogo_protobuf_sortkeys.Strings(keysForMetrics)
	mapStringForMetrics := "map[string]*Params_MetricInfo{"
	for _, k := range keysForMetrics {
		mapStringForMetrics += fmt.Sprintf("%v: %v,", k, this.Metrics[k])
	}
	mapStringForMetrics += "}"
	s := strings.Join([]string{`&Params{`,
		`Address:` + fmt.Sprintf("%v", this.Address) + `,`,
		`Prefix:` + fmt.Sprintf("%v", this.Prefix) + `,`,
		`FlushDuration:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.FlushDuration), "Duration", "types.Duration", 1), `&`, ``, 1) + `,`,
		`FlushBytes:` + fmt.Sprintf("%v", this.FlushBytes) + `,`,
		`SamplingRate:` + fmt.Sprintf("%v", this.SamplingRate) + `,`,
		`Metrics:` + mapStringForMetrics + `,`,
		`}`,
	}, "")
	return s
}
func (this *Params_MetricInfo) String() string {
	if this == nil {
		return "nil"
	}
	s := strings.Join([]string{`&Params_MetricInfo{`,
		`Type:` + fmt.Sprintf("%v", this.Type) + `,`,
		`NameTemplate:` + fmt.Sprintf("%v", this.NameTemplate) + `,`,
		`}`,
	}, "")
	return s
}
func valueToStringConfig(v interface{}) string {
	rv := reflect.ValueOf(v)
	if rv.IsNil() {
		return "nil"
	}
	pv := reflect.Indirect(rv).Interface()
	return fmt.Sprintf("*%v", pv)
}
func (m *Params) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowConfig
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: Params: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowConfig
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthConfig
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthConfig
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Address = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Prefix", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowConfig
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthConfig
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthConfig
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Prefix = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field FlushDuration", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowConfig
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthConfig
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthConfig
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.FlushDuration, dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 4:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field FlushBytes", wireType)
			}
			m.FlushBytes = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowConfig
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.FlushBytes |= int32(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 5:
			if wireType != 5 {
				return fmt.Errorf("proto: wrong wireType = %d for field SamplingRate", wireType)
			}
			var v uint32
			if (iNdEx + 4) > l {
				return io.ErrUnexpectedEOF
			}
			v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:]))
			iNdEx += 4
			m.SamplingRate = float32(math.Float32frombits(v))
		case 6:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Metrics", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowConfig
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthConfig
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthConfig
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.Metrics == nil {
				m.Metrics = make(map[string]*Params_MetricInfo)
			}
			var mapkey string
			var mapvalue *Params_MetricInfo
			for iNdEx < postIndex {
				entryPreIndex := iNdEx
				var wire uint64
				for shift := uint(0); ; shift += 7 {
					if shift >= 64 {
						return ErrIntOverflowConfig
					}
					if iNdEx >= l {
						return io.ErrUnexpectedEOF
					}
					b := dAtA[iNdEx]
					iNdEx++
					wire |= uint64(b&0x7F) << shift
					if b < 0x80 {
						break
					}
				}
				fieldNum := int32(wire >> 3)
				if fieldNum == 1 {
					var stringLenmapkey uint64
					for shift := uint(0); ; shift += 7 {
						if shift >= 64 {
							return ErrIntOverflowConfig
						}
						if iNdEx >= l {
							return io.ErrUnexpectedEOF
						}
						b := dAtA[iNdEx]
						iNdEx++
						stringLenmapkey |= uint64(b&0x7F) << shift
						if b < 0x80 {
							break
						}
					}
					intStringLenmapkey := int(stringLenmapkey)
					if intStringLenmapkey < 0 {
						return ErrInvalidLengthConfig
					}
					postStringIndexmapkey := iNdEx + intStringLenmapkey
					if postStringIndexmapkey < 0 {
						return ErrInvalidLengthConfig
					}
					if postStringIndexmapkey > l {
						return io.ErrUnexpectedEOF
					}
					mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
					iNdEx = postStringIndexmapkey
				} else if fieldNum == 2 {
					var mapmsglen int
					for shift := uint(0); ; shift += 7 {
						if shift >= 64 {
							return ErrIntOverflowConfig
						}
						if iNdEx >= l {
							return io.ErrUnexpectedEOF
						}
						b := dAtA[iNdEx]
						iNdEx++
						mapmsglen |= int(b&0x7F) << shift
						if b < 0x80 {
							break
						}
					}
					if mapmsglen < 0 {
						return ErrInvalidLengthConfig
					}
					postmsgIndex := iNdEx + mapmsglen
					if postmsgIndex < 0 {
						return ErrInvalidLengthConfig
					}
					if postmsgIndex > l {
						return io.ErrUnexpectedEOF
					}
					mapvalue = &Params_MetricInfo{}
					if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
						return err
					}
					iNdEx = postmsgIndex
				} else {
					iNdEx = entryPreIndex
					skippy, err := skipConfig(dAtA[iNdEx:])
					if err != nil {
						return err
					}
					if skippy < 0 {
						return ErrInvalidLengthConfig
					}
					if (iNdEx + skippy) > postIndex {
						return io.ErrUnexpectedEOF
					}
					iNdEx += skippy
				}
			}
			m.Metrics[mapkey] = mapvalue
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipConfig(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthConfig
			}
			if (iNdEx + skippy) < 0 {
				return ErrInvalidLengthConfig
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *Params_MetricInfo) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowConfig
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: MetricInfo: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: MetricInfo: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
			}
			m.Type = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowConfig
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Type |= Params_MetricInfo_Type(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field NameTemplate", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowConfig
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthConfig
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthConfig
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.NameTemplate = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipConfig(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthConfig
			}
			if (iNdEx + skippy) < 0 {
				return ErrInvalidLengthConfig
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func skipConfig(dAtA []byte) (n int, err error) {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return 0, ErrIntOverflowConfig
			}
			if iNdEx >= l {
				return 0, io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= (uint64(b) & 0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		wireType := int(wire & 0x7)
		switch wireType {
		case 0:
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return 0, ErrIntOverflowConfig
				}
				if iNdEx >= l {
					return 0, io.ErrUnexpectedEOF
				}
				iNdEx++
				if dAtA[iNdEx-1] < 0x80 {
					break
				}
			}
			return iNdEx, nil
		case 1:
			iNdEx += 8
			return iNdEx, nil
		case 2:
			var length int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return 0, ErrIntOverflowConfig
				}
				if iNdEx >= l {
					return 0, io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				length |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if length < 0 {
				return 0, ErrInvalidLengthConfig
			}
			iNdEx += length
			if iNdEx < 0 {
				return 0, ErrInvalidLengthConfig
			}
			return iNdEx, nil
		case 3:
			for {
				var innerWire uint64
				var start int = iNdEx
				for shift := uint(0); ; shift += 7 {
					if shift >= 64 {
						return 0, ErrIntOverflowConfig
					}
					if iNdEx >= l {
						return 0, io.ErrUnexpectedEOF
					}
					b := dAtA[iNdEx]
					iNdEx++
					innerWire |= (uint64(b) & 0x7F) << shift
					if b < 0x80 {
						break
					}
				}
				innerWireType := int(innerWire & 0x7)
				if innerWireType == 4 {
					break
				}
				next, err := skipConfig(dAtA[start:])
				if err != nil {
					return 0, err
				}
				iNdEx = start + next
				if iNdEx < 0 {
					return 0, ErrInvalidLengthConfig
				}
			}
			return iNdEx, nil
		case 4:
			return iNdEx, nil
		case 5:
			iNdEx += 4
			return iNdEx, nil
		default:
			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
		}
	}
	panic("unreachable")
}

var (
	ErrInvalidLengthConfig = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowConfig   = fmt.Errorf("proto: integer overflow")
)
