// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: mixer/pkg/aspect/config/attrgen.proto

/*
	Package config is a generated protocol buffer package.

	It is generated from these files:
		mixer/pkg/aspect/config/attrgen.proto
		mixer/pkg/aspect/config/lists.proto
		mixer/pkg/aspect/config/quotas.proto

	It has these top-level messages:
		AttributesGeneratorParams
		ListsParams
		QuotasParams
*/
package config

import proto "github.com/gogo/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "github.com/gogo/protobuf/gogoproto"

import strings "strings"
import reflect "reflect"
import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"

import io "io"

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

// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package

// Configures an AttributesGenerator aspect.
//
// The following config specifies two adapters (mixer_info and k8s_pod_info)
// that will be used to generate attributes for use within in Mixer:
//
// aspects:
// - kind: attributes
//   adapter: mixer_info
//   params:
//     attribute_bindings:
//       mixer_version: version
//       mixer_build_id: buildID
//       mixer_build_status: buildStatus
// - kind: attributes
//   adapter: k8s_pod_info
//   params:
//     input_expressions:
//       srcIP: source.ip | "unknown"
//       tgtIP: target.ip | "unknown"
//     attribute_bindings:
//       source_name: srcName
//       target_name: tgtName
//
// The mixer_info adapter takes no input arguments and produces three output
// values (version, buildID, and buildStatus). Those three output values are
// mapped into three attributes (mixer_version, mixer_build_id, and
// mixer_build_status) via the attribute_bindings.
//
// Similarly, the k8s_pod_info adapter takes two inputs (srcIp and tgtIp). Their
// values are generated from the expressions that reference mixer attributes.
// The adapter produces two outputs (srcName and tgtName) that are mapped into
// mixer attributes (source_name and target_name) by the attribute_bindings.
type AttributesGeneratorParams struct {
	// Map of input params name to attribute expressions. At runtime, each
	// expression will be evaluated to determine the input value provided to the
	// aspect.
	InputExpressions map[string]string `protobuf:"bytes,1,rep,name=input_expressions,json=inputExpressions" json:"input_expressions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
	// Map of attribute descriptor names to the names of values produced by
	// an adapter. This map will be used to translate from adapter outputs into
	// mixer attributes.
	AttributeBindings map[string]string `protobuf:"bytes,2,rep,name=attribute_bindings,json=attributeBindings" json:"attribute_bindings,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}

func (m *AttributesGeneratorParams) Reset()                    { *m = AttributesGeneratorParams{} }
func (*AttributesGeneratorParams) ProtoMessage()               {}
func (*AttributesGeneratorParams) Descriptor() ([]byte, []int) { return fileDescriptorAttrgen, []int{0} }

func init() {
	proto.RegisterType((*AttributesGeneratorParams)(nil), "pkg.aspect.config.AttributesGeneratorParams")
}
func (m *AttributesGeneratorParams) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalTo(dAtA)
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *AttributesGeneratorParams) MarshalTo(dAtA []byte) (int, error) {
	var i int
	_ = i
	var l int
	_ = l
	if len(m.InputExpressions) > 0 {
		for k, _ := range m.InputExpressions {
			dAtA[i] = 0xa
			i++
			v := m.InputExpressions[k]
			mapSize := 1 + len(k) + sovAttrgen(uint64(len(k))) + 1 + len(v) + sovAttrgen(uint64(len(v)))
			i = encodeVarintAttrgen(dAtA, i, uint64(mapSize))
			dAtA[i] = 0xa
			i++
			i = encodeVarintAttrgen(dAtA, i, uint64(len(k)))
			i += copy(dAtA[i:], k)
			dAtA[i] = 0x12
			i++
			i = encodeVarintAttrgen(dAtA, i, uint64(len(v)))
			i += copy(dAtA[i:], v)
		}
	}
	if len(m.AttributeBindings) > 0 {
		for k, _ := range m.AttributeBindings {
			dAtA[i] = 0x12
			i++
			v := m.AttributeBindings[k]
			mapSize := 1 + len(k) + sovAttrgen(uint64(len(k))) + 1 + len(v) + sovAttrgen(uint64(len(v)))
			i = encodeVarintAttrgen(dAtA, i, uint64(mapSize))
			dAtA[i] = 0xa
			i++
			i = encodeVarintAttrgen(dAtA, i, uint64(len(k)))
			i += copy(dAtA[i:], k)
			dAtA[i] = 0x12
			i++
			i = encodeVarintAttrgen(dAtA, i, uint64(len(v)))
			i += copy(dAtA[i:], v)
		}
	}
	return i, nil
}

