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/struct.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// StructMatcher provides a general interface to check if a given value is matched in 31// google.protobuf.Struct. It uses `path` to retrieve the value 32// from the struct and then check if it's matched to the specified value. 33// 34// For example, for the following Struct: 35// 36// .. code-block:: yaml 37// 38// fields: 39// a: 40// struct_value: 41// fields: 42// b: 43// struct_value: 44// fields: 45// c: 46// string_value: pro 47// t: 48// list_value: 49// values: 50// - string_value: m 51// - string_value: n 52// 53// The following MetadataMatcher is matched as the path [a, b, c] will retrieve a string value "pro" 54// from the Metadata which is matched to the specified prefix match. 55// 56// .. code-block:: yaml 57// 58// path: 59// - key: a 60// - key: b 61// - key: c 62// value: 63// string_match: 64// prefix: pr 65// 66// The following StructMatcher is matched as the code will match one of the string values in the 67// list at the path [a, t]. 68// 69// .. code-block:: yaml 70// 71// path: 72// - key: a 73// - key: t 74// value: 75// list_match: 76// one_of: 77// string_match: 78// exact: m 79// 80// An example use of StructMatcher is to match metadata in envoy.v*.core.Node. 81type StructMatcher struct { 82 state protoimpl.MessageState 83 sizeCache protoimpl.SizeCache 84 unknownFields protoimpl.UnknownFields 85 86 // The path to retrieve the Value from the Struct. 87 Path []*StructMatcher_PathSegment `protobuf:"bytes,2,rep,name=path,proto3" json:"path,omitempty"` 88 // The StructMatcher is matched if the value retrieved by path is matched to this value. 89 Value *ValueMatcher `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` 90} 91 92func (x *StructMatcher) Reset() { 93 *x = StructMatcher{} 94 if protoimpl.UnsafeEnabled { 95 mi := &file_envoy_type_matcher_v3_struct_proto_msgTypes[0] 96 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 97 ms.StoreMessageInfo(mi) 98 } 99} 100 101func (x *StructMatcher) String() string { 102 return protoimpl.X.MessageStringOf(x) 103} 104 105func (*StructMatcher) ProtoMessage() {} 106 107func (x *StructMatcher) ProtoReflect() protoreflect.Message { 108 mi := &file_envoy_type_matcher_v3_struct_proto_msgTypes[0] 109 if protoimpl.UnsafeEnabled && x != nil { 110 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 111 if ms.LoadMessageInfo() == nil { 112 ms.StoreMessageInfo(mi) 113 } 114 return ms 115 } 116 return mi.MessageOf(x) 117} 118 119// Deprecated: Use StructMatcher.ProtoReflect.Descriptor instead. 120func (*StructMatcher) Descriptor() ([]byte, []int) { 121 return file_envoy_type_matcher_v3_struct_proto_rawDescGZIP(), []int{0} 122} 123 124func (x *StructMatcher) GetPath() []*StructMatcher_PathSegment { 125 if x != nil { 126 return x.Path 127 } 128 return nil 129} 130 131func (x *StructMatcher) GetValue() *ValueMatcher { 132 if x != nil { 133 return x.Value 134 } 135 return nil 136} 137 138// Specifies the segment in a path to retrieve value from Struct. 139type StructMatcher_PathSegment struct { 140 state protoimpl.MessageState 141 sizeCache protoimpl.SizeCache 142 unknownFields protoimpl.UnknownFields 143 144 // Types that are assignable to Segment: 145 // *StructMatcher_PathSegment_Key 146 Segment isStructMatcher_PathSegment_Segment `protobuf_oneof:"segment"` 147} 148 149func (x *StructMatcher_PathSegment) Reset() { 150 *x = StructMatcher_PathSegment{} 151 if protoimpl.UnsafeEnabled { 152 mi := &file_envoy_type_matcher_v3_struct_proto_msgTypes[1] 153 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 154 ms.StoreMessageInfo(mi) 155 } 156} 157 158func (x *StructMatcher_PathSegment) String() string { 159 return protoimpl.X.MessageStringOf(x) 160} 161 162func (*StructMatcher_PathSegment) ProtoMessage() {} 163 164func (x *StructMatcher_PathSegment) ProtoReflect() protoreflect.Message { 165 mi := &file_envoy_type_matcher_v3_struct_proto_msgTypes[1] 166 if protoimpl.UnsafeEnabled && x != nil { 167 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 168 if ms.LoadMessageInfo() == nil { 169 ms.StoreMessageInfo(mi) 170 } 171 return ms 172 } 173 return mi.MessageOf(x) 174} 175 176// Deprecated: Use StructMatcher_PathSegment.ProtoReflect.Descriptor instead. 177func (*StructMatcher_PathSegment) Descriptor() ([]byte, []int) { 178 return file_envoy_type_matcher_v3_struct_proto_rawDescGZIP(), []int{0, 0} 179} 180 181func (m *StructMatcher_PathSegment) GetSegment() isStructMatcher_PathSegment_Segment { 182 if m != nil { 183 return m.Segment 184 } 185 return nil 186} 187 188func (x *StructMatcher_PathSegment) GetKey() string { 189 if x, ok := x.GetSegment().(*StructMatcher_PathSegment_Key); ok { 190 return x.Key 191 } 192 return "" 193} 194 195type isStructMatcher_PathSegment_Segment interface { 196 isStructMatcher_PathSegment_Segment() 197} 198 199type StructMatcher_PathSegment_Key struct { 200 // If specified, use the key to retrieve the value in a Struct. 201 Key string `protobuf:"bytes,1,opt,name=key,proto3,oneof"` 202} 203 204func (*StructMatcher_PathSegment_Key) isStructMatcher_PathSegment_Segment() {} 205 206var File_envoy_type_matcher_v3_struct_proto protoreflect.FileDescriptor 207 208var file_envoy_type_matcher_v3_struct_proto_rawDesc = []byte{ 209 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 210 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 211 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 212 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x21, 0x65, 0x6e, 0x76, 213 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 214 0x76, 0x33, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 215 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 216 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 217 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 218 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 219 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 220 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbe, 0x02, 0x0a, 0x0d, 0x53, 0x74, 221 0x72, 0x75, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x4e, 0x0a, 0x04, 0x70, 222 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 223 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 224 0x33, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 225 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 226 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x43, 0x0a, 0x05, 0x76, 227 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 228 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 229 0x76, 0x33, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 230 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 231 0x1a, 0x6f, 0x0a, 0x0b, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 232 0x1b, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 233 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x3a, 0x33, 0x9a, 0xc5, 234 0x88, 0x1e, 0x2e, 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 235 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x4d, 0x61, 236 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 237 0x74, 0x42, 0x0e, 0x0a, 0x07, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x03, 0xf8, 0x42, 238 0x01, 0x3a, 0x27, 0x9a, 0xc5, 0x88, 0x1e, 0x22, 0x0a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 239 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x72, 240 0x75, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x3c, 0x0a, 0x23, 0x69, 0x6f, 241 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 242 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 243 0x33, 0x42, 0x0b, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 244 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 245} 246 247var ( 248 file_envoy_type_matcher_v3_struct_proto_rawDescOnce sync.Once 249 file_envoy_type_matcher_v3_struct_proto_rawDescData = file_envoy_type_matcher_v3_struct_proto_rawDesc 250) 251 252func file_envoy_type_matcher_v3_struct_proto_rawDescGZIP() []byte { 253 file_envoy_type_matcher_v3_struct_proto_rawDescOnce.Do(func() { 254 file_envoy_type_matcher_v3_struct_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_matcher_v3_struct_proto_rawDescData) 255 }) 256 return file_envoy_type_matcher_v3_struct_proto_rawDescData 257} 258 259var file_envoy_type_matcher_v3_struct_proto_msgTypes = make([]protoimpl.MessageInfo, 2) 260var file_envoy_type_matcher_v3_struct_proto_goTypes = []interface{}{ 261 (*StructMatcher)(nil), // 0: envoy.type.matcher.v3.StructMatcher 262 (*StructMatcher_PathSegment)(nil), // 1: envoy.type.matcher.v3.StructMatcher.PathSegment 263 (*ValueMatcher)(nil), // 2: envoy.type.matcher.v3.ValueMatcher 264} 265var file_envoy_type_matcher_v3_struct_proto_depIdxs = []int32{ 266 1, // 0: envoy.type.matcher.v3.StructMatcher.path:type_name -> envoy.type.matcher.v3.StructMatcher.PathSegment 267 2, // 1: envoy.type.matcher.v3.StructMatcher.value:type_name -> envoy.type.matcher.v3.ValueMatcher 268 2, // [2:2] is the sub-list for method output_type 269 2, // [2:2] is the sub-list for method input_type 270 2, // [2:2] is the sub-list for extension type_name 271 2, // [2:2] is the sub-list for extension extendee 272 0, // [0:2] is the sub-list for field type_name 273} 274 275func init() { file_envoy_type_matcher_v3_struct_proto_init() } 276func file_envoy_type_matcher_v3_struct_proto_init() { 277 if File_envoy_type_matcher_v3_struct_proto != nil { 278 return 279 } 280 file_envoy_type_matcher_v3_value_proto_init() 281 if !protoimpl.UnsafeEnabled { 282 file_envoy_type_matcher_v3_struct_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 283 switch v := v.(*StructMatcher); i { 284 case 0: 285 return &v.state 286 case 1: 287 return &v.sizeCache 288 case 2: 289 return &v.unknownFields 290 default: 291 return nil 292 } 293 } 294 file_envoy_type_matcher_v3_struct_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { 295 switch v := v.(*StructMatcher_PathSegment); i { 296 case 0: 297 return &v.state 298 case 1: 299 return &v.sizeCache 300 case 2: 301 return &v.unknownFields 302 default: 303 return nil 304 } 305 } 306 } 307 file_envoy_type_matcher_v3_struct_proto_msgTypes[1].OneofWrappers = []interface{}{ 308 (*StructMatcher_PathSegment_Key)(nil), 309 } 310 type x struct{} 311 out := protoimpl.TypeBuilder{ 312 File: protoimpl.DescBuilder{ 313 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 314 RawDescriptor: file_envoy_type_matcher_v3_struct_proto_rawDesc, 315 NumEnums: 0, 316 NumMessages: 2, 317 NumExtensions: 0, 318 NumServices: 0, 319 }, 320 GoTypes: file_envoy_type_matcher_v3_struct_proto_goTypes, 321 DependencyIndexes: file_envoy_type_matcher_v3_struct_proto_depIdxs, 322 MessageInfos: file_envoy_type_matcher_v3_struct_proto_msgTypes, 323 }.Build() 324 File_envoy_type_matcher_v3_struct_proto = out.File 325 file_envoy_type_matcher_v3_struct_proto_rawDesc = nil 326 file_envoy_type_matcher_v3_struct_proto_goTypes = nil 327 file_envoy_type_matcher_v3_struct_proto_depIdxs = nil 328} 329