// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.10
// 	protoc        v6.33.2
// source: envoy/extensions/filters/http/file_server/v3/file_server.proto

package file_serverv3

import (
	_ "github.com/cncf/xds/go/udpa/annotations"
	_ "github.com/cncf/xds/go/xds/annotations/v3"
	v3 "github.com/envoyproxy/go-control-plane/envoy/extensions/common/async_files/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)
)

// A :ref:`file server <config_http_filters_file_server>` filter configuration.
// [#next-free-field: 6]
type FileServerConfig struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// A configuration for the AsyncFileManager to be used to read from the filesystem.
	ManagerConfig *v3.AsyncFileManagerConfig `protobuf:"bytes,1,opt,name=manager_config,json=managerConfig,proto3" json:"manager_config,omitempty"`
	// The longest matching path_mapping takes precedence.
	PathMappings []*FileServerConfig_PathMapping `protobuf:"bytes,2,rep,name=path_mappings,json=pathMappings,proto3" json:"path_mappings,omitempty"`
	// A map from filename suffix (in lowercase) to content type header.
	// e.g. “{"txt": "text/plain"}“
	//
	// File suffixes may not contain “.“ as the filename suffix after
	// the last “.“ is used to perform an O(1) lookup against the keys.
	//
	// An empty string suffix will only match files ending with a “.“.
	//
	// Files with no suffix (e.g. “README“) can be matched as the full string
	// in lowercase. e.g. “{"readme": "text/plain"}“
	ContentTypes map[string]string `protobuf:"bytes,3,rep,name=content_types,json=contentTypes,proto3" json:"content_types,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
	// If “content_types“ does not contain a match for a file suffix,
	// “default_content_type“ is used.
	//
	// If there is no match and “default_content_type“ is empty, the
	// “content-type“ header will be omitted from the response.
	DefaultContentType string `protobuf:"bytes,4,opt,name=default_content_type,json=defaultContentType,proto3" json:"default_content_type,omitempty"`
	// If the requested path refers to a directory, the given behaviors are
	// tried in order until one succeeds. If the end of the list is reached
	// with no success, the result is a 403 Forbidden.
	DirectoryBehaviors []*FileServerConfig_DirectoryBehavior `protobuf:"bytes,5,rep,name=directory_behaviors,json=directoryBehaviors,proto3" json:"directory_behaviors,omitempty"`
	unknownFields      protoimpl.UnknownFields
	sizeCache          protoimpl.SizeCache
}

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

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

func (*FileServerConfig) ProtoMessage() {}

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

func (x *FileServerConfig) GetManagerConfig() *v3.AsyncFileManagerConfig {
	if x != nil {
		return x.ManagerConfig
	}
	return nil
}

func (x *FileServerConfig) GetPathMappings() []*FileServerConfig_PathMapping {
	if x != nil {
		return x.PathMappings
	}
	return nil
}

func (x *FileServerConfig) GetContentTypes() map[string]string {
	if x != nil {
		return x.ContentTypes
	}
	return nil
}

func (x *FileServerConfig) GetDefaultContentType() string {
	if x != nil {
		return x.DefaultContentType
	}
	return ""
}

func (x *FileServerConfig) GetDirectoryBehaviors() []*FileServerConfig_DirectoryBehavior {
	if x != nil {
		return x.DirectoryBehaviors
	}
	return nil
}

type FileServerConfig_PathMapping struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// If no “request_path_prefix“ is matched, the filter does not intercept a request.
	//
	// If a “request_path_prefix“ is matched, that prefix is removed from the request
	// and replaced with “file_path_prefix“ to form a filesystem path for
	// the request.
	//
	// Prefix “/“ will match all GET requests.
	RequestPathPrefix string `protobuf:"bytes,1,opt,name=request_path_prefix,json=requestPathPrefix,proto3" json:"request_path_prefix,omitempty"`
	// Replaces a matched “request_path_prefix“ to form a filesystem path for a
	// request. May be relative to the working directory of the envoy execution,
	// or an absolute path.
	FilePathPrefix string `protobuf:"bytes,2,opt,name=file_path_prefix,json=filePathPrefix,proto3" json:"file_path_prefix,omitempty"`
	unknownFields  protoimpl.UnknownFields
	sizeCache      protoimpl.SizeCache
}

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

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

func (*FileServerConfig_PathMapping) ProtoMessage() {}

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

func (x *FileServerConfig_PathMapping) GetRequestPathPrefix() string {
	if x != nil {
		return x.RequestPathPrefix
	}
	return ""
}

func (x *FileServerConfig_PathMapping) GetFilePathPrefix() string {
	if x != nil {
		return x.FilePathPrefix
	}
	return ""
}

type FileServerConfig_DirectoryBehavior struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Attempts to serve the given file within the directory, e.g. “index.html“.
	// Precisely one of “default_file“ and “list“ must be set per “DirectoryBehavior“.
	DefaultFile string `protobuf:"bytes,1,opt,name=default_file,json=defaultFile,proto3" json:"default_file,omitempty"`
	// Responds with an html formatted list of the files and subdirectories in the directory.
	// Precisely one of “default_file“ and “list“ must be set per “DirectoryBehavior“.
	// [#not-implemented-hide:] Directory operations currently have no async implementation.
	List          *FileServerConfig_DirectoryBehavior_List `protobuf:"bytes,2,opt,name=list,proto3" json:"list,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*FileServerConfig_DirectoryBehavior) ProtoMessage() {}

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

