// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.10
// 	protoc        v7.35.1
// source: envoy/type/tracing/v2/custom_tag.proto

package tracingv2

import (
	_ "github.com/cncf/xds/go/udpa/annotations"
	v2 "github.com/envoyproxy/go-control-plane/envoy/type/metadata/v2"
	_ "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)
)

// Describes custom tags for the active span.
// [#next-free-field: 6]
type CustomTag struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Used to populate the tag name.
	Tag string `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"`
	// Used to specify what kind of custom tag.
	//
	// Types that are valid to be assigned to Type:
	//
	//	*CustomTag_Literal_
	//	*CustomTag_Environment_
	//	*CustomTag_RequestHeader
	//	*CustomTag_Metadata_
	Type          isCustomTag_Type `protobuf_oneof:"type"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*CustomTag) ProtoMessage() {}

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

func (x *CustomTag) GetTag() string {
	if x != nil {
		return x.Tag
	}
	return ""
}

func (x *CustomTag) GetType() isCustomTag_Type {
	if x != nil {
		return x.Type
	}
	return nil
}

func (x *CustomTag) GetLiteral() *CustomTag_Literal {
	if x != nil {
		if x, ok := x.Type.(*CustomTag_Literal_); ok {
			return x.Literal
		}
	}
	return nil
}

func (x *CustomTag) GetEnvironment() *CustomTag_Environment {
	if x != nil {
		if x, ok := x.Type.(*CustomTag_Environment_); ok {
			return x.Environment
		}
	}
	return nil
}

func (x *CustomTag) GetRequestHeader() *CustomTag_Header {
	if x != nil {
		if x, ok := x.Type.(*CustomTag_RequestHeader); ok {
			return x.RequestHeader
		}
	}
	return nil
}

func (x *CustomTag) GetMetadata() *CustomTag_Metadata {
	if x != nil {
		if x, ok := x.Type.(*CustomTag_Metadata_); ok {
			return x.Metadata
		}
	}
	return nil
}

type isCustomTag_Type interface {
	isCustomTag_Type()
}

type CustomTag_Literal_ struct {
	// A literal custom tag.
	Literal *CustomTag_Literal `protobuf:"bytes,2,opt,name=literal,proto3,oneof"`
}

type CustomTag_Environment_ struct {
	// An environment custom tag.
	Environment *CustomTag_Environment `protobuf:"bytes,3,opt,name=environment,proto3,oneof"`
}

type CustomTag_RequestHeader struct {
	// A request header custom tag.
	RequestHeader *CustomTag_Header `protobuf:"bytes,4,opt,name=request_header,json=requestHeader,proto3,oneof"`
}

type CustomTag_Metadata_ struct {
	// A custom tag to obtain tag value from the metadata.
	Metadata *CustomTag_Metadata `protobuf:"bytes,5,opt,name=metadata,proto3,oneof"`
}

func (*CustomTag_Literal_) isCustomTag_Type() {}

func (*CustomTag_Environment_) isCustomTag_Type() {}

func (*CustomTag_RequestHeader) isCustomTag_Type() {}

func (*CustomTag_Metadata_) isCustomTag_Type() {}

// Literal type custom tag with static value for the tag value.
type CustomTag_Literal struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Static literal value to populate the tag value.
	Value         string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*CustomTag_Literal) ProtoMessage() {}

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

func (x *CustomTag_Literal) GetValue() string {
	if x != nil {
		return x.Value
	}
	return ""
}

// Environment type custom tag with environment name and default value.
type CustomTag_Environment struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Environment variable name to obtain the value to populate the tag value.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// When the environment variable is not found,
	// the tag value will be populated with this default value if specified,
	// otherwise no tag will be populated.
	DefaultValue  string `protobuf:"bytes,2,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*CustomTag_Environment) ProtoMessage() {}

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

func (x *CustomTag_Environment) GetName() string {
	if x != nil {
		return x.Name
	}
	return ""
}

func (x *CustomTag_Environment) GetDefaultValue() string {
	if x != nil {
		return x.DefaultValue
	}
	return ""
}

