// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.10
// 	protoc        v5.29.3
// source: xds/core/v3/resource_locator.proto

package v3

import (
	_ "github.com/cncf/xds/go/xds/annotations/v3"
	_ "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)
)

type ResourceLocator_Scheme int32

const (
	ResourceLocator_XDSTP ResourceLocator_Scheme = 0
	ResourceLocator_HTTP  ResourceLocator_Scheme = 1
	ResourceLocator_FILE  ResourceLocator_Scheme = 2
)

// Enum value maps for ResourceLocator_Scheme.
var (
	ResourceLocator_Scheme_name = map[int32]string{
		0: "XDSTP",
		1: "HTTP",
		2: "FILE",
	}
	ResourceLocator_Scheme_value = map[string]int32{
		"XDSTP": 0,
		"HTTP":  1,
		"FILE":  2,
	}
)

func (x ResourceLocator_Scheme) Enum() *ResourceLocator_Scheme {
	p := new(ResourceLocator_Scheme)
	*p = x
	return p
}

func (x ResourceLocator_Scheme) String() string {
	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}

func (ResourceLocator_Scheme) Descriptor() protoreflect.EnumDescriptor {
	return file_xds_core_v3_resource_locator_proto_enumTypes[0].Descriptor()
}

func (ResourceLocator_Scheme) Type() protoreflect.EnumType {
	return &file_xds_core_v3_resource_locator_proto_enumTypes[0]
}

func (x ResourceLocator_Scheme) Number() protoreflect.EnumNumber {
	return protoreflect.EnumNumber(x)
}

// Deprecated: Use ResourceLocator_Scheme.Descriptor instead.
func (ResourceLocator_Scheme) EnumDescriptor() ([]byte, []int) {
	return file_xds_core_v3_resource_locator_proto_rawDescGZIP(), []int{0, 0}
}

type ResourceLocator struct {
	state        protoimpl.MessageState `protogen:"open.v1"`
	Scheme       ResourceLocator_Scheme `protobuf:"varint,1,opt,name=scheme,proto3,enum=xds.core.v3.ResourceLocator_Scheme" json:"scheme,omitempty"`
	Id           string                 `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	Authority    string                 `protobuf:"bytes,3,opt,name=authority,proto3" json:"authority,omitempty"`
	ResourceType string                 `protobuf:"bytes,4,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"`
	// Types that are valid to be assigned to ContextParamSpecifier:
	//
	//	*ResourceLocator_ExactContext
	ContextParamSpecifier isResourceLocator_ContextParamSpecifier `protobuf_oneof:"context_param_specifier"`
	Directives            []*ResourceLocator_Directive            `protobuf:"bytes,6,rep,name=directives,proto3" json:"directives,omitempty"`
	unknownFields         protoimpl.UnknownFields
	sizeCache             protoimpl.SizeCache
}

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

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

func (*ResourceLocator) ProtoMessage() {}

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

func (x *ResourceLocator) GetScheme() ResourceLocator_Scheme {
	if x != nil {
		return x.Scheme
	}
	return ResourceLocator_XDSTP
}

func (x *ResourceLocator) GetId() string {
	if x != nil {
		return x.Id
	}
	return ""
}

func (x *ResourceLocator) GetAuthority() string {
	if x != nil {
		return x.Authority
	}
	return ""
}

func (x *ResourceLocator) GetResourceType() string {
	if x != nil {
		return x.ResourceType
	}
	return ""
}

func (x *ResourceLocator) GetContextParamSpecifier() isResourceLocator_ContextParamSpecifier {
	if x != nil {
		return x.ContextParamSpecifier
	}
	return nil
}

func (x *ResourceLocator) GetExactContext() *ContextParams {
	if x != nil {
		if x, ok := x.ContextParamSpecifier.(*ResourceLocator_ExactContext); ok {
			return x.ExactContext
		}
	}
	return nil
}

func (x *ResourceLocator) GetDirectives() []*ResourceLocator_Directive {
	if x != nil {
		return x.Directives
	}
	return nil
}

type isResourceLocator_ContextParamSpecifier interface {
	isResourceLocator_ContextParamSpecifier()
}

type ResourceLocator_ExactContext struct {
	ExactContext *ContextParams `protobuf:"bytes,5,opt,name=exact_context,json=exactContext,proto3,oneof"`
}

func (*ResourceLocator_ExactContext) isResourceLocator_ContextParamSpecifier() {}

type ResourceLocator_Directive struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Types that are valid to be assigned to Directive:
	//
	//	*ResourceLocator_Directive_Alt
	//	*ResourceLocator_Directive_Entry
	Directive     isResourceLocator_Directive_Directive `protobuf_oneof:"directive"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*ResourceLocator_Directive) ProtoMessage() {}

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

