Debian Codegraph @

js/types/v1/environment_token_pb.ts

raw symbols SCIP
1 // @generated by protoc-gen-es v1.10.0 with parameter "target=ts,import_extension=none"
2 // @generated from file types/v1/environment_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.EnvironmentRole
11 */
12 export enum EnvironmentRole {
13 /**
14 * @generated from enum value: EnvironmentRole_Invalid = 0;
15 */
16 EnvironmentRole_Invalid = 0,
17
18 /**
19 * @generated from enum value: EnvironmentRole_Ingestor = 1;
20 */
21 EnvironmentRole_Ingestor = 1,
22 }
23 // Retrieve enum metadata with: proto3.getEnumType(EnvironmentRole)
24 proto3.util.setEnumType(EnvironmentRole, "types.v1.EnvironmentRole", [
25 { no: 0, name: "EnvironmentRole_Invalid" },
26 { no: 1, name: "EnvironmentRole_Ingestor" },
27 ]);
28
29 /**
30 * @generated from message types.v1.EnvironmentToken
31 */
32 export class EnvironmentToken extends Message<EnvironmentToken> {
33 /**
34 * @generated from field: int64 environment_id = 1;
35 */
36 environmentId = 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.EnvironmentRole roles = 4;
50 */
51 roles: EnvironmentRole[] = [];
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<EnvironmentToken>) {
69 super();
70 proto3.util.initPartial(data, this);
71 }
72
73 static readonly runtime: typeof proto3 = proto3;
74 static readonly typeName = "types.v1.EnvironmentToken";
75 static readonly fields: FieldList = proto3.util.newFieldList(() => [
76 { no: 1, name: "environment_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(EnvironmentRole), 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>): EnvironmentToken {
86 return new EnvironmentToken().fromBinary(bytes, options);
87 }
88
89 static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): EnvironmentToken {
90 return new EnvironmentToken().fromJson(jsonValue, options);
91 }
92
93 static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): EnvironmentToken {
94 return new EnvironmentToken().fromJsonString(jsonString, options);
95 }
96
97 static equals(a: EnvironmentToken | PlainMessage<EnvironmentToken> | undefined, b: EnvironmentToken | PlainMessage<EnvironmentToken> | undefined): boolean {
98 return proto3.util.equals(EnvironmentToken, a, b);
99 }
100 }
101