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

package bandwidth_limitv3

import (
	_ "github.com/cncf/xds/go/udpa/annotations"
	v3 "github.com/envoyproxy/go-control-plane/envoy/config/core/v3"
	_ "github.com/envoyproxy/protoc-gen-validate/validate"
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	durationpb "google.golang.org/protobuf/types/known/durationpb"
	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)
)

// Defines the mode for the bandwidth limit filter.
// Values represent bitmask.
type BandwidthLimit_EnableMode int32

const (
	// Filter is disabled.
	BandwidthLimit_DISABLED BandwidthLimit_EnableMode = 0
	// Filter enabled only for incoming traffic.
	BandwidthLimit_REQUEST BandwidthLimit_EnableMode = 1
	// Filter enabled only for outgoing traffic.
	BandwidthLimit_RESPONSE BandwidthLimit_EnableMode = 2
	// Filter enabled for both incoming and outgoing traffic.
	BandwidthLimit_REQUEST_AND_RESPONSE BandwidthLimit_EnableMode = 3
)

// Enum value maps for BandwidthLimit_EnableMode.
var (
	BandwidthLimit_EnableMode_name = map[int32]string{
		0: "DISABLED",
		1: "REQUEST",
		2: "RESPONSE",
		3: "REQUEST_AND_RESPONSE",
	}
	BandwidthLimit_EnableMode_value = map[string]int32{
		"DISABLED":             0,
		"REQUEST":              1,
		"RESPONSE":             2,
		"REQUEST_AND_RESPONSE": 3,
	}
)

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

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

func (BandwidthLimit_EnableMode) Descriptor() protoreflect.EnumDescriptor {
	return file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_enumTypes[0].Descriptor()
}

func (BandwidthLimit_EnableMode) Type() protoreflect.EnumType {
	return &file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_enumTypes[0]
}

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

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

// [#next-free-field: 8]
type BandwidthLimit struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The human readable prefix to use when emitting stats.
	StatPrefix string `protobuf:"bytes,1,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"`
	// The enable mode for the bandwidth limit filter.
	// Default is Disabled.
	EnableMode BandwidthLimit_EnableMode `protobuf:"varint,2,opt,name=enable_mode,json=enableMode,proto3,enum=envoy.extensions.filters.http.bandwidth_limit.v3.BandwidthLimit_EnableMode" json:"enable_mode,omitempty"`
	// The limit supplied in KiB/s.
	//
	// .. note::
	//
	//	It's fine for the limit to be unset for the global configuration since the bandwidth limit
	//	can be applied at a the virtual host or route level. Thus, the limit must be set for the
	//	per route configuration otherwise the config will be rejected.
	//
	// .. note::
	//
	//	When using per route configuration, the limit becomes unique to that route.
	LimitKbps *wrapperspb.UInt64Value `protobuf:"bytes,3,opt,name=limit_kbps,json=limitKbps,proto3" json:"limit_kbps,omitempty"`
	// Optional Fill interval in milliseconds for the token refills. Defaults to 50ms.
	// It must be at least 20ms to avoid too aggressive refills.
	FillInterval *durationpb.Duration `protobuf:"bytes,4,opt,name=fill_interval,json=fillInterval,proto3" json:"fill_interval,omitempty"`
	// Runtime flag that controls whether the filter is enabled or not. If not specified, defaults
	// to enabled.
	RuntimeEnabled *v3.RuntimeFeatureFlag `protobuf:"bytes,5,opt,name=runtime_enabled,json=runtimeEnabled,proto3" json:"runtime_enabled,omitempty"`
	// Enable response trailers.
	//
	// .. note::
	//
	//	If set true, the following 4 trailers will be added, prefixed by ``response_trailer_prefix``:
	//	* bandwidth-request-delay-ms: delay time in milliseconds it took for the request stream transfer including request body transfer time and the time added by the filter.
	//	* bandwidth-response-delay-ms: delay time in milliseconds it took for the response stream transfer including response body transfer time and the time added by the filter.
	//	* bandwidth-request-filter-delay-ms: delay time in milliseconds in request stream transfer added by the filter.
	//	* bandwidth-response-filter-delay-ms: delay time in milliseconds that added by the filter.
	//	If :ref:`enable_mode <envoy_v3_api_field_extensions.filters.http.bandwidth_limit.v3.BandwidthLimit.enable_mode>` is ``DISABLED`` or ``REQUEST``, the trailers will not be set.
	//	If both the request and response delay time is 0, the trailers will not be set.
	EnableResponseTrailers bool `protobuf:"varint,6,opt,name=enable_response_trailers,json=enableResponseTrailers,proto3" json:"enable_response_trailers,omitempty"`
	// Optional The prefix for the response trailers.
	ResponseTrailerPrefix string `protobuf:"bytes,7,opt,name=response_trailer_prefix,json=responseTrailerPrefix,proto3" json:"response_trailer_prefix,omitempty"`
	unknownFields         protoimpl.UnknownFields
	sizeCache             protoimpl.SizeCache
}

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

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

func (*BandwidthLimit) ProtoMessage() {}

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

func (x *BandwidthLimit) GetStatPrefix() string {
	if x != nil {
		return x.StatPrefix
	}
	return ""
}

func (x *BandwidthLimit) GetEnableMode() BandwidthLimit_EnableMode {
	if x != nil {
		return x.EnableMode
	}
	return BandwidthLimit_DISABLED
}

func (x *BandwidthLimit) GetLimitKbps() *wrapperspb.UInt64Value {
	if x != nil {
		return x.LimitKbps
	}
	return nil
}

