// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: envoy/api/v2/auth/auth.proto

/*
	Package auth is a generated protocol buffer package.

	It is generated from these files:
		envoy/api/v2/auth/auth.proto
		envoy/api/v2/auth/cert.proto

	It has these top-level messages:
		AuthAction
		TlsParameters
		TlsCertificate
		TlsSessionTicketKeys
		CertificateValidationContext
		CommonTlsContext
		UpstreamTlsContext
		DownstreamTlsContext
		SdsSecretConfig
		Secret
*/
package auth

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

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

// Should we do white-list or black-list style access control.
type AuthAction_ActionType int32

const (
	// Request matches all rules are allowed, otherwise denied.
	AuthAction_ALLOW AuthAction_ActionType = 0
	// Request matches all rules or missing required auth fields are denied,
	// otherwise allowed.
	AuthAction_DENY AuthAction_ActionType = 1
)

var AuthAction_ActionType_name = map[int32]string{
	0: "ALLOW",
	1: "DENY",
}
var AuthAction_ActionType_value = map[string]int32{
	"ALLOW": 0,
	"DENY":  1,
}

func (x AuthAction_ActionType) String() string {
	return proto.EnumName(AuthAction_ActionType_name, int32(x))
}
func (AuthAction_ActionType) EnumDescriptor() ([]byte, []int) { return fileDescriptorAuth, []int{0, 0} }

type AuthAction struct {
	ActionType AuthAction_ActionType `protobuf:"varint,1,opt,name=action_type,json=actionType,proto3,enum=envoy.api.v2.auth.AuthAction_ActionType" json:"action_type,omitempty"`
	// List of rules
	Rules []*AuthAction_Rule `protobuf:"bytes,2,rep,name=rules" json:"rules,omitempty"`
}

func (m *AuthAction) Reset()                    { *m = AuthAction{} }
func (m *AuthAction) String() string            { return proto.CompactTextString(m) }
func (*AuthAction) ProtoMessage()               {}
func (*AuthAction) Descriptor() ([]byte, []int) { return fileDescriptorAuth, []int{0} }

func (m *AuthAction) GetActionType() AuthAction_ActionType {
	if m != nil {
		return m.ActionType
	}
	return AuthAction_ALLOW
}

func (m *AuthAction) GetRules() []*AuthAction_Rule {
	if m != nil {
		return m.Rules
	}
	return nil
}

// Logic AND that requires all rules match.
type AuthAction_AndRule struct {
	Rules []*AuthAction_Rule `protobuf:"bytes,1,rep,name=rules" json:"rules,omitempty"`
}

func (m *AuthAction_AndRule) Reset()                    { *m = AuthAction_AndRule{} }
func (m *AuthAction_AndRule) String() string            { return proto.CompactTextString(m) }
func (*AuthAction_AndRule) ProtoMessage()               {}
func (*AuthAction_AndRule) Descriptor() ([]byte, []int) { return fileDescriptorAuth, []int{0, 0} }

func (m *AuthAction_AndRule) GetRules() []*AuthAction_Rule {
	if m != nil {
		return m.Rules
	}
	return nil
}

// Logic OR that requires at least one rule matches.
type AuthAction_OrRule struct {
	Rules []*AuthAction_Rule `protobuf:"bytes,1,rep,name=rules" json:"rules,omitempty"`
}

func (m *AuthAction_OrRule) Reset()                    { *m = AuthAction_OrRule{} }
func (m *AuthAction_OrRule) String() string            { return proto.CompactTextString(m) }
func (*AuthAction_OrRule) ProtoMessage()               {}
func (*AuthAction_OrRule) Descriptor() ([]byte, []int) { return fileDescriptorAuth, []int{0, 1} }

func (m *AuthAction_OrRule) GetRules() []*AuthAction_Rule {
	if m != nil {
		return m.Rules
	}
	return nil
}

// Check peer identity using X.509 certificate.
type AuthAction_X509Rule struct {
	// How to validate peer certificates.
	ValidationContext *CertificateValidationContext `protobuf:"bytes,3,opt,name=validation_context,json=validationContext" json:"validation_context,omitempty"`
}

func (m *AuthAction_X509Rule) Reset()                    { *m = AuthAction_X509Rule{} }
func (m *AuthAction_X509Rule) String() string            { return proto.CompactTextString(m) }
func (*AuthAction_X509Rule) ProtoMessage()               {}
func (*AuthAction_X509Rule) Descriptor() ([]byte, []int) { return fileDescriptorAuth, []int{0, 2} }

