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

package genericv3

import (
	_ "github.com/cncf/xds/go/udpa/annotations"
	v3 "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/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)
)

// Generic extension can be used to inject HTTP Basic Auth, Bearer Token, or any arbitrary credential
// into the proxied requests.
// The credential will be injected into the specified HTTP request header.
// Refer to [RFC 6750: The OAuth 2.0 Authorization Framework: Bearer Token Usage](https://www.rfc-editor.org/rfc/rfc6750) for details.
type Generic struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The SDS configuration for the credential that will be injected to the specified HTTP request header.
	// It must be a generic secret.
	Credential *v3.SdsSecretConfig `protobuf:"bytes,1,opt,name=credential,proto3" json:"credential,omitempty"`
	// The header that will be injected to the HTTP request with the provided credential.
	// If not set, filter will default to: “Authorization“
	Header string `protobuf:"bytes,2,opt,name=header,proto3" json:"header,omitempty"`
	// The prefix to prepend to the credential value before injecting it into the header.
	// This is useful for adding a scheme such as “Bearer “ or “Basic “ to the credential.
	// For example, if the credential is “xyz123“ and the prefix is “Bearer “, the
	// final header value will be “Bearer xyz123“.
	// If not set, the raw credential value will be injected without any prefix.
	HeaderValuePrefix string `protobuf:"bytes,3,opt,name=header_value_prefix,json=headerValuePrefix,proto3" json:"header_value_prefix,omitempty"`
	unknownFields     protoimpl.UnknownFields
	sizeCache         protoimpl.SizeCache
}

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

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

func (*Generic) ProtoMessage() {}

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

func (x *Generic) GetCredential() *v3.SdsSecretConfig {
	if x != nil {
		return x.Credential
	}
	return nil
}

func (x *Generic) GetHeader() string {
	if x != nil {
		return x.Header
	}
	return ""
}

func (x *Generic) GetHeaderValuePrefix() string {
	if x != nil {
		return x.HeaderValuePrefix
	}
	return ""
}

var File_envoy_extensions_http_injected_credentials_generic_v3_generic_proto protoreflect.FileDescriptor

const file_envoy_extensions_http_injected_credentials_generic_v3_generic_proto_rawDesc = "" +
	"\n" +
	"Cenvoy/extensions/http/injected_credentials/generic/v3/generic.proto\x125envoy.extensions.http.injected_credentials.generic.v3\x1a6envoy/extensions/transport_sockets/tls/v3/secret.proto\x1a\x1dudpa/annotations/status.proto\x1a\x17validate/validate.proto\"\xc4\x01\n" +
	"\aGeneric\x12d\n" +
	"\n" +
	"credential\x18\x01 \x01(\v2:.envoy.extensions.transport_sockets.tls.v3.SdsSecretConfigB\b\xfaB\x05\x8a\x01\x02\x10\x01R\n" +
	"credential\x12#\n" +
	"\x06header\x18\x02 \x01(\tB\v\xfaB\br\x06\xd0\x01\x01\xc0\x01\x01R\x06header\x12.\n" +
	"\x13header_value_prefix\x18\x03 \x01(\tR\x11headerValuePrefixB\xc5\x01\xba\x80\xc8\xd1\x06\x02\x10\x02\n" +
	"Cio.envoyproxy.envoy.extensions.http.injected_credentials.generic.v3B\fGenericProtoP\x01Zfgithub.com/envoyproxy/go-control-plane/envoy/extensions/http/injected_credentials/generic/v3;genericv3b\x06proto3"

var (
	file_envoy_extensions_http_injected_credentials_generic_v3_generic_proto_rawDescOnce sync.Once
	file_envoy_extensions_http_injected_credentials_generic_v3_generic_proto_rawDescData []byte
)

func file_envoy_extensions_http_injected_credentials_generic_v3_generic_proto_rawDescGZIP() []byte {
	file_envoy_extensions_http_injected_credentials_generic_v3_generic_proto_rawDescOnce.Do(func() {
		file_envoy_extensions_http_injected_credentials_generic_v3_generic_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_envoy_extensions_http_injected_credentials_generic_v3_generic_proto_rawDesc), len(file_envoy_extensions_http_injected_credentials_generic_v3_generic_proto_rawDesc)))
	})
	return file_envoy_extensions_http_injected_credentials_generic_v3_generic_proto_rawDescData
}

var file_envoy_extensions_http_injected_credentials_generic_v3_generic_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_envoy_extensions_http_injected_credentials_generic_v3_generic_proto_goTypes = []any{
	(*Generic)(nil),            // 0: envoy.extensions.http.injected_credentials.generic.v3.Generic
	(*v3.SdsSecretConfig)(nil), // 1: envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig
}
var file_envoy_extensions_http_injected_credentials_generic_v3_generic_proto_depIdxs = []int32{
	1, // 0: envoy.extensions.http.injected_credentials.generic.v3.Generic.credential:type_name -> envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig
	1, // [1:1] is the sub-list for method output_type
	1, // [1:1] is the sub-list for method input_type
	1, // [1:1] is the sub-list for extension type_name
	1, // [1:1] is the sub-list for extension extendee
	0, // [0:1] is the sub-list for field type_name
}

func init() { file_envoy_extensions_http_injected_credentials_generic_v3_generic_proto_init() }
func file_envoy_extensions_http_injected_credentials_generic_v3_generic_proto_init() {
	if File_envoy_extensions_http_injected_credentials_generic_v3_generic_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_injected_credentials_generic_v3_generic_proto_rawDesc), len(file_envoy_extensions_http_injected_credentials_generic_v3_generic_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   1,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_envoy_extensions_http_injected_credentials_generic_v3_generic_proto_goTypes,
		DependencyIndexes: file_envoy_extensions_http_injected_credentials_generic_v3_generic_proto_depIdxs,
		MessageInfos:      file_envoy_extensions_http_injected_credentials_generic_v3_generic_proto_msgTypes,
	}.Build()
	File_envoy_extensions_http_injected_credentials_generic_v3_generic_proto = out.File
	file_envoy_extensions_http_injected_credentials_generic_v3_generic_proto_goTypes = nil
	file_envoy_extensions_http_injected_credentials_generic_v3_generic_proto_depIdxs = nil
}
