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

package mapped_attribute_builderv3

import (
	_ "github.com/cncf/xds/go/udpa/annotations"
	_ "github.com/cncf/xds/go/xds/annotations/v3"
	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)
)

// Extension to build custom attributes in the
// :ref:`ProcessingRequest <envoy_v3_api_msg_service.ext_proc.v3.ProcessingRequest>` based on a
// configurable mapping. The native implementation uses the CEL expression as the key, which is
// not always desirable. Using this extension, one can re-map a CEL expression that references
// internal filter state into a more user-friendly key that decouples the value from the underlying
// filter implementation.
//
// If a given CEL expression fails to evaluate, it will not be present in the attributes struct.
//
// If this extension is configured, then the original
// :ref:`ProcessingRequest <envoy_v3_api_msg_service.ext_proc.v3.ProcessingRequest>`'s
// “request_attributes“ are ignored, and all attributes should be explicitly set via this
// extension.
//
// An example configuration may look like so:
//
// .. code-block:: yaml
//
//	mapped_request_attributes:
//	  "request.path": "request.path"
//	  "source.country": "metadata.filter_metadata['com.example.location_filter']['country_code']"
//
// In the above example, the complex “filter_metadata“ expression is evaluated via CEL, and the
// value is stored under the friendlier “source.country“ key. The
// :ref:`ProcessingRequest <envoy_v3_api_msg_service.ext_proc.v3.ProcessingRequest>` would look
// like:
//
// .. code-block:: text
//
//	attributes {
//	  key: "envoy.filters.http.ext_proc"
//	  value {
//	    fields {
//	      key: "request.path"
//	      value {
//	        string_value: "/profile"
//	      }
//	    }
//	    fields {
//	      key: "source.country"
//	      value {
//	        string_value: "US"
//	      }
//	    }
//	  }
//	}
//
// .. note::
//
//	Processing request modifiers are currently in alpha.
type MappedAttributeBuilder struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// A map of request attributes to set in the
	// :ref:`attributes <envoy_v3_api_field_service.ext_proc.v3.ProcessingRequest.attributes>` struct.
	// The key is the attribute name, and the value is the CEL expression to evaluate. This allows
	// for the re-mapping of attributes, which is not supported by the native attribute building
	// logic.
	MappedRequestAttributes map[string]string `protobuf:"bytes,1,rep,name=mapped_request_attributes,json=mappedRequestAttributes,proto3" json:"mapped_request_attributes,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
	// Similar to “mapped_request_attributes“, but for response attributes. The "response"
	// nomenclature here indicates that the attributes, whatever they may be, are sent with a
	// response headers, body, or trailers ext_proc call.
	//
	// If a value contains a request key (e.g., “request.host“), then the attribute would just be
	// sent along in the response. This is useful if a given ext_proc extension is only enabled for
	// response handling (e.g., “RESPONSE_HEADERS“) but the backend wants to access request
	// metadata.
	MappedResponseAttributes map[string]string `protobuf:"bytes,2,rep,name=mapped_response_attributes,json=mappedResponseAttributes,proto3" json:"mapped_response_attributes,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
	unknownFields            protoimpl.UnknownFields
	sizeCache                protoimpl.SizeCache
}

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

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

func (*MappedAttributeBuilder) ProtoMessage() {}

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

func (x *MappedAttributeBuilder) GetMappedRequestAttributes() map[string]string {
	if x != nil {
		return x.MappedRequestAttributes
	}
	return nil
}

func (x *MappedAttributeBuilder) GetMappedResponseAttributes() map[string]string {
	if x != nil {
		return x.MappedResponseAttributes
	}
	return nil
}

var File_envoy_extensions_http_ext_proc_processing_request_modifiers_mapped_attribute_builder_v3_mapped_attribute_builder_proto protoreflect.FileDescriptor

const file_envoy_extensions_http_ext_proc_processing_request_modifiers_mapped_attribute_builder_v3_mapped_attribute_builder_proto_rawDesc = "" +
	"\n" +
	"venvoy/extensions/http/ext_proc/processing_request_modifiers/mapped_attribute_builder/v3/mapped_attribute_builder.proto\x12Wenvoy.extensions.http.ext_proc.processing_request_modifiers.mapped_attribute_builder.v3\x1a\x1fxds/annotations/v3/status.proto\x1a\x1dudpa/annotations/status.proto\"\xcc\x04\n" +
	"\x16MappedAttributeBuilder\x12\xc9\x01\n" +
	"\x19mapped_request_attributes\x18\x01 \x03(\v2\x8c\x01.envoy.extensions.http.ext_proc.processing_request_modifiers.mapped_attribute_builder.v3.MappedAttributeBuilder.MappedRequestAttributesEntryR\x17mappedRequestAttributes\x12\xcc\x01\n" +
	"\x1amapped_response_attributes\x18\x02 \x03(\v2\x8d\x01.envoy.extensions.http.ext_proc.processing_request_modifiers.mapped_attribute_builder.v3.MappedAttributeBuilder.MappedResponseAttributesEntryR\x18mappedResponseAttributes\x1aJ\n" +
	"\x1cMappedRequestAttributesEntry\x12\x10\n" +
	"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
	"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\x1aK\n" +
	"\x1dMappedResponseAttributesEntry\x12\x10\n" +
	"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
	"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01B\xb2\x02\xba\x80\xc8\xd1\x06\x02\x10\x02\xd2Ƥ\xe1\x06\x02\b\x01\n" +
	"eio.envoyproxy.envoy.extensions.http.ext_proc.processing_request_modifiers.mapped_attribute_builder.v3B\x1bMappedAttributeBuilderProtoP\x01Z\x99\x01github.com/envoyproxy/go-control-plane/envoy/extensions/http/ext_proc/processing_request_modifiers/mapped_attribute_builder/v3;mapped_attribute_builderv3b\x06proto3"

