// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.10
// 	protoc        v7.35.1
// source: envoy/type/matcher/value.proto

package matcher

import (
	_ "github.com/cncf/xds/go/udpa/annotations"
	_ "github.com/envoyproxy/protoc-gen-validate/validate"
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	reflect "reflect"
	sync "sync"
	unsafe "unsafe"
)

const (
	// Verify that this generated code is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
	// Verify that runtime/protoimpl is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)

// Specifies the way to match a Protobuf::Value. Primitive values and ListValue are supported.
// StructValue is not supported and is always not matched.
// [#next-free-field: 7]
type ValueMatcher struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Specifies how to match a value.
	//
	// Types that are valid to be assigned to MatchPattern:
	//
	//	*ValueMatcher_NullMatch_
	//	*ValueMatcher_DoubleMatch
	//	*ValueMatcher_StringMatch
	//	*ValueMatcher_BoolMatch
	//	*ValueMatcher_PresentMatch
	//	*ValueMatcher_ListMatch
	MatchPattern  isValueMatcher_MatchPattern `protobuf_oneof:"match_pattern"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *ValueMatcher) Reset() {
	*x = ValueMatcher{}
	mi := &file_envoy_type_matcher_value_proto_msgTypes[0]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *ValueMatcher) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*ValueMatcher) ProtoMessage() {}

func (x *ValueMatcher) ProtoReflect() protoreflect.Message {
	mi := &file_envoy_type_matcher_value_proto_msgTypes[0]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use ValueMatcher.ProtoReflect.Descriptor instead.
func (*ValueMatcher) Descriptor() ([]byte, []int) {
	return file_envoy_type_matcher_value_proto_rawDescGZIP(), []int{0}
}

func (x *ValueMatcher) GetMatchPattern() isValueMatcher_MatchPattern {
	if x != nil {
		return x.MatchPattern
	}
	return nil
}

func (x *ValueMatcher) GetNullMatch() *ValueMatcher_NullMatch {
	if x != nil {
		if x, ok := x.MatchPattern.(*ValueMatcher_NullMatch_); ok {
			return x.NullMatch
		}
	}
	return nil
}

func (x *ValueMatcher) GetDoubleMatch() *DoubleMatcher {
	if x != nil {
		if x, ok := x.MatchPattern.(*ValueMatcher_DoubleMatch); ok {
			return x.DoubleMatch
		}
	}
	return nil
}

func (x *ValueMatcher) GetStringMatch() *StringMatcher {
	if x != nil {
		if x, ok := x.MatchPattern.(*ValueMatcher_StringMatch); ok {
			return x.StringMatch
		}
	}
	return nil
}

func (x *ValueMatcher) GetBoolMatch() bool {
	if x != nil {
		if x, ok := x.MatchPattern.(*ValueMatcher_BoolMatch); ok {
			return x.BoolMatch
		}
	}
	return false
}

func (x *ValueMatcher) GetPresentMatch() bool {
	if x != nil {
		if x, ok := x.MatchPattern.(*ValueMatcher_PresentMatch); ok {
			return x.PresentMatch
		}
	}
	return false
}

func (x *ValueMatcher) GetListMatch() *ListMatcher {
	if x != nil {
		if x, ok := x.MatchPattern.(*ValueMatcher_ListMatch); ok {
			return x.ListMatch
		}
	}
	return nil
}

type isValueMatcher_MatchPattern interface {
	isValueMatcher_MatchPattern()
}

type ValueMatcher_NullMatch_ struct {
	// If specified, a match occurs if and only if the target value is a NullValue.
	NullMatch *ValueMatcher_NullMatch `protobuf:"bytes,1,opt,name=null_match,json=nullMatch,proto3,oneof"`
}

type ValueMatcher_DoubleMatch struct {
	// If specified, a match occurs if and only if the target value is a double value and is
	// matched to this field.
	DoubleMatch *DoubleMatcher `protobuf:"bytes,2,opt,name=double_match,json=doubleMatch,proto3,oneof"`
}

type ValueMatcher_StringMatch struct {
	// If specified, a match occurs if and only if the target value is a string value and is
	// matched to this field.
	StringMatch *StringMatcher `protobuf:"bytes,3,opt,name=string_match,json=stringMatch,proto3,oneof"`
}

type ValueMatcher_BoolMatch struct {
	// If specified, a match occurs if and only if the target value is a bool value and is equal
	// to this field.
	BoolMatch bool `protobuf:"varint,4,opt,name=bool_match,json=boolMatch,proto3,oneof"`
}

type ValueMatcher_PresentMatch struct {
	// If specified, value match will be performed based on whether the path is referring to a
	// valid primitive value in the metadata. If the path is referring to a non-primitive value,
	// the result is always not matched.
	PresentMatch bool `protobuf:"varint,5,opt,name=present_match,json=presentMatch,proto3,oneof"`
}

type ValueMatcher_ListMatch struct {
	// If specified, a match occurs if and only if the target value is a list value and
	// is matched to this field.
	ListMatch *ListMatcher `protobuf:"bytes,6,opt,name=list_match,json=listMatch,proto3,oneof"`
}

func (*ValueMatcher_NullMatch_) isValueMatcher_MatchPattern() {}

func (*ValueMatcher_DoubleMatch) isValueMatcher_MatchPattern() {}

func (*ValueMatcher_StringMatch) isValueMatcher_MatchPattern() {}

func (*ValueMatcher_BoolMatch) isValueMatcher_MatchPattern() {}

func (*ValueMatcher_PresentMatch) isValueMatcher_MatchPattern() {}

func (*ValueMatcher_ListMatch) isValueMatcher_MatchPattern() {}

// Specifies the way to match a list value.
type ListMatcher struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Types that are valid to be assigned to MatchPattern:
	//
	//	*ListMatcher_OneOf
	MatchPattern  isListMatcher_MatchPattern `protobuf_oneof:"match_pattern"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *ListMatcher) Reset() {
	*x = ListMatcher{}
	mi := &file_envoy_type_matcher_value_proto_msgTypes[1]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *ListMatcher) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*ListMatcher) ProtoMessage() {}

