// 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/cache/v3/cache.proto

package cachev3

import (
	_ "github.com/cncf/xds/go/udpa/annotations"
	v31 "github.com/envoyproxy/go-control-plane/envoy/config/route/v3"
	v3 "github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3"
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	anypb "google.golang.org/protobuf/types/known/anypb"
	wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
	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)
)

// [#extension: envoy.filters.http.cache]
// [#next-free-field: 7]
type CacheConfig struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Config specific to the cache storage implementation. Required unless “disabled“
	// is true.
	// [#extension-category: envoy.http.cache]
	TypedConfig *anypb.Any `protobuf:"bytes,1,opt,name=typed_config,json=typedConfig,proto3" json:"typed_config,omitempty"`
	// When true, the cache filter is a no-op filter.
	//
	// Possible use-cases for this include:
	// - Turning a filter on and off with :ref:`ECDS <envoy_v3_api_file_envoy/service/extension/v3/config_discovery.proto>`.
	// [#comment: once route-specific overrides are implemented, they are the more likely use-case.]
	Disabled *wrapperspb.BoolValue `protobuf:"bytes,5,opt,name=disabled,proto3" json:"disabled,omitempty"`
	// List of matching rules that defines allowed “Vary“ headers.
	//
	// The “vary“ response header holds a list of header names that affect the
	// contents of a response, as described by
	// https://httpwg.org/specs/rfc7234.html#caching.negotiated.responses.
	//
	// During insertion, “allowed_vary_headers“ acts as a allowlist: if a
	// response's “vary“ header mentions any header names that aren't matched by any rules in
	// “allowed_vary_headers“, that response will not be cached.
	//
	// During lookup, “allowed_vary_headers“ controls what request headers will be
	// sent to the cache storage implementation.
	AllowedVaryHeaders []*v3.StringMatcher `protobuf:"bytes,2,rep,name=allowed_vary_headers,json=allowedVaryHeaders,proto3" json:"allowed_vary_headers,omitempty"`
	// [#not-implemented-hide:]
	// <TODO(toddmgreer) implement key customization>
	//
	// Modifies cache key creation by restricting which parts of the URL are included.
	KeyCreatorParams *CacheConfig_KeyCreatorParams `protobuf:"bytes,3,opt,name=key_creator_params,json=keyCreatorParams,proto3" json:"key_creator_params,omitempty"`
	// [#not-implemented-hide:]
	// <TODO(toddmgreer) implement size limit>
	//
	// Max body size the cache filter will insert into a cache. 0 means unlimited (though the cache
	// storage implementation may have its own limit beyond which it will reject insertions).
	MaxBodyBytes uint32 `protobuf:"varint,4,opt,name=max_body_bytes,json=maxBodyBytes,proto3" json:"max_body_bytes,omitempty"`
	// By default, a “cache-control: no-cache“ or “pragma: no-cache“ header in the request
	// causes the cache to validate with its upstream even if the lookup is a hit. Setting this
	// to true will ignore these headers.
	IgnoreRequestCacheControlHeader bool `protobuf:"varint,6,opt,name=ignore_request_cache_control_header,json=ignoreRequestCacheControlHeader,proto3" json:"ignore_request_cache_control_header,omitempty"`
	unknownFields                   protoimpl.UnknownFields
	sizeCache                       protoimpl.SizeCache
}

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

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

func (*CacheConfig) ProtoMessage() {}

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

func (x *CacheConfig) GetTypedConfig() *anypb.Any {
	if x != nil {
		return x.TypedConfig
	}
	return nil
}

func (x *CacheConfig) GetDisabled() *wrapperspb.BoolValue {
	if x != nil {
		return x.Disabled
	}
	return nil
}

func (x *CacheConfig) GetAllowedVaryHeaders() []*v3.StringMatcher {
	if x != nil {
		return x.AllowedVaryHeaders
	}
	return nil
}

func (x *CacheConfig) GetKeyCreatorParams() *CacheConfig_KeyCreatorParams {
	if x != nil {
		return x.KeyCreatorParams
	}
	return nil
}

func (x *CacheConfig) GetMaxBodyBytes() uint32 {
	if x != nil {
		return x.MaxBodyBytes
	}
	return 0
}

func (x *CacheConfig) GetIgnoreRequestCacheControlHeader() bool {
	if x != nil {
		return x.IgnoreRequestCacheControlHeader
	}
	return false
}

