// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.10
// 	protoc        v6.33.2
// source: envoy/service/network_ext_proc/v3/network_external_processor.proto

package network_ext_procv3

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

// DataProcessedStatus indicates whether the data was modified by the external processor.
type ProcessingResponse_DataProcessedStatus int32

const (
	// The data processed status is unknown.
	ProcessingResponse_UNKNOWN ProcessingResponse_DataProcessedStatus = 0
	// The data remains unchanged. Envoy will use the original data.
	// This is useful when the processor only wants to inspect but not modify the traffic.
	ProcessingResponse_UNMODIFIED ProcessingResponse_DataProcessedStatus = 1
	// The data has been modified. Envoy will use the modified data provided in the response.
	// This allows the processor to transform the network traffic as needed.
	ProcessingResponse_MODIFIED ProcessingResponse_DataProcessedStatus = 2
)

// Enum value maps for ProcessingResponse_DataProcessedStatus.
var (
	ProcessingResponse_DataProcessedStatus_name = map[int32]string{
		0: "UNKNOWN",
		1: "UNMODIFIED",
		2: "MODIFIED",
	}
	ProcessingResponse_DataProcessedStatus_value = map[string]int32{
		"UNKNOWN":    0,
		"UNMODIFIED": 1,
		"MODIFIED":   2,
	}
)

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

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

func (ProcessingResponse_DataProcessedStatus) Descriptor() protoreflect.EnumDescriptor {
	return file_envoy_service_network_ext_proc_v3_network_external_processor_proto_enumTypes[0].Descriptor()
}

func (ProcessingResponse_DataProcessedStatus) Type() protoreflect.EnumType {
	return &file_envoy_service_network_ext_proc_v3_network_external_processor_proto_enumTypes[0]
}

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

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

// ConnectionStatus determines what happens to the connection after processing.
type ProcessingResponse_ConnectionStatus int32

const (
	// Continue normal processing of the connection.
	// This is the default behavior and allows traffic to flow normally.
	ProcessingResponse_CONTINUE ProcessingResponse_ConnectionStatus = 0
	// Close the connection with normal TCP FIN.
	// This allows for clean connection termination with a normal close sequence.
	// Any buffered data will be sent before closing.
	ProcessingResponse_CLOSE ProcessingResponse_ConnectionStatus = 1
	// Immediately reset the connection with TCP RST.
	// This forcibly terminates the connection without a clean shutdown,
	// discarding any buffered data. Use this for security-critical situations
	// or when immediate termination is required.
	ProcessingResponse_CLOSE_RST ProcessingResponse_ConnectionStatus = 2
)

// Enum value maps for ProcessingResponse_ConnectionStatus.
var (
	ProcessingResponse_ConnectionStatus_name = map[int32]string{
		0: "CONTINUE",
		1: "CLOSE",
		2: "CLOSE_RST",
	}
	ProcessingResponse_ConnectionStatus_value = map[string]int32{
		"CONTINUE":  0,
		"CLOSE":     1,
		"CLOSE_RST": 2,
	}
)

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

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

func (ProcessingResponse_ConnectionStatus) Descriptor() protoreflect.EnumDescriptor {
	return file_envoy_service_network_ext_proc_v3_network_external_processor_proto_enumTypes[1].Descriptor()
}

func (ProcessingResponse_ConnectionStatus) Type() protoreflect.EnumType {
	return &file_envoy_service_network_ext_proc_v3_network_external_processor_proto_enumTypes[1]
}

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

// Deprecated: Use ProcessingResponse_ConnectionStatus.Descriptor instead.
func (ProcessingResponse_ConnectionStatus) EnumDescriptor() ([]byte, []int) {
	return file_envoy_service_network_ext_proc_v3_network_external_processor_proto_rawDescGZIP(), []int{2, 1}
}

