// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.10
// 	protoc        v7.35.1
// source: envoy/extensions/filters/http/ext_proc/v3/processing_mode.proto

package ext_procv3

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

// Control how headers and trailers are handled.
type ProcessingMode_HeaderSendMode int32

const (
	// When used to configure the ext_proc filter
	// :ref:`processing_mode <envoy_v3_api_field_extensions.filters.http.ext_proc.v3.ExternalProcessor.processing_mode>`,
	// the default “HeaderSendMode“ depends on which part of the message is being processed. By
	// default, request and response headers are sent, while trailers are skipped.
	//
	// When used in
	// :ref:`mode_override <envoy_v3_api_field_service.ext_proc.v3.ProcessingResponse.mode_override>`
	// or
	// :ref:`allowed_override_modes <envoy_v3_api_field_extensions.filters.http.ext_proc.v3.ExternalProcessor.allowed_override_modes>`,
	// a value of “DEFAULT“ indicates that there is no change from the behavior that is configured
	// for the filter in
	// :ref:`processing_mode <envoy_v3_api_field_extensions.filters.http.ext_proc.v3.ExternalProcessor.processing_mode>`.
	ProcessingMode_DEFAULT ProcessingMode_HeaderSendMode = 0
	// Send the header or trailer.
	ProcessingMode_SEND ProcessingMode_HeaderSendMode = 1
	// Do not send the header or trailer.
	ProcessingMode_SKIP ProcessingMode_HeaderSendMode = 2
)

// Enum value maps for ProcessingMode_HeaderSendMode.
var (
	ProcessingMode_HeaderSendMode_name = map[int32]string{
		0: "DEFAULT",
		1: "SEND",
		2: "SKIP",
	}
	ProcessingMode_HeaderSendMode_value = map[string]int32{
		"DEFAULT": 0,
		"SEND":    1,
		"SKIP":    2,
	}
)

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

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

func (ProcessingMode_HeaderSendMode) Descriptor() protoreflect.EnumDescriptor {
	return file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_enumTypes[0].Descriptor()
}

func (ProcessingMode_HeaderSendMode) Type() protoreflect.EnumType {
	return &file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_enumTypes[0]
}

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

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

// Control how the request and response bodies are handled.
//
// When body mutation by the external processor is enabled, the ext_proc filter will always remove the
// content length header in the following four cases, unless
// :ref:`allow_content_length_header <envoy_v3_api_field_extensions.filters.http.ext_proc.v3.ExternalProcessor.allow_content_length_header>`
// is enabled. This is because the content length cannot be guaranteed to be set correctly:
//
// 1) “STREAMED“ BodySendMode: header processing completes before body mutation comes back.
// 2) “BUFFERED_PARTIAL“ BodySendMode: body is buffered and could be injected in different phases.
// 3) “BUFFERED“ BodySendMode + “SKIP“ HeaderSendMode: header processing (e.g., update content-length) is skipped.
// 4) “FULL_DUPLEX_STREAMED“ BodySendMode: header processing completes before body mutation comes back.
//
// In Envoy's HTTP/1 codec implementation, removing content length will enable chunked transfer
// encoding whenever feasible. The recipient (either client or server) must be able to parse and
// decode the chunked transfer coding
// (see `details in RFC9112 <https://tools.ietf.org/html/rfc9112#section-7.1>`_).
//
// In “BUFFERED“ BodySendMode + “SEND“ HeaderSendMode, content length header is allowed but it
// is the external processor's responsibility to set the content length correctly matched to the
// length of the mutated body. If they don't match, the corresponding body mutation will be
// rejected and a local reply will be sent with an error message.
type ProcessingMode_BodySendMode int32

