// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.10
// 	protoc        v6.33.2
// source: envoy/type/metadata/v3/metadata.proto

package metadatav3

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)
)

// MetadataKey provides a way to retrieve values from
// :ref:`Metadata <envoy_v3_api_msg_config.core.v3.Metadata>` using a “key“ and a “path“.
//
// For example, consider the following Metadata:
//
// .. code-block:: yaml
//
//	filter_metadata:
//	  envoy.xxx:
//	    prop:
//	      foo: bar
//	      xyz:
//	        hello: envoy
//
// The following MetadataKey would retrieve the string value "bar" from the Metadata:
//
// .. code-block:: yaml
//
//	key: envoy.xxx
//	path:
//	- key: prop
//	- key: foo
type MetadataKey struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The key name of the Metadata from which to retrieve the Struct.
	// This typically represents a builtin subsystem or custom extension.
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// The path used to retrieve a specific Value from the Struct.
	// This can be either a prefix or a full path, depending on the use case.
	// For example, “[prop, xyz]“ would retrieve a struct or “[prop, foo]“ would retrieve a string
	// in the example above.
	//
	// .. note::
	//
	//	Since only key-type segments are supported, a path cannot specify a list
	//	unless the list is the last segment.
	Path          []*MetadataKey_PathSegment `protobuf:"bytes,2,rep,name=path,proto3" json:"path,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*MetadataKey) ProtoMessage() {}

func (x *MetadataKey) ProtoReflect() protoreflect.Message {
	mi := &file_envoy_type_metadata_v3_metadata_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 MetadataKey.ProtoReflect.Descriptor instead.
func (*MetadataKey) Descriptor() ([]byte, []int) {
	return file_envoy_type_metadata_v3_metadata_proto_rawDescGZIP(), []int{0}
}

func (x *MetadataKey) GetKey() string {
	if x != nil {
		return x.Key
	}
	return ""
}

func (x *MetadataKey) GetPath() []*MetadataKey_PathSegment {
	if x != nil {
		return x.Path
	}
	return nil
}

// Describes different types of metadata sources.
type MetadataKind struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Types that are valid to be assigned to Kind:
	//
	//	*MetadataKind_Request_
	//	*MetadataKind_Route_
	//	*MetadataKind_Cluster_
	//	*MetadataKind_Host_
	Kind          isMetadataKind_Kind `protobuf_oneof:"kind"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*MetadataKind) ProtoMessage() {}