func (m *AuthAction_X509Rule) GetValidationContext() *CertificateValidationContext {
	if m != nil {
		return m.ValidationContext
	}
	return nil
}

// Element type of AndRule/OrRule, it chooses among different type of rule.
type AuthAction_Rule struct {
	// Types that are valid to be assigned to RuleSpecifier:
	//	*AuthAction_Rule_AndRule
	//	*AuthAction_Rule_OrRule
	//	*AuthAction_Rule_X509Rule
	RuleSpecifier isAuthAction_Rule_RuleSpecifier `protobuf_oneof:"rule_specifier"`
}

func (m *AuthAction_Rule) Reset()                    { *m = AuthAction_Rule{} }
func (m *AuthAction_Rule) String() string            { return proto.CompactTextString(m) }
func (*AuthAction_Rule) ProtoMessage()               {}
func (*AuthAction_Rule) Descriptor() ([]byte, []int) { return fileDescriptorAuth, []int{0, 3} }

type isAuthAction_Rule_RuleSpecifier interface {
	isAuthAction_Rule_RuleSpecifier()
	Equal(interface{}) bool
	MarshalTo([]byte) (int, error)
	Size() int
}

type AuthAction_Rule_AndRule struct {
	AndRule *AuthAction_AndRule `protobuf:"bytes,1,opt,name=and_rule,json=andRule,oneof"`
}
type AuthAction_Rule_OrRule struct {
	OrRule *AuthAction_OrRule `protobuf:"bytes,2,opt,name=or_rule,json=orRule,oneof"`
}
type AuthAction_Rule_X509Rule struct {
	X509Rule *AuthAction_X509Rule `protobuf:"bytes,3,opt,name=x509_rule,json=x509Rule,oneof"`
}

func (*AuthAction_Rule_AndRule) isAuthAction_Rule_RuleSpecifier()  {}
func (*AuthAction_Rule_OrRule) isAuthAction_Rule_RuleSpecifier()   {}
func (*AuthAction_Rule_X509Rule) isAuthAction_Rule_RuleSpecifier() {}

func (m *AuthAction_Rule) GetRuleSpecifier() isAuthAction_Rule_RuleSpecifier {
	if m != nil {
		return m.RuleSpecifier
	}
	return nil
}

func (m *AuthAction_Rule) GetAndRule() *AuthAction_AndRule {
	if x, ok := m.GetRuleSpecifier().(*AuthAction_Rule_AndRule); ok {
		return x.AndRule
	}
	return nil
}

func (m *AuthAction_Rule) GetOrRule() *AuthAction_OrRule {
	if x, ok := m.GetRuleSpecifier().(*AuthAction_Rule_OrRule); ok {
		return x.OrRule
	}
	return nil
}

func (m *AuthAction_Rule) GetX509Rule() *AuthAction_X509Rule {
	if x, ok := m.GetRuleSpecifier().(*AuthAction_Rule_X509Rule); ok {
		return x.X509Rule
	}
	return nil
}

// XXX_OneofFuncs is for the internal use of the proto package.
func (*AuthAction_Rule) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
	return _AuthAction_Rule_OneofMarshaler, _AuthAction_Rule_OneofUnmarshaler, _AuthAction_Rule_OneofSizer, []interface{}{
		(*AuthAction_Rule_AndRule)(nil),
		(*AuthAction_Rule_OrRule)(nil),
		(*AuthAction_Rule_X509Rule)(nil),
	}
}

func _AuthAction_Rule_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
	m := msg.(*AuthAction_Rule)
	// rule_specifier
	switch x := m.RuleSpecifier.(type) {
	case *AuthAction_Rule_AndRule:
		_ = b.EncodeVarint(1<<3 | proto.WireBytes)
		if err := b.EncodeMessage(x.AndRule); err != nil {
			return err
		}
	case *AuthAction_Rule_OrRule:
		_ = b.EncodeVarint(2<<3 | proto.WireBytes)
		if err := b.EncodeMessage(x.OrRule); err != nil {
			return err
		}
	case *AuthAction_Rule_X509Rule:
		_ = b.EncodeVarint(3<<3 | proto.WireBytes)
		if err := b.EncodeMessage(x.X509Rule); err != nil {
			return err
		}
	case nil:
	default:
		return fmt.Errorf("AuthAction_Rule.RuleSpecifier has unexpected type %T", x)
	}
	return nil
}