// [#not-implemented-hide:]
// Modifies cache key creation by restricting which parts of the URL are included.
type CacheConfig_KeyCreatorParams struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// If true, exclude the URL scheme from the cache key. Set to true if your origins always
	// produce the same response for http and https requests.
	ExcludeScheme bool `protobuf:"varint,1,opt,name=exclude_scheme,json=excludeScheme,proto3" json:"exclude_scheme,omitempty"`
	// If true, exclude the host from the cache key. Set to true if your origins' responses don't
	// ever depend on host.
	ExcludeHost bool `protobuf:"varint,2,opt,name=exclude_host,json=excludeHost,proto3" json:"exclude_host,omitempty"`
	// If “query_parameters_included“ is nonempty, only query parameters matched
	// by one or more of its matchers are included in the cache key. Any other
	// query params will not affect cache lookup.
	QueryParametersIncluded []*v31.QueryParameterMatcher `protobuf:"bytes,3,rep,name=query_parameters_included,json=queryParametersIncluded,proto3" json:"query_parameters_included,omitempty"`
	// If “query_parameters_excluded“ is nonempty, query parameters matched by one
	// or more of its matchers are excluded from the cache key (even if also
	// matched by “query_parameters_included“), and will not affect cache lookup.
	QueryParametersExcluded []*v31.QueryParameterMatcher `protobuf:"bytes,4,rep,name=query_parameters_excluded,json=queryParametersExcluded,proto3" json:"query_parameters_excluded,omitempty"`
	unknownFields           protoimpl.UnknownFields
	sizeCache               protoimpl.SizeCache
}

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

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

func (*CacheConfig_KeyCreatorParams) ProtoMessage() {}

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

func (x *CacheConfig_KeyCreatorParams) GetExcludeScheme() bool {
	if x != nil {
		return x.ExcludeScheme
	}
	return false
}

func (x *CacheConfig_KeyCreatorParams) GetExcludeHost() bool {
	if x != nil {
		return x.ExcludeHost
	}
	return false
}

func (x *CacheConfig_KeyCreatorParams) GetQueryParametersIncluded() []*v31.QueryParameterMatcher {
	if x != nil {
		return x.QueryParametersIncluded
	}
	return nil
}

func (x *CacheConfig_KeyCreatorParams) GetQueryParametersExcluded() []*v31.QueryParameterMatcher {
	if x != nil {
		return x.QueryParametersExcluded
	}
	return nil
}

var File_envoy_extensions_filters_http_cache_v3_cache_proto protoreflect.FileDescriptor

const file_envoy_extensions_filters_http_cache_v3_cache_proto_rawDesc = "" +
	"\n" +
	"2envoy/extensions/filters/http/cache/v3/cache.proto\x12&envoy.extensions.filters.http.cache.v3\x1a,envoy/config/route/v3/route_components.proto\x1a\"envoy/type/matcher/v3/string.proto\x1a\x19google/protobuf/any.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x1dudpa/annotations/status.proto\x1a!udpa/annotations/versioning.proto\"\xf8\x06\n" +
	"\vCacheConfig\x127\n" +
	"\ftyped_config\x18\x01 \x01(\v2\x14.google.protobuf.AnyR\vtypedConfig\x126\n" +
	"\bdisabled\x18\x05 \x01(\v2\x1a.google.protobuf.BoolValueR\bdisabled\x12V\n" +
	"\x14allowed_vary_headers\x18\x02 \x03(\v2$.envoy.type.matcher.v3.StringMatcherR\x12allowedVaryHeaders\x12r\n" +
	"\x12key_creator_params\x18\x03 \x01(\v2D.envoy.extensions.filters.http.cache.v3.CacheConfig.KeyCreatorParamsR\x10keyCreatorParams\x12$\n" +
	"\x0emax_body_bytes\x18\x04 \x01(\rR\fmaxBodyBytes\x12L\n" +
	"#ignore_request_cache_control_header\x18\x06 \x01(\bR\x1fignoreRequestCacheControlHeader\x1a\xfc\x02\n" +
	"\x10KeyCreatorParams\x12%\n" +
	"\x0eexclude_scheme\x18\x01 \x01(\bR\rexcludeScheme\x12!\n" +
	"\fexclude_host\x18\x02 \x01(\bR\vexcludeHost\x12h\n" +
	"\x19query_parameters_included\x18\x03 \x03(\v2,.envoy.config.route.v3.QueryParameterMatcherR\x17queryParametersIncluded\x12h\n" +
	"\x19query_parameters_excluded\x18\x04 \x03(\v2,.envoy.config.route.v3.QueryParameterMatcherR\x17queryParametersExcluded:J\x9aň\x1eE\n" +
	"Cenvoy.config.filter.http.cache.v2alpha.CacheConfig.KeyCreatorParams:9\x9aň\x1e4\n" +
	"2envoy.config.filter.http.cache.v2alpha.CacheConfigB\xa3\x01\xba\x80\xc8\xd1\x06\x02\x10\x02\n" +
	"4io.envoyproxy.envoy.extensions.filters.http.cache.v3B\n" +
	"CacheProtoP\x01ZUgithub.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/cache/v3;cachev3b\x06proto3"