func (x *MetadataKind) ProtoReflect() protoreflect.Message {
	mi := &file_envoy_type_metadata_v3_metadata_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 MetadataKind.ProtoReflect.Descriptor instead.
func (*MetadataKind) Descriptor() ([]byte, []int) {
	return file_envoy_type_metadata_v3_metadata_proto_rawDescGZIP(), []int{1}
}

func (x *MetadataKind) GetKind() isMetadataKind_Kind {
	if x != nil {
		return x.Kind
	}
	return nil
}

func (x *MetadataKind) GetRequest() *MetadataKind_Request {
	if x != nil {
		if x, ok := x.Kind.(*MetadataKind_Request_); ok {
			return x.Request
		}
	}
	return nil
}

func (x *MetadataKind) GetRoute() *MetadataKind_Route {
	if x != nil {
		if x, ok := x.Kind.(*MetadataKind_Route_); ok {
			return x.Route
		}
	}
	return nil
}

func (x *MetadataKind) GetCluster() *MetadataKind_Cluster {
	if x != nil {
		if x, ok := x.Kind.(*MetadataKind_Cluster_); ok {
			return x.Cluster
		}
	}
	return nil
}

func (x *MetadataKind) GetHost() *MetadataKind_Host {
	if x != nil {
		if x, ok := x.Kind.(*MetadataKind_Host_); ok {
			return x.Host
		}
	}
	return nil
}

type isMetadataKind_Kind interface {
	isMetadataKind_Kind()
}

type MetadataKind_Request_ struct {
	// Request kind of metadata.
	Request *MetadataKind_Request `protobuf:"bytes,1,opt,name=request,proto3,oneof"`
}

type MetadataKind_Route_ struct {
	// Route kind of metadata.
	Route *MetadataKind_Route `protobuf:"bytes,2,opt,name=route,proto3,oneof"`
}

type MetadataKind_Cluster_ struct {
	// Cluster kind of metadata.
	Cluster *MetadataKind_Cluster `protobuf:"bytes,3,opt,name=cluster,proto3,oneof"`
}

type MetadataKind_Host_ struct {
	// Host kind of metadata.
	Host *MetadataKind_Host `protobuf:"bytes,4,opt,name=host,proto3,oneof"`
}

func (*MetadataKind_Request_) isMetadataKind_Kind() {}

func (*MetadataKind_Route_) isMetadataKind_Kind() {}

func (*MetadataKind_Cluster_) isMetadataKind_Kind() {}

func (*MetadataKind_Host_) isMetadataKind_Kind() {}

// Specifies a segment in a path for retrieving values from Metadata.
// Currently, only key-based segments (field names) are supported.
type MetadataKey_PathSegment struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Types that are valid to be assigned to Segment:
	//
	//	*MetadataKey_PathSegment_Key
	Segment       isMetadataKey_PathSegment_Segment `protobuf_oneof:"segment"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*MetadataKey_PathSegment) ProtoMessage() {}

func (x *MetadataKey_PathSegment) ProtoReflect() protoreflect.Message {
	mi := &file_envoy_type_metadata_v3_metadata_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 MetadataKey_PathSegment.ProtoReflect.Descriptor instead.
func (*MetadataKey_PathSegment) Descriptor() ([]byte, []int) {
	return file_envoy_type_metadata_v3_metadata_proto_rawDescGZIP(), []int{0, 0}
}

func (x *MetadataKey_PathSegment) GetSegment() isMetadataKey_PathSegment_Segment {
	if x != nil {
		return x.Segment
	}
	return nil
}

func (x *MetadataKey_PathSegment) GetKey() string {
	if x != nil {
		if x, ok := x.Segment.(*MetadataKey_PathSegment_Key); ok {
			return x.Key
		}
	}
	return ""
}

type isMetadataKey_PathSegment_Segment interface {
	isMetadataKey_PathSegment_Segment()
}

type MetadataKey_PathSegment_Key struct {
	// If specified, use this key to retrieve the value in a Struct.
	Key string `protobuf:"bytes,1,opt,name=key,proto3,oneof"`
}

func (*MetadataKey_PathSegment_Key) isMetadataKey_PathSegment_Segment() {}

// Represents dynamic metadata associated with the request.
type MetadataKind_Request struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *MetadataKind_Request) Reset() {
	*x = MetadataKind_Request{}
	mi := &file_envoy_type_metadata_v3_metadata_proto_msgTypes[3]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*MetadataKind_Request) ProtoMessage() {}

func (x *MetadataKind_Request) ProtoReflect() protoreflect.Message {
	mi := &file_envoy_type_metadata_v3_metadata_proto_msgTypes[3]
	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 MetadataKind_Request.ProtoReflect.Descriptor instead.
func (*MetadataKind_Request) Descriptor() ([]byte, []int) {
	return file_envoy_type_metadata_v3_metadata_proto_rawDescGZIP(), []int{1, 0}
}

// Represents metadata from :ref:`the route<envoy_v3_api_field_config.route.v3.Route.metadata>`.
type MetadataKind_Route struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *MetadataKind_Route) Reset() {
	*x = MetadataKind_Route{}
	mi := &file_envoy_type_metadata_v3_metadata_proto_msgTypes[4]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*MetadataKind_Route) ProtoMessage() {}

func (x *MetadataKind_Route) ProtoReflect() protoreflect.Message {
	mi := &file_envoy_type_metadata_v3_metadata_proto_msgTypes[4]
	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 MetadataKind_Route.ProtoReflect.Descriptor instead.
func (*MetadataKind_Route) Descriptor() ([]byte, []int) {
	return file_envoy_type_metadata_v3_metadata_proto_rawDescGZIP(), []int{1, 1}
}

// Represents metadata from :ref:`the upstream cluster<envoy_v3_api_field_config.cluster.v3.Cluster.metadata>`.
type MetadataKind_Cluster struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *MetadataKind_Cluster) Reset() {
	*x = MetadataKind_Cluster{}
	mi := &file_envoy_type_metadata_v3_metadata_proto_msgTypes[5]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*MetadataKind_Cluster) ProtoMessage() {}

func (x *MetadataKind_Cluster) ProtoReflect() protoreflect.Message {
	mi := &file_envoy_type_metadata_v3_metadata_proto_msgTypes[5]
	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 MetadataKind_Cluster.ProtoReflect.Descriptor instead.
func (*MetadataKind_Cluster) Descriptor() ([]byte, []int) {
	return file_envoy_type_metadata_v3_metadata_proto_rawDescGZIP(), []int{1, 2}
}

// Represents metadata from :ref:`the upstream
// host<envoy_v3_api_field_config.endpoint.v3.LbEndpoint.metadata>`.
type MetadataKind_Host struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *MetadataKind_Host) Reset() {
	*x = MetadataKind_Host{}
	mi := &file_envoy_type_metadata_v3_metadata_proto_msgTypes[6]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*MetadataKind_Host) ProtoMessage() {}