func _AuthAction_Rule_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
	m := msg.(*AuthAction_Rule)
	switch tag {
	case 1: // rule_specifier.and_rule
		if wire != proto.WireBytes {
			return true, proto.ErrInternalBadWireType
		}
		msg := new(AuthAction_AndRule)
		err := b.DecodeMessage(msg)
		m.RuleSpecifier = &AuthAction_Rule_AndRule{msg}
		return true, err
	case 2: // rule_specifier.or_rule
		if wire != proto.WireBytes {
			return true, proto.ErrInternalBadWireType
		}
		msg := new(AuthAction_OrRule)
		err := b.DecodeMessage(msg)
		m.RuleSpecifier = &AuthAction_Rule_OrRule{msg}
		return true, err
	case 3: // rule_specifier.x509_rule
		if wire != proto.WireBytes {
			return true, proto.ErrInternalBadWireType
		}
		msg := new(AuthAction_X509Rule)
		err := b.DecodeMessage(msg)
		m.RuleSpecifier = &AuthAction_Rule_X509Rule{msg}
		return true, err
	default:
		return false, nil
	}
}

func _AuthAction_Rule_OneofSizer(msg proto.Message) (n int) {
	m := msg.(*AuthAction_Rule)
	// rule_specifier
	switch x := m.RuleSpecifier.(type) {
	case *AuthAction_Rule_AndRule:
		s := proto.Size(x.AndRule)
		n += proto.SizeVarint(1<<3 | proto.WireBytes)
		n += proto.SizeVarint(uint64(s))
		n += s
	case *AuthAction_Rule_OrRule:
		s := proto.Size(x.OrRule)
		n += proto.SizeVarint(2<<3 | proto.WireBytes)
		n += proto.SizeVarint(uint64(s))
		n += s
	case *AuthAction_Rule_X509Rule:
		s := proto.Size(x.X509Rule)
		n += proto.SizeVarint(3<<3 | proto.WireBytes)
		n += proto.SizeVarint(uint64(s))
		n += s
	case nil:
	default:
		panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
	}
	return n
}