func (x *BandwidthLimit) GetFillInterval() *durationpb.Duration {
	if x != nil {
		return x.FillInterval
	}
	return nil
}

func (x *BandwidthLimit) GetRuntimeEnabled() *v3.RuntimeFeatureFlag {
	if x != nil {
		return x.RuntimeEnabled
	}
	return nil
}

func (x *BandwidthLimit) GetEnableResponseTrailers() bool {
	if x != nil {
		return x.EnableResponseTrailers
	}
	return false
}

func (x *BandwidthLimit) GetResponseTrailerPrefix() string {
	if x != nil {
		return x.ResponseTrailerPrefix
	}
	return ""
}

var File_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto protoreflect.FileDescriptor

const file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_rawDesc = "" +
	"\n" +
	"Fenvoy/extensions/filters/http/bandwidth_limit/v3/bandwidth_limit.proto\x120envoy.extensions.filters.http.bandwidth_limit.v3\x1a\x1fenvoy/config/core/v3/base.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x1dudpa/annotations/status.proto\x1a\x17validate/validate.proto\"\xee\x04\n" +
	"\x0eBandwidthLimit\x12(\n" +
	"\vstat_prefix\x18\x01 \x01(\tB\a\xfaB\x04r\x02\x10\x01R\n" +
	"statPrefix\x12v\n" +
	"\venable_mode\x18\x02 \x01(\x0e2K.envoy.extensions.filters.http.bandwidth_limit.v3.BandwidthLimit.EnableModeB\b\xfaB\x05\x82\x01\x02\x10\x01R\n" +
	"enableMode\x12D\n" +
	"\n" +
	"limit_kbps\x18\x03 \x01(\v2\x1c.google.protobuf.UInt64ValueB\a\xfaB\x042\x02(\x01R\tlimitKbps\x12Q\n" +
	"\rfill_interval\x18\x04 \x01(\v2\x19.google.protobuf.DurationB\x11\xfaB\x0e\xaa\x01\v\"\x02\b\x012\x05\x10\x80\xda\xc4\tR\ffillInterval\x12Q\n" +
	"\x0fruntime_enabled\x18\x05 \x01(\v2(.envoy.config.core.v3.RuntimeFeatureFlagR\x0eruntimeEnabled\x128\n" +
	"\x18enable_response_trailers\x18\x06 \x01(\bR\x16enableResponseTrailers\x12C\n" +
	"\x17response_trailer_prefix\x18\a \x01(\tB\v\xfaB\br\x06\xc8\x01\x00\xc0\x01\x01R\x15responseTrailerPrefix\"O\n" +
	"\n" +
	"EnableMode\x12\f\n" +
	"\bDISABLED\x10\x00\x12\v\n" +
	"\aREQUEST\x10\x01\x12\f\n" +
	"\bRESPONSE\x10\x02\x12\x18\n" +
	"\x14REQUEST_AND_RESPONSE\x10\x03B\xca\x01\xba\x80\xc8\xd1\x06\x02\x10\x02\n" +
	">io.envoyproxy.envoy.extensions.filters.http.bandwidth_limit.v3B\x13BandwidthLimitProtoP\x01Zigithub.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/bandwidth_limit/v3;bandwidth_limitv3b\x06proto3"

var (
	file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_rawDescOnce sync.Once
	file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_rawDescData []byte
)

func file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_rawDescGZIP() []byte {
	file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_rawDescOnce.Do(func() {
		file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_rawDesc), len(file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_rawDesc)))
	})
	return file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_rawDescData
}

var file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_goTypes = []any{
	(BandwidthLimit_EnableMode)(0), // 0: envoy.extensions.filters.http.bandwidth_limit.v3.BandwidthLimit.EnableMode
	(*BandwidthLimit)(nil),         // 1: envoy.extensions.filters.http.bandwidth_limit.v3.BandwidthLimit
	(*wrapperspb.UInt64Value)(nil), // 2: google.protobuf.UInt64Value
	(*durationpb.Duration)(nil),    // 3: google.protobuf.Duration
	(*v3.RuntimeFeatureFlag)(nil),  // 4: envoy.config.core.v3.RuntimeFeatureFlag
}
var file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_depIdxs = []int32{
	0, // 0: envoy.extensions.filters.http.bandwidth_limit.v3.BandwidthLimit.enable_mode:type_name -> envoy.extensions.filters.http.bandwidth_limit.v3.BandwidthLimit.EnableMode
	2, // 1: envoy.extensions.filters.http.bandwidth_limit.v3.BandwidthLimit.limit_kbps:type_name -> google.protobuf.UInt64Value
	3, // 2: envoy.extensions.filters.http.bandwidth_limit.v3.BandwidthLimit.fill_interval:type_name -> google.protobuf.Duration
	4, // 3: envoy.extensions.filters.http.bandwidth_limit.v3.BandwidthLimit.runtime_enabled:type_name -> envoy.config.core.v3.RuntimeFeatureFlag
	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_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_init() }
func file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_init() {
	if File_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_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_bandwidth_limit_v3_bandwidth_limit_proto_rawDesc), len(file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_rawDesc)),
			NumEnums:      1,
			NumMessages:   1,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_goTypes,
		DependencyIndexes: file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_depIdxs,
		EnumInfos:         file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_enumTypes,
		MessageInfos:      file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_msgTypes,
	}.Build()
	File_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto = out.File
	file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_goTypes = nil
	file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_depIdxs = nil
}