func (x *ListMatcher) ProtoReflect() protoreflect.Message {
	mi := &file_envoy_type_matcher_value_proto_msgTypes[1]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use ListMatcher.ProtoReflect.Descriptor instead.
func (*ListMatcher) Descriptor() ([]byte, []int) {
	return file_envoy_type_matcher_value_proto_rawDescGZIP(), []int{1}
}

func (x *ListMatcher) GetMatchPattern() isListMatcher_MatchPattern {
	if x != nil {
		return x.MatchPattern
	}
	return nil
}

func (x *ListMatcher) GetOneOf() *ValueMatcher {
	if x != nil {
		if x, ok := x.MatchPattern.(*ListMatcher_OneOf); ok {
			return x.OneOf
		}
	}
	return nil
}

type isListMatcher_MatchPattern interface {
	isListMatcher_MatchPattern()
}

type ListMatcher_OneOf struct {
	// If specified, at least one of the values in the list must match the value specified.
	OneOf *ValueMatcher `protobuf:"bytes,1,opt,name=one_of,json=oneOf,proto3,oneof"`
}

func (*ListMatcher_OneOf) isListMatcher_MatchPattern() {}

// NullMatch is an empty message to specify a null value.
type ValueMatcher_NullMatch struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *ValueMatcher_NullMatch) Reset() {
	*x = ValueMatcher_NullMatch{}
	mi := &file_envoy_type_matcher_value_proto_msgTypes[2]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *ValueMatcher_NullMatch) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*ValueMatcher_NullMatch) ProtoMessage() {}