var (
	file_envoy_extensions_filters_http_cache_v3_cache_proto_rawDescOnce sync.Once
	file_envoy_extensions_filters_http_cache_v3_cache_proto_rawDescData []byte
)

func file_envoy_extensions_filters_http_cache_v3_cache_proto_rawDescGZIP() []byte {
	file_envoy_extensions_filters_http_cache_v3_cache_proto_rawDescOnce.Do(func() {
		file_envoy_extensions_filters_http_cache_v3_cache_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_envoy_extensions_filters_http_cache_v3_cache_proto_rawDesc), len(file_envoy_extensions_filters_http_cache_v3_cache_proto_rawDesc)))
	})
	return file_envoy_extensions_filters_http_cache_v3_cache_proto_rawDescData
}

var file_envoy_extensions_filters_http_cache_v3_cache_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_envoy_extensions_filters_http_cache_v3_cache_proto_goTypes = []any{
	(*CacheConfig)(nil),                  // 0: envoy.extensions.filters.http.cache.v3.CacheConfig
	(*CacheConfig_KeyCreatorParams)(nil), // 1: envoy.extensions.filters.http.cache.v3.CacheConfig.KeyCreatorParams
	(*anypb.Any)(nil),                    // 2: google.protobuf.Any
	(*wrapperspb.BoolValue)(nil),         // 3: google.protobuf.BoolValue
	(*v3.StringMatcher)(nil),             // 4: envoy.type.matcher.v3.StringMatcher
	(*v31.QueryParameterMatcher)(nil),    // 5: envoy.config.route.v3.QueryParameterMatcher
}
var file_envoy_extensions_filters_http_cache_v3_cache_proto_depIdxs = []int32{
	2, // 0: envoy.extensions.filters.http.cache.v3.CacheConfig.typed_config:type_name -> google.protobuf.Any
	3, // 1: envoy.extensions.filters.http.cache.v3.CacheConfig.disabled:type_name -> google.protobuf.BoolValue
	4, // 2: envoy.extensions.filters.http.cache.v3.CacheConfig.allowed_vary_headers:type_name -> envoy.type.matcher.v3.StringMatcher
	1, // 3: envoy.extensions.filters.http.cache.v3.CacheConfig.key_creator_params:type_name -> envoy.extensions.filters.http.cache.v3.CacheConfig.KeyCreatorParams
	5, // 4: envoy.extensions.filters.http.cache.v3.CacheConfig.KeyCreatorParams.query_parameters_included:type_name -> envoy.config.route.v3.QueryParameterMatcher
	5, // 5: envoy.extensions.filters.http.cache.v3.CacheConfig.KeyCreatorParams.query_parameters_excluded:type_name -> envoy.config.route.v3.QueryParameterMatcher
	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_extensions_filters_http_cache_v3_cache_proto_init() }
func file_envoy_extensions_filters_http_cache_v3_cache_proto_init() {
	if File_envoy_extensions_filters_http_cache_v3_cache_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_cache_v3_cache_proto_rawDesc), len(file_envoy_extensions_filters_http_cache_v3_cache_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   2,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_envoy_extensions_filters_http_cache_v3_cache_proto_goTypes,
		DependencyIndexes: file_envoy_extensions_filters_http_cache_v3_cache_proto_depIdxs,
		MessageInfos:      file_envoy_extensions_filters_http_cache_v3_cache_proto_msgTypes,
	}.Build()
	File_envoy_extensions_filters_http_cache_v3_cache_proto = out.File
	file_envoy_extensions_filters_http_cache_v3_cache_proto_goTypes = nil
	file_envoy_extensions_filters_http_cache_v3_cache_proto_depIdxs = nil
}
