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/v3/metadata.proto 6 7package envoy_type_matcher_v3 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 // If true, the match result will be inverted. 43 Invert bool `protobuf:"varint,4,opt,name=invert,proto3" json:"invert,omitempty"` 44} 45 46func (x *MetadataMatcher) Reset() { 47 *x = MetadataMatcher{} 48 if protoimpl.UnsafeEnabled { 49 mi := &file_envoy_type_matcher_v3_metadata_proto_msgTypes[0] 50 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 51 ms.StoreMessageInfo(mi) 52 } 53} 54 55func (x *MetadataMatcher) String() string { 56 return protoimpl.X.MessageStringOf(x) 57} 58 59func (*MetadataMatcher) ProtoMessage() {} 60 61func (x *MetadataMatcher) ProtoReflect() protoreflect.Message { 62 mi := &file_envoy_type_matcher_v3_metadata_proto_msgTypes[0] 63 if protoimpl.UnsafeEnabled && x != nil { 64 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 65 if ms.LoadMessageInfo() == nil { 66 ms.StoreMessageInfo(mi) 67 } 68 return ms 69 } 70 return mi.MessageOf(x) 71} 72 73// Deprecated: Use MetadataMatcher.ProtoReflect.Descriptor instead. 74func (*MetadataMatcher) Descriptor() ([]byte, []int) { 75 return file_envoy_type_matcher_v3_metadata_proto_rawDescGZIP(), []int{0} 76} 77 78func (x *MetadataMatcher) GetFilter() string { 79 if x != nil { 80 return x.Filter 81 } 82 return "" 83} 84 85func (x *MetadataMatcher) GetPath() []*MetadataMatcher_PathSegment { 86 if x != nil { 87 return x.Path 88 } 89 return nil 90} 91 92func (x *MetadataMatcher) GetValue() *ValueMatcher { 93 if x != nil { 94 return x.Value 95 } 96 return nil 97} 98 99func (x *MetadataMatcher) GetInvert() bool { 100 if x != nil { 101 return x.Invert 102 } 103 return false 104} 105 106// Specifies the segment in a path to retrieve value from Metadata. 107// Note: Currently it's not supported to retrieve a value from a list in Metadata. This means that 108// if the segment key refers to a list, it has to be the last segment in a path. 109type MetadataMatcher_PathSegment struct { 110 state protoimpl.MessageState 111 sizeCache protoimpl.SizeCache 112 unknownFields protoimpl.UnknownFields 113 114 // Types that are assignable to Segment: 115 // *MetadataMatcher_PathSegment_Key 116 Segment isMetadataMatcher_PathSegment_Segment `protobuf_oneof:"segment"` 117} 118 119func (x *MetadataMatcher_PathSegment) Reset() { 120 *x = MetadataMatcher_PathSegment{} 121 if protoimpl.UnsafeEnabled { 122 mi := &file_envoy_type_matcher_v3_metadata_proto_msgTypes[1] 123 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 124 ms.StoreMessageInfo(mi) 125 } 126} 127 128func (x *MetadataMatcher_PathSegment) String() string { 129 return protoimpl.X.MessageStringOf(x) 130} 131 132func (*MetadataMatcher_PathSegment) ProtoMessage() {} 133 134func (x *MetadataMatcher_PathSegment) ProtoReflect() protoreflect.Message { 135 mi := &file_envoy_type_matcher_v3_metadata_proto_msgTypes[1] 136 if protoimpl.UnsafeEnabled && x != nil { 137 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 138 if ms.LoadMessageInfo() == nil { 139 ms.StoreMessageInfo(mi) 140 } 141 return ms 142 } 143 return mi.MessageOf(x) 144} 145 146// Deprecated: Use MetadataMatcher_PathSegment.ProtoReflect.Descriptor instead. 147func (*MetadataMatcher_PathSegment) Descriptor() ([]byte, []int) { 148 return file_envoy_type_matcher_v3_metadata_proto_rawDescGZIP(), []int{0, 0} 149} 150 151func (m *MetadataMatcher_PathSegment) GetSegment() isMetadataMatcher_PathSegment_Segment { 152 if m != nil { 153 return m.Segment 154 } 155 return nil 156} 157 158func (x *MetadataMatcher_PathSegment) GetKey() string { 159 if x, ok := x.GetSegment().(*MetadataMatcher_PathSegment_Key); ok { 160 return x.Key 161 } 162 return "" 163} 164 165type isMetadataMatcher_PathSegment_Segment interface { 166 isMetadataMatcher_PathSegment_Segment() 167} 168 169type MetadataMatcher_PathSegment_Key struct { 170 // If specified, use the key to retrieve the value in a Struct. 171 Key string `protobuf:"bytes,1,opt,name=key,proto3,oneof"` 172} 173 174func (*MetadataMatcher_PathSegment_Key) isMetadataMatcher_PathSegment_Segment() {} 175 176var File_envoy_type_matcher_v3_metadata_proto protoreflect.FileDescriptor 177 178var file_envoy_type_matcher_v3_metadata_proto_rawDesc = []byte{ 179 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 180 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 181 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 182 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x21, 0x65, 183 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 184 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 185 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 186 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 187 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 188 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 189 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 190 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xff, 0x02, 0x0a, 0x0f, 191 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 192 0x1f, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 193 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 194 0x12, 0x50, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 195 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 196 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 197 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x67, 0x6d, 0x65, 198 0x6e, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x04, 0x70, 0x61, 199 0x74, 0x68, 0x12, 0x43, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 200 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 201 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 202 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 203 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6e, 0x76, 0x65, 0x72, 204 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x1a, 205 0x71, 0x0a, 0x0b, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1b, 206 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 207 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x3a, 0x35, 0x9a, 0xc5, 0x88, 208 0x1e, 0x30, 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 209 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 210 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x67, 0x6d, 0x65, 211 0x6e, 0x74, 0x42, 0x0e, 0x0a, 0x07, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x03, 0xf8, 212 0x42, 0x01, 0x3a, 0x29, 0x9a, 0xc5, 0x88, 0x1e, 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 213 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x65, 214 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x3e, 0x0a, 215 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 216 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 217 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x50, 0x72, 218 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 219 0x72, 0x6f, 0x74, 0x6f, 0x33, 220} 221 222var ( 223 file_envoy_type_matcher_v3_metadata_proto_rawDescOnce sync.Once 224 file_envoy_type_matcher_v3_metadata_proto_rawDescData = file_envoy_type_matcher_v3_metadata_proto_rawDesc 225) 226 227func file_envoy_type_matcher_v3_metadata_proto_rawDescGZIP() []byte { 228 file_envoy_type_matcher_v3_metadata_proto_rawDescOnce.Do(func() { 229 file_envoy_type_matcher_v3_metadata_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_matcher_v3_metadata_proto_rawDescData) 230 }) 231 return file_envoy_type_matcher_v3_metadata_proto_rawDescData 232} 233 234var file_envoy_type_matcher_v3_metadata_proto_msgTypes = make([]protoimpl.MessageInfo, 2) 235var file_envoy_type_matcher_v3_metadata_proto_goTypes = []interface{}{ 236 (*MetadataMatcher)(nil), // 0: envoy.type.matcher.v3.MetadataMatcher 237 (*MetadataMatcher_PathSegment)(nil), // 1: envoy.type.matcher.v3.MetadataMatcher.PathSegment 238 (*ValueMatcher)(nil), // 2: envoy.type.matcher.v3.ValueMatcher 239} 240var file_envoy_type_matcher_v3_metadata_proto_depIdxs = []int32{ 241 1, // 0: envoy.type.matcher.v3.MetadataMatcher.path:type_name -> envoy.type.matcher.v3.MetadataMatcher.PathSegment 242 2, // 1: envoy.type.matcher.v3.MetadataMatcher.value:type_name -> envoy.type.matcher.v3.ValueMatcher 243 2, // [2:2] is the sub-list for method output_type 244 2, // [2:2] is the sub-list for method input_type 245 2, // [2:2] is the sub-list for extension type_name 246 2, // [2:2] is the sub-list for extension extendee 247 0, // [0:2] is the sub-list for field type_name 248} 249 250func init() { file_envoy_type_matcher_v3_metadata_proto_init() } 251func file_envoy_type_matcher_v3_metadata_proto_init() { 252 if File_envoy_type_matcher_v3_metadata_proto != nil { 253 return 254 } 255 file_envoy_type_matcher_v3_value_proto_init() 256 if !protoimpl.UnsafeEnabled { 257 file_envoy_type_matcher_v3_metadata_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 258 switch v := v.(*MetadataMatcher); i { 259 case 0: 260 return &v.state 261 case 1: 262 return &v.sizeCache 263 case 2: 264 return &v.unknownFields 265 default: 266 return nil 267 } 268 } 269 file_envoy_type_matcher_v3_metadata_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { 270 switch v := v.(*MetadataMatcher_PathSegment); i { 271 case 0: 272 return &v.state 273 case 1: 274 return &v.sizeCache 275 case 2: 276 return &v.unknownFields 277 default: 278 return nil 279 } 280 } 281 } 282 file_envoy_type_matcher_v3_metadata_proto_msgTypes[1].OneofWrappers = []interface{}{ 283 (*MetadataMatcher_PathSegment_Key)(nil), 284 } 285 type x struct{} 286 out := protoimpl.TypeBuilder{ 287 File: protoimpl.DescBuilder{ 288 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 289 RawDescriptor: file_envoy_type_matcher_v3_metadata_proto_rawDesc, 290 NumEnums: 0, 291 NumMessages: 2, 292 NumExtensions: 0, 293 NumServices: 0, 294 }, 295 GoTypes: file_envoy_type_matcher_v3_metadata_proto_goTypes, 296 DependencyIndexes: file_envoy_type_matcher_v3_metadata_proto_depIdxs, 297 MessageInfos: file_envoy_type_matcher_v3_metadata_proto_msgTypes, 298 }.Build() 299 File_envoy_type_matcher_v3_metadata_proto = out.File 300 file_envoy_type_matcher_v3_metadata_proto_rawDesc = nil 301 file_envoy_type_matcher_v3_metadata_proto_goTypes = nil 302 file_envoy_type_matcher_v3_metadata_proto_depIdxs = nil 303} 304