// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.6
// 	protoc        v5.29.3
// source: spark_authn_internal.proto

package spark_authn_internal

import (
	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)
)

// Protected information about a session
type Session struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Protocol version
	Version int32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
	// When the session expires (UTC Unix seconds)
	ExpirationTimestamp int64 `protobuf:"varint,2,opt,name=expiration_timestamp,json=expirationTimestamp,proto3" json:"expiration_timestamp,omitempty"`
	// Random nonce for uniqueness
	Nonce []byte `protobuf:"bytes,3,opt,name=nonce,proto3" json:"nonce,omitempty"`
	// Public key this session is valid for
	PublicKey     []byte `protobuf:"bytes,4,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*Session) ProtoMessage() {}

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

func (x *Session) GetVersion() int32 {
	if x != nil {
		return x.Version
	}
	return 0
}

func (x *Session) GetExpirationTimestamp() int64 {
	if x != nil {
		return x.ExpirationTimestamp
	}
	return 0
}

func (x *Session) GetNonce() []byte {
	if x != nil {
		return x.Nonce
	}
	return nil
}

func (x *Session) GetPublicKey() []byte {
	if x != nil {
		return x.PublicKey
	}
	return nil
}

// ProtectedSession wraps Session with integrity protection
type ProtectedSession struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Version of the protection scheme
	Version int32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
	// The session data
	Session *Session `protobuf:"bytes,2,opt,name=session,proto3" json:"session,omitempty"`
	// HMAC of the session data
	Hmac          []byte `protobuf:"bytes,3,opt,name=hmac,proto3" json:"hmac,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*ProtectedSession) ProtoMessage() {}

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

func (x *ProtectedSession) GetVersion() int32 {
	if x != nil {
		return x.Version
	}
	return 0
}

func (x *ProtectedSession) GetSession() *Session {
	if x != nil {
		return x.Session
	}
	return nil
}

func (x *ProtectedSession) GetHmac() []byte {
	if x != nil {
		return x.Hmac
	}
	return nil
}

var File_spark_authn_internal_proto protoreflect.FileDescriptor

const file_spark_authn_internal_proto_rawDesc = "" +
	"\n" +
	"\x1aspark_authn_internal.proto\x12\vspark_authn\"\x8b\x01\n" +
	"\aSession\x12\x18\n" +
	"\aversion\x18\x01 \x01(\x05R\aversion\x121\n" +
	"\x14expiration_timestamp\x18\x02 \x01(\x03R\x13expirationTimestamp\x12\x14\n" +
	"\x05nonce\x18\x03 \x01(\fR\x05nonce\x12\x1d\n" +
	"\n" +
	"public_key\x18\x04 \x01(\fR\tpublicKey\"p\n" +
	"\x10ProtectedSession\x12\x18\n" +
	"\aversion\x18\x01 \x01(\x05R\aversion\x12.\n" +
	"\asession\x18\x02 \x01(\v2\x14.spark_authn.SessionR\asession\x12\x12\n" +
	"\x04hmac\x18\x03 \x01(\fR\x04hmacB;Z9github.com/lightsparkdev/spark/proto/spark_authn_internalb\x06proto3"

var (
	file_spark_authn_internal_proto_rawDescOnce sync.Once
	file_spark_authn_internal_proto_rawDescData []byte
)

func file_spark_authn_internal_proto_rawDescGZIP() []byte {
	file_spark_authn_internal_proto_rawDescOnce.Do(func() {
		file_spark_authn_internal_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_spark_authn_internal_proto_rawDesc), len(file_spark_authn_internal_proto_rawDesc)))
	})
	return file_spark_authn_internal_proto_rawDescData
}

var file_spark_authn_internal_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_spark_authn_internal_proto_goTypes = []any{
	(*Session)(nil),          // 0: spark_authn.Session
	(*ProtectedSession)(nil), // 1: spark_authn.ProtectedSession
}
var file_spark_authn_internal_proto_depIdxs = []int32{
	0, // 0: spark_authn.ProtectedSession.session:type_name -> spark_authn.Session
	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_spark_authn_internal_proto_init() }
func file_spark_authn_internal_proto_init() {
	if File_spark_authn_internal_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_spark_authn_internal_proto_rawDesc), len(file_spark_authn_internal_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   2,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_spark_authn_internal_proto_goTypes,
		DependencyIndexes: file_spark_authn_internal_proto_depIdxs,
		MessageInfos:      file_spark_authn_internal_proto_msgTypes,
	}.Build()
	File_spark_authn_internal_proto = out.File
	file_spark_authn_internal_proto_goTypes = nil
	file_spark_authn_internal_proto_depIdxs = nil
}
