// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.10
// 	protoc        (unknown)
// source: tars/tokens/v1/tokens.proto

package tokensv1

import (
	_ "github.com/tetrateio/agentrouter-go/genapi/api/tars/auth/v1"
	_ "google.golang.org/genproto/googleapis/api/annotations"
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	timestamppb "google.golang.org/protobuf/types/known/timestamppb"
	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)
)

// GetRevocationListRequest requests the revocation list.
type GetRevocationListRequest struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Optional: Only return revocations updated after this timestamp.
	// Used for incremental updates.
	Since *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=since,proto3,oneof" json:"since,omitempty"`
	// Optional: Maximum number of entries to return.
	// If not specified, returns all revoked tokens.
	Limit         *int32 `protobuf:"varint,2,opt,name=limit,proto3,oneof" json:"limit,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*GetRevocationListRequest) ProtoMessage() {}

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

func (x *GetRevocationListRequest) GetSince() *timestamppb.Timestamp {
	if x != nil {
		return x.Since
	}
	return nil
}

func (x *GetRevocationListRequest) GetLimit() int32 {
	if x != nil && x.Limit != nil {
		return *x.Limit
	}
	return 0
}

// GetRevocationListResponse contains the revocation list.
type GetRevocationListResponse struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// List of revoked token information.
	Revocations []*RevokedTokenInfo `protobuf:"bytes,1,rep,name=revocations,proto3" json:"revocations,omitempty"`
	// Timestamp of this revocation list snapshot.
	// Can be used for 'since' in next request for incremental updates.
	SnapshotAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=snapshot_at,json=snapshotAt,proto3" json:"snapshot_at,omitempty"`
	// Total number of revoked tokens (may be more than returned if limit was
	// set).
	TotalCount    int64 `protobuf:"varint,3,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*GetRevocationListResponse) ProtoMessage() {}

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

func (x *GetRevocationListResponse) GetRevocations() []*RevokedTokenInfo {
	if x != nil {
		return x.Revocations
	}
	return nil
}

func (x *GetRevocationListResponse) GetSnapshotAt() *timestamppb.Timestamp {
	if x != nil {
		return x.SnapshotAt
	}
	return nil
}

func (x *GetRevocationListResponse) GetTotalCount() int64 {
	if x != nil {
		return x.TotalCount
	}
	return 0
}

// RevokedTokenInfo contains information about a revoked token.
type RevokedTokenInfo struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// JWT ID (jti) of the revoked token.
	Jti string `protobuf:"bytes,1,opt,name=jti,proto3" json:"jti,omitempty"`
	// When the token was revoked.
	RevokedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=revoked_at,json=revokedAt,proto3" json:"revoked_at,omitempty"`
	// Optional: Reason for revocation.
	Reason        *string `protobuf:"bytes,3,opt,name=reason,proto3,oneof" json:"reason,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *RevokedTokenInfo) Reset() {
	*x = RevokedTokenInfo{}
	mi := &file_tars_tokens_v1_tokens_proto_msgTypes[2]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*RevokedTokenInfo) ProtoMessage() {}

func (x *RevokedTokenInfo) ProtoReflect() protoreflect.Message {
	mi := &file_tars_tokens_v1_tokens_proto_msgTypes[2]
	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 RevokedTokenInfo.ProtoReflect.Descriptor instead.
func (*RevokedTokenInfo) Descriptor() ([]byte, []int) {
	return file_tars_tokens_v1_tokens_proto_rawDescGZIP(), []int{2}
}

func (x *RevokedTokenInfo) GetJti() string {
	if x != nil {
		return x.Jti
	}
	return ""
}

func (x *RevokedTokenInfo) GetRevokedAt() *timestamppb.Timestamp {
	if x != nil {
		return x.RevokedAt
	}
	return nil
}

func (x *RevokedTokenInfo) GetReason() string {
	if x != nil && x.Reason != nil {
		return *x.Reason
	}
	return ""
}

// UpdateLastUsedRequest updates the last used timestamp for a token.
type UpdateLastUsedRequest struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// JWT ID (jti) of the token.
	Jti string `protobuf:"bytes,1,opt,name=jti,proto3" json:"jti,omitempty"`
	// Timestamp when the token was used.
	// If not provided, server will use current time.
	UsedAt        *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=used_at,json=usedAt,proto3,oneof" json:"used_at,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *UpdateLastUsedRequest) Reset() {
	*x = UpdateLastUsedRequest{}
	mi := &file_tars_tokens_v1_tokens_proto_msgTypes[3]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*UpdateLastUsedRequest) ProtoMessage() {}

func (x *UpdateLastUsedRequest) ProtoReflect() protoreflect.Message {
	mi := &file_tars_tokens_v1_tokens_proto_msgTypes[3]
	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 UpdateLastUsedRequest.ProtoReflect.Descriptor instead.
func (*UpdateLastUsedRequest) Descriptor() ([]byte, []int) {
	return file_tars_tokens_v1_tokens_proto_rawDescGZIP(), []int{3}
}

func (x *UpdateLastUsedRequest) GetJti() string {
	if x != nil {
		return x.Jti
	}
	return ""
}

func (x *UpdateLastUsedRequest) GetUsedAt() *timestamppb.Timestamp {
	if x != nil {
		return x.UsedAt
	}
	return nil
}

// UpdateLastUsedResponse confirms the update.
type UpdateLastUsedResponse struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Whether the update was successful.
	Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	// The timestamp that was recorded.
	RecordedAt    *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=recorded_at,json=recordedAt,proto3" json:"recorded_at,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *UpdateLastUsedResponse) Reset() {
	*x = UpdateLastUsedResponse{}
	mi := &file_tars_tokens_v1_tokens_proto_msgTypes[4]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*UpdateLastUsedResponse) ProtoMessage() {}

func (x *UpdateLastUsedResponse) ProtoReflect() protoreflect.Message {
	mi := &file_tars_tokens_v1_tokens_proto_msgTypes[4]
	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 UpdateLastUsedResponse.ProtoReflect.Descriptor instead.
func (*UpdateLastUsedResponse) Descriptor() ([]byte, []int) {
	return file_tars_tokens_v1_tokens_proto_rawDescGZIP(), []int{4}
}

func (x *UpdateLastUsedResponse) GetSuccess() bool {
	if x != nil {
		return x.Success
	}
	return false
}

func (x *UpdateLastUsedResponse) GetRecordedAt() *timestamppb.Timestamp {
	if x != nil {
		return x.RecordedAt
	}
	return nil
}

var File_tars_tokens_v1_tokens_proto protoreflect.FileDescriptor

const file_tars_tokens_v1_tokens_proto_rawDesc = "" +
	"\n" +
	"\x1btars/tokens/v1/tokens.proto\x12\x0etars.tokens.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1ftars/auth/v1/auth_options.proto\"\x80\x01\n" +
	"\x18GetRevocationListRequest\x125\n" +
	"\x05since\x18\x01 \x01(\v2\x1a.google.protobuf.TimestampH\x00R\x05since\x88\x01\x01\x12\x19\n" +
	"\x05limit\x18\x02 \x01(\x05H\x01R\x05limit\x88\x01\x01B\b\n" +
	"\x06_sinceB\b\n" +
	"\x06_limit\"\xbd\x01\n" +
	"\x19GetRevocationListResponse\x12B\n" +
	"\vrevocations\x18\x01 \x03(\v2 .tars.tokens.v1.RevokedTokenInfoR\vrevocations\x12;\n" +
	"\vsnapshot_at\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\n" +
	"snapshotAt\x12\x1f\n" +
	"\vtotal_count\x18\x03 \x01(\x03R\n" +
	"totalCount\"\x87\x01\n" +
	"\x10RevokedTokenInfo\x12\x10\n" +
	"\x03jti\x18\x01 \x01(\tR\x03jti\x129\n" +
	"\n" +
	"revoked_at\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\trevokedAt\x12\x1b\n" +
	"\x06reason\x18\x03 \x01(\tH\x00R\x06reason\x88\x01\x01B\t\n" +
	"\a_reason\"o\n" +
	"\x15UpdateLastUsedRequest\x12\x10\n" +
	"\x03jti\x18\x01 \x01(\tR\x03jti\x128\n" +
	"\aused_at\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampH\x00R\x06usedAt\x88\x01\x01B\n" +
	"\n" +
	"\b_used_at\"o\n" +
	"\x16UpdateLastUsedResponse\x12\x18\n" +
	"\asuccess\x18\x01 \x01(\bR\asuccess\x12;\n" +
	"\vrecorded_at\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\n" +
	"recordedAt2\xbc\x02\n" +
	"\rTokensService\x12\x9d\x01\n" +
	"\x11GetRevocationList\x12(.tars.tokens.v1.GetRevocationListRequest\x1a).tars.tokens.v1.GetRevocationListResponse\"3\x8a\xb5\x18\x11\n" +
	"\x02\x02\x01\x12\x04read\x12\x05admin\x82\xd3\xe4\x93\x02\x18\x12\x16/v1/tokens/revocations\x12\x8a\x01\n" +
	"\x0eUpdateLastUsed\x12%.tars.tokens.v1.UpdateLastUsedRequest\x1a&.tars.tokens.v1.UpdateLastUsedResponse\")\x8a\xb5\x18\n" +
	"\n" +
	"\x01\x02\x12\x05write\x82\xd3\xe4\x93\x02\x15:\x01*\"\x10/v1/tokens/usageB\xb4\x01\n" +
	"\x12com.tars.tokens.v1B\vTokensProtoP\x01Z7github.com/tetrateio/fraser/api/tars/tokens/v1;tokensv1\xa2\x02\x03TTX\xaa\x02\x0eTars.Tokens.V1\xca\x02\x0eTars\\Tokens\\V1\xe2\x02\x1aTars\\Tokens\\V1\\GPBMetadata\xea\x02\x10Tars::Tokens::V1b\x06proto3"

var (
	file_tars_tokens_v1_tokens_proto_rawDescOnce sync.Once
	file_tars_tokens_v1_tokens_proto_rawDescData []byte
)

func file_tars_tokens_v1_tokens_proto_rawDescGZIP() []byte {
	file_tars_tokens_v1_tokens_proto_rawDescOnce.Do(func() {
		file_tars_tokens_v1_tokens_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_tars_tokens_v1_tokens_proto_rawDesc), len(file_tars_tokens_v1_tokens_proto_rawDesc)))
	})
	return file_tars_tokens_v1_tokens_proto_rawDescData
}

var file_tars_tokens_v1_tokens_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_tars_tokens_v1_tokens_proto_goTypes = []any{
	(*GetRevocationListRequest)(nil),  // 0: tars.tokens.v1.GetRevocationListRequest
	(*GetRevocationListResponse)(nil), // 1: tars.tokens.v1.GetRevocationListResponse
	(*RevokedTokenInfo)(nil),          // 2: tars.tokens.v1.RevokedTokenInfo
	(*UpdateLastUsedRequest)(nil),     // 3: tars.tokens.v1.UpdateLastUsedRequest
	(*UpdateLastUsedResponse)(nil),    // 4: tars.tokens.v1.UpdateLastUsedResponse
	(*timestamppb.Timestamp)(nil),     // 5: google.protobuf.Timestamp
}
var file_tars_tokens_v1_tokens_proto_depIdxs = []int32{
	5, // 0: tars.tokens.v1.GetRevocationListRequest.since:type_name -> google.protobuf.Timestamp
	2, // 1: tars.tokens.v1.GetRevocationListResponse.revocations:type_name -> tars.tokens.v1.RevokedTokenInfo
	5, // 2: tars.tokens.v1.GetRevocationListResponse.snapshot_at:type_name -> google.protobuf.Timestamp
	5, // 3: tars.tokens.v1.RevokedTokenInfo.revoked_at:type_name -> google.protobuf.Timestamp
	5, // 4: tars.tokens.v1.UpdateLastUsedRequest.used_at:type_name -> google.protobuf.Timestamp
	5, // 5: tars.tokens.v1.UpdateLastUsedResponse.recorded_at:type_name -> google.protobuf.Timestamp
	0, // 6: tars.tokens.v1.TokensService.GetRevocationList:input_type -> tars.tokens.v1.GetRevocationListRequest
	3, // 7: tars.tokens.v1.TokensService.UpdateLastUsed:input_type -> tars.tokens.v1.UpdateLastUsedRequest
	1, // 8: tars.tokens.v1.TokensService.GetRevocationList:output_type -> tars.tokens.v1.GetRevocationListResponse
	4, // 9: tars.tokens.v1.TokensService.UpdateLastUsed:output_type -> tars.tokens.v1.UpdateLastUsedResponse
	8, // [8:10] is the sub-list for method output_type
	6, // [6:8] is the sub-list for method input_type
	6, // [6:6] is the sub-list for extension type_name
	6, // [6:6] is the sub-list for extension extendee
	0, // [0:6] is the sub-list for field type_name
}

func init() { file_tars_tokens_v1_tokens_proto_init() }
func file_tars_tokens_v1_tokens_proto_init() {
	if File_tars_tokens_v1_tokens_proto != nil {
		return
	}
	file_tars_tokens_v1_tokens_proto_msgTypes[0].OneofWrappers = []any{}
	file_tars_tokens_v1_tokens_proto_msgTypes[2].OneofWrappers = []any{}
	file_tars_tokens_v1_tokens_proto_msgTypes[3].OneofWrappers = []any{}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_tars_tokens_v1_tokens_proto_rawDesc), len(file_tars_tokens_v1_tokens_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   5,
			NumExtensions: 0,
			NumServices:   1,
		},
		GoTypes:           file_tars_tokens_v1_tokens_proto_goTypes,
		DependencyIndexes: file_tars_tokens_v1_tokens_proto_depIdxs,
		MessageInfos:      file_tars_tokens_v1_tokens_proto_msgTypes,
	}.Build()
	File_tars_tokens_v1_tokens_proto = out.File
	file_tars_tokens_v1_tokens_proto_goTypes = nil
	file_tars_tokens_v1_tokens_proto_depIdxs = nil
}