func init() {
	proto.RegisterType((*AuthAction)(nil), "envoy.api.v2.auth.AuthAction")
	proto.RegisterType((*AuthAction_AndRule)(nil), "envoy.api.v2.auth.AuthAction.AndRule")
	proto.RegisterType((*AuthAction_OrRule)(nil), "envoy.api.v2.auth.AuthAction.OrRule")
	proto.RegisterType((*AuthAction_X509Rule)(nil), "envoy.api.v2.auth.AuthAction.X509Rule")
	proto.RegisterType((*AuthAction_Rule)(nil), "envoy.api.v2.auth.AuthAction.Rule")
	proto.RegisterEnum("envoy.api.v2.auth.AuthAction_ActionType", AuthAction_ActionType_name, AuthAction_ActionType_value)
}
func (this *AuthAction) Equal(that interface{}) bool {
	if that == nil {
		if this == nil {
			return true
		}
		return false
	}

	that1, ok := that.(*AuthAction)
	if !ok {
		that2, ok := that.(AuthAction)
		if ok {
			that1 = &that2
		} else {
			return false
		}
	}
	if that1 == nil {
		if this == nil {
			return true
		}
		return false
	} else if this == nil {
		return false
	}
	if this.ActionType != that1.ActionType {
		return false
	}
	if len(this.Rules) != len(that1.Rules) {
		return false
	}
	for i := range this.Rules {
		if !this.Rules[i].Equal(that1.Rules[i]) {
			return false
		}
	}
	return true
}
func (this *AuthAction_AndRule) Equal(that interface{}) bool {
	if that == nil {
		if this == nil {
			return true
		}
		return false
	}

	that1, ok := that.(*AuthAction_AndRule)
	if !ok {
		that2, ok := that.(AuthAction_AndRule)
		if ok {
			that1 = &that2
		} else {
			return false
		}
	}
	if that1 == nil {
		if this == nil {
			return true
		}
		return false
	} else if this == nil {
		return false
	}
	if len(this.Rules) != len(that1.Rules) {
		return false
	}
	for i := range this.Rules {
		if !this.Rules[i].Equal(that1.Rules[i]) {
			return false
		}
	}
	return true
}
func (this *AuthAction_OrRule) Equal(that interface{}) bool {
	if that == nil {
		if this == nil {
			return true
		}
		return false
	}

	that1, ok := that.(*AuthAction_OrRule)
	if !ok {
		that2, ok := that.(AuthAction_OrRule)
		if ok {
			that1 = &that2
		} else {
			return false
		}
	}
	if that1 == nil {
		if this == nil {
			return true
		}
		return false
	} else if this == nil {
		return false
	}
	if len(this.Rules) != len(that1.Rules) {
		return false
	}
	for i := range this.Rules {
		if !this.Rules[i].Equal(that1.Rules[i]) {
			return false
		}
	}
	return true
}
func (this *AuthAction_X509Rule) Equal(that interface{}) bool {
	if that == nil {
		if this == nil {
			return true
		}
		return false
	}

	that1, ok := that.(*AuthAction_X509Rule)
	if !ok {
		that2, ok := that.(AuthAction_X509Rule)
		if ok {
			that1 = &that2
		} else {
			return false
		}
	}
	if that1 == nil {
		if this == nil {
			return true
		}
		return false
	} else if this == nil {
		return false
	}
	if !this.ValidationContext.Equal(that1.ValidationContext) {
		return false
	}
	return true
}
func (this *AuthAction_Rule) Equal(that interface{}) bool {
	if that == nil {
		if this == nil {
			return true
		}
		return false
	}

	that1, ok := that.(*AuthAction_Rule)
	if !ok {
		that2, ok := that.(AuthAction_Rule)
		if ok {
			that1 = &that2
		} else {
			return false
		}
	}
	if that1 == nil {
		if this == nil {
			return true
		}
		return false
	} else if this == nil {
		return false
	}
	if that1.RuleSpecifier == nil {
		if this.RuleSpecifier != nil {
			return false
		}
	} else if this.RuleSpecifier == nil {
		return false
	} else if !this.RuleSpecifier.Equal(that1.RuleSpecifier) {
		return false
	}
	return true
}
func (this *AuthAction_Rule_AndRule) Equal(that interface{}) bool {
	if that == nil {
		if this == nil {
			return true
		}
		return false
	}

	that1, ok := that.(*AuthAction_Rule_AndRule)
	if !ok {
		that2, ok := that.(AuthAction_Rule_AndRule)
		if ok {
			that1 = &that2
		} else {
			return false
		}
	}
	if that1 == nil {
		if this == nil {
			return true
		}
		return false
	} else if this == nil {
		return false
	}
	if !this.AndRule.Equal(that1.AndRule) {
		return false
	}
	return true
}
func (this *AuthAction_Rule_OrRule) Equal(that interface{}) bool {
	if that == nil {
		if this == nil {
			return true
		}
		return false
	}

	that1, ok := that.(*AuthAction_Rule_OrRule)
	if !ok {
		that2, ok := that.(AuthAction_Rule_OrRule)
		if ok {
			that1 = &that2
		} else {
			return false
		}
	}
	if that1 == nil {
		if this == nil {
			return true
		}
		return false
	} else if this == nil {
		return false
	}
	if !this.OrRule.Equal(that1.OrRule) {
		return false
	}
	return true
}
func (this *AuthAction_Rule_X509Rule) Equal(that interface{}) bool {
	if that == nil {
		if this == nil {
			return true
		}
		return false
	}

	that1, ok := that.(*AuthAction_Rule_X509Rule)
	if !ok {
		that2, ok := that.(AuthAction_Rule_X509Rule)
		if ok {
			that1 = &that2
		} else {
			return false
		}
	}
	if that1 == nil {
		if this == nil {
			return true
		}
		return false
	} else if this == nil {
		return false
	}
	if !this.X509Rule.Equal(that1.X509Rule) {
		return false
	}
	return true
}
func (m *AuthAction) 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 *AuthAction) MarshalTo(dAtA []byte) (int, error) {
	var i int
	_ = i
	var l int
	_ = l
	if m.ActionType != 0 {
		dAtA[i] = 0x8
		i++
		i = encodeVarintAuth(dAtA, i, uint64(m.ActionType))
	}
	if len(m.Rules) > 0 {
		for _, msg := range m.Rules {
			dAtA[i] = 0x12
			i++
			i = encodeVarintAuth(dAtA, i, uint64(msg.Size()))
			n, err := msg.MarshalTo(dAtA[i:])
			if err != nil {
				return 0, err
			}
			i += n
		}
	}
	return i, nil
}