const (
	// Do not send the body at all. This is the default.
	ProcessingMode_NONE ProcessingMode_BodySendMode = 0
	// Stream the body to the server in pieces as they are seen.
	ProcessingMode_STREAMED ProcessingMode_BodySendMode = 1
	// Buffer the message body in memory and send the entire body at once.
	// If the body exceeds the configured buffer limit, then the
	// downstream system will receive an error.
	ProcessingMode_BUFFERED ProcessingMode_BodySendMode = 2
	// Buffer the message body in memory and send the entire body in one
	// chunk. If the body exceeds the configured buffer limit, then the body contents
	// up to the buffer limit will be sent.
	ProcessingMode_BUFFERED_PARTIAL ProcessingMode_BodySendMode = 3
	// The ext_proc client (the data plane) streams the body to the server in pieces as they arrive.
	//
	//  1. The server may choose to buffer any number of chunks of data before processing them.
	//     After it finishes buffering, the server processes the buffered data. Then it splits the
	//     processed data into any number of chunks, and streams them back to the ext_proc client one
	//     by one. The server may continuously do so until the complete body is processed. The
	//     individual response chunk size is recommended to be no greater than 64K bytes, or
	//     :ref:`max_receive_message_length <envoy_v3_api_field_config.core.v3.GrpcService.EnvoyGrpc.max_receive_message_length>`
	//     if EnvoyGrpc is used.
	//
	//  2. The server may also choose to buffer the entire message, including the headers (if header
	//     mode is “SEND“), the entire body, and the trailers (if present), before sending back any
	//     response. The server response has to maintain the headers-body-trailers ordering.
	//
	//  3. Note that the server might also choose not to buffer data. That is, upon receiving a body
	//     request, it could process the data and send back a body response immediately.
	//
	// In this body mode:
	//
	//   - The corresponding trailer mode has to be set to “SEND“.
	//   - The client will send body and trailers (if present) to the server as they arrive. Sending
	//     the trailers (if present) is to inform the server that the complete body has arrived. In
	//     case there are no trailers, then the client will set
	//     :ref:`end_of_stream <envoy_v3_api_field_service.ext_proc.v3.HttpBody.end_of_stream>`
	//     to “true“ as part of the last body chunk request to notify the server that no other data
	//     is to be sent.
	//   - The server needs to send
	//     :ref:`StreamedBodyResponse <envoy_v3_api_msg_service.ext_proc.v3.StreamedBodyResponse>`
	//     to the client in the body response.
	//   - The client will stream the body chunks in the responses from the server to the
	//     upstream/downstream as they arrive.
	ProcessingMode_FULL_DUPLEX_STREAMED ProcessingMode_BodySendMode = 4
	// [#not-implemented-hide:]
	// A mode for gRPC traffic. This is similar to “FULL_DUPLEX_STREAMED“, except that instead of
	// sending raw chunks of the HTTP/2 DATA frames, the ext_proc client will de-frame the
	// individual gRPC messages inside the HTTP/2 DATA frames, and as each message is de-framed, it
	// will be sent to the ext_proc server as a
	// :ref:`request_body <envoy_v3_api_field_service.ext_proc.v3.ProcessingRequest.request_body>`
	// or
	// :ref:`response_body <envoy_v3_api_field_service.ext_proc.v3.ProcessingRequest.response_body>`.
	// The ext_proc server will stream back individual gRPC messages in the
	// :ref:`StreamedBodyResponse <envoy_v3_api_msg_service.ext_proc.v3.StreamedBodyResponse>`
	// field, but the number of messages sent by the ext_proc server does not need to equal the
	// number of messages sent by the data plane. This allows the ext_proc server to change the
	// number of messages sent on the stream. In this mode, the client will send body and trailers
	// to the server as they arrive.
	ProcessingMode_GRPC ProcessingMode_BodySendMode = 5
)

// Enum value maps for ProcessingMode_BodySendMode.
var (
	ProcessingMode_BodySendMode_name = map[int32]string{
		0: "NONE",
		1: "STREAMED",
		2: "BUFFERED",
		3: "BUFFERED_PARTIAL",
		4: "FULL_DUPLEX_STREAMED",
		5: "GRPC",
	}
	ProcessingMode_BodySendMode_value = map[string]int32{
		"NONE":                 0,
		"STREAMED":             1,
		"BUFFERED":             2,
		"BUFFERED_PARTIAL":     3,
		"FULL_DUPLEX_STREAMED": 4,
		"GRPC":                 5,
	}
)

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

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

func (ProcessingMode_BodySendMode) Descriptor() protoreflect.EnumDescriptor {
	return file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_enumTypes[1].Descriptor()
}

func (ProcessingMode_BodySendMode) Type() protoreflect.EnumType {
	return &file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_enumTypes[1]
}

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

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