func (x *ValueMatcher_NullMatch) ProtoReflect() protoreflect.Message {
	mi := &file_envoy_type_matcher_value_proto_msgTypes[2]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use ValueMatcher_NullMatch.ProtoReflect.Descriptor instead.
func (*ValueMatcher_NullMatch) Descriptor() ([]byte, []int) {
	return file_envoy_type_matcher_value_proto_rawDescGZIP(), []int{0, 0}
}

var File_envoy_type_matcher_value_proto protoreflect.FileDescriptor

const file_envoy_type_matcher_value_proto_rawDesc = "" +
	"\n" +
	"\x1eenvoy/type/matcher/value.proto\x12\x12envoy.type.matcher\x1a\x1fenvoy/type/matcher/number.proto\x1a\x1fenvoy/type/matcher/string.proto\x1a\x1dudpa/annotations/status.proto\x1a\x17validate/validate.proto\"\x98\x03\n" +
	"\fValueMatcher\x12K\n" +
	"\n" +
	"null_match\x18\x01 \x01(\v2*.envoy.type.matcher.ValueMatcher.NullMatchH\x00R\tnullMatch\x12F\n" +
	"\fdouble_match\x18\x02 \x01(\v2!.envoy.type.matcher.DoubleMatcherH\x00R\vdoubleMatch\x12F\n" +
	"\fstring_match\x18\x03 \x01(\v2!.envoy.type.matcher.StringMatcherH\x00R\vstringMatch\x12\x1f\n" +
	"\n" +
	"bool_match\x18\x04 \x01(\bH\x00R\tboolMatch\x12%\n" +
	"\rpresent_match\x18\x05 \x01(\bH\x00R\fpresentMatch\x12@\n" +
	"\n" +
	"list_match\x18\x06 \x01(\v2\x1f.envoy.type.matcher.ListMatcherH\x00R\tlistMatch\x1a\v\n" +
	"\tNullMatchB\x14\n" +
	"\rmatch_pattern\x12\x03\xf8B\x01\"^\n" +
	"\vListMatcher\x129\n" +
	"\x06one_of\x18\x01 \x01(\v2 .envoy.type.matcher.ValueMatcherH\x00R\x05oneOfB\x14\n" +
	"\rmatch_pattern\x12\x03\xf8B\x01Bs\xba\x80\xc8\xd1\x06\x02\x10\x01\n" +
	" io.envoyproxy.envoy.type.matcherB\n" +
	"ValueProtoP\x01Z9github.com/envoyproxy/go-control-plane/envoy/type/matcherb\x06proto3"

var (
	file_envoy_type_matcher_value_proto_rawDescOnce sync.Once
	file_envoy_type_matcher_value_proto_rawDescData []byte
)

func file_envoy_type_matcher_value_proto_rawDescGZIP() []byte {
	file_envoy_type_matcher_value_proto_rawDescOnce.Do(func() {
		file_envoy_type_matcher_value_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_envoy_type_matcher_value_proto_rawDesc), len(file_envoy_type_matcher_value_proto_rawDesc)))
	})
	return file_envoy_type_matcher_value_proto_rawDescData
}

var file_envoy_type_matcher_value_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_envoy_type_matcher_value_proto_goTypes = []any{
	(*ValueMatcher)(nil),           // 0: envoy.type.matcher.ValueMatcher
	(*ListMatcher)(nil),            // 1: envoy.type.matcher.ListMatcher
	(*ValueMatcher_NullMatch)(nil), // 2: envoy.type.matcher.ValueMatcher.NullMatch
	(*DoubleMatcher)(nil),          // 3: envoy.type.matcher.DoubleMatcher
	(*StringMatcher)(nil),          // 4: envoy.type.matcher.StringMatcher
}
var file_envoy_type_matcher_value_proto_depIdxs = []int32{
	2, // 0: envoy.type.matcher.ValueMatcher.null_match:type_name -> envoy.type.matcher.ValueMatcher.NullMatch
	3, // 1: envoy.type.matcher.ValueMatcher.double_match:type_name -> envoy.type.matcher.DoubleMatcher
	4, // 2: envoy.type.matcher.ValueMatcher.string_match:type_name -> envoy.type.matcher.StringMatcher
	1, // 3: envoy.type.matcher.ValueMatcher.list_match:type_name -> envoy.type.matcher.ListMatcher
	0, // 4: envoy.type.matcher.ListMatcher.one_of:type_name -> envoy.type.matcher.ValueMatcher
	5, // [5:5] is the sub-list for method output_type
	5, // [5:5] is the sub-list for method input_type
	5, // [5:5] is the sub-list for extension type_name
	5, // [5:5] is the sub-list for extension extendee
	0, // [0:5] is the sub-list for field type_name
}

func init() { file_envoy_type_matcher_value_proto_init() }
func file_envoy_type_matcher_value_proto_init() {
	if File_envoy_type_matcher_value_proto != nil {
		return
	}
	file_envoy_type_matcher_number_proto_init()
	file_envoy_type_matcher_string_proto_init()
	file_envoy_type_matcher_value_proto_msgTypes[0].OneofWrappers = []any{
		(*ValueMatcher_NullMatch_)(nil),
		(*ValueMatcher_DoubleMatch)(nil),
		(*ValueMatcher_StringMatch)(nil),
		(*ValueMatcher_BoolMatch)(nil),
		(*ValueMatcher_PresentMatch)(nil),
		(*ValueMatcher_ListMatch)(nil),
	}
	file_envoy_type_matcher_value_proto_msgTypes[1].OneofWrappers = []any{
		(*ListMatcher_OneOf)(nil),
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_envoy_type_matcher_value_proto_rawDesc), len(file_envoy_type_matcher_value_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   3,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_envoy_type_matcher_value_proto_goTypes,
		DependencyIndexes: file_envoy_type_matcher_value_proto_depIdxs,
		MessageInfos:      file_envoy_type_matcher_value_proto_msgTypes,
	}.Build()
	File_envoy_type_matcher_value_proto = out.File
	file_envoy_type_matcher_value_proto_goTypes = nil
	file_envoy_type_matcher_value_proto_depIdxs = nil
}