func (x *ResourceLocator_Directive) GetDirective() isResourceLocator_Directive_Directive {
	if x != nil {
		return x.Directive
	}
	return nil
}

func (x *ResourceLocator_Directive) GetAlt() *ResourceLocator {
	if x != nil {
		if x, ok := x.Directive.(*ResourceLocator_Directive_Alt); ok {
			return x.Alt
		}
	}
	return nil
}

func (x *ResourceLocator_Directive) GetEntry() string {
	if x != nil {
		if x, ok := x.Directive.(*ResourceLocator_Directive_Entry); ok {
			return x.Entry
		}
	}
	return ""
}

type isResourceLocator_Directive_Directive interface {
	isResourceLocator_Directive_Directive()
}

type ResourceLocator_Directive_Alt struct {
	Alt *ResourceLocator `protobuf:"bytes,1,opt,name=alt,proto3,oneof"`
}

type ResourceLocator_Directive_Entry struct {
	Entry string `protobuf:"bytes,2,opt,name=entry,proto3,oneof"`
}

func (*ResourceLocator_Directive_Alt) isResourceLocator_Directive_Directive() {}

func (*ResourceLocator_Directive_Entry) isResourceLocator_Directive_Directive() {}

var File_xds_core_v3_resource_locator_proto protoreflect.FileDescriptor

const file_xds_core_v3_resource_locator_proto_rawDesc = "" +
	"\n" +
	"\"xds/core/v3/resource_locator.proto\x12\vxds.core.v3\x1a\x1fxds/annotations/v3/status.proto\x1a xds/core/v3/context_params.proto\x1a\x17validate/validate.proto\"\x8e\x04\n" +
	"\x0fResourceLocator\x12E\n" +
	"\x06scheme\x18\x01 \x01(\x0e2#.xds.core.v3.ResourceLocator.SchemeB\b\xfaB\x05\x82\x01\x02\x10\x01R\x06scheme\x12\x0e\n" +
	"\x02id\x18\x02 \x01(\tR\x02id\x12\x1c\n" +
	"\tauthority\x18\x03 \x01(\tR\tauthority\x12,\n" +
	"\rresource_type\x18\x04 \x01(\tB\a\xfaB\x04r\x02\x10\x01R\fresourceType\x12A\n" +
	"\rexact_context\x18\x05 \x01(\v2\x1a.xds.core.v3.ContextParamsH\x00R\fexactContext\x12F\n" +
	"\n" +
	"directives\x18\x06 \x03(\v2&.xds.core.v3.ResourceLocator.DirectiveR\n" +
	"directives\x1a\x88\x01\n" +
	"\tDirective\x120\n" +
	"\x03alt\x18\x01 \x01(\v2\x1c.xds.core.v3.ResourceLocatorH\x00R\x03alt\x127\n" +
	"\x05entry\x18\x02 \x01(\tB\x1f\xfaB\x1cr\x1a\x10\x012\x16^[0-9a-zA-Z_\\-\\./~:]+$H\x00R\x05entryB\x10\n" +
	"\tdirective\x12\x03\xf8B\x01\"'\n" +
	"\x06Scheme\x12\t\n" +
	"\x05XDSTP\x10\x00\x12\b\n" +
	"\x04HTTP\x10\x01\x12\b\n" +
	"\x04FILE\x10\x02B\x19\n" +
	"\x17context_param_specifierB\\\xd2Ƥ\xe1\x06\x02\b\x01\n" +
	"\x16com.github.xds.core.v3B\x14ResourceLocatorProtoP\x01Z\"github.com/cncf/xds/go/xds/core/v3b\x06proto3"