// [#next-free-field: 7]
type ProcessingMode struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// How to handle the request header.
	//
	// .. note::
	//
	//	This field is ignored in
	//	:ref:`mode_override <envoy_v3_api_field_service.ext_proc.v3.ProcessingResponse.mode_override>`,
	//	since mode overrides can only affect messages exchanged after the request header is
	//	processed.
	//
	// Defaults to “SEND“.
	RequestHeaderMode ProcessingMode_HeaderSendMode `protobuf:"varint,1,opt,name=request_header_mode,json=requestHeaderMode,proto3,enum=envoy.extensions.filters.http.ext_proc.v3.ProcessingMode_HeaderSendMode" json:"request_header_mode,omitempty"`
	// How to handle the response header.
	//
	// Defaults to “SEND“.
	ResponseHeaderMode ProcessingMode_HeaderSendMode `protobuf:"varint,2,opt,name=response_header_mode,json=responseHeaderMode,proto3,enum=envoy.extensions.filters.http.ext_proc.v3.ProcessingMode_HeaderSendMode" json:"response_header_mode,omitempty"`
	// How to handle the request body.
	//
	// Defaults to “NONE“.
	RequestBodyMode ProcessingMode_BodySendMode `protobuf:"varint,3,opt,name=request_body_mode,json=requestBodyMode,proto3,enum=envoy.extensions.filters.http.ext_proc.v3.ProcessingMode_BodySendMode" json:"request_body_mode,omitempty"`
	// How to handle the response body.
	//
	// Defaults to “NONE“.
	ResponseBodyMode ProcessingMode_BodySendMode `protobuf:"varint,4,opt,name=response_body_mode,json=responseBodyMode,proto3,enum=envoy.extensions.filters.http.ext_proc.v3.ProcessingMode_BodySendMode" json:"response_body_mode,omitempty"`
	// How to handle the request trailers.
	//
	// Defaults to “SKIP“.
	RequestTrailerMode ProcessingMode_HeaderSendMode `protobuf:"varint,5,opt,name=request_trailer_mode,json=requestTrailerMode,proto3,enum=envoy.extensions.filters.http.ext_proc.v3.ProcessingMode_HeaderSendMode" json:"request_trailer_mode,omitempty"`
	// How to handle the response trailers.
	//
	// Defaults to “SKIP“.
	ResponseTrailerMode ProcessingMode_HeaderSendMode `protobuf:"varint,6,opt,name=response_trailer_mode,json=responseTrailerMode,proto3,enum=envoy.extensions.filters.http.ext_proc.v3.ProcessingMode_HeaderSendMode" json:"response_trailer_mode,omitempty"`
	unknownFields       protoimpl.UnknownFields
	sizeCache           protoimpl.SizeCache
}

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

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

func (*ProcessingMode) ProtoMessage() {}

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

func (x *ProcessingMode) GetRequestHeaderMode() ProcessingMode_HeaderSendMode {
	if x != nil {
		return x.RequestHeaderMode
	}
	return ProcessingMode_DEFAULT
}

func (x *ProcessingMode) GetResponseHeaderMode() ProcessingMode_HeaderSendMode {
	if x != nil {
		return x.ResponseHeaderMode
	}
	return ProcessingMode_DEFAULT
}

func (x *ProcessingMode) GetRequestBodyMode() ProcessingMode_BodySendMode {
	if x != nil {
		return x.RequestBodyMode
	}
	return ProcessingMode_NONE
}

func (x *ProcessingMode) GetResponseBodyMode() ProcessingMode_BodySendMode {
	if x != nil {
		return x.ResponseBodyMode
	}
	return ProcessingMode_NONE
}

func (x *ProcessingMode) GetRequestTrailerMode() ProcessingMode_HeaderSendMode {
	if x != nil {
		return x.RequestTrailerMode
	}
	return ProcessingMode_DEFAULT
}

func (x *ProcessingMode) GetResponseTrailerMode() ProcessingMode_HeaderSendMode {
	if x != nil {
		return x.ResponseTrailerMode
	}
	return ProcessingMode_DEFAULT
}

var File_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto protoreflect.FileDescriptor