// Header type custom tag with header name and default value.
type CustomTag_Header struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Header name to obtain the value to populate the tag value.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// When the header does not exist,
	// the tag value will be populated with this default value if specified,
	// otherwise no tag will be populated.
	DefaultValue  string `protobuf:"bytes,2,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*CustomTag_Header) ProtoMessage() {}

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

func (x *CustomTag_Header) GetName() string {
	if x != nil {
		return x.Name
	}
	return ""
}

func (x *CustomTag_Header) GetDefaultValue() string {
	if x != nil {
		return x.DefaultValue
	}
	return ""
}

// Metadata type custom tag using
// :ref:`MetadataKey <envoy_api_msg_type.metadata.v2.MetadataKey>` to retrieve the protobuf value
// from :ref:`Metadata <envoy_api_msg_core.Metadata>`, and populate the tag value with
// `the canonical JSON <https://developers.google.com/protocol-buffers/docs/proto3#json>`_
// representation of it.
type CustomTag_Metadata struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Specify what kind of metadata to obtain tag value from.
	Kind *v2.MetadataKind `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"`
	// Metadata key to define the path to retrieve the tag value.
	MetadataKey *v2.MetadataKey `protobuf:"bytes,2,opt,name=metadata_key,json=metadataKey,proto3" json:"metadata_key,omitempty"`
	// When no valid metadata is found,
	// the tag value would be populated with this default value if specified,
	// otherwise no tag would be populated.
	DefaultValue  string `protobuf:"bytes,3,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*CustomTag_Metadata) ProtoMessage() {}

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

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

func (x *CustomTag_Metadata) GetMetadataKey() *v2.MetadataKey {
	if x != nil {
		return x.MetadataKey
	}
	return nil
}

func (x *CustomTag_Metadata) GetDefaultValue() string {
	if x != nil {
		return x.DefaultValue
	}
	return ""
}

var File_envoy_type_tracing_v2_custom_tag_proto protoreflect.FileDescriptor

const file_envoy_type_tracing_v2_custom_tag_proto_rawDesc = "" +
	"\n" +
	"&envoy/type/tracing/v2/custom_tag.proto\x12\x15envoy.type.tracing.v2\x1a%envoy/type/metadata/v2/metadata.proto\x1a\x1dudpa/annotations/status.proto\x1a\x17validate/validate.proto\"\xe7\x05\n" +
	"\tCustomTag\x12\x19\n" +
	"\x03tag\x18\x01 \x01(\tB\a\xfaB\x04r\x02 \x01R\x03tag\x12D\n" +
	"\aliteral\x18\x02 \x01(\v2(.envoy.type.tracing.v2.CustomTag.LiteralH\x00R\aliteral\x12P\n" +
	"\venvironment\x18\x03 \x01(\v2,.envoy.type.tracing.v2.CustomTag.EnvironmentH\x00R\venvironment\x12P\n" +
	"\x0erequest_header\x18\x04 \x01(\v2'.envoy.type.tracing.v2.CustomTag.HeaderH\x00R\rrequestHeader\x12G\n" +
	"\bmetadata\x18\x05 \x01(\v2).envoy.type.tracing.v2.CustomTag.MetadataH\x00R\bmetadata\x1a(\n" +
	"\aLiteral\x12\x1d\n" +
	"\x05value\x18\x01 \x01(\tB\a\xfaB\x04r\x02 \x01R\x05value\x1aO\n" +
	"\vEnvironment\x12\x1b\n" +
	"\x04name\x18\x01 \x01(\tB\a\xfaB\x04r\x02 \x01R\x04name\x12#\n" +
	"\rdefault_value\x18\x02 \x01(\tR\fdefaultValue\x1aP\n" +
	"\x06Header\x12!\n" +
	"\x04name\x18\x01 \x01(\tB\r\xfaB\n" +
	"r\b \x01\xc8\x01\x00\xc0\x01\x01R\x04name\x12#\n" +
	"\rdefault_value\x18\x02 \x01(\tR\fdefaultValue\x1a\xb1\x01\n" +
	"\bMetadata\x128\n" +
	"\x04kind\x18\x01 \x01(\v2$.envoy.type.metadata.v2.MetadataKindR\x04kind\x12F\n" +
	"\fmetadata_key\x18\x02 \x01(\v2#.envoy.type.metadata.v2.MetadataKeyR\vmetadataKey\x12#\n" +
	"\rdefault_value\x18\x03 \x01(\tR\fdefaultValueB\v\n" +
	"\x04type\x12\x03\xf8B\x01B\x87\x01\xba\x80\xc8\xd1\x06\x02\x10\x01\n" +
	"#io.envoyproxy.envoy.type.tracing.v2B\x0eCustomTagProtoP\x01ZFgithub.com/envoyproxy/go-control-plane/envoy/type/tracing/v2;tracingv2b\x06proto3"

var (
	file_envoy_type_tracing_v2_custom_tag_proto_rawDescOnce sync.Once
	file_envoy_type_tracing_v2_custom_tag_proto_rawDescData []byte
)

func file_envoy_type_tracing_v2_custom_tag_proto_rawDescGZIP() []byte {
	file_envoy_type_tracing_v2_custom_tag_proto_rawDescOnce.Do(func() {
		file_envoy_type_tracing_v2_custom_tag_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_envoy_type_tracing_v2_custom_tag_proto_rawDesc), len(file_envoy_type_tracing_v2_custom_tag_proto_rawDesc)))
	})
	return file_envoy_type_tracing_v2_custom_tag_proto_rawDescData
}

var file_envoy_type_tracing_v2_custom_tag_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_envoy_type_tracing_v2_custom_tag_proto_goTypes = []any{
	(*CustomTag)(nil),             // 0: envoy.type.tracing.v2.CustomTag
	(*CustomTag_Literal)(nil),     // 1: envoy.type.tracing.v2.CustomTag.Literal
	(*CustomTag_Environment)(nil), // 2: envoy.type.tracing.v2.CustomTag.Environment
	(*CustomTag_Header)(nil),      // 3: envoy.type.tracing.v2.CustomTag.Header
	(*CustomTag_Metadata)(nil),    // 4: envoy.type.tracing.v2.CustomTag.Metadata
	(*v2.MetadataKind)(nil),       // 5: envoy.type.metadata.v2.MetadataKind
	(*v2.MetadataKey)(nil),        // 6: envoy.type.metadata.v2.MetadataKey
}
var file_envoy_type_tracing_v2_custom_tag_proto_depIdxs = []int32{
	1, // 0: envoy.type.tracing.v2.CustomTag.literal:type_name -> envoy.type.tracing.v2.CustomTag.Literal
	2, // 1: envoy.type.tracing.v2.CustomTag.environment:type_name -> envoy.type.tracing.v2.CustomTag.Environment
	3, // 2: envoy.type.tracing.v2.CustomTag.request_header:type_name -> envoy.type.tracing.v2.CustomTag.Header
	4, // 3: envoy.type.tracing.v2.CustomTag.metadata:type_name -> envoy.type.tracing.v2.CustomTag.Metadata
	5, // 4: envoy.type.tracing.v2.CustomTag.Metadata.kind:type_name -> envoy.type.metadata.v2.MetadataKind
	6, // 5: envoy.type.tracing.v2.CustomTag.Metadata.metadata_key:type_name -> envoy.type.metadata.v2.MetadataKey
	6, // [6:6] is the sub-list for method output_type
	6, // [6:6] is the sub-list for method input_type
	6, // [6:6] is the sub-list for extension type_name
	6, // [6:6] is the sub-list for extension extendee
	0, // [0:6] is the sub-list for field type_name
}

func init() { file_envoy_type_tracing_v2_custom_tag_proto_init() }
func file_envoy_type_tracing_v2_custom_tag_proto_init() {
	if File_envoy_type_tracing_v2_custom_tag_proto != nil {
		return
	}
	file_envoy_type_tracing_v2_custom_tag_proto_msgTypes[0].OneofWrappers = []any{
		(*CustomTag_Literal_)(nil),
		(*CustomTag_Environment_)(nil),
		(*CustomTag_RequestHeader)(nil),
		(*CustomTag_Metadata_)(nil),
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_envoy_type_tracing_v2_custom_tag_proto_rawDesc), len(file_envoy_type_tracing_v2_custom_tag_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   5,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_envoy_type_tracing_v2_custom_tag_proto_goTypes,
		DependencyIndexes: file_envoy_type_tracing_v2_custom_tag_proto_depIdxs,
		MessageInfos:      file_envoy_type_tracing_v2_custom_tag_proto_msgTypes,
	}.Build()
	File_envoy_type_tracing_v2_custom_tag_proto = out.File
	file_envoy_type_tracing_v2_custom_tag_proto_goTypes = nil
	file_envoy_type_tracing_v2_custom_tag_proto_depIdxs = nil
}
