1// Code generated by protoc-gen-go. DO NOT EDIT.
2// versions:
3// 	protoc-gen-go v1.25.0
4// 	protoc        v3.19.1
5// source: envoy/type/matcher/metadata.proto
6
7package envoy_type_matcher
8
9import (
10	_ "github.com/cncf/xds/go/udpa/annotations"
11	_ "github.com/envoyproxy/protoc-gen-validate/validate"
12	proto "github.com/golang/protobuf/proto"
13	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
14	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
15	reflect "reflect"
16	sync "sync"
17)
18
19const (
20	// Verify that this generated code is sufficiently up-to-date.
21	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
22	// Verify that runtime/protoimpl is sufficiently up-to-date.
23	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
24)
25
26// This is a compile-time assertion that a sufficiently up-to-date version
27// of the legacy proto package is being used.
28const _ = proto.ProtoPackageIsVersion4
29
30// [#next-major-version: MetadataMatcher should use StructMatcher]
31type MetadataMatcher struct {
32	state         protoimpl.MessageState
33	sizeCache     protoimpl.SizeCache
34	unknownFields protoimpl.UnknownFields
35
36	// The filter name to retrieve the Struct from the Metadata.
37	Filter string `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"`
38	// The path to retrieve the Value from the Struct.
39	Path []*MetadataMatcher_PathSegment `protobuf:"bytes,2,rep,name=path,proto3" json:"path,omitempty"`
40	// The MetadataMatcher is matched if the value retrieved by path is matched to this value.
41	Value *ValueMatcher `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
42}
43
44func (x *MetadataMatcher) Reset() {
45	*x = MetadataMatcher{}
46	if protoimpl.UnsafeEnabled {
47		mi := &file_envoy_type_matcher_metadata_proto_msgTypes[0]
48		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
49		ms.StoreMessageInfo(mi)
50	}
51}
52
53func (x *MetadataMatcher) String() string {
54	return protoimpl.X.MessageStringOf(x)
55}
56
57func (*MetadataMatcher) ProtoMessage() {}
58
59func (x *MetadataMatcher) ProtoReflect() protoreflect.Message {
60	mi := &file_envoy_type_matcher_metadata_proto_msgTypes[0]
61	if protoimpl.UnsafeEnabled && x != nil {
62		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
63		if ms.LoadMessageInfo() == nil {
64			ms.StoreMessageInfo(mi)
65		}
66		return ms
67	}
68	return mi.MessageOf(x)
69}
70
71// Deprecated: Use MetadataMatcher.ProtoReflect.Descriptor instead.
72func (*MetadataMatcher) Descriptor() ([]byte, []int) {
73	return file_envoy_type_matcher_metadata_proto_rawDescGZIP(), []int{0}
74}
75
76func (x *MetadataMatcher) GetFilter() string {
77	if x != nil {
78		return x.Filter
79	}
80	return ""
81}
82
83func (x *MetadataMatcher) GetPath() []*MetadataMatcher_PathSegment {
84	if x != nil {
85		return x.Path
86	}
87	return nil
88}
89
90func (x *MetadataMatcher) GetValue() *ValueMatcher {
91	if x != nil {
92		return x.Value
93	}
94	return nil
95}
96
97// Specifies the segment in a path to retrieve value from Metadata.
98// Note: Currently it's not supported to retrieve a value from a list in Metadata. This means that
99// if the segment key refers to a list, it has to be the last segment in a path.
100type MetadataMatcher_PathSegment struct {
101	state         protoimpl.MessageState
102	sizeCache     protoimpl.SizeCache
103	unknownFields protoimpl.UnknownFields
104
105	// Types that are assignable to Segment:
106	//	*MetadataMatcher_PathSegment_Key
107	Segment isMetadataMatcher_PathSegment_Segment `protobuf_oneof:"segment"`
108}
109
110func (x *MetadataMatcher_PathSegment) Reset() {
111	*x = MetadataMatcher_PathSegment{}
112	if protoimpl.UnsafeEnabled {
113		mi := &file_envoy_type_matcher_metadata_proto_msgTypes[1]
114		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
115		ms.StoreMessageInfo(mi)
116	}
117}
118
119func (x *MetadataMatcher_PathSegment) String() string {
120	return protoimpl.X.MessageStringOf(x)
121}
122
123func (*MetadataMatcher_PathSegment) ProtoMessage() {}
124
125func (x *MetadataMatcher_PathSegment) ProtoReflect() protoreflect.Message {
126	mi := &file_envoy_type_matcher_metadata_proto_msgTypes[1]
127	if protoimpl.UnsafeEnabled && x != nil {
128		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
129		if ms.LoadMessageInfo() == nil {
130			ms.StoreMessageInfo(mi)
131		}
132		return ms
133	}
134	return mi.MessageOf(x)
135}
136
137// Deprecated: Use MetadataMatcher_PathSegment.ProtoReflect.Descriptor instead.
138func (*MetadataMatcher_PathSegment) Descriptor() ([]byte, []int) {
139	return file_envoy_type_matcher_metadata_proto_rawDescGZIP(), []int{0, 0}
140}
141
142func (m *MetadataMatcher_PathSegment) GetSegment() isMetadataMatcher_PathSegment_Segment {
143	if m != nil {
144		return m.Segment
145	}
146	return nil
147}
148
149func (x *MetadataMatcher_PathSegment) GetKey() string {
150	if x, ok := x.GetSegment().(*MetadataMatcher_PathSegment_Key); ok {
151		return x.Key
152	}
153	return ""
154}
155
156type isMetadataMatcher_PathSegment_Segment interface {
157	isMetadataMatcher_PathSegment_Segment()
158}
159
160type MetadataMatcher_PathSegment_Key struct {
161	// If specified, use the key to retrieve the value in a Struct.
162	Key string `protobuf:"bytes,1,opt,name=key,proto3,oneof"`
163}
164
165func (*MetadataMatcher_PathSegment_Key) isMetadataMatcher_PathSegment_Segment() {}
166
167var File_envoy_type_matcher_metadata_proto protoreflect.FileDescriptor
168
169var file_envoy_type_matcher_metadata_proto_rawDesc = []byte{
170	0x0a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74,
171	0x63, 0x68, 0x65, 0x72, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72,
172	0x6f, 0x74, 0x6f, 0x12, 0x12, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e,
173	0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x1a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74,
174	0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x61, 0x6c, 0x75,
175	0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e,
176	0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
177	0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65,
178	0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
179	0xff, 0x01, 0x0a, 0x0f, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x61, 0x74, 0x63,
180	0x68, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20,
181	0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x66, 0x69,
182	0x6c, 0x74, 0x65, 0x72, 0x12, 0x4d, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x03,
183	0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e,
184	0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
185	0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x67, 0x6d,
186	0x65, 0x6e, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x04, 0x70,
187	0x61, 0x74, 0x68, 0x12, 0x40, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01,
188	0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e,
189	0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x74,
190	0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05,
191	0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x3a, 0x0a, 0x0b, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x67,
192	0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
193	0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x03, 0x6b, 0x65,
194	0x79, 0x42, 0x0e, 0x0a, 0x07, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x03, 0xf8, 0x42,
195	0x01, 0x42, 0x3b, 0x0a, 0x20, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f,
196	0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61,
197	0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x50,
198	0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06,
199	0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
200}
201
202var (
203	file_envoy_type_matcher_metadata_proto_rawDescOnce sync.Once
204	file_envoy_type_matcher_metadata_proto_rawDescData = file_envoy_type_matcher_metadata_proto_rawDesc
205)
206
207func file_envoy_type_matcher_metadata_proto_rawDescGZIP() []byte {
208	file_envoy_type_matcher_metadata_proto_rawDescOnce.Do(func() {
209		file_envoy_type_matcher_metadata_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_matcher_metadata_proto_rawDescData)
210	})
211	return file_envoy_type_matcher_metadata_proto_rawDescData
212}
213
214var file_envoy_type_matcher_metadata_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
215var file_envoy_type_matcher_metadata_proto_goTypes = []interface{}{
216	(*MetadataMatcher)(nil),             // 0: envoy.type.matcher.MetadataMatcher
217	(*MetadataMatcher_PathSegment)(nil), // 1: envoy.type.matcher.MetadataMatcher.PathSegment
218	(*ValueMatcher)(nil),                // 2: envoy.type.matcher.ValueMatcher
219}
220var file_envoy_type_matcher_metadata_proto_depIdxs = []int32{
221	1, // 0: envoy.type.matcher.MetadataMatcher.path:type_name -> envoy.type.matcher.MetadataMatcher.PathSegment
222	2, // 1: envoy.type.matcher.MetadataMatcher.value:type_name -> envoy.type.matcher.ValueMatcher
223	2, // [2:2] is the sub-list for method output_type
224	2, // [2:2] is the sub-list for method input_type
225	2, // [2:2] is the sub-list for extension type_name
226	2, // [2:2] is the sub-list for extension extendee
227	0, // [0:2] is the sub-list for field type_name
228}
229
230func init() { file_envoy_type_matcher_metadata_proto_init() }
231func file_envoy_type_matcher_metadata_proto_init() {
232	if File_envoy_type_matcher_metadata_proto != nil {
233		return
234	}
235	file_envoy_type_matcher_value_proto_init()
236	if !protoimpl.UnsafeEnabled {
237		file_envoy_type_matcher_metadata_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
238			switch v := v.(*MetadataMatcher); i {
239			case 0:
240				return &v.state
241			case 1:
242				return &v.sizeCache
243			case 2:
244				return &v.unknownFields
245			default:
246				return nil
247			}
248		}
249		file_envoy_type_matcher_metadata_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
250			switch v := v.(*MetadataMatcher_PathSegment); i {
251			case 0:
252				return &v.state
253			case 1:
254				return &v.sizeCache
255			case 2:
256				return &v.unknownFields
257			default:
258				return nil
259			}
260		}
261	}
262	file_envoy_type_matcher_metadata_proto_msgTypes[1].OneofWrappers = []interface{}{
263		(*MetadataMatcher_PathSegment_Key)(nil),
264	}
265	type x struct{}
266	out := protoimpl.TypeBuilder{
267		File: protoimpl.DescBuilder{
268			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
269			RawDescriptor: file_envoy_type_matcher_metadata_proto_rawDesc,
270			NumEnums:      0,
271			NumMessages:   2,
272			NumExtensions: 0,
273			NumServices:   0,
274		},
275		GoTypes:           file_envoy_type_matcher_metadata_proto_goTypes,
276		DependencyIndexes: file_envoy_type_matcher_metadata_proto_depIdxs,
277		MessageInfos:      file_envoy_type_matcher_metadata_proto_msgTypes,
278	}.Build()
279	File_envoy_type_matcher_metadata_proto = out.File
280	file_envoy_type_matcher_metadata_proto_rawDesc = nil
281	file_envoy_type_matcher_metadata_proto_goTypes = nil
282	file_envoy_type_matcher_metadata_proto_depIdxs = nil
283}
284