const file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_rawDesc = "" +
	"\n" +
	"?envoy/extensions/filters/http/ext_proc/v3/processing_mode.proto\x12)envoy.extensions.filters.http.ext_proc.v3\x1a\x1dudpa/annotations/status.proto\x1a\x17validate/validate.proto\"\xcd\a\n" +
	"\x0eProcessingMode\x12\x82\x01\n" +
	"\x13request_header_mode\x18\x01 \x01(\x0e2H.envoy.extensions.filters.http.ext_proc.v3.ProcessingMode.HeaderSendModeB\b\xfaB\x05\x82\x01\x02\x10\x01R\x11requestHeaderMode\x12\x84\x01\n" +
	"\x14response_header_mode\x18\x02 \x01(\x0e2H.envoy.extensions.filters.http.ext_proc.v3.ProcessingMode.HeaderSendModeB\b\xfaB\x05\x82\x01\x02\x10\x01R\x12responseHeaderMode\x12|\n" +
	"\x11request_body_mode\x18\x03 \x01(\x0e2F.envoy.extensions.filters.http.ext_proc.v3.ProcessingMode.BodySendModeB\b\xfaB\x05\x82\x01\x02\x10\x01R\x0frequestBodyMode\x12~\n" +
	"\x12response_body_mode\x18\x04 \x01(\x0e2F.envoy.extensions.filters.http.ext_proc.v3.ProcessingMode.BodySendModeB\b\xfaB\x05\x82\x01\x02\x10\x01R\x10responseBodyMode\x12\x84\x01\n" +
	"\x14request_trailer_mode\x18\x05 \x01(\x0e2H.envoy.extensions.filters.http.ext_proc.v3.ProcessingMode.HeaderSendModeB\b\xfaB\x05\x82\x01\x02\x10\x01R\x12requestTrailerMode\x12\x86\x01\n" +
	"\x15response_trailer_mode\x18\x06 \x01(\x0e2H.envoy.extensions.filters.http.ext_proc.v3.ProcessingMode.HeaderSendModeB\b\xfaB\x05\x82\x01\x02\x10\x01R\x13responseTrailerMode\"1\n" +
	"\x0eHeaderSendMode\x12\v\n" +
	"\aDEFAULT\x10\x00\x12\b\n" +
	"\x04SEND\x10\x01\x12\b\n" +
	"\x04SKIP\x10\x02\"n\n" +
	"\fBodySendMode\x12\b\n" +
	"\x04NONE\x10\x00\x12\f\n" +
	"\bSTREAMED\x10\x01\x12\f\n" +
	"\bBUFFERED\x10\x02\x12\x14\n" +
	"\x10BUFFERED_PARTIAL\x10\x03\x12\x18\n" +
	"\x14FULL_DUPLEX_STREAMED\x10\x04\x12\b\n" +
	"\x04GRPC\x10\x05B\xb5\x01\xba\x80\xc8\xd1\x06\x02\x10\x02\n" +
	"7io.envoyproxy.envoy.extensions.filters.http.ext_proc.v3B\x13ProcessingModeProtoP\x01Z[github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/ext_proc/v3;ext_procv3b\x06proto3"

var (
	file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_rawDescOnce sync.Once
	file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_rawDescData []byte
)

func file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_rawDescGZIP() []byte {
	file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_rawDescOnce.Do(func() {
		file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_rawDesc), len(file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_rawDesc)))
	})
	return file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_rawDescData
}

var file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_goTypes = []any{
	(ProcessingMode_HeaderSendMode)(0), // 0: envoy.extensions.filters.http.ext_proc.v3.ProcessingMode.HeaderSendMode
	(ProcessingMode_BodySendMode)(0),   // 1: envoy.extensions.filters.http.ext_proc.v3.ProcessingMode.BodySendMode
	(*ProcessingMode)(nil),             // 2: envoy.extensions.filters.http.ext_proc.v3.ProcessingMode
}
var file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_depIdxs = []int32{
	0, // 0: envoy.extensions.filters.http.ext_proc.v3.ProcessingMode.request_header_mode:type_name -> envoy.extensions.filters.http.ext_proc.v3.ProcessingMode.HeaderSendMode
	0, // 1: envoy.extensions.filters.http.ext_proc.v3.ProcessingMode.response_header_mode:type_name -> envoy.extensions.filters.http.ext_proc.v3.ProcessingMode.HeaderSendMode
	1, // 2: envoy.extensions.filters.http.ext_proc.v3.ProcessingMode.request_body_mode:type_name -> envoy.extensions.filters.http.ext_proc.v3.ProcessingMode.BodySendMode
	1, // 3: envoy.extensions.filters.http.ext_proc.v3.ProcessingMode.response_body_mode:type_name -> envoy.extensions.filters.http.ext_proc.v3.ProcessingMode.BodySendMode
	0, // 4: envoy.extensions.filters.http.ext_proc.v3.ProcessingMode.request_trailer_mode:type_name -> envoy.extensions.filters.http.ext_proc.v3.ProcessingMode.HeaderSendMode
	0, // 5: envoy.extensions.filters.http.ext_proc.v3.ProcessingMode.response_trailer_mode:type_name -> envoy.extensions.filters.http.ext_proc.v3.ProcessingMode.HeaderSendMode
	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_ext_proc_v3_processing_mode_proto_init() }
func file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_init() {
	if File_envoy_extensions_filters_http_ext_proc_v3_processing_mode_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_ext_proc_v3_processing_mode_proto_rawDesc), len(file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_rawDesc)),
			NumEnums:      2,
			NumMessages:   1,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_goTypes,
		DependencyIndexes: file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_depIdxs,
		EnumInfos:         file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_enumTypes,
		MessageInfos:      file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_msgTypes,
	}.Build()
	File_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto = out.File
	file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_goTypes = nil
	file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_depIdxs = nil
}