// The payload data from network layer
type Data struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The raw payload data
	Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	// Indicates whether this is the last data frame in the current direction.
	// The external processor should still respond to this message even
	// if there is no more data expected in this direction.
	EndOfStream   bool `protobuf:"varint,2,opt,name=end_of_stream,json=endOfStream,proto3" json:"end_of_stream,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*Data) ProtoMessage() {}

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

func (x *Data) GetData() []byte {
	if x != nil {
		return x.Data
	}
	return nil
}

func (x *Data) GetEndOfStream() bool {
	if x != nil {
		return x.EndOfStream
	}
	return false
}

// ProcessingRequest contains data sent from Envoy to the external processing server.
// Each request contains either read data (from client) or write data (to client)
// along with optional metadata.
type ProcessingRequest struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// ReadData contains the network data intercepted in the request path (client to server).
	// This is sent to the external processor when data arrives from the downstream client.
	// If this is set, write_data should not be set.
	ReadData *Data `protobuf:"bytes,1,opt,name=read_data,json=readData,proto3" json:"read_data,omitempty"`
	// WriteData contains the network data intercepted in the response path (server to client).
	// This is sent to the external processor when data arrives from the upstream server.
	// If this is set, read_data should not be set.
	WriteData *Data `protobuf:"bytes,2,opt,name=write_data,json=writeData,proto3" json:"write_data,omitempty"`
	// Optional metadata associated with the request.
	// This can include connection properties, filter configuration, and any other
	// contextual information that might be useful for processing decisions.
	//
	// The metadata is not automatically propagated from request to response.
	// The external processor must include any needed metadata in its response.
	Metadata      *v3.Metadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*ProcessingRequest) ProtoMessage() {}

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

func (x *ProcessingRequest) GetReadData() *Data {
	if x != nil {
		return x.ReadData
	}
	return nil
}

func (x *ProcessingRequest) GetWriteData() *Data {
	if x != nil {
		return x.WriteData
	}
	return nil
}

func (x *ProcessingRequest) GetMetadata() *v3.Metadata {
	if x != nil {
		return x.Metadata
	}
	return nil
}

// ProcessingResponse contains the response from the external processing server to Envoy.
// Each response corresponds to a ProcessingRequest and indicates how the network
// traffic should be handled.
// [#next-free-field: 6]
type ProcessingResponse struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The processed ReadData containing potentially modified data for the request path.
	// This should be sent in response to a ProcessingRequest with read_data, and the
	// previous data in ProcessingRequest will be replaced by the new data in Envoy's data plane.
	// If this is set, write_data should not be set.
	ReadData *Data `protobuf:"bytes,1,opt,name=read_data,json=readData,proto3" json:"read_data,omitempty"`
	// The processed WriteData containing potentially modified data for the response path.
	// This should be sent in response to a ProcessingRequest with write_data, and the
	// previous data in ProcessingRequest will be replaced by the new data in Envoy's data plane.
	// If this is set, read_data should not be set.
	WriteData *Data `protobuf:"bytes,2,opt,name=write_data,json=writeData,proto3" json:"write_data,omitempty"`
	// Indicates whether the data was modified or not.
	// This is mandatory and tells Envoy whether to use the original or modified data.
	DataProcessingStatus ProcessingResponse_DataProcessedStatus `protobuf:"varint,3,opt,name=data_processing_status,json=dataProcessingStatus,proto3,enum=envoy.service.network_ext_proc.v3.ProcessingResponse_DataProcessedStatus" json:"data_processing_status,omitempty"`
	// Optional: Determines the connection behavior after processing.
	// If not specified, CONTINUE is assumed, and the connection proceeds normally.
	// Use CLOSE or CLOSE_RST to terminate the connection based on processing results.
	ConnectionStatus ProcessingResponse_ConnectionStatus `protobuf:"varint,4,opt,name=connection_status,json=connectionStatus,proto3,enum=envoy.service.network_ext_proc.v3.ProcessingResponse_ConnectionStatus" json:"connection_status,omitempty"`
	// Optional metadata associated with the request.
	// This can include connection properties, filter configuration, and any other
	// contextual information that might be useful for processing decisions.
	//
	// The metadata is not automatically propagated from request to response.
	// The external processor must include any needed metadata in its response.
	DynamicMetadata *structpb.Struct `protobuf:"bytes,5,opt,name=dynamic_metadata,json=dynamicMetadata,proto3" json:"dynamic_metadata,omitempty"`
	unknownFields   protoimpl.UnknownFields
	sizeCache       protoimpl.SizeCache
}

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

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

func (*ProcessingResponse) ProtoMessage() {}

func (x *ProcessingResponse) ProtoReflect() protoreflect.Message {
	mi := &file_envoy_service_network_ext_proc_v3_network_external_processor_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 ProcessingResponse.ProtoReflect.Descriptor instead.
func (*ProcessingResponse) Descriptor() ([]byte, []int) {
	return file_envoy_service_network_ext_proc_v3_network_external_processor_proto_rawDescGZIP(), []int{2}
}

func (x *ProcessingResponse) GetReadData() *Data {
	if x != nil {
		return x.ReadData
	}
	return nil
}

func (x *ProcessingResponse) GetWriteData() *Data {
	if x != nil {
		return x.WriteData
	}
	return nil
}

func (x *ProcessingResponse) GetDataProcessingStatus() ProcessingResponse_DataProcessedStatus {
	if x != nil {
		return x.DataProcessingStatus
	}
	return ProcessingResponse_UNKNOWN
}

func (x *ProcessingResponse) GetConnectionStatus() ProcessingResponse_ConnectionStatus {
	if x != nil {
		return x.ConnectionStatus
	}
	return ProcessingResponse_CONTINUE
}

func (x *ProcessingResponse) GetDynamicMetadata() *structpb.Struct {
	if x != nil {
		return x.DynamicMetadata
	}
	return nil
}

var File_envoy_service_network_ext_proc_v3_network_external_processor_proto protoreflect.FileDescriptor

const file_envoy_service_network_ext_proc_v3_network_external_processor_proto_rawDesc = "" +
	"\n" +
	"Benvoy/service/network_ext_proc/v3/network_external_processor.proto\x12!envoy.service.network_ext_proc.v3\x1a\x1fenvoy/config/core/v3/base.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fxds/annotations/v3/status.proto\x1a\x1dudpa/annotations/status.proto\">\n" +
	"\x04Data\x12\x12\n" +
	"\x04data\x18\x01 \x01(\fR\x04data\x12\"\n" +
	"\rend_of_stream\x18\x02 \x01(\bR\vendOfStream\"\xdd\x01\n" +
	"\x11ProcessingRequest\x12D\n" +
	"\tread_data\x18\x01 \x01(\v2'.envoy.service.network_ext_proc.v3.DataR\breadData\x12F\n" +
	"\n" +
	"write_data\x18\x02 \x01(\v2'.envoy.service.network_ext_proc.v3.DataR\twriteData\x12:\n" +
	"\bmetadata\x18\x03 \x01(\v2\x1e.envoy.config.core.v3.MetadataR\bmetadata\"\xda\x04\n" +
	"\x12ProcessingResponse\x12D\n" +
	"\tread_data\x18\x01 \x01(\v2'.envoy.service.network_ext_proc.v3.DataR\breadData\x12F\n" +
	"\n" +
	"write_data\x18\x02 \x01(\v2'.envoy.service.network_ext_proc.v3.DataR\twriteData\x12\x7f\n" +
	"\x16data_processing_status\x18\x03 \x01(\x0e2I.envoy.service.network_ext_proc.v3.ProcessingResponse.DataProcessedStatusR\x14dataProcessingStatus\x12s\n" +
	"\x11connection_status\x18\x04 \x01(\x0e2F.envoy.service.network_ext_proc.v3.ProcessingResponse.ConnectionStatusR\x10connectionStatus\x12B\n" +
	"\x10dynamic_metadata\x18\x05 \x01(\v2\x17.google.protobuf.StructR\x0fdynamicMetadata\"@\n" +
	"\x13DataProcessedStatus\x12\v\n" +
	"\aUNKNOWN\x10\x00\x12\x0e\n" +
	"\n" +
	"UNMODIFIED\x10\x01\x12\f\n" +
	"\bMODIFIED\x10\x02\":\n" +
	"\x10ConnectionStatus\x12\f\n" +
	"\bCONTINUE\x10\x00\x12\t\n" +
	"\x05CLOSE\x10\x01\x12\r\n" +
	"\tCLOSE_RST\x10\x022\x98\x01\n" +
	"\x18NetworkExternalProcessor\x12|\n" +
	"\aProcess\x124.envoy.service.network_ext_proc.v3.ProcessingRequest\x1a5.envoy.service.network_ext_proc.v3.ProcessingResponse\"\x00(\x010\x01B\xbf\x01\xba\x80\xc8\xd1\x06\x02\x10\x02\xd2Ƥ\xe1\x06\x02\b\x01\n" +
	"/io.envoyproxy.envoy.service.network_ext_proc.v3B\x1dNetworkExternalProcessorProtoP\x01Z[github.com/envoyproxy/go-control-plane/envoy/service/network_ext_proc/v3;network_ext_procv3b\x06proto3"

var (
	file_envoy_service_network_ext_proc_v3_network_external_processor_proto_rawDescOnce sync.Once
	file_envoy_service_network_ext_proc_v3_network_external_processor_proto_rawDescData []byte
)

func file_envoy_service_network_ext_proc_v3_network_external_processor_proto_rawDescGZIP() []byte {
	file_envoy_service_network_ext_proc_v3_network_external_processor_proto_rawDescOnce.Do(func() {
		file_envoy_service_network_ext_proc_v3_network_external_processor_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_envoy_service_network_ext_proc_v3_network_external_processor_proto_rawDesc), len(file_envoy_service_network_ext_proc_v3_network_external_processor_proto_rawDesc)))
	})
	return file_envoy_service_network_ext_proc_v3_network_external_processor_proto_rawDescData
}

var file_envoy_service_network_ext_proc_v3_network_external_processor_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_envoy_service_network_ext_proc_v3_network_external_processor_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_envoy_service_network_ext_proc_v3_network_external_processor_proto_goTypes = []any{
	(ProcessingResponse_DataProcessedStatus)(0), // 0: envoy.service.network_ext_proc.v3.ProcessingResponse.DataProcessedStatus
	(ProcessingResponse_ConnectionStatus)(0),    // 1: envoy.service.network_ext_proc.v3.ProcessingResponse.ConnectionStatus
	(*Data)(nil),                                // 2: envoy.service.network_ext_proc.v3.Data
	(*ProcessingRequest)(nil),                   // 3: envoy.service.network_ext_proc.v3.ProcessingRequest
	(*ProcessingResponse)(nil),                  // 4: envoy.service.network_ext_proc.v3.ProcessingResponse
	(*v3.Metadata)(nil),                         // 5: envoy.config.core.v3.Metadata
	(*structpb.Struct)(nil),                     // 6: google.protobuf.Struct
}
var file_envoy_service_network_ext_proc_v3_network_external_processor_proto_depIdxs = []int32{
	2, // 0: envoy.service.network_ext_proc.v3.ProcessingRequest.read_data:type_name -> envoy.service.network_ext_proc.v3.Data
	2, // 1: envoy.service.network_ext_proc.v3.ProcessingRequest.write_data:type_name -> envoy.service.network_ext_proc.v3.Data
	5, // 2: envoy.service.network_ext_proc.v3.ProcessingRequest.metadata:type_name -> envoy.config.core.v3.Metadata
	2, // 3: envoy.service.network_ext_proc.v3.ProcessingResponse.read_data:type_name -> envoy.service.network_ext_proc.v3.Data
	2, // 4: envoy.service.network_ext_proc.v3.ProcessingResponse.write_data:type_name -> envoy.service.network_ext_proc.v3.Data
	0, // 5: envoy.service.network_ext_proc.v3.ProcessingResponse.data_processing_status:type_name -> envoy.service.network_ext_proc.v3.ProcessingResponse.DataProcessedStatus
	1, // 6: envoy.service.network_ext_proc.v3.ProcessingResponse.connection_status:type_name -> envoy.service.network_ext_proc.v3.ProcessingResponse.ConnectionStatus
	6, // 7: envoy.service.network_ext_proc.v3.ProcessingResponse.dynamic_metadata:type_name -> google.protobuf.Struct
	3, // 8: envoy.service.network_ext_proc.v3.NetworkExternalProcessor.Process:input_type -> envoy.service.network_ext_proc.v3.ProcessingRequest
	4, // 9: envoy.service.network_ext_proc.v3.NetworkExternalProcessor.Process:output_type -> envoy.service.network_ext_proc.v3.ProcessingResponse
	9, // [9:10] is the sub-list for method output_type
	8, // [8:9] is the sub-list for method input_type
	8, // [8:8] is the sub-list for extension type_name
	8, // [8:8] is the sub-list for extension extendee
	0, // [0:8] is the sub-list for field type_name
}

func init() { file_envoy_service_network_ext_proc_v3_network_external_processor_proto_init() }
func file_envoy_service_network_ext_proc_v3_network_external_processor_proto_init() {
	if File_envoy_service_network_ext_proc_v3_network_external_processor_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_envoy_service_network_ext_proc_v3_network_external_processor_proto_rawDesc), len(file_envoy_service_network_ext_proc_v3_network_external_processor_proto_rawDesc)),
			NumEnums:      2,
			NumMessages:   3,
			NumExtensions: 0,
			NumServices:   1,
		},
		GoTypes:           file_envoy_service_network_ext_proc_v3_network_external_processor_proto_goTypes,
		DependencyIndexes: file_envoy_service_network_ext_proc_v3_network_external_processor_proto_depIdxs,
		EnumInfos:         file_envoy_service_network_ext_proc_v3_network_external_processor_proto_enumTypes,
		MessageInfos:      file_envoy_service_network_ext_proc_v3_network_external_processor_proto_msgTypes,
	}.Build()
	File_envoy_service_network_ext_proc_v3_network_external_processor_proto = out.File
	file_envoy_service_network_ext_proc_v3_network_external_processor_proto_goTypes = nil
	file_envoy_service_network_ext_proc_v3_network_external_processor_proto_depIdxs = nil
}