func (m *AuthAction_AndRule) 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 *AuthAction_AndRule) MarshalTo(dAtA []byte) (int, error) {
	var i int
	_ = i
	var l int
	_ = l
	if len(m.Rules) > 0 {
		for _, msg := range m.Rules {
			dAtA[i] = 0xa
			i++
			i = encodeVarintAuth(dAtA, i, uint64(msg.Size()))
			n, err := msg.MarshalTo(dAtA[i:])
			if err != nil {
				return 0, err
			}
			i += n
		}
	}
	return i, nil
}

func (m *AuthAction_OrRule) 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 *AuthAction_OrRule) MarshalTo(dAtA []byte) (int, error) {
	var i int
	_ = i
	var l int
	_ = l
	if len(m.Rules) > 0 {
		for _, msg := range m.Rules {
			dAtA[i] = 0xa
			i++
			i = encodeVarintAuth(dAtA, i, uint64(msg.Size()))
			n, err := msg.MarshalTo(dAtA[i:])
			if err != nil {
				return 0, err
			}
			i += n
		}
	}
	return i, nil
}

func (m *AuthAction_X509Rule) 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 *AuthAction_X509Rule) MarshalTo(dAtA []byte) (int, error) {
	var i int
	_ = i
	var l int
	_ = l
	if m.ValidationContext != nil {
		dAtA[i] = 0x1a
		i++
		i = encodeVarintAuth(dAtA, i, uint64(m.ValidationContext.Size()))
		n1, err := m.ValidationContext.MarshalTo(dAtA[i:])
		if err != nil {
			return 0, err
		}
		i += n1
	}
	return i, nil
}

func (m *AuthAction_Rule) 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 *AuthAction_Rule) MarshalTo(dAtA []byte) (int, error) {
	var i int
	_ = i
	var l int
	_ = l
	if m.RuleSpecifier != nil {
		nn2, err := m.RuleSpecifier.MarshalTo(dAtA[i:])
		if err != nil {
			return 0, err
		}
		i += nn2
	}
	return i, nil
}

func (m *AuthAction_Rule_AndRule) MarshalTo(dAtA []byte) (int, error) {
	i := 0
	if m.AndRule != nil {
		dAtA[i] = 0xa
		i++
		i = encodeVarintAuth(dAtA, i, uint64(m.AndRule.Size()))
		n3, err := m.AndRule.MarshalTo(dAtA[i:])
		if err != nil {
			return 0, err
		}
		i += n3
	}
	return i, nil
}
func (m *AuthAction_Rule_OrRule) MarshalTo(dAtA []byte) (int, error) {
	i := 0
	if m.OrRule != nil {
		dAtA[i] = 0x12
		i++
		i = encodeVarintAuth(dAtA, i, uint64(m.OrRule.Size()))
		n4, err := m.OrRule.MarshalTo(dAtA[i:])
		if err != nil {
			return 0, err
		}
		i += n4
	}
	return i, nil
}
func (m *AuthAction_Rule_X509Rule) MarshalTo(dAtA []byte) (int, error) {
	i := 0
	if m.X509Rule != nil {
		dAtA[i] = 0x1a
		i++
		i = encodeVarintAuth(dAtA, i, uint64(m.X509Rule.Size()))
		n5, err := m.X509Rule.MarshalTo(dAtA[i:])
		if err != nil {
			return 0, err
		}
		i += n5
	}
	return i, nil
}
func encodeVarintAuth(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 *AuthAction) Size() (n int) {
	var l int
	_ = l
	if m.ActionType != 0 {
		n += 1 + sovAuth(uint64(m.ActionType))
	}
	if len(m.Rules) > 0 {
		for _, e := range m.Rules {
			l = e.Size()
			n += 1 + l + sovAuth(uint64(l))
		}
	}
	return n
}

func (m *AuthAction_AndRule) Size() (n int) {
	var l int
	_ = l
	if len(m.Rules) > 0 {
		for _, e := range m.Rules {
			l = e.Size()
			n += 1 + l + sovAuth(uint64(l))
		}
	}
	return n
}

func (m *AuthAction_OrRule) Size() (n int) {
	var l int
	_ = l
	if len(m.Rules) > 0 {
		for _, e := range m.Rules {
			l = e.Size()
			n += 1 + l + sovAuth(uint64(l))
		}
	}
	return n
}

func (m *AuthAction_X509Rule) Size() (n int) {
	var l int
	_ = l
	if m.ValidationContext != nil {
		l = m.ValidationContext.Size()
		n += 1 + l + sovAuth(uint64(l))
	}
	return n
}