func (x *MetadataKind_Host) ProtoReflect() protoreflect.Message {
	mi := &file_envoy_type_metadata_v3_metadata_proto_msgTypes[6]
	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 MetadataKind_Host.ProtoReflect.Descriptor instead.
func (*MetadataKind_Host) Descriptor() ([]byte, []int) {
	return file_envoy_type_metadata_v3_metadata_proto_rawDescGZIP(), []int{1, 3}
}

var File_envoy_type_metadata_v3_metadata_proto protoreflect.FileDescriptor

const file_envoy_type_metadata_v3_metadata_proto_rawDesc = "" +
	"\n" +
	"%envoy/type/metadata/v3/metadata.proto\x12\x16envoy.type.metadata.v3\x1a\x1dudpa/annotations/status.proto\x1a!udpa/annotations/versioning.proto\x1a\x17validate/validate.proto\"\x95\x02\n" +
	"\vMetadataKey\x12\x19\n" +
	"\x03key\x18\x01 \x01(\tB\a\xfaB\x04r\x02\x10\x01R\x03key\x12M\n" +
	"\x04path\x18\x02 \x03(\v2/.envoy.type.metadata.v3.MetadataKey.PathSegmentB\b\xfaB\x05\x92\x01\x02\b\x01R\x04path\x1aq\n" +
	"\vPathSegment\x12\x1b\n" +
	"\x03key\x18\x01 \x01(\tB\a\xfaB\x04r\x02\x10\x01H\x00R\x03key:5\x9aň\x1e0\n" +
	".envoy.type.metadata.v2.MetadataKey.PathSegmentB\x0e\n" +
	"\asegment\x12\x03\xf8B\x01:)\x9aň\x1e$\n" +
	"\"envoy.type.metadata.v2.MetadataKey\"\xd2\x04\n" +
	"\fMetadataKind\x12H\n" +
	"\arequest\x18\x01 \x01(\v2,.envoy.type.metadata.v3.MetadataKind.RequestH\x00R\arequest\x12B\n" +
	"\x05route\x18\x02 \x01(\v2*.envoy.type.metadata.v3.MetadataKind.RouteH\x00R\x05route\x12H\n" +
	"\acluster\x18\x03 \x01(\v2,.envoy.type.metadata.v3.MetadataKind.ClusterH\x00R\acluster\x12?\n" +
	"\x04host\x18\x04 \x01(\v2).envoy.type.metadata.v3.MetadataKind.HostH\x00R\x04host\x1a=\n" +
	"\aRequest:2\x9aň\x1e-\n" +
	"+envoy.type.metadata.v2.MetadataKind.Request\x1a9\n" +
	"\x05Route:0\x9aň\x1e+\n" +
	")envoy.type.metadata.v2.MetadataKind.Route\x1a=\n" +
	"\aCluster:2\x9aň\x1e-\n" +
	"+envoy.type.metadata.v2.MetadataKind.Cluster\x1a7\n" +
	"\x04Host:/\x9aň\x1e*\n" +
	"(envoy.type.metadata.v2.MetadataKind.Host:*\x9aň\x1e%\n" +
	"#envoy.type.metadata.v2.MetadataKindB\v\n" +
	"\x04kind\x12\x03\xf8B\x01B\x89\x01\xba\x80\xc8\xd1\x06\x02\x10\x02\n" +
	"$io.envoyproxy.envoy.type.metadata.v3B\rMetadataProtoP\x01ZHgithub.com/envoyproxy/go-control-plane/envoy/type/metadata/v3;metadatav3b\x06proto3"

var (
	file_envoy_type_metadata_v3_metadata_proto_rawDescOnce sync.Once
	file_envoy_type_metadata_v3_metadata_proto_rawDescData []byte
)

func file_envoy_type_metadata_v3_metadata_proto_rawDescGZIP() []byte {
	file_envoy_type_metadata_v3_metadata_proto_rawDescOnce.Do(func() {
		file_envoy_type_metadata_v3_metadata_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_envoy_type_metadata_v3_metadata_proto_rawDesc), len(file_envoy_type_metadata_v3_metadata_proto_rawDesc)))
	})
	return file_envoy_type_metadata_v3_metadata_proto_rawDescData
}

