// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.10
// 	protoc        v6.33.2
// source: envoy/api/v2/scoped_route.proto

package apiv2

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

// Specifies a routing scope, which associates a
// :ref:`Key<envoy_api_msg_ScopedRouteConfiguration.Key>` to a
// :ref:`envoy_api_msg_RouteConfiguration` (identified by its resource name).
//
// The HTTP connection manager builds up a table consisting of these Key to
// RouteConfiguration mappings, and looks up the RouteConfiguration to use per
// request according to the algorithm specified in the
// :ref:`scope_key_builder<envoy_api_field_config.filter.network.http_connection_manager.v2.ScopedRoutes.scope_key_builder>`
// assigned to the HttpConnectionManager.
//
// For example, with the following configurations (in YAML):
//
// HttpConnectionManager config:
//
// .. code::
//
//	...
//	scoped_routes:
//	  name: foo-scoped-routes
//	  scope_key_builder:
//	    fragments:
//	      - header_value_extractor:
//	          name: X-Route-Selector
//	          element_separator: ","
//	          element:
//	            separator: =
//	            key: vip
//
// ScopedRouteConfiguration resources (specified statically via
// :ref:`scoped_route_configurations_list<envoy_api_field_config.filter.network.http_connection_manager.v2.ScopedRoutes.scoped_route_configurations_list>`
// or obtained dynamically via SRDS):
//
// .. code::
//
//	(1)
//	 name: route-scope1
//	 route_configuration_name: route-config1
//	 key:
//	    fragments:
//	      - string_key: 172.10.10.20
//
//	(2)
//	 name: route-scope2
//	 route_configuration_name: route-config2
//	 key:
//	   fragments:
//	     - string_key: 172.20.20.30
//
// A request from a client such as:
//
// .. code::
//
//	GET / HTTP/1.1
//	Host: foo.com
//	X-Route-Selector: vip=172.10.10.20
//
// would result in the routing table defined by the `route-config1`
// RouteConfiguration being assigned to the HTTP request/stream.
type ScopedRouteConfiguration struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The name assigned to the routing scope.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The resource name to use for a :ref:`envoy_api_msg_DiscoveryRequest` to an
	// RDS server to fetch the :ref:`envoy_api_msg_RouteConfiguration` associated
	// with this scope.
	RouteConfigurationName string `protobuf:"bytes,2,opt,name=route_configuration_name,json=routeConfigurationName,proto3" json:"route_configuration_name,omitempty"`
	// The key to match against.
	Key           *ScopedRouteConfiguration_Key `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*ScopedRouteConfiguration) ProtoMessage() {}

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

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

func (x *ScopedRouteConfiguration) GetRouteConfigurationName() string {
	if x != nil {
		return x.RouteConfigurationName
	}
	return ""
}

func (x *ScopedRouteConfiguration) GetKey() *ScopedRouteConfiguration_Key {
	if x != nil {
		return x.Key
	}
	return nil
}

// Specifies a key which is matched against the output of the
// :ref:`scope_key_builder<envoy_api_field_config.filter.network.http_connection_manager.v2.ScopedRoutes.scope_key_builder>`
// specified in the HttpConnectionManager. The matching is done per HTTP
// request and is dependent on the order of the fragments contained in the
// Key.
type ScopedRouteConfiguration_Key struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The ordered set of fragments to match against. The order must match the
	// fragments in the corresponding
	// :ref:`scope_key_builder<envoy_api_field_config.filter.network.http_connection_manager.v2.ScopedRoutes.scope_key_builder>`.
	Fragments     []*ScopedRouteConfiguration_Key_Fragment `protobuf:"bytes,1,rep,name=fragments,proto3" json:"fragments,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*ScopedRouteConfiguration_Key) ProtoMessage() {}

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

func (x *ScopedRouteConfiguration_Key) GetFragments() []*ScopedRouteConfiguration_Key_Fragment {
	if x != nil {
		return x.Fragments
	}
	return nil
}

