| 1 | // @generated by protoc-gen-es v1.10.0 with parameter "target=ts,import_extension=none" |
| 2 | // @generated from file types/v1/account_token.proto (package types.v1, syntax proto3) |
| 3 | /* eslint-disable */ |
| 4 | // @ts-nocheck |
| 5 | |
| 6 | import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; |
| 7 | import { Message, proto3, protoInt64, Timestamp } from "@bufbuild/protobuf"; |
| 8 | |
| 9 | /** |
| 10 | * @generated from enum types.v1.AccountRole |
| 11 | */ |
| 12 | export enum AccountRole { |
| 13 | /** |
| 14 | * @generated from enum value: AccountRole_Invalid = 0; |
| 15 | */ |
| 16 | AccountRole_Invalid = 0, |
| 17 | |
| 18 | /** |
| 19 | * @generated from enum value: AccountRole_Ingestor = 1; |
| 20 | */ |
| 21 | AccountRole_Ingestor = 1, |
| 22 | } |
| 23 | // Retrieve enum metadata with: proto3.getEnumType(AccountRole) |
| 24 | proto3.util.setEnumType(AccountRole, "types.v1.AccountRole", [ |
| 25 | { no: 0, name: "AccountRole_Invalid" }, |
| 26 | { no: 1, name: "AccountRole_Ingestor" }, |
| 27 | ]); |
| 28 | |
| 29 | /** |
| 30 | * @generated from message types.v1.AccountToken |
| 31 | */ |
| 32 | export class AccountToken extends Message<AccountToken> { |
| 33 | /** |
| 34 | * @generated from field: int64 account_id = 1; |
| 35 | */ |
| 36 | accountId = protoInt64.zero; |
| 37 | |
| 38 | /** |
| 39 | * @generated from field: int64 token_id = 2; |
| 40 | */ |
| 41 | tokenId = protoInt64.zero; |
| 42 | |
| 43 | /** |
| 44 | * @generated from field: string token = 3; |
| 45 | */ |
| 46 | token = ""; |
| 47 | |
| 48 | /** |
| 49 | * @generated from field: repeated types.v1.AccountRole roles = 4; |
| 50 | */ |
| 51 | roles: AccountRole[] = []; |
| 52 | |
| 53 | /** |
| 54 | * @generated from field: google.protobuf.Timestamp expires_at = 5; |
| 55 | */ |
| 56 | expiresAt?: Timestamp; |
| 57 | |
| 58 | /** |
| 59 | * @generated from field: google.protobuf.Timestamp revoked_at = 6; |
| 60 | */ |
| 61 | revokedAt?: Timestamp; |
| 62 | |
| 63 | /** |
| 64 | * @generated from field: google.protobuf.Timestamp last_used_at = 7; |
| 65 | */ |
| 66 | lastUsedAt?: Timestamp; |
| 67 | |
| 68 | constructor(data?: PartialMessage<AccountToken>) { |
| 69 | super(); |
| 70 | proto3.util.initPartial(data, this); |
| 71 | } |
| 72 | |
| 73 | static readonly runtime: typeof proto3 = proto3; |
| 74 | static readonly typeName = "types.v1.AccountToken"; |
| 75 | static readonly fields: FieldList = proto3.util.newFieldList(() => [ |
| 76 | { no: 1, name: "account_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, |
| 77 | { no: 2, name: "token_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, |
| 78 | { no: 3, name: "token", kind: "scalar", T: 9 /* ScalarType.STRING */ }, |
| 79 | { no: 4, name: "roles", kind: "enum", T: proto3.getEnumType(AccountRole), repeated: true }, |
| 80 | { no: 5, name: "expires_at", kind: "message", T: Timestamp }, |
| 81 | { no: 6, name: "revoked_at", kind: "message", T: Timestamp }, |
| 82 | { no: 7, name: "last_used_at", kind: "message", T: Timestamp }, |
| 83 | ]); |
| 84 | |
| 85 | static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AccountToken { |
| 86 | return new AccountToken().fromBinary(bytes, options); |
| 87 | } |
| 88 | |
| 89 | static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AccountToken { |
| 90 | return new AccountToken().fromJson(jsonValue, options); |
| 91 | } |
| 92 | |
| 93 | static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AccountToken { |
| 94 | return new AccountToken().fromJsonString(jsonString, options); |
| 95 | } |
| 96 | |
| 97 | static equals(a: AccountToken | PlainMessage<AccountToken> | undefined, b: AccountToken | PlainMessage<AccountToken> | undefined): boolean { |
| 98 | return proto3.util.equals(AccountToken, a, b); |
| 99 | } |
| 100 | } |
| 101 |