func (m *AuthAction_Rule) Size() (n int) {
	var l int
	_ = l
	if m.RuleSpecifier != nil {
		n += m.RuleSpecifier.Size()
	}
	return n
}

func (m *AuthAction_Rule_AndRule) Size() (n int) {
	var l int
	_ = l
	if m.AndRule != nil {
		l = m.AndRule.Size()
		n += 1 + l + sovAuth(uint64(l))
	}
	return n
}
func (m *AuthAction_Rule_OrRule) Size() (n int) {
	var l int
	_ = l
	if m.OrRule != nil {
		l = m.OrRule.Size()
		n += 1 + l + sovAuth(uint64(l))
	}
	return n
}
func (m *AuthAction_Rule_X509Rule) Size() (n int) {
	var l int
	_ = l
	if m.X509Rule != nil {
		l = m.X509Rule.Size()
		n += 1 + l + sovAuth(uint64(l))
	}
	return n
}

func sovAuth(x uint64) (n int) {
	for {
		n++
		x >>= 7
		if x == 0 {
			break
		}
	}
	return n
}
func sozAuth(x uint64) (n int) {
	return sovAuth(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *AuthAction) 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 ErrIntOverflowAuth
			}
			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: AuthAction: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: AuthAction: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field ActionType", wireType)
			}
			m.ActionType = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowAuth
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.ActionType |= (AuthAction_ActionType(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowAuth
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthAuth
			}
			postIndex := iNdEx + msglen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Rules = append(m.Rules, &AuthAction_Rule{})
			if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipAuth(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthAuth
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *AuthAction_AndRule) 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 ErrIntOverflowAuth
			}
			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: AndRule: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: AndRule: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowAuth
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthAuth
			}
			postIndex := iNdEx + msglen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Rules = append(m.Rules, &AuthAction_Rule{})
			if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipAuth(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthAuth
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *AuthAction_OrRule) 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 ErrIntOverflowAuth
			}
			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: OrRule: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: OrRule: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowAuth
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthAuth
			}
			postIndex := iNdEx + msglen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Rules = append(m.Rules, &AuthAction_Rule{})
			if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipAuth(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthAuth
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *AuthAction_X509Rule) 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 ErrIntOverflowAuth
			}
			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: X509Rule: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: X509Rule: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ValidationContext", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowAuth
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthAuth
			}
			postIndex := iNdEx + msglen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.ValidationContext == nil {
				m.ValidationContext = &CertificateValidationContext{}
			}
			if err := m.ValidationContext.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipAuth(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthAuth
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *AuthAction_Rule) 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 ErrIntOverflowAuth
			}
			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: Rule: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: Rule: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field AndRule", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowAuth
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthAuth
			}
			postIndex := iNdEx + msglen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			v := &AuthAction_AndRule{}
			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			m.RuleSpecifier = &AuthAction_Rule_AndRule{v}
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field OrRule", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowAuth
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthAuth
			}
			postIndex := iNdEx + msglen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			v := &AuthAction_OrRule{}
			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			m.RuleSpecifier = &AuthAction_Rule_OrRule{v}
			iNdEx = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field X509Rule", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowAuth
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthAuth
			}
			postIndex := iNdEx + msglen
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			v := &AuthAction_X509Rule{}
			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			m.RuleSpecifier = &AuthAction_Rule_X509Rule{v}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipAuth(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthAuth
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func skipAuth(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, ErrIntOverflowAuth
			}
			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, ErrIntOverflowAuth
				}
				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, ErrIntOverflowAuth
				}
				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, ErrInvalidLengthAuth
			}
			return iNdEx, nil
		case 3:
			for {
				var innerWire uint64
				var start int = iNdEx
				for shift := uint(0); ; shift += 7 {
					if shift >= 64 {
						return 0, ErrIntOverflowAuth
					}
					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 := skipAuth(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 (
	ErrInvalidLengthAuth = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowAuth   = fmt.Errorf("proto: integer overflow")
)

func init() { proto.RegisterFile("envoy/api/v2/auth/auth.proto", fileDescriptorAuth) }

var fileDescriptorAuth = []byte{
	// 394 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x92, 0xdd, 0x8a, 0xda, 0x40,
	0x18, 0x86, 0x33, 0xfe, 0xc6, 0x2f, 0x20, 0x1a, 0x4a, 0x91, 0x50, 0x82, 0x95, 0xb6, 0xe4, 0x28,
	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