type ScopedRouteConfiguration_Key_Fragment struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Types that are valid to be assigned to Type:
	//
	//	*ScopedRouteConfiguration_Key_Fragment_StringKey
	Type          isScopedRouteConfiguration_Key_Fragment_Type `protobuf_oneof:"type"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*ScopedRouteConfiguration_Key_Fragment) ProtoMessage() {}

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

func (x *ScopedRouteConfiguration_Key_Fragment) GetType() isScopedRouteConfiguration_Key_Fragment_Type {
	if x != nil {
		return x.Type
	}
	return nil
}

func (x *ScopedRouteConfiguration_Key_Fragment) GetStringKey() string {
	if x != nil {
		if x, ok := x.Type.(*ScopedRouteConfiguration_Key_Fragment_StringKey); ok {
			return x.StringKey
		}
	}
	return ""
}

type isScopedRouteConfiguration_Key_Fragment_Type interface {
	isScopedRouteConfiguration_Key_Fragment_Type()
}

type ScopedRouteConfiguration_Key_Fragment_StringKey struct {
	// A string to match against.
	StringKey string `protobuf:"bytes,1,opt,name=string_key,json=stringKey,proto3,oneof"`
}

func (*ScopedRouteConfiguration_Key_Fragment_StringKey) isScopedRouteConfiguration_Key_Fragment_Type() {
}

var File_envoy_api_v2_scoped_route_proto protoreflect.FileDescriptor

const file_envoy_api_v2_scoped_route_proto_rawDesc = "" +
	"\n" +
	"\x1fenvoy/api/v2/scoped_route.proto\x12\fenvoy.api.v2\x1a\x1eudpa/annotations/migrate.proto\x1a\x1dudpa/annotations/status.proto\x1a\x17validate/validate.proto\"\xe1\x02\n" +
	"\x18ScopedRouteConfiguration\x12\x1b\n" +
	"\x04name\x18\x01 \x01(\tB\a\xfaB\x04r\x02 \x01R\x04name\x12A\n" +
	"\x18route_configuration_name\x18\x02 \x01(\tB\a\xfaB\x04r\x02 \x01R\x16routeConfigurationName\x12F\n" +
	"\x03key\x18\x03 \x01(\v2*.envoy.api.v2.ScopedRouteConfiguration.KeyB\b\xfaB\x05\x8a\x01\x02\x10\x01R\x03key\x1a\x9c\x01\n" +
	"\x03Key\x12[\n" +
	"\tfragments\x18\x01 \x03(\v23.envoy.api.v2.ScopedRouteConfiguration.Key.FragmentB\b\xfaB\x05\x92\x01\x02\b\x01R\tfragments\x1a8\n" +
	"\bFragment\x12\x1f\n" +
	"\n" +
	"string_key\x18\x01 \x01(\tH\x00R\tstringKeyB\v\n" +
	"\x04type\x12\x03\xf8B\x01B\x90\x01\xf2\x98\xfe\x8f\x05\x17\x12\x15envoy.config.route.v3\xba\x80\xc8\xd1\x06\x02\x10\x01\n" +
	"\x1aio.envoyproxy.envoy.api.v2B\x10ScopedRouteProtoP\x01Z9github.com/envoyproxy/go-control-plane/envoy/api/v2;apiv2b\x06proto3"

var (
	file_envoy_api_v2_scoped_route_proto_rawDescOnce sync.Once
	file_envoy_api_v2_scoped_route_proto_rawDescData []byte
)

func file_envoy_api_v2_scoped_route_proto_rawDescGZIP() []byte {
	file_envoy_api_v2_scoped_route_proto_rawDescOnce.Do(func() {
		file_envoy_api_v2_scoped_route_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_envoy_api_v2_scoped_route_proto_rawDesc), len(file_envoy_api_v2_scoped_route_proto_rawDesc)))
	})
	return file_envoy_api_v2_scoped_route_proto_rawDescData
}

var file_envoy_api_v2_scoped_route_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_envoy_api_v2_scoped_route_proto_goTypes = []any{
	(*ScopedRouteConfiguration)(nil),              // 0: envoy.api.v2.ScopedRouteConfiguration
	(*ScopedRouteConfiguration_Key)(nil),          // 1: envoy.api.v2.ScopedRouteConfiguration.Key
	(*ScopedRouteConfiguration_Key_Fragment)(nil), // 2: envoy.api.v2.ScopedRouteConfiguration.Key.Fragment
}
var file_envoy_api_v2_scoped_route_proto_depIdxs = []int32{
	1, // 0: envoy.api.v2.ScopedRouteConfiguration.key:type_name -> envoy.api.v2.ScopedRouteConfiguration.Key
	2, // 1: envoy.api.v2.ScopedRouteConfiguration.Key.fragments:type_name -> envoy.api.v2.ScopedRouteConfiguration.Key.Fragment
	2, // [2:2] is the sub-list for method output_type
	2, // [2:2] is the sub-list for method input_type
	2, // [2:2] is the sub-list for extension type_name
	2, // [2:2] is the sub-list for extension extendee
	0, // [0:2] is the sub-list for field type_name
}

func init() { file_envoy_api_v2_scoped_route_proto_init() }
func file_envoy_api_v2_scoped_route_proto_init() {
	if File_envoy_api_v2_scoped_route_proto != nil {
		return
	}
	file_envoy_api_v2_scoped_route_proto_msgTypes[2].OneofWrappers = []any{
		(*ScopedRouteConfiguration_Key_Fragment_StringKey)(nil),
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_envoy_api_v2_scoped_route_proto_rawDesc), len(file_envoy_api_v2_scoped_route_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   3,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_envoy_api_v2_scoped_route_proto_goTypes,
		DependencyIndexes: file_envoy_api_v2_scoped_route_proto_depIdxs,
		MessageInfos:      file_envoy_api_v2_scoped_route_proto_msgTypes,
	}.Build()
	File_envoy_api_v2_scoped_route_proto = out.File
	file_envoy_api_v2_scoped_route_proto_goTypes = nil
	file_envoy_api_v2_scoped_route_proto_depIdxs = nil
}