func (x *FileServerConfig_DirectoryBehavior) GetDefaultFile() string {
	if x != nil {
		return x.DefaultFile
	}
	return ""
}

func (x *FileServerConfig_DirectoryBehavior) GetList() *FileServerConfig_DirectoryBehavior_List {
	if x != nil {
		return x.List
	}
	return nil
}

// [#not-implemented-hide:] Directory operations currently have no async implementation.
type FileServerConfig_DirectoryBehavior_List struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*FileServerConfig_DirectoryBehavior_List) ProtoMessage() {}

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

var File_envoy_extensions_filters_http_file_server_v3_file_server_proto protoreflect.FileDescriptor

const file_envoy_extensions_filters_http_file_server_v3_file_server_proto_rawDesc = "" +
	"\n" +
	">envoy/extensions/filters/http/file_server/v3/file_server.proto\x12,envoy.extensions.filters.http.file_server.v3\x1a?envoy/extensions/common/async_files/v3/async_file_manager.proto\x1a\x1fxds/annotations/v3/status.proto\x1a\x1dudpa/annotations/status.proto\x1a\x17validate/validate.proto\"\xb6\a\n" +
	"\x10FileServerConfig\x12o\n" +
	"\x0emanager_config\x18\x01 \x01(\v2>.envoy.extensions.common.async_files.v3.AsyncFileManagerConfigB\b\xfaB\x05\x8a\x01\x02\x10\x01R\rmanagerConfig\x12o\n" +
	"\rpath_mappings\x18\x02 \x03(\v2J.envoy.extensions.filters.http.file_server.v3.FileServerConfig.PathMappingR\fpathMappings\x12\x91\x01\n" +
	"\rcontent_types\x18\x03 \x03(\v2P.envoy.extensions.filters.http.file_server.v3.FileServerConfig.ContentTypesEntryB\x1a\xfaB\x17\x9a\x01\x14\"\x12r\x102\x0e^[a-z0-9_\\-]*$R\fcontentTypes\x120\n" +
	"\x14default_content_type\x18\x04 \x01(\tR\x12defaultContentType\x12\x81\x01\n" +
	"\x13directory_behaviors\x18\x05 \x03(\v2P.envoy.extensions.filters.http.file_server.v3.FileServerConfig.DirectoryBehaviorR\x12directoryBehaviors\x1ay\n" +
	"\vPathMapping\x127\n" +
	"\x13request_path_prefix\x18\x01 \x01(\tB\a\xfaB\x04r\x02\x10\x01R\x11requestPathPrefix\x121\n" +
	"\x10file_path_prefix\x18\x02 \x01(\tB\a\xfaB\x04r\x02\x10\x01R\x0efilePathPrefix\x1a\xb9\x01\n" +
	"\x11DirectoryBehavior\x121\n" +
	"\fdefault_file\x18\x01 \x01(\tB\x0e\xfaB\vr\t2\a^[^/]*$R\vdefaultFile\x12i\n" +
	"\x04list\x18\x02 \x01(\v2U.envoy.extensions.filters.http.file_server.v3.FileServerConfig.DirectoryBehavior.ListR\x04list\x1a\x06\n" +
	"\x04List\x1a?\n" +
	"\x11ContentTypesEntry\x12\x10\n" +
	"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
	"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01B\xc2\x01\xba\x80\xc8\xd1\x06\x02\x10\x02\xd2Ƥ\xe1\x06\x02\b\x01\n" +
	":io.envoyproxy.envoy.extensions.filters.http.file_server.v3B\x0fFileServerProtoP\x01Zagithub.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/file_server/v3;file_serverv3b\x06proto3"

