// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.10
// 	protoc        v6.33.2
// source: envoy/extensions/http/custom_response/local_response_policy/v3/local_response_policy.proto

package local_response_policyv3

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"
	_ "github.com/envoyproxy/protoc-gen-validate/validate"
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	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)
)

// Custom response policy to serve a locally stored response to the
// downstream.
type LocalResponsePolicy struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Optional new local reply body text. It will be used
	// in the “%LOCAL_REPLY_BODY%“ command operator in the “body_format“.
	Body *v3.DataSource `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"`
	// Optional body format to be used for this response. If “body_format“ is  not
	// provided, and “body“ is, the contents of “body“ will be used to populate
	// the body of the local reply without formatting.
	BodyFormat *v3.SubstitutionFormatString `protobuf:"bytes,2,opt,name=body_format,json=bodyFormat,proto3" json:"body_format,omitempty"`
	// The new response status code if specified.
	StatusCode *wrapperspb.UInt32Value `protobuf:"bytes,3,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"`
	// HTTP headers to add to the response. This allows the
	// response policy to append, to add or to override headers of
	// the original response for local body, or the custom response from the
	// remote body, before it is sent to a downstream client.
	ResponseHeadersToAdd []*v3.HeaderValueOption `protobuf:"bytes,4,rep,name=response_headers_to_add,json=responseHeadersToAdd,proto3" json:"response_headers_to_add,omitempty"`
	unknownFields        protoimpl.UnknownFields
	sizeCache            protoimpl.SizeCache
}

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

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

func (*LocalResponsePolicy) ProtoMessage() {}

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

func (x *LocalResponsePolicy) GetBody() *v3.DataSource {
	if x != nil {
		return x.Body
	}
	return nil
}

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

func (x *LocalResponsePolicy) GetStatusCode() *wrapperspb.UInt32Value {
	if x != nil {
		return x.StatusCode
	}
	return nil
}

func (x *LocalResponsePolicy) GetResponseHeadersToAdd() []*v3.HeaderValueOption {
	if x != nil {
		return x.ResponseHeadersToAdd
	}
	return nil
}

var File_envoy_extensions_http_custom_response_local_response_policy_v3_local_response_policy_proto protoreflect.FileDescriptor

const file_envoy_extensions_http_custom_response_local_response_policy_v3_local_response_policy_proto_rawDesc = "" +
	"\n" +
	"Zenvoy/extensions/http/custom_response/local_response_policy/v3/local_response_policy.proto\x12>envoy.extensions.http.custom_response.local_response_policy.v3\x1a\x1fenvoy/config/core/v3/base.proto\x1a5envoy/config/core/v3/substitution_format_string.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x1fxds/annotations/v3/status.proto\x1a\x1dudpa/annotations/status.proto\x1a\x17validate/validate.proto\"\xd3\x02\n" +
	"\x13LocalResponsePolicy\x124\n" +
	"\x04body\x18\x01 \x01(\v2 .envoy.config.core.v3.DataSourceR\x04body\x12O\n" +
	"\vbody_format\x18\x02 \x01(\v2..envoy.config.core.v3.SubstitutionFormatStringR\n" +
	"bodyFormat\x12J\n" +
	"\vstatus_code\x18\x03 \x01(\v2\x1c.google.protobuf.UInt32ValueB\v\xfaB\b*\x06\x10\xd8\x04(\xc8\x01R\n" +
	"statusCode\x12i\n" +
	"\x17response_headers_to_add\x18\x04 \x03(\v2'.envoy.config.core.v3.HeaderValueOptionB\t\xfaB\x06\x92\x01\x03\x10\xe8\aR\x14responseHeadersToAddB\xf9\x01\xba\x80\xc8\xd1\x06\x02\x10\x02\xd2Ƥ\xe1\x06\x02\b\x01\n" +
	"Lio.envoyproxy.envoy.extensions.http.custom_response.local_response_policy.v3B\x18LocalResponsePolicyProtoP\x01Z}github.com/envoyproxy/go-control-plane/envoy/extensions/http/custom_response/local_response_policy/v3;local_response_policyv3b\x06proto3"

