gitee.com/zhaochuninhefei/gmgo@v0.0.31-0.20240209061119-069254a02979/go-control-plane/envoy/type/matcher/struct.pb.go (about)

     1  // Code generated by protoc-gen-go. DO NOT EDIT.
     2  // versions:
     3  // 	protoc-gen-go v1.25.0
     4  // 	protoc        v3.16.0
     5  // source: envoy/type/matcher/struct.proto
     6  
     7  package envoy_type_matcher
     8  
     9  import (
    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  
    19  const (
    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.
    28  const _ = 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.
    81  type 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  
    92  func (x *StructMatcher) Reset() {
    93  	*x = StructMatcher{}
    94  	if protoimpl.UnsafeEnabled {
    95  		mi := &file_envoy_type_matcher_struct_proto_msgTypes[0]
    96  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    97  		ms.StoreMessageInfo(mi)
    98  	}
    99  }
   100  
   101  func (x *StructMatcher) String() string {
   102  	return protoimpl.X.MessageStringOf(x)
   103  }
   104  
   105  func (*StructMatcher) ProtoMessage() {}
   106  
   107  func (x *StructMatcher) ProtoReflect() protoreflect.Message {
   108  	mi := &file_envoy_type_matcher_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.
   120  func (*StructMatcher) Descriptor() ([]byte, []int) {
   121  	return file_envoy_type_matcher_struct_proto_rawDescGZIP(), []int{0}
   122  }
   123  
   124  func (x *StructMatcher) GetPath() []*StructMatcher_PathSegment {
   125  	if x != nil {
   126  		return x.Path
   127  	}
   128  	return nil
   129  }
   130  
   131  func (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.
   139  type 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  
   149  func (x *StructMatcher_PathSegment) Reset() {
   150  	*x = StructMatcher_PathSegment{}
   151  	if protoimpl.UnsafeEnabled {
   152  		mi := &file_envoy_type_matcher_struct_proto_msgTypes[1]
   153  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   154  		ms.StoreMessageInfo(mi)
   155  	}
   156  }
   157  
   158  func (x *StructMatcher_PathSegment) String() string {
   159  	return protoimpl.X.MessageStringOf(x)
   160  }
   161  
   162  func (*StructMatcher_PathSegment) ProtoMessage() {}
   163  
   164  func (x *StructMatcher_PathSegment) ProtoReflect() protoreflect.Message {
   165  	mi := &file_envoy_type_matcher_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.
   177  func (*StructMatcher_PathSegment) Descriptor() ([]byte, []int) {
   178  	return file_envoy_type_matcher_struct_proto_rawDescGZIP(), []int{0, 0}
   179  }
   180  
   181  func (m *StructMatcher_PathSegment) GetSegment() isStructMatcher_PathSegment_Segment {
   182  	if m != nil {
   183  		return m.Segment
   184  	}
   185  	return nil
   186  }
   187  
   188  func (x *StructMatcher_PathSegment) GetKey() string {
   189  	if x, ok := x.GetSegment().(*StructMatcher_PathSegment_Key); ok {
   190  		return x.Key
   191  	}
   192  	return ""
   193  }
   194  
   195  type isStructMatcher_PathSegment_Segment interface {
   196  	isStructMatcher_PathSegment_Segment()
   197  }
   198  
   199  type 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  
   204  func (*StructMatcher_PathSegment_Key) isStructMatcher_PathSegment_Segment() {}
   205  
   206  var File_envoy_type_matcher_struct_proto protoreflect.FileDescriptor
   207  
   208  var file_envoy_type_matcher_struct_proto_rawDesc = []byte{
   209  	0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74,
   210  	0x63, 0x68, 0x65, 0x72, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74,
   211  	0x6f, 0x12, 0x12, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61,
   212  	0x74, 0x63, 0x68, 0x65, 0x72, 0x1a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70,
   213  	0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2e,
   214  	0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f,
   215  	0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70,
   216  	0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76,
   217  	0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xda, 0x01,
   218  	0x0a, 0x0d, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12,
   219  	0x4b, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e,
   220  	0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68,
   221  	0x65, 0x72, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72,
   222  	0x2e, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x08, 0xfa, 0x42,
   223  	0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x40, 0x0a, 0x05,
   224  	0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e,
   225  	0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72,
   226  	0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa,
   227  	0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x3a,
   228  	0x0a, 0x0b, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a,
   229  	0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72,
   230  	0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x42, 0x0e, 0x0a, 0x07, 0x73, 0x65,
   231  	0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x39, 0x0a, 0x20, 0x69, 0x6f,
   232  	0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f,
   233  	0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x0b,
   234  	0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0xba, 0x80, 0xc8,
   235  	0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
   236  }
   237  
   238  var (
   239  	file_envoy_type_matcher_struct_proto_rawDescOnce sync.Once
   240  	file_envoy_type_matcher_struct_proto_rawDescData = file_envoy_type_matcher_struct_proto_rawDesc
   241  )
   242  
   243  func file_envoy_type_matcher_struct_proto_rawDescGZIP() []byte {
   244  	file_envoy_type_matcher_struct_proto_rawDescOnce.Do(func() {
   245  		file_envoy_type_matcher_struct_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_matcher_struct_proto_rawDescData)
   246  	})
   247  	return file_envoy_type_matcher_struct_proto_rawDescData
   248  }
   249  
   250  var file_envoy_type_matcher_struct_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
   251  var file_envoy_type_matcher_struct_proto_goTypes = []interface{}{
   252  	(*StructMatcher)(nil),             // 0: envoy.type.matcher.StructMatcher
   253  	(*StructMatcher_PathSegment)(nil), // 1: envoy.type.matcher.StructMatcher.PathSegment
   254  	(*ValueMatcher)(nil),              // 2: envoy.type.matcher.ValueMatcher
   255  }
   256  var file_envoy_type_matcher_struct_proto_depIdxs = []int32{
   257  	1, // 0: envoy.type.matcher.StructMatcher.path:type_name -> envoy.type.matcher.StructMatcher.PathSegment
   258  	2, // 1: envoy.type.matcher.StructMatcher.value:type_name -> envoy.type.matcher.ValueMatcher
   259  	2, // [2:2] is the sub-list for method output_type
   260  	2, // [2:2] is the sub-list for method input_type
   261  	2, // [2:2] is the sub-list for extension type_name
   262  	2, // [2:2] is the sub-list for extension extendee
   263  	0, // [0:2] is the sub-list for field type_name
   264  }
   265  
   266  func init() { file_envoy_type_matcher_struct_proto_init() }
   267  func file_envoy_type_matcher_struct_proto_init() {
   268  	if File_envoy_type_matcher_struct_proto != nil {
   269  		return
   270  	}
   271  	file_envoy_type_matcher_value_proto_init()
   272  	if !protoimpl.UnsafeEnabled {
   273  		file_envoy_type_matcher_struct_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
   274  			switch v := v.(*StructMatcher); i {
   275  			case 0:
   276  				return &v.state
   277  			case 1:
   278  				return &v.sizeCache
   279  			case 2:
   280  				return &v.unknownFields
   281  			default:
   282  				return nil
   283  			}
   284  		}
   285  		file_envoy_type_matcher_struct_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
   286  			switch v := v.(*StructMatcher_PathSegment); i {
   287  			case 0:
   288  				return &v.state
   289  			case 1:
   290  				return &v.sizeCache
   291  			case 2:
   292  				return &v.unknownFields
   293  			default:
   294  				return nil
   295  			}
   296  		}
   297  	}
   298  	file_envoy_type_matcher_struct_proto_msgTypes[1].OneofWrappers = []interface{}{
   299  		(*StructMatcher_PathSegment_Key)(nil),
   300  	}
   301  	type x struct{}
   302  	out := protoimpl.TypeBuilder{
   303  		File: protoimpl.DescBuilder{
   304  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   305  			RawDescriptor: file_envoy_type_matcher_struct_proto_rawDesc,
   306  			NumEnums:      0,
   307  			NumMessages:   2,
   308  			NumExtensions: 0,
   309  			NumServices:   0,
   310  		},
   311  		GoTypes:           file_envoy_type_matcher_struct_proto_goTypes,
   312  		DependencyIndexes: file_envoy_type_matcher_struct_proto_depIdxs,
   313  		MessageInfos:      file_envoy_type_matcher_struct_proto_msgTypes,
   314  	}.Build()
   315  	File_envoy_type_matcher_struct_proto = out.File
   316  	file_envoy_type_matcher_struct_proto_rawDesc = nil
   317  	file_envoy_type_matcher_struct_proto_goTypes = nil
   318  	file_envoy_type_matcher_struct_proto_depIdxs = nil
   319  }