var (
	file_envoy_extensions_filters_http_file_server_v3_file_server_proto_rawDescOnce sync.Once
	file_envoy_extensions_filters_http_file_server_v3_file_server_proto_rawDescData []byte
)

func file_envoy_extensions_filters_http_file_server_v3_file_server_proto_rawDescGZIP() []byte {
	file_envoy_extensions_filters_http_file_server_v3_file_server_proto_rawDescOnce.Do(func() {
		file_envoy_extensions_filters_http_file_server_v3_file_server_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_envoy_extensions_filters_http_file_server_v3_file_server_proto_rawDesc), len(file_envoy_extensions_filters_http_file_server_v3_file_server_proto_rawDesc)))
	})
	return file_envoy_extensions_filters_http_file_server_v3_file_server_proto_rawDescData
}

var file_envoy_extensions_filters_http_file_server_v3_file_server_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_envoy_extensions_filters_http_file_server_v3_file_server_proto_goTypes = []any{
	(*FileServerConfig)(nil),                   // 0: envoy.extensions.filters.http.file_server.v3.FileServerConfig
	(*FileServerConfig_PathMapping)(nil),       // 1: envoy.extensions.filters.http.file_server.v3.FileServerConfig.PathMapping
	(*FileServerConfig_DirectoryBehavior)(nil), // 2: envoy.extensions.filters.http.file_server.v3.FileServerConfig.DirectoryBehavior
	nil, // 3: envoy.extensions.filters.http.file_server.v3.FileServerConfig.ContentTypesEntry
	(*FileServerConfig_DirectoryBehavior_List)(nil), // 4: envoy.extensions.filters.http.file_server.v3.FileServerConfig.DirectoryBehavior.List
	(*v3.AsyncFileManagerConfig)(nil),               // 5: envoy.extensions.common.async_files.v3.AsyncFileManagerConfig
}
var file_envoy_extensions_filters_http_file_server_v3_file_server_proto_depIdxs = []int32{
	5, // 0: envoy.extensions.filters.http.file_server.v3.FileServerConfig.manager_config:type_name -> envoy.extensions.common.async_files.v3.AsyncFileManagerConfig
	1, // 1: envoy.extensions.filters.http.file_server.v3.FileServerConfig.path_mappings:type_name -> envoy.extensions.filters.http.file_server.v3.FileServerConfig.PathMapping
	3, // 2: envoy.extensions.filters.http.file_server.v3.FileServerConfig.content_types:type_name -> envoy.extensions.filters.http.file_server.v3.FileServerConfig.ContentTypesEntry
	2, // 3: envoy.extensions.filters.http.file_server.v3.FileServerConfig.directory_behaviors:type_name -> envoy.extensions.filters.http.file_server.v3.FileServerConfig.DirectoryBehavior
	4, // 4: envoy.extensions.filters.http.file_server.v3.FileServerConfig.DirectoryBehavior.list:type_name -> envoy.extensions.filters.http.file_server.v3.FileServerConfig.DirectoryBehavior.List
	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_extensions_filters_http_file_server_v3_file_server_proto_init() }
func file_envoy_extensions_filters_http_file_server_v3_file_server_proto_init() {
	if File_envoy_extensions_filters_http_file_server_v3_file_server_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_envoy_extensions_filters_http_file_server_v3_file_server_proto_rawDesc), len(file_envoy_extensions_filters_http_file_server_v3_file_server_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   5,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_envoy_extensions_filters_http_file_server_v3_file_server_proto_goTypes,
		DependencyIndexes: file_envoy_extensions_filters_http_file_server_v3_file_server_proto_depIdxs,
		MessageInfos:      file_envoy_extensions_filters_http_file_server_v3_file_server_proto_msgTypes,
	}.Build()
	File_envoy_extensions_filters_http_file_server_v3_file_server_proto = out.File
	file_envoy_extensions_filters_http_file_server_v3_file_server_proto_goTypes = nil
	file_envoy_extensions_filters_http_file_server_v3_file_server_proto_depIdxs = nil
}