var (
	file_envoy_extensions_http_custom_response_local_response_policy_v3_local_response_policy_proto_rawDescOnce sync.Once
	file_envoy_extensions_http_custom_response_local_response_policy_v3_local_response_policy_proto_rawDescData []byte
)

func file_envoy_extensions_http_custom_response_local_response_policy_v3_local_response_policy_proto_rawDescGZIP() []byte {
	file_envoy_extensions_http_custom_response_local_response_policy_v3_local_response_policy_proto_rawDescOnce.Do(func() {
		file_envoy_extensions_http_custom_response_local_response_policy_v3_local_response_policy_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_envoy_extensions_http_custom_response_local_response_policy_v3_local_response_policy_proto_rawDesc), len(file_envoy_extensions_http_custom_response_local_response_policy_v3_local_response_policy_proto_rawDesc)))
	})
	return file_envoy_extensions_http_custom_response_local_response_policy_v3_local_response_policy_proto_rawDescData
}

var file_envoy_extensions_http_custom_response_local_response_policy_v3_local_response_policy_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_envoy_extensions_http_custom_response_local_response_policy_v3_local_response_policy_proto_goTypes = []any{
	(*LocalResponsePolicy)(nil),         // 0: envoy.extensions.http.custom_response.local_response_policy.v3.LocalResponsePolicy
	(*v3.DataSource)(nil),               // 1: envoy.config.core.v3.DataSource
	(*v3.SubstitutionFormatString)(nil), // 2: envoy.config.core.v3.SubstitutionFormatString
	(*wrapperspb.UInt32Value)(nil),      // 3: google.protobuf.UInt32Value
	(*v3.HeaderValueOption)(nil),        // 4: envoy.config.core.v3.HeaderValueOption
}
var file_envoy_extensions_http_custom_response_local_response_policy_v3_local_response_policy_proto_depIdxs = []int32{
	1, // 0: envoy.extensions.http.custom_response.local_response_policy.v3.LocalResponsePolicy.body:type_name -> envoy.config.core.v3.DataSource
	2, // 1: envoy.extensions.http.custom_response.local_response_policy.v3.LocalResponsePolicy.body_format:type_name -> envoy.config.core.v3.SubstitutionFormatString
	3, // 2: envoy.extensions.http.custom_response.local_response_policy.v3.LocalResponsePolicy.status_code:type_name -> google.protobuf.UInt32Value
	4, // 3: envoy.extensions.http.custom_response.local_response_policy.v3.LocalResponsePolicy.response_headers_to_add:type_name -> envoy.config.core.v3.HeaderValueOption
	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_http_custom_response_local_response_policy_v3_local_response_policy_proto_init()
}
func file_envoy_extensions_http_custom_response_local_response_policy_v3_local_response_policy_proto_init() {
	if File_envoy_extensions_http_custom_response_local_response_policy_v3_local_response_policy_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_custom_response_local_response_policy_v3_local_response_policy_proto_rawDesc), len(file_envoy_extensions_http_custom_response_local_response_policy_v3_local_response_policy_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   1,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_envoy_extensions_http_custom_response_local_response_policy_v3_local_response_policy_proto_goTypes,
		DependencyIndexes: file_envoy_extensions_http_custom_response_local_response_policy_v3_local_response_policy_proto_depIdxs,
		MessageInfos:      file_envoy_extensions_http_custom_response_local_response_policy_v3_local_response_policy_proto_msgTypes,
	}.Build()
	File_envoy_extensions_http_custom_response_local_response_policy_v3_local_response_policy_proto = out.File
	file_envoy_extensions_http_custom_response_local_response_policy_v3_local_response_policy_proto_goTypes = nil
	file_envoy_extensions_http_custom_response_local_response_policy_v3_local_response_policy_proto_depIdxs = nil
}