func encodeVarintAttrgen(dAtA []byte, offset int, v uint64) int {
	for v >= 1<<7 {
		dAtA[offset] = uint8(v&0x7f | 0x80)
		v >>= 7
		offset++
	}
	dAtA[offset] = uint8(v)
	return offset + 1
}
func (m *AttributesGeneratorParams) Size() (n int) {
	var l int
	_ = l
	if len(m.InputExpressions) > 0 {
		for k, v := range m.InputExpressions {
			_ = k
			_ = v
			mapEntrySize := 1 + len(k) + sovAttrgen(uint64(len(k))) + 1 + len(v) + sovAttrgen(uint64(len(v)))
			n += mapEntrySize + 1 + sovAttrgen(uint64(mapEntrySize))
		}
	}
	if len(m.AttributeBindings) > 0 {
		for k, v := range m.AttributeBindings {
			_ = k
			_ = v
			mapEntrySize := 1 + len(k) + sovAttrgen(uint64(len(k))) + 1 + len(v) + sovAttrgen(uint64(len(v)))
			n += mapEntrySize + 1 + sovAttrgen(uint64(mapEntrySize))
		}
	}
	return n
}

func sovAttrgen(x uint64) (n int) {
	for {
		n++
		x >>= 7
		if x == 0 {
			break
		}
	}
	return n
}
func sozAttrgen(x uint64) (n int) {
	return sovAttrgen(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (this *AttributesGeneratorParams) String() string {
	if this == nil {
		return "nil"
	}
	keysForInputExpressions := make([]string, 0, len(this.InputExpressions))
	for k, _ := range this.InputExpressions {
		keysForInputExpressions = append(keysForInputExpressions, k)
	}
	github_com_gogo_protobuf_sortkeys.Strings(keysForInputExpressions)
	mapStringForInputExpressions := "map[string]string{"
	for _, k := range keysForInputExpressions {
		mapStringForInputExpressions += fmt.Sprintf("%v: %v,", k, this.InputExpressions[k])
	}
	mapStringForInputExpressions += "}"
	keysForAttributeBindings := make([]string, 0, len(this.AttributeBindings))
	for k, _ := range this.AttributeBindings {
		keysForAttributeBindings = append(keysForAttributeBindings, k)
	}
	github_com_gogo_protobuf_sortkeys.Strings(keysForAttributeBindings)
	mapStringForAttributeBindings := "map[string]string{"
	for _, k := range keysForAttributeBindings {
		mapStringForAttributeBindings += fmt.Sprintf("%v: %v,", k, this.AttributeBindings[k])
	}
	mapStringForAttributeBindings += "}"
	s := strings.Join([]string{`&AttributesGeneratorParams{`,
		`InputExpressions:` + mapStringForInputExpressions + `,`,
		`AttributeBindings:` + mapStringForAttributeBindings + `,`,
		`}`,
	}, "")
	return s
}
func valueToStringAttrgen(v interface{}) string {
	rv := reflect.ValueOf(v)
	if rv.IsNil() {
		return "nil"
	}
	pv := reflect.Indirect(rv).Interface()
	return fmt.Sprintf("*%v", pv)
}
func (m *AttributesGeneratorParams) 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 ErrIntOverflowAttrgen
			}
			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: AttributesGeneratorParams: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: AttributesGeneratorParams: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field InputExpressions", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowAttrgen
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthAttrgen
			}
			postIndex := iNdEx + msglen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.InputExpressions == nil {
				m.InputExpressions = make(map[string]string)
			}
			var mapkey string
			var mapvalue string
			for iNdEx < postIndex {
				entryPreIndex := iNdEx
				var wire uint64
				for shift := uint(0); ; shift += 7 {
					if shift >= 64 {
						return ErrIntOverflowAttrgen
					}
					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 ErrIntOverflowAttrgen
						}
						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 ErrInvalidLengthAttrgen
					}
					postStringIndexmapkey := iNdEx + intStringLenmapkey
					if postStringIndexmapkey > l {
						return io.ErrUnexpectedEOF
					}
					mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
					iNdEx = postStringIndexmapkey
				} else if fieldNum == 2 {
					var stringLenmapvalue uint64
					for shift := uint(0); ; shift += 7 {
						if shift >= 64 {
							return ErrIntOverflowAttrgen
						}
						if iNdEx >= l {
							return io.ErrUnexpectedEOF
						}
						b := dAtA[iNdEx]
						iNdEx++
						stringLenmapvalue |= (uint64(b) & 0x7F) << shift
						if b < 0x80 {
							break
						}
					}
					intStringLenmapvalue := int(stringLenmapvalue)
					if intStringLenmapvalue < 0 {
						return ErrInvalidLengthAttrgen
					}
					postStringIndexmapvalue := iNdEx + intStringLenmapvalue
					if postStringIndexmapvalue > l {
						return io.ErrUnexpectedEOF
					}
					mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue])
					iNdEx = postStringIndexmapvalue
				} else {
					iNdEx = entryPreIndex
					skippy, err := skipAttrgen(dAtA[iNdEx:])
					if err != nil {
						return err
					}
					if skippy < 0 {
						return ErrInvalidLengthAttrgen
					}
					if (iNdEx + skippy) > postIndex {
						return io.ErrUnexpectedEOF
					}
					iNdEx += skippy
				}
			}
			m.InputExpressions[mapkey] = mapvalue
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field AttributeBindings", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowAttrgen
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthAttrgen
			}
			postIndex := iNdEx + msglen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.AttributeBindings == nil {
				m.AttributeBindings = make(map[string]string)
			}
			var mapkey string
			var mapvalue string
			for iNdEx < postIndex {
				entryPreIndex := iNdEx
				var wire uint64
				for shift := uint(0); ; shift += 7 {
					if shift >= 64 {
						return ErrIntOverflowAttrgen
					}
					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 ErrIntOverflowAttrgen
						}
						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 ErrInvalidLengthAttrgen
					}
					postStringIndexmapkey := iNdEx + intStringLenmapkey
					if postStringIndexmapkey > l {
						return io.ErrUnexpectedEOF
					}
					mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
					iNdEx = postStringIndexmapkey
				} else if fieldNum == 2 {
					var stringLenmapvalue uint64
					for shift := uint(0); ; shift += 7 {
						if shift >= 64 {
							return ErrIntOverflowAttrgen
						}
						if iNdEx >= l {
							return io.ErrUnexpectedEOF
						}
						b := dAtA[iNdEx]
						iNdEx++
						stringLenmapvalue |= (uint64(b) & 0x7F) << shift
						if b < 0x80 {
							break
						}
					}
					intStringLenmapvalue := int(stringLenmapvalue)
					if intStringLenmapvalue < 0 {
						return ErrInvalidLengthAttrgen
					}
					postStringIndexmapvalue := iNdEx + intStringLenmapvalue
					if postStringIndexmapvalue > l {
						return io.ErrUnexpectedEOF
					}
					mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue])
					iNdEx = postStringIndexmapvalue
				} else {
					iNdEx = entryPreIndex
					skippy, err := skipAttrgen(dAtA[iNdEx:])
					if err != nil {
						return err
					}
					if skippy < 0 {
						return ErrInvalidLengthAttrgen
					}
					if (iNdEx + skippy) > postIndex {
						return io.ErrUnexpectedEOF
					}
					iNdEx += skippy
				}
			}
			m.AttributeBindings[mapkey] = mapvalue
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipAttrgen(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthAttrgen
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func skipAttrgen(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, ErrIntOverflowAttrgen
			}
			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, ErrIntOverflowAttrgen
				}
				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, ErrIntOverflowAttrgen
				}
				if iNdEx >= l {
					return 0, io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				length |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			iNdEx += length
			if length < 0 {
				return 0, ErrInvalidLengthAttrgen
			}
			return iNdEx, nil
		case 3:
			for {
				var innerWire uint64
				var start int = iNdEx
				for shift := uint(0); ; shift += 7 {
					if shift >= 64 {
						return 0, ErrIntOverflowAttrgen
					}
					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 := skipAttrgen(dAtA[start:])
				if err != nil {
					return 0, err
				}
				iNdEx = start + next
			}
			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 (
	ErrInvalidLengthAttrgen = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowAttrgen   = fmt.Errorf("proto: integer overflow")
)

func init() { proto.RegisterFile("mixer/pkg/aspect/config/attrgen.proto", fileDescriptorAttrgen) }

var fileDescriptorAttrgen = []byte{
	// 313 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x91, 0x3f, 0x4f, 0x02, 0x31,
	0x18, 0xc6, 0x5b, 0x88, 0x24, 0xd6, 0x05, 0x2e, 0x68, 0x4e, 0x86, 0x37, 0xc4, 0xc4, 0x84, 0xe9,
	0x2e, 0xd1, 0x85, 0xb8, 0x09, 0x12, 0xe3, 0x66, 0x18, 0x5d, 0x48, 0xc1, 0xda, 0x34, 0x48, 0xdb,
	0xb4, 0xc5, 0xc0, 0xe6, 0xee, 0xe2, 0xc7, 0xf0, 0xa3, 0x30, 0x32, 0x3a, 0x7a, 0x75, 0x71, 0xe4,
	0x23, 0x98, 0xbb, 0xfa, 0x27, 0x41, 0x1c, 0xd8, 0xde, 0x3e, 0xef, 0x93, 0xdf, 0xaf, 0x69, 0xc9,
	0xf1, 0x44, 0xcc, 0x98, 0x49, 0xf5, 0x98, 0xa7, 0xd4, 0x6a, 0x36, 0x72, 0xe9, 0x48, 0xc9, 0x3b,
	0xc1, 0x53, 0xea, 0x9c, 0xe1, 0x4c, 0x26, 0xda, 0x28, 0xa7, 0xa2, 0x9a, 0x1e, 0xf3, 0x24, 0x14,
	0x92, 0x50, 0x68, 0xd4, 0xb9, 0xe2, 0xaa, 0xd8, 0xa6, 0xf9, 0x14, 0x8a, 0x47, 0x4f, 0x65, 0x72,
	0x78, 0xee, 0x9c, 0x11, 0xc3, 0xa9, 0x63, 0xf6, 0x92, 0x49, 0x66, 0xa8, 0x53, 0xe6, 0x9a, 0x1a,
	0x3a, 0xb1, 0x91, 0x22, 0x35, 0x21, 0xf5, 0xd4, 0x0d, 0xd8, 0x4c, 0x1b, 0x66, 0xad, 0x50, 0xd2,
	0xc6, 0xb8, 0x59, 0x6e, 0xed, 0x9d, 0x74, 0x92, 0x3f, 0x8a, 0xe4, 0x5f, 0x50, 0x72, 0x95, 0x53,
	0x7a, 0xbf, 0x90, 0x9e, 0x74, 0x66, 0xde, 0xaf, 0x8a, 0xb5, 0x38, 0x32, 0x24, 0xa2, 0xdf, 0x90,
	0xc1, 0x50, 0xc8, 0x5b, 0x21, 0xb9, 0x8d, 0x4b, 0x85, 0xb1, 0xbb, 0x95, 0xf1, 0x67, 0xd3, 0xf9,
	0xa2, 0x04, 0x65, 0x8d, 0xae, 0xe7, 0x8d, 0x2e, 0xd9, 0xdf, 0x78, 0xbd, 0xa8, 0x4a, 0xca, 0x63,
	0x36, 0x8f, 0x71, 0x13, 0xb7, 0x76, 0xfb, 0xf9, 0x18, 0xd5, 0xc9, 0xce, 0x03, 0xbd, 0x9f, 0xb2,
	0xb8, 0x54, 0x64, 0xe1, 0x70, 0x56, 0x6a, 0xe3, 0xc6, 0x05, 0x39, 0xd8, 0x6c, 0xdc, 0x86, 0xd2,
	0x69, 0x2f, 0x32, 0x40, 0xcb, 0x0c, 0xd0, 0x6b, 0x06, 0x68, 0x95, 0x01, 0x7a, 0xf4, 0x80, 0x5f,
	0x3c, 0xa0, 0x85, 0x07, 0xbc, 0xf4, 0x80, 0xdf, 0x3c, 0xe0, 0x0f, 0x0f, 0x68, 0xe5, 0x01, 0x3f,
	0xbf, 0x03, 0xba, 0xa9, 0x84, 0x87, 0x18, 0x56, 0x8a, 0xef, 0x3c, 0xfd, 0x0c, 0x00, 0x00, 0xff,
	0xff, 0x1c, 0x74, 0x4a, 0x29, 0x20, 0x02, 0x00, 0x00,
}
