// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.10
// 	protoc        v7.35.1
// source: envoy/type/http/v3/cookie.proto

package httpv3

import (
	_ "github.com/cncf/xds/go/udpa/annotations"
	_ "github.com/envoyproxy/protoc-gen-validate/validate"
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	durationpb "google.golang.org/protobuf/types/known/durationpb"
	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)
)

// Cookie defines an API for obtaining or generating HTTP cookie.
type Cookie struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The name that will be used to obtain cookie value from downstream HTTP request or generate
	// new cookie for downstream.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Duration of cookie. This will be used to set the expiry time of a new cookie when it is
	// generated. Set this to 0s to use a session cookie and disable cookie expiration.
	Ttl *durationpb.Duration `protobuf:"bytes,2,opt,name=ttl,proto3" json:"ttl,omitempty"`
	// Path of cookie. This will be used to set the path of a new cookie when it is generated.
	// If no path is specified here, no path will be set for the cookie.
	Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"`
	// Additional attributes for the cookie. They will be used when generating a new cookie.
	Attributes    []*CookieAttribute `protobuf:"bytes,4,rep,name=attributes,proto3" json:"attributes,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*Cookie) ProtoMessage() {}

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

func (x *Cookie) GetName() string {
	if x != nil {
		return x.Name
	}
	return ""
}

func (x *Cookie) GetTtl() *durationpb.Duration {
	if x != nil {
		return x.Ttl
	}
	return nil
}

func (x *Cookie) GetPath() string {
	if x != nil {
		return x.Path
	}
	return ""
}

func (x *Cookie) GetAttributes() []*CookieAttribute {
	if x != nil {
		return x.Attributes
	}
	return nil
}

// CookieAttribute defines an API for adding additional attributes for a HTTP cookie.
type CookieAttribute struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The name of the cookie attribute.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The optional value of the cookie attribute.
	Value         string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*CookieAttribute) ProtoMessage() {}

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

func (x *CookieAttribute) GetName() string {
	if x != nil {
		return x.Name
	}
	return ""
}

func (x *CookieAttribute) GetValue() string {
	if x != nil {
		return x.Value
	}
	return ""
}

var File_envoy_type_http_v3_cookie_proto protoreflect.FileDescriptor

const file_envoy_type_http_v3_cookie_proto_rawDesc = "" +
	"\n" +
	"\x1fenvoy/type/http/v3/cookie.proto\x12\x12envoy.type.http.v3\x1a\x1egoogle/protobuf/duration.proto\x1a\x1dudpa/annotations/status.proto\x1a\x17validate/validate.proto\"\xb5\x01\n" +
	"\x06Cookie\x12\x1b\n" +
	"\x04name\x18\x01 \x01(\tB\a\xfaB\x04r\x02\x10\x01R\x04name\x125\n" +
	"\x03ttl\x18\x02 \x01(\v2\x19.google.protobuf.DurationB\b\xfaB\x05\xaa\x01\x022\x00R\x03ttl\x12\x12\n" +
	"\x04path\x18\x03 \x01(\tR\x04path\x12C\n" +
	"\n" +
	"attributes\x18\x04 \x03(\v2#.envoy.type.http.v3.CookieAttributeR\n" +
	"attributes\"_\n" +
	"\x0fCookieAttribute\x12%\n" +
	"\x04name\x18\x01 \x01(\tB\x11\xfaB\x0er\f\x10\x01(\x80\x80\x01\xc8\x01\x00\xc0\x01\x01R\x04name\x12%\n" +
	"\x05value\x18\x02 \x01(\tB\x0f\xfaB\fr\n" +
	"(\x80\x80\x01\xc8\x01\x00\xc0\x01\x02R\x05valueB{\xba\x80\xc8\xd1\x06\x02\x10\x02\n" +
	" io.envoyproxy.envoy.type.http.v3B\vCookieProtoP\x01Z@github.com/envoyproxy/go-control-plane/envoy/type/http/v3;httpv3b\x06proto3"

var (
	file_envoy_type_http_v3_cookie_proto_rawDescOnce sync.Once
	file_envoy_type_http_v3_cookie_proto_rawDescData []byte
)

func file_envoy_type_http_v3_cookie_proto_rawDescGZIP() []byte {
	file_envoy_type_http_v3_cookie_proto_rawDescOnce.Do(func() {
		file_envoy_type_http_v3_cookie_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_envoy_type_http_v3_cookie_proto_rawDesc), len(file_envoy_type_http_v3_cookie_proto_rawDesc)))
	})
	return file_envoy_type_http_v3_cookie_proto_rawDescData
}

var file_envoy_type_http_v3_cookie_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_envoy_type_http_v3_cookie_proto_goTypes = []any{
	(*Cookie)(nil),              // 0: envoy.type.http.v3.Cookie
	(*CookieAttribute)(nil),     // 1: envoy.type.http.v3.CookieAttribute
	(*durationpb.Duration)(nil), // 2: google.protobuf.Duration
}
var file_envoy_type_http_v3_cookie_proto_depIdxs = []int32{
	2, // 0: envoy.type.http.v3.Cookie.ttl:type_name -> google.protobuf.Duration
	1, // 1: envoy.type.http.v3.Cookie.attributes:type_name -> envoy.type.http.v3.CookieAttribute
	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_type_http_v3_cookie_proto_init() }
func file_envoy_type_http_v3_cookie_proto_init() {
	if File_envoy_type_http_v3_cookie_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_envoy_type_http_v3_cookie_proto_rawDesc), len(file_envoy_type_http_v3_cookie_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   2,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_envoy_type_http_v3_cookie_proto_goTypes,
		DependencyIndexes: file_envoy_type_http_v3_cookie_proto_depIdxs,
		MessageInfos:      file_envoy_type_http_v3_cookie_proto_msgTypes,
	}.Build()
	File_envoy_type_http_v3_cookie_proto = out.File
	file_envoy_type_http_v3_cookie_proto_goTypes = nil
	file_envoy_type_http_v3_cookie_proto_depIdxs = nil
}
