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

package transformv3

import (
	_ "github.com/cncf/xds/go/udpa/annotations"
	v3 "github.com/envoyproxy/go-control-plane/envoy/config/common/mutation_rules/v3"
	v31 "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"
	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)
)

type BodyTransformation_TransformAction int32

const (
	// Merge the transformed body with the original body. This is the default action.
	BodyTransformation_MERGE BodyTransformation_TransformAction = 0
	// Replace the original body with the transformed body.
	BodyTransformation_REPLACE BodyTransformation_TransformAction = 1
)

// Enum value maps for BodyTransformation_TransformAction.
var (
	BodyTransformation_TransformAction_name = map[int32]string{
		0: "MERGE",
		1: "REPLACE",
	}
	BodyTransformation_TransformAction_value = map[string]int32{
		"MERGE":   0,
		"REPLACE": 1,
	}
)

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

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

func (BodyTransformation_TransformAction) Descriptor() protoreflect.EnumDescriptor {
	return file_envoy_extensions_filters_http_transform_v3_transform_proto_enumTypes[0].Descriptor()
}

func (BodyTransformation_TransformAction) Type() protoreflect.EnumType {
	return &file_envoy_extensions_filters_http_transform_v3_transform_proto_enumTypes[0]
}

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

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

// Configuration for the transform filter. The filter may buffer the request/response until the
// entire body is received, and then mutate the headers and body according to the contents
// of the request/response. The request and response transformations are independent and could
// be configured separately.
// Only JSON body transformation is supported for now.
type TransformConfig struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Configuration for transforming request.
	//
	// .. note::
	//
	//	If set then the entire request headers and body will always be buffered on a JSON request
	//	even if only headers are transformed.
	RequestTransformation *Transformation `protobuf:"bytes,1,opt,name=request_transformation,json=requestTransformation,proto3" json:"request_transformation,omitempty"`
	// Configuration for transforming response.
	//
	// .. note::
	//
	//	If set then the entire response headers and body will always be buffered on a JSON response
	//	even if only headers are transformed.
	ResponseTransformation *Transformation `protobuf:"bytes,2,opt,name=response_transformation,json=responseTransformation,proto3" json:"response_transformation,omitempty"`
	// If true and the request headers are transformed, Envoy will re-evaluate the target
	// cluster in the same route. Please ensure the cluster specifier in the route supports
	// dynamic evaluation or this flag will have no effect, e.g.
	// :ref:`matcher cluster specifier
	// <envoy_v3_api_msg_extensions.router.cluster_specifiers.matcher.v3.MatcherClusterSpecifier>`.
	//
	// Only one of “clear_cluster_cache“ and “clear_route_cache“ can be true.
	ClearClusterCache bool `protobuf:"varint,3,opt,name=clear_cluster_cache,json=clearClusterCache,proto3" json:"clear_cluster_cache,omitempty"`
	// If true and the request headers are transformed, Envoy will clear the route cache for
	// the current request and force re-evaluation of the route. This has performance penalty and
	// should only be used when the route match criteria depends on the transformed headers.
	//
	// Only one of “clear_cluster_cache“ and “clear_route_cache“ can be true.
	ClearRouteCache bool `protobuf:"varint,4,opt,name=clear_route_cache,json=clearRouteCache,proto3" json:"clear_route_cache,omitempty"`
	unknownFields   protoimpl.UnknownFields
	sizeCache       protoimpl.SizeCache
}

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

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

func (*TransformConfig) ProtoMessage() {}

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

func (x *TransformConfig) GetRequestTransformation() *Transformation {
	if x != nil {
		return x.RequestTransformation
	}
	return nil
}

func (x *TransformConfig) GetResponseTransformation() *Transformation {
	if x != nil {
		return x.ResponseTransformation
	}
	return nil
}

func (x *TransformConfig) GetClearClusterCache() bool {
	if x != nil {
		return x.ClearClusterCache
	}
	return false
}

func (x *TransformConfig) GetClearRouteCache() bool {
	if x != nil {
		return x.ClearRouteCache
	}
	return false
}