var (
	file_envoy_extensions_http_ext_proc_processing_request_modifiers_mapped_attribute_builder_v3_mapped_attribute_builder_proto_rawDescOnce sync.Once
	file_envoy_extensions_http_ext_proc_processing_request_modifiers_mapped_attribute_builder_v3_mapped_attribute_builder_proto_rawDescData []byte
)

func file_envoy_extensions_http_ext_proc_processing_request_modifiers_mapped_attribute_builder_v3_mapped_attribute_builder_proto_rawDescGZIP() []byte {
	file_envoy_extensions_http_ext_proc_processing_request_modifiers_mapped_attribute_builder_v3_mapped_attribute_builder_proto_rawDescOnce.Do(func() {
		file_envoy_extensions_http_ext_proc_processing_request_modifiers_mapped_attribute_builder_v3_mapped_attribute_builder_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_envoy_extensions_http_ext_proc_processing_request_modifiers_mapped_attribute_builder_v3_mapped_attribute_builder_proto_rawDesc), len(file_envoy_extensions_http_ext_proc_processing_request_modifiers_mapped_attribute_builder_v3_mapped_attribute_builder_proto_rawDesc)))
	})
	return file_envoy_extensions_http_ext_proc_processing_request_modifiers_mapped_attribute_builder_v3_mapped_attribute_builder_proto_rawDescData
}

var file_envoy_extensions_http_ext_proc_processing_request_modifiers_mapped_attribute_builder_v3_mapped_attribute_builder_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_envoy_extensions_http_ext_proc_processing_request_modifiers_mapped_attribute_builder_v3_mapped_attribute_builder_proto_goTypes = []any{
	(*MappedAttributeBuilder)(nil), // 0: envoy.extensions.http.ext_proc.processing_request_modifiers.mapped_attribute_builder.v3.MappedAttributeBuilder
	nil,                            // 1: envoy.extensions.http.ext_proc.processing_request_modifiers.mapped_attribute_builder.v3.MappedAttributeBuilder.MappedRequestAttributesEntry
	nil,                            // 2: envoy.extensions.http.ext_proc.processing_request_modifiers.mapped_attribute_builder.v3.MappedAttributeBuilder.MappedResponseAttributesEntry
}
var file_envoy_extensions_http_ext_proc_processing_request_modifiers_mapped_attribute_builder_v3_mapped_attribute_builder_proto_depIdxs = []int32{
	1, // 0: envoy.extensions.http.ext_proc.processing_request_modifiers.mapped_attribute_builder.v3.MappedAttributeBuilder.mapped_request_attributes:type_name -> envoy.extensions.http.ext_proc.processing_request_modifiers.mapped_attribute_builder.v3.MappedAttributeBuilder.MappedRequestAttributesEntry
	2, // 1: envoy.extensions.http.ext_proc.processing_request_modifiers.mapped_attribute_builder.v3.MappedAttributeBuilder.mapped_response_attributes:type_name -> envoy.extensions.http.ext_proc.processing_request_modifiers.mapped_attribute_builder.v3.MappedAttributeBuilder.MappedResponseAttributesEntry
	2, // [2:2] is the sub-list for method output_type
	2, // [2:2] is the sub-list for method input_type
	2, // [2:2] is the sub-list for extension type_name
	2, // [2:2] is the sub-list for extension extendee
	0, // [0:2] is the sub-list for field type_name
}

func init() {
	file_envoy_extensions_http_ext_proc_processing_request_modifiers_mapped_attribute_builder_v3_mapped_attribute_builder_proto_init()
}
func file_envoy_extensions_http_ext_proc_processing_request_modifiers_mapped_attribute_builder_v3_mapped_attribute_builder_proto_init() {
	if File_envoy_extensions_http_ext_proc_processing_request_modifiers_mapped_attribute_builder_v3_mapped_attribute_builder_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_http_ext_proc_processing_request_modifiers_mapped_attribute_builder_v3_mapped_attribute_builder_proto_rawDesc), len(file_envoy_extensions_http_ext_proc_processing_request_modifiers_mapped_attribute_builder_v3_mapped_attribute_builder_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   3,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_envoy_extensions_http_ext_proc_processing_request_modifiers_mapped_attribute_builder_v3_mapped_attribute_builder_proto_goTypes,
		DependencyIndexes: file_envoy_extensions_http_ext_proc_processing_request_modifiers_mapped_attribute_builder_v3_mapped_attribute_builder_proto_depIdxs,
		MessageInfos:      file_envoy_extensions_http_ext_proc_processing_request_modifiers_mapped_attribute_builder_v3_mapped_attribute_builder_proto_msgTypes,
	}.Build()
	File_envoy_extensions_http_ext_proc_processing_request_modifiers_mapped_attribute_builder_v3_mapped_attribute_builder_proto = out.File
	file_envoy_extensions_http_ext_proc_processing_request_modifiers_mapped_attribute_builder_v3_mapped_attribute_builder_proto_goTypes = nil
	file_envoy_extensions_http_ext_proc_processing_request_modifiers_mapped_attribute_builder_v3_mapped_attribute_builder_proto_depIdxs = nil
}