var file_envoy_type_metadata_v3_metadata_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
var file_envoy_type_metadata_v3_metadata_proto_goTypes = []any{
	(*MetadataKey)(nil),             // 0: envoy.type.metadata.v3.MetadataKey
	(*MetadataKind)(nil),            // 1: envoy.type.metadata.v3.MetadataKind
	(*MetadataKey_PathSegment)(nil), // 2: envoy.type.metadata.v3.MetadataKey.PathSegment
	(*MetadataKind_Request)(nil),    // 3: envoy.type.metadata.v3.MetadataKind.Request
	(*MetadataKind_Route)(nil),      // 4: envoy.type.metadata.v3.MetadataKind.Route
	(*MetadataKind_Cluster)(nil),    // 5: envoy.type.metadata.v3.MetadataKind.Cluster
	(*MetadataKind_Host)(nil),       // 6: envoy.type.metadata.v3.MetadataKind.Host
}
var file_envoy_type_metadata_v3_metadata_proto_depIdxs = []int32{
	2, // 0: envoy.type.metadata.v3.MetadataKey.path:type_name -> envoy.type.metadata.v3.MetadataKey.PathSegment
	3, // 1: envoy.type.metadata.v3.MetadataKind.request:type_name -> envoy.type.metadata.v3.MetadataKind.Request
	4, // 2: envoy.type.metadata.v3.MetadataKind.route:type_name -> envoy.type.metadata.v3.MetadataKind.Route
	5, // 3: envoy.type.metadata.v3.MetadataKind.cluster:type_name -> envoy.type.metadata.v3.MetadataKind.Cluster
	6, // 4: envoy.type.metadata.v3.MetadataKind.host:type_name -> envoy.type.metadata.v3.MetadataKind.Host
	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_metadata_v3_metadata_proto_init() }
func file_envoy_type_metadata_v3_metadata_proto_init() {
	if File_envoy_type_metadata_v3_metadata_proto != nil {
		return
	}
	file_envoy_type_metadata_v3_metadata_proto_msgTypes[1].OneofWrappers = []any{
		(*MetadataKind_Request_)(nil),
		(*MetadataKind_Route_)(nil),
		(*MetadataKind_Cluster_)(nil),
		(*MetadataKind_Host_)(nil),
	}
	file_envoy_type_metadata_v3_metadata_proto_msgTypes[2].OneofWrappers = []any{
		(*MetadataKey_PathSegment_Key)(nil),
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_envoy_type_metadata_v3_metadata_proto_rawDesc), len(file_envoy_type_metadata_v3_metadata_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   7,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_envoy_type_metadata_v3_metadata_proto_goTypes,
		DependencyIndexes: file_envoy_type_metadata_v3_metadata_proto_depIdxs,
		MessageInfos:      file_envoy_type_metadata_v3_metadata_proto_msgTypes,
	}.Build()
	File_envoy_type_metadata_v3_metadata_proto = out.File
	file_envoy_type_metadata_v3_metadata_proto_goTypes = nil
	file_envoy_type_metadata_v3_metadata_proto_depIdxs = nil
}