type Transformation struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The header mutations to perform.
	// The :ref:`substitution format specifier <config_access_log_format>` could be applied here.
	// In addition to the commonly used format specifiers, this filter introduces additional format specifiers:
	//
	//   - “%REQUEST_BODY(KEY*)%“: the request body. And “Key“ KEY is an optional
	//     lookup key in the namespace with the option of specifying nested keys separated by ':'.
	//   - “%RESPONSE_BODY(KEY*)%“: the response body. And “Key“ KEY is an optional
	//     lookup key in the namespace with the option of specifying nested keys separated by ':'.
	HeadersMutations []*v3.HeaderMutation `protobuf:"bytes,1,rep,name=headers_mutations,json=headersMutations,proto3" json:"headers_mutations,omitempty"`
	// The body transformation configuration. If not set, no body transformation will be performed.
	BodyTransformation *BodyTransformation `protobuf:"bytes,2,opt,name=body_transformation,json=bodyTransformation,proto3" json:"body_transformation,omitempty"`
	unknownFields      protoimpl.UnknownFields
	sizeCache          protoimpl.SizeCache
}

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

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

func (*Transformation) ProtoMessage() {}

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

func (x *Transformation) GetHeadersMutations() []*v3.HeaderMutation {
	if x != nil {
		return x.HeadersMutations
	}
	return nil
}

func (x *Transformation) GetBodyTransformation() *BodyTransformation {
	if x != nil {
		return x.BodyTransformation
	}
	return nil
}

