// Copyright IBM Corp. 2020, 2026
// SPDX-License-Identifier: BUSL-1.1

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.11
// 	protoc        (unknown)
// source: controller/storage/authtoken/store/v1/authtoken.proto

package store

import (
	timestamp "github.com/hashicorp/boundary/internal/db/timestamp"
	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 AuthToken struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// public_id is used to access the auth token via an API
	// @inject_tag: gorm:"primary_key"
	PublicId string `protobuf:"bytes,1,opt,name=public_id,json=publicId,proto3" json:"public_id,omitempty" gorm:"primary_key"`
	// create_time from the RDBMS
	// @inject_tag: `gorm:"default:current_timestamp"`
	CreateTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty" gorm:"default:current_timestamp"`
	// update_time from the RDBMS
	// @inject_tag: `gorm:"default:current_timestamp"`
	UpdateTime *timestamp.Timestamp `protobuf:"bytes,3,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty" gorm:"default:current_timestamp"`
	// last_access_time indicates the last time the auth token was used on the Boundary API.
	// @inject_tag: `gorm:"default:current_timestamp"`
	ApproximateLastAccessTime *timestamp.Timestamp `protobuf:"bytes,4,opt,name=approximate_last_access_time,json=approximateLastAccessTime,proto3" json:"approximate_last_access_time,omitempty" gorm:"default:current_timestamp"`
	// expiration_time indicates when this session will expire.
	// If null a default duration and create_time is used to calculate expiration.
	// @inject_tag: `gorm:"default:null"`
	ExpirationTime *timestamp.Timestamp `protobuf:"bytes,5,opt,name=expiration_time,json=expirationTime,proto3" json:"expiration_time,omitempty" gorm:"default:null"`
	// ciphertext token value stored in the database
	// @inject_tag: gorm:"column:token;not_null" wrapping:"ct,authtoken_token"
	CtToken []byte `protobuf:"bytes,6,opt,name=ct_token,json=ctToken,proto3" json:"ct_token,omitempty" gorm:"column:token;not_null" wrapping:"ct,authtoken_token"`
	// plain text version of the decrypted authtoken value
	// we are NOT storing this plain-text entry data in the db
	// token is the field stored and used by the client
	// @inject_tag: gorm:"-" wrapping:"pt,authtoken_token"
	Token string `protobuf:"bytes,7,opt,name=token,proto3" json:"token,omitempty" gorm:"-" wrapping:"pt,authtoken_token"`
	// auth_account_id is the public id for the auth account this auth token
	// was generated for.
	// @inject_tag: `gorm:"default:not_null"`
	AuthAccountId string `protobuf:"bytes,10,opt,name=auth_account_id,json=authAccountId,proto3" json:"auth_account_id,omitempty" gorm:"default:not_null"`
	// scope_id is not stored in the backing DB but it derived from the linked to auth account.
	// @inject_tag: gorm:"->"
	ScopeId string `protobuf:"bytes,11,opt,name=scope_id,json=scopeId,proto3" json:"scope_id,omitempty" gorm:"->"`
	// auth_method_id is not stored in the backing DB but it derived from the linked to auth account.
	// @inject_tag: gorm:"->"
	AuthMethodId string `protobuf:"bytes,12,opt,name=auth_method_id,json=authMethodId,proto3" json:"auth_method_id,omitempty" gorm:"->"`
	// iam_user_id is not stored in the backing DB but it derived from the linked to auth account.
	// @inject_tag: gorm:"->"
	IamUserId string `protobuf:"bytes,13,opt,name=iam_user_id,json=iamUserId,proto3" json:"iam_user_id,omitempty" gorm:"->"`
	// key_id is the key ID that was used for the encryption operation. It can be
	// used to identify a specific version of the key needed to decrypt the value,
	// which is useful for caching purposes.
	// @inject_tag: `gorm:"not_null"`
	KeyId string `protobuf:"bytes,14,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty" gorm:"not_null"`
	// status is the auth token's status. It will default of "token issued" in the
	// database.
	// @inject_tag: `gorm:"default:null"`
	Status        string `protobuf:"bytes,15,opt,name=status,proto3" json:"status,omitempty" gorm:"default:null"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*AuthToken) ProtoMessage() {}

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

func (x *AuthToken) GetPublicId() string {
	if x != nil {
		return x.PublicId
	}
	return ""
}

func (x *AuthToken) GetCreateTime() *timestamp.Timestamp {
	if x != nil {
		return x.CreateTime
	}
	return nil
}

func (x *AuthToken) GetUpdateTime() *timestamp.Timestamp {
	if x != nil {
		return x.UpdateTime
	}
	return nil
}

func (x *AuthToken) GetApproximateLastAccessTime() *timestamp.Timestamp {
	if x != nil {
		return x.ApproximateLastAccessTime
	}
	return nil
}

func (x *AuthToken) GetExpirationTime() *timestamp.Timestamp {
	if x != nil {
		return x.ExpirationTime
	}
	return nil
}

func (x *AuthToken) GetCtToken() []byte {
	if x != nil {
		return x.CtToken
	}
	return nil
}

func (x *AuthToken) GetToken() string {
	if x != nil {
		return x.Token
	}
	return ""
}

func (x *AuthToken) GetAuthAccountId() string {
	if x != nil {
		return x.AuthAccountId
	}
	return ""
}

func (x *AuthToken) GetScopeId() string {
	if x != nil {
		return x.ScopeId
	}
	return ""
}

func (x *AuthToken) GetAuthMethodId() string {
	if x != nil {
		return x.AuthMethodId
	}
	return ""
}

func (x *AuthToken) GetIamUserId() string {
	if x != nil {
		return x.IamUserId
	}
	return ""
}

func (x *AuthToken) GetKeyId() string {
	if x != nil {
		return x.KeyId
	}
	return ""
}

func (x *AuthToken) GetStatus() string {
	if x != nil {
		return x.Status
	}
	return ""
}

var File_controller_storage_authtoken_store_v1_authtoken_proto protoreflect.FileDescriptor

const file_controller_storage_authtoken_store_v1_authtoken_proto_rawDesc = "" +
	"\n" +
	"5controller/storage/authtoken/store/v1/authtoken.proto\x12%controller.storage.authtoken.store.v1\x1a/controller/storage/timestamp/v1/timestamp.proto\"\xed\x04\n" +
	"\tAuthToken\x12\x1b\n" +
	"\tpublic_id\x18\x01 \x01(\tR\bpublicId\x12K\n" +
	"\vcreate_time\x18\x02 \x01(\v2*.controller.storage.timestamp.v1.TimestampR\n" +
	"createTime\x12K\n" +
	"\vupdate_time\x18\x03 \x01(\v2*.controller.storage.timestamp.v1.TimestampR\n" +
	"updateTime\x12k\n" +
	"\x1capproximate_last_access_time\x18\x04 \x01(\v2*.controller.storage.timestamp.v1.TimestampR\x19approximateLastAccessTime\x12S\n" +
	"\x0fexpiration_time\x18\x05 \x01(\v2*.controller.storage.timestamp.v1.TimestampR\x0eexpirationTime\x12\x19\n" +
	"\bct_token\x18\x06 \x01(\fR\actToken\x12\x14\n" +
	"\x05token\x18\a \x01(\tR\x05token\x12&\n" +
	"\x0fauth_account_id\x18\n" +
	" \x01(\tR\rauthAccountId\x12\x19\n" +
	"\bscope_id\x18\v \x01(\tR\ascopeId\x12$\n" +
	"\x0eauth_method_id\x18\f \x01(\tR\fauthMethodId\x12\x1e\n" +
	"\viam_user_id\x18\r \x01(\tR\tiamUserId\x12\x15\n" +
	"\x06key_id\x18\x0e \x01(\tR\x05keyId\x12\x16\n" +
	"\x06status\x18\x0f \x01(\tR\x06statusB>Z<github.com/hashicorp/boundary/internal/authtoken/store;storeb\x06proto3"

var (
	file_controller_storage_authtoken_store_v1_authtoken_proto_rawDescOnce sync.Once
	file_controller_storage_authtoken_store_v1_authtoken_proto_rawDescData []byte
)

func file_controller_storage_authtoken_store_v1_authtoken_proto_rawDescGZIP() []byte {
	file_controller_storage_authtoken_store_v1_authtoken_proto_rawDescOnce.Do(func() {
		file_controller_storage_authtoken_store_v1_authtoken_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_controller_storage_authtoken_store_v1_authtoken_proto_rawDesc), len(file_controller_storage_authtoken_store_v1_authtoken_proto_rawDesc)))
	})
	return file_controller_storage_authtoken_store_v1_authtoken_proto_rawDescData
}

var file_controller_storage_authtoken_store_v1_authtoken_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_controller_storage_authtoken_store_v1_authtoken_proto_goTypes = []any{
	(*AuthToken)(nil),           // 0: controller.storage.authtoken.store.v1.AuthToken
	(*timestamp.Timestamp)(nil), // 1: controller.storage.timestamp.v1.Timestamp
}
var file_controller_storage_authtoken_store_v1_authtoken_proto_depIdxs = []int32{
	1, // 0: controller.storage.authtoken.store.v1.AuthToken.create_time:type_name -> controller.storage.timestamp.v1.Timestamp
	1, // 1: controller.storage.authtoken.store.v1.AuthToken.update_time:type_name -> controller.storage.timestamp.v1.Timestamp
	1, // 2: controller.storage.authtoken.store.v1.AuthToken.approximate_last_access_time:type_name -> controller.storage.timestamp.v1.Timestamp
	1, // 3: controller.storage.authtoken.store.v1.AuthToken.expiration_time:type_name -> controller.storage.timestamp.v1.Timestamp
	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_controller_storage_authtoken_store_v1_authtoken_proto_init() }
func file_controller_storage_authtoken_store_v1_authtoken_proto_init() {
	if File_controller_storage_authtoken_store_v1_authtoken_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_controller_storage_authtoken_store_v1_authtoken_proto_rawDesc), len(file_controller_storage_authtoken_store_v1_authtoken_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   1,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_controller_storage_authtoken_store_v1_authtoken_proto_goTypes,
		DependencyIndexes: file_controller_storage_authtoken_store_v1_authtoken_proto_depIdxs,
		MessageInfos:      file_controller_storage_authtoken_store_v1_authtoken_proto_msgTypes,
	}.Build()
	File_controller_storage_authtoken_store_v1_authtoken_proto = out.File
	file_controller_storage_authtoken_store_v1_authtoken_proto_goTypes = nil
	file_controller_storage_authtoken_store_v1_authtoken_proto_depIdxs = nil
}