var (
	file_xds_core_v3_resource_locator_proto_rawDescOnce sync.Once
	file_xds_core_v3_resource_locator_proto_rawDescData []byte
)

func file_xds_core_v3_resource_locator_proto_rawDescGZIP() []byte {
	file_xds_core_v3_resource_locator_proto_rawDescOnce.Do(func() {
		file_xds_core_v3_resource_locator_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_xds_core_v3_resource_locator_proto_rawDesc), len(file_xds_core_v3_resource_locator_proto_rawDesc)))
	})
	return file_xds_core_v3_resource_locator_proto_rawDescData
}

var file_xds_core_v3_resource_locator_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_xds_core_v3_resource_locator_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_xds_core_v3_resource_locator_proto_goTypes = []any{
	(ResourceLocator_Scheme)(0),       // 0: xds.core.v3.ResourceLocator.Scheme
	(*ResourceLocator)(nil),           // 1: xds.core.v3.ResourceLocator
	(*ResourceLocator_Directive)(nil), // 2: xds.core.v3.ResourceLocator.Directive
	(*ContextParams)(nil),             // 3: xds.core.v3.ContextParams
}
var file_xds_core_v3_resource_locator_proto_depIdxs = []int32{
	0, // 0: xds.core.v3.ResourceLocator.scheme:type_name -> xds.core.v3.ResourceLocator.Scheme
	3, // 1: xds.core.v3.ResourceLocator.exact_context:type_name -> xds.core.v3.ContextParams
	2, // 2: xds.core.v3.ResourceLocator.directives:type_name -> xds.core.v3.ResourceLocator.Directive
	1, // 3: xds.core.v3.ResourceLocator.Directive.alt:type_name -> xds.core.v3.ResourceLocator
	4, // [4:4] is the sub-list for method output_type
	4, // [4:4] is the sub-list for method input_type
	4, // [4:4] is the sub-list for extension type_name
	4, // [4:4] is the sub-list for extension extendee
	0, // [0:4] is the sub-list for field type_name
}

func init() { file_xds_core_v3_resource_locator_proto_init() }
func file_xds_core_v3_resource_locator_proto_init() {
	if File_xds_core_v3_resource_locator_proto != nil {
		return
	}
	file_xds_core_v3_context_params_proto_init()
	file_xds_core_v3_resource_locator_proto_msgTypes[0].OneofWrappers = []any{
		(*ResourceLocator_ExactContext)(nil),
	}
	file_xds_core_v3_resource_locator_proto_msgTypes[1].OneofWrappers = []any{
		(*ResourceLocator_Directive_Alt)(nil),
		(*ResourceLocator_Directive_Entry)(nil),
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_xds_core_v3_resource_locator_proto_rawDesc), len(file_xds_core_v3_resource_locator_proto_rawDesc)),
			NumEnums:      1,
			NumMessages:   2,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_xds_core_v3_resource_locator_proto_goTypes,
		DependencyIndexes: file_xds_core_v3_resource_locator_proto_depIdxs,
		EnumInfos:         file_xds_core_v3_resource_locator_proto_enumTypes,
		MessageInfos:      file_xds_core_v3_resource_locator_proto_msgTypes,
	}.Build()
	File_xds_core_v3_resource_locator_proto = out.File
	file_xds_core_v3_resource_locator_proto_goTypes = nil
	file_xds_core_v3_resource_locator_proto_depIdxs = nil
}