type BodyTransformation struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Body transformation configuration. The substitution format string is used as the template
	// to generate the transformed new body content.
	// The :ref:`substitution format specifier <config_access_log_format>` could be applied here.
	// And except the commonly used format specifiers, the additional format specifiers
	// “%REQUEST_BODY(KEY*)%“ and “%RESPONSE_BODY(KEY*)%“ could also be used here.
	BodyFormat *v31.SubstitutionFormatString `protobuf:"bytes,1,opt,name=body_format,json=bodyFormat,proto3" json:"body_format,omitempty"`
	// The action to perform for new body content and original body content.
	// For example, if “MERGE“ is used, then the new body content generated from the “body_format“
	// will be merged into the original body content.
	//
	// Default is “MERGE“.
	Action        BodyTransformation_TransformAction `protobuf:"varint,2,opt,name=action,proto3,enum=envoy.extensions.filters.http.transform.v3.BodyTransformation_TransformAction" json:"action,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*BodyTransformation) ProtoMessage() {}

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

func (x *BodyTransformation) GetBodyFormat() *v31.SubstitutionFormatString {
	if x != nil {
		return x.BodyFormat
	}
	return nil
}

func (x *BodyTransformation) GetAction() BodyTransformation_TransformAction {
	if x != nil {
		return x.Action
	}
	return BodyTransformation_MERGE
}

var File_envoy_extensions_filters_http_transform_v3_transform_proto protoreflect.FileDescriptor

const file_envoy_extensions_filters_http_transform_v3_transform_proto_rawDesc = "" +
	"\n" +
	":envoy/extensions/filters/http/transform/v3/transform.proto\x12*envoy.extensions.filters.http.transform.v3\x1a:envoy/config/common/mutation_rules/v3/mutation_rules.proto\x1a5envoy/config/core/v3/substitution_format_string.proto\x1a\x1dudpa/annotations/status.proto\x1a\x17validate/validate.proto\"\xd5\x02\n" +
	"\x0fTransformConfig\x12q\n" +
	"\x16request_transformation\x18\x01 \x01(\v2:.envoy.extensions.filters.http.transform.v3.TransformationR\x15requestTransformation\x12s\n" +
	"\x17response_transformation\x18\x02 \x01(\v2:.envoy.extensions.filters.http.transform.v3.TransformationR\x16responseTransformation\x12.\n" +
	"\x13clear_cluster_cache\x18\x03 \x01(\bR\x11clearClusterCache\x12*\n" +
	"\x11clear_route_cache\x18\x04 \x01(\bR\x0fclearRouteCache\"\xe5\x01\n" +
	"\x0eTransformation\x12b\n" +
	"\x11headers_mutations\x18\x01 \x03(\v25.envoy.config.common.mutation_rules.v3.HeaderMutationR\x10headersMutations\x12o\n" +
	"\x13body_transformation\x18\x02 \x01(\v2>.envoy.extensions.filters.http.transform.v3.BodyTransformationR\x12bodyTransformation\"\x82\x02\n" +
	"\x12BodyTransformation\x12Y\n" +
	"\vbody_format\x18\x01 \x01(\v2..envoy.config.core.v3.SubstitutionFormatStringB\b\xfaB\x05\x8a\x01\x02\x10\x01R\n" +
	"bodyFormat\x12f\n" +
	"\x06action\x18\x02 \x01(\x0e2N.envoy.extensions.filters.http.transform.v3.BodyTransformation.TransformActionR\x06action\")\n" +
	"\x0fTransformAction\x12\t\n" +
	"\x05MERGE\x10\x00\x12\v\n" +
	"\aREPLACE\x10\x01B\xb3\x01\xba\x80\xc8\xd1\x06\x02\x10\x02\n" +
	"8io.envoyproxy.envoy.extensions.filters.http.transform.v3B\x0eTransformProtoP\x01Z]github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/transform/v3;transformv3b\x06proto3"

var (
	file_envoy_extensions_filters_http_transform_v3_transform_proto_rawDescOnce sync.Once
	file_envoy_extensions_filters_http_transform_v3_transform_proto_rawDescData []byte
)

func file_envoy_extensions_filters_http_transform_v3_transform_proto_rawDescGZIP() []byte {
	file_envoy_extensions_filters_http_transform_v3_transform_proto_rawDescOnce.Do(func() {
		file_envoy_extensions_filters_http_transform_v3_transform_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_envoy_extensions_filters_http_transform_v3_transform_proto_rawDesc), len(file_envoy_extensions_filters_http_transform_v3_transform_proto_rawDesc)))
	})
	return file_envoy_extensions_filters_http_transform_v3_transform_proto_rawDescData
}

var file_envoy_extensions_filters_http_transform_v3_transform_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_envoy_extensions_filters_http_transform_v3_transform_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_envoy_extensions_filters_http_transform_v3_transform_proto_goTypes = []any{
	(BodyTransformation_TransformAction)(0), // 0: envoy.extensions.filters.http.transform.v3.BodyTransformation.TransformAction
	(*TransformConfig)(nil),                 // 1: envoy.extensions.filters.http.transform.v3.TransformConfig
	(*Transformation)(nil),                  // 2: envoy.extensions.filters.http.transform.v3.Transformation
	(*BodyTransformation)(nil),              // 3: envoy.extensions.filters.http.transform.v3.BodyTransformation
	(*v3.HeaderMutation)(nil),               // 4: envoy.config.common.mutation_rules.v3.HeaderMutation
	(*v31.SubstitutionFormatString)(nil),    // 5: envoy.config.core.v3.SubstitutionFormatString
}
var file_envoy_extensions_filters_http_transform_v3_transform_proto_depIdxs = []int32{
	2, // 0: envoy.extensions.filters.http.transform.v3.TransformConfig.request_transformation:type_name -> envoy.extensions.filters.http.transform.v3.Transformation
	2, // 1: envoy.extensions.filters.http.transform.v3.TransformConfig.response_transformation:type_name -> envoy.extensions.filters.http.transform.v3.Transformation
	4, // 2: envoy.extensions.filters.http.transform.v3.Transformation.headers_mutations:type_name -> envoy.config.common.mutation_rules.v3.HeaderMutation
	3, // 3: envoy.extensions.filters.http.transform.v3.Transformation.body_transformation:type_name -> envoy.extensions.filters.http.transform.v3.BodyTransformation
	5, // 4: envoy.extensions.filters.http.transform.v3.BodyTransformation.body_format:type_name -> envoy.config.core.v3.SubstitutionFormatString
	0, // 5: envoy.extensions.filters.http.transform.v3.BodyTransformation.action:type_name -> envoy.extensions.filters.http.transform.v3.BodyTransformation.TransformAction
	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_transform_v3_transform_proto_init() }
func file_envoy_extensions_filters_http_transform_v3_transform_proto_init() {
	if File_envoy_extensions_filters_http_transform_v3_transform_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_transform_v3_transform_proto_rawDesc), len(file_envoy_extensions_filters_http_transform_v3_transform_proto_rawDesc)),
			NumEnums:      1,
			NumMessages:   3,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_envoy_extensions_filters_http_transform_v3_transform_proto_goTypes,
		DependencyIndexes: file_envoy_extensions_filters_http_transform_v3_transform_proto_depIdxs,
		EnumInfos:         file_envoy_extensions_filters_http_transform_v3_transform_proto_enumTypes,
		MessageInfos:      file_envoy_extensions_filters_http_transform_v3_transform_proto_msgTypes,
	}.Build()
	File_envoy_extensions_filters_http_transform_v3_transform_proto = out.File
	file_envoy_extensions_filters_http_transform_v3_transform_proto_goTypes = nil
	file_envoy_extensions_filters_http_transform_v3_transform_proto_depIdxs = nil
}
