Debian Codegraph @

js/svc/token/v1/service_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 svc/token/v1/service.proto (package svc.token.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 import { EnvironmentRole, EnvironmentToken } from "../../../types/v1/environment_token_pb";
9 import { Cursor } from "../../../types/v1/cursor_pb";
10
11 /**
12 * @generated from message svc.token.v1.GenerateEnvironmentTokenRequest
13 */
14 export class GenerateEnvironmentTokenRequest extends Message<GenerateEnvironmentTokenRequest> {
15 /**
16 * @generated from field: int64 environment_id = 1;
17 */
18 environmentId = protoInt64.zero;
19
20 /**
21 * @generated from field: google.protobuf.Timestamp expires_at = 2;
22 */
23 expiresAt?: Timestamp;
24
25 /**
26 * @generated from field: repeated types.v1.EnvironmentRole roles = 3;
27 */
28 roles: EnvironmentRole[] = [];
29
30 constructor(data?: PartialMessage<GenerateEnvironmentTokenRequest>) {
31 super();
32 proto3.util.initPartial(data, this);
33 }
34
35 static readonly runtime: typeof proto3 = proto3;
36 static readonly typeName = "svc.token.v1.GenerateEnvironmentTokenRequest";
37 static readonly fields: FieldList = proto3.util.newFieldList(() => [
38 { no: 1, name: "environment_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
39 { no: 2, name: "expires_at", kind: "message", T: Timestamp },
40 { no: 3, name: "roles", kind: "enum", T: proto3.getEnumType(EnvironmentRole), repeated: true },
41 ]);
42
43 static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GenerateEnvironmentTokenRequest {
44 return new GenerateEnvironmentTokenRequest().fromBinary(bytes, options);
45 }
46
47 static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GenerateEnvironmentTokenRequest {
48 return new GenerateEnvironmentTokenRequest().fromJson(jsonValue, options);
49 }
50
51 static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GenerateEnvironmentTokenRequest {
52 return new GenerateEnvironmentTokenRequest().fromJsonString(jsonString, options);
53 }
54
55 static equals(a: GenerateEnvironmentTokenRequest | PlainMessage<GenerateEnvironmentTokenRequest> | undefined, b: GenerateEnvironmentTokenRequest | PlainMessage<GenerateEnvironmentTokenRequest> | undefined): boolean {
56 return proto3.util.equals(GenerateEnvironmentTokenRequest, a, b);
57 }
58 }
59
60 /**
61 * @generated from message svc.token.v1.GenerateEnvironmentTokenResponse
62 */
63 export class GenerateEnvironmentTokenResponse extends Message<GenerateEnvironmentTokenResponse> {
64 /**
65 * @generated from field: types.v1.EnvironmentToken token = 1;
66 */
67 token?: EnvironmentToken;
68
69 constructor(data?: PartialMessage<GenerateEnvironmentTokenResponse>) {
70 super();
71 proto3.util.initPartial(data, this);
72 }
73
74 static readonly runtime: typeof proto3 = proto3;
75 static readonly typeName = "svc.token.v1.GenerateEnvironmentTokenResponse";
76 static readonly fields: FieldList = proto3.util.newFieldList(() => [
77 { no: 1, name: "token", kind: "message", T: EnvironmentToken },
78 ]);
79
80 static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GenerateEnvironmentTokenResponse {
81 return new GenerateEnvironmentTokenResponse().fromBinary(bytes, options);
82 }
83
84 static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GenerateEnvironmentTokenResponse {
85 return new GenerateEnvironmentTokenResponse().fromJson(jsonValue, options);
86 }
87
88 static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GenerateEnvironmentTokenResponse {
89 return new GenerateEnvironmentTokenResponse().fromJsonString(jsonString, options);
90 }
91
92 static equals(a: GenerateEnvironmentTokenResponse | PlainMessage<GenerateEnvironmentTokenResponse> | undefined, b: GenerateEnvironmentTokenResponse | PlainMessage<GenerateEnvironmentTokenResponse> | undefined): boolean {
93 return proto3.util.equals(GenerateEnvironmentTokenResponse, a, b);
94 }
95 }
96
97 /**
98 * @generated from message svc.token.v1.RevokeEnvironmentTokenRequest
99 */
100 export class RevokeEnvironmentTokenRequest extends Message<RevokeEnvironmentTokenRequest> {
101 /**
102 * @generated from field: int64 environment_id = 1;
103 */
104 environmentId = protoInt64.zero;
105
106 /**
107 * @generated from field: int64 token_id = 2;
108 */
109 tokenId = protoInt64.zero;
110
111 constructor(data?: PartialMessage<RevokeEnvironmentTokenRequest>) {
112 super();
113 proto3.util.initPartial(data, this);
114 }
115
116 static readonly runtime: typeof proto3 = proto3;
117 static readonly typeName = "svc.token.v1.RevokeEnvironmentTokenRequest";
118 static readonly fields: FieldList = proto3.util.newFieldList(() => [
119 { no: 1, name: "environment_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
120 { no: 2, name: "token_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
121 ]);
122
123 static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): RevokeEnvironmentTokenRequest {
124 return new RevokeEnvironmentTokenRequest().fromBinary(bytes, options);
125 }
126
127 static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): RevokeEnvironmentTokenRequest {
128 return new RevokeEnvironmentTokenRequest().fromJson(jsonValue, options);
129 }
130
131 static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): RevokeEnvironmentTokenRequest {
132 return new RevokeEnvironmentTokenRequest().fromJsonString(jsonString, options);
133 }
134
135 static equals(a: RevokeEnvironmentTokenRequest | PlainMessage<RevokeEnvironmentTokenRequest> | undefined, b: RevokeEnvironmentTokenRequest | PlainMessage<RevokeEnvironmentTokenRequest> | undefined): boolean {
136 return proto3.util.equals(RevokeEnvironmentTokenRequest, a, b);
137 }
138 }
139
140 /**
141 * @generated from message svc.token.v1.RevokeEnvironmentTokenResponse
142 */
143 export class RevokeEnvironmentTokenResponse extends Message<RevokeEnvironmentTokenResponse> {
144 constructor(data?: PartialMessage<RevokeEnvironmentTokenResponse>) {
145 super();
146 proto3.util.initPartial(data, this);
147 }
148
149 static readonly runtime: typeof proto3 = proto3;
150 static readonly typeName = "svc.token.v1.RevokeEnvironmentTokenResponse";
151 static readonly fields: FieldList = proto3.util.newFieldList(() => [
152 ]);
153
154 static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): RevokeEnvironmentTokenResponse {
155 return new RevokeEnvironmentTokenResponse().fromBinary(bytes, options);
156 }
157
158 static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): RevokeEnvironmentTokenResponse {
159 return new RevokeEnvironmentTokenResponse().fromJson(jsonValue, options);
160 }
161
162 static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): RevokeEnvironmentTokenResponse {
163 return new RevokeEnvironmentTokenResponse().fromJsonString(jsonString, options);
164 }
165
166 static equals(a: RevokeEnvironmentTokenResponse | PlainMessage<RevokeEnvironmentTokenResponse> | undefined, b: RevokeEnvironmentTokenResponse | PlainMessage<RevokeEnvironmentTokenResponse> | undefined): boolean {
167 return proto3.util.equals(RevokeEnvironmentTokenResponse, a, b);
168 }
169 }
170
171 /**
172 * @generated from message svc.token.v1.GetEnvironmentTokenRequest
173 */
174 export class GetEnvironmentTokenRequest extends Message<GetEnvironmentTokenRequest> {
175 /**
176 * @generated from field: int64 environment_id = 1;
177 */
178 environmentId = protoInt64.zero;
179
180 /**
181 * @generated from field: int64 token_id = 2;
182 */
183 tokenId = protoInt64.zero;
184
185 constructor(data?: PartialMessage<GetEnvironmentTokenRequest>) {
186 super();
187 proto3.util.initPartial(data, this);
188 }
189
190 static readonly runtime: typeof proto3 = proto3;
191 static readonly typeName = "svc.token.v1.GetEnvironmentTokenRequest";
192 static readonly fields: FieldList = proto3.util.newFieldList(() => [
193 { no: 1, name: "environment_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
194 { no: 2, name: "token_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
195 ]);
196
197 static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetEnvironmentTokenRequest {
198 return new GetEnvironmentTokenRequest().fromBinary(bytes, options);
199 }
200
201 static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetEnvironmentTokenRequest {
202 return new GetEnvironmentTokenRequest().fromJson(jsonValue, options);
203 }
204
205 static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetEnvironmentTokenRequest {
206 return new GetEnvironmentTokenRequest().fromJsonString(jsonString, options);
207 }
208
209 static equals(a: GetEnvironmentTokenRequest | PlainMessage<GetEnvironmentTokenRequest> | undefined, b: GetEnvironmentTokenRequest | PlainMessage<GetEnvironmentTokenRequest> | undefined): boolean {
210 return proto3.util.equals(GetEnvironmentTokenRequest, a, b);
211 }
212 }
213
214 /**
215 * @generated from message svc.token.v1.GetEnvironmentTokenResponse
216 */
217 export class GetEnvironmentTokenResponse extends Message<GetEnvironmentTokenResponse> {
218 /**
219 * @generated from field: types.v1.EnvironmentToken token = 1;
220 */
221 token?: EnvironmentToken;
222
223 constructor(data?: PartialMessage<GetEnvironmentTokenResponse>) {
224 super();
225 proto3.util.initPartial(data, this);
226 }
227
228 static readonly runtime: typeof proto3 = proto3;
229 static readonly typeName = "svc.token.v1.GetEnvironmentTokenResponse";
230 static readonly fields: FieldList = proto3.util.newFieldList(() => [
231 { no: 1, name: "token", kind: "message", T: EnvironmentToken },
232 ]);
233
234 static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetEnvironmentTokenResponse {
235 return new GetEnvironmentTokenResponse().fromBinary(bytes, options);
236 }
237
238 static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetEnvironmentTokenResponse {
239 return new GetEnvironmentTokenResponse().fromJson(jsonValue, options);
240 }
241
242 static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetEnvironmentTokenResponse {
243 return new GetEnvironmentTokenResponse().fromJsonString(jsonString, options);
244 }
245
246 static equals(a: GetEnvironmentTokenResponse | PlainMessage<GetEnvironmentTokenResponse> | undefined, b: GetEnvironmentTokenResponse | PlainMessage<GetEnvironmentTokenResponse> | undefined): boolean {
247 return proto3.util.equals(GetEnvironmentTokenResponse, a, b);
248 }
249 }
250
251 /**
252 * @generated from message svc.token.v1.ListEnvironmentTokenRequest
253 */
254 export class ListEnvironmentTokenRequest extends Message<ListEnvironmentTokenRequest> {
255 /**
256 * @generated from field: types.v1.Cursor cursor = 1;
257 */
258 cursor?: Cursor;
259
260 /**
261 * @generated from field: int32 limit = 2;
262 */
263 limit = 0;
264
265 /**
266 * @generated from field: int64 environment_id = 3;
267 */
268 environmentId = protoInt64.zero;
269
270 constructor(data?: PartialMessage<ListEnvironmentTokenRequest>) {
271 super();
272 proto3.util.initPartial(data, this);
273 }
274
275 static readonly runtime: typeof proto3 = proto3;
276 static readonly typeName = "svc.token.v1.ListEnvironmentTokenRequest";
277 static readonly fields: FieldList = proto3.util.newFieldList(() => [
278 { no: 1, name: "cursor", kind: "message", T: Cursor },
279 { no: 2, name: "limit", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
280 { no: 3, name: "environment_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
281 ]);
282
283 static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListEnvironmentTokenRequest {
284 return new ListEnvironmentTokenRequest().fromBinary(bytes, options);
285 }
286
287 static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListEnvironmentTokenRequest {
288 return new ListEnvironmentTokenRequest().fromJson(jsonValue, options);
289 }
290
291 static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListEnvironmentTokenRequest {
292 return new ListEnvironmentTokenRequest().fromJsonString(jsonString, options);
293 }
294
295 static equals(a: ListEnvironmentTokenRequest | PlainMessage<ListEnvironmentTokenRequest> | undefined, b: ListEnvironmentTokenRequest | PlainMessage<ListEnvironmentTokenRequest> | undefined): boolean {
296 return proto3.util.equals(ListEnvironmentTokenRequest, a, b);
297 }
298 }
299
300 /**
301 * @generated from message svc.token.v1.ListEnvironmentTokenResponse
302 */
303 export class ListEnvironmentTokenResponse extends Message<ListEnvironmentTokenResponse> {
304 /**
305 * @generated from field: types.v1.Cursor next = 1;
306 */
307 next?: Cursor;
308
309 /**
310 * @generated from field: repeated svc.token.v1.ListEnvironmentTokenResponse.ListItem items = 2;
311 */
312 items: ListEnvironmentTokenResponse_ListItem[] = [];
313
314 constructor(data?: PartialMessage<ListEnvironmentTokenResponse>) {
315 super();
316 proto3.util.initPartial(data, this);
317 }
318
319 static readonly runtime: typeof proto3 = proto3;
320 static readonly typeName = "svc.token.v1.ListEnvironmentTokenResponse";
321 static readonly fields: FieldList = proto3.util.newFieldList(() => [
322 { no: 1, name: "next", kind: "message", T: Cursor },
323 { no: 2, name: "items", kind: "message", T: ListEnvironmentTokenResponse_ListItem, repeated: true },
324 ]);
325
326 static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListEnvironmentTokenResponse {
327 return new ListEnvironmentTokenResponse().fromBinary(bytes, options);
328 }
329
330 static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListEnvironmentTokenResponse {
331 return new ListEnvironmentTokenResponse().fromJson(jsonValue, options);
332 }
333
334 static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListEnvironmentTokenResponse {
335 return new ListEnvironmentTokenResponse().fromJsonString(jsonString, options);
336 }
337
338 static equals(a: ListEnvironmentTokenResponse | PlainMessage<ListEnvironmentTokenResponse> | undefined, b: ListEnvironmentTokenResponse | PlainMessage<ListEnvironmentTokenResponse> | undefined): boolean {
339 return proto3.util.equals(ListEnvironmentTokenResponse, a, b);
340 }
341 }
342
343 /**
344 * @generated from message svc.token.v1.ListEnvironmentTokenResponse.ListItem
345 */
346 export class ListEnvironmentTokenResponse_ListItem extends Message<ListEnvironmentTokenResponse_ListItem> {
347 /**
348 * @generated from field: types.v1.EnvironmentToken token = 1;
349 */
350 token?: EnvironmentToken;
351
352 constructor(data?: PartialMessage<ListEnvironmentTokenResponse_ListItem>) {
353 super();
354 proto3.util.initPartial(data, this);
355 }
356
357 static readonly runtime: typeof proto3 = proto3;
358 static readonly typeName = "svc.token.v1.ListEnvironmentTokenResponse.ListItem";
359 static readonly fields: FieldList = proto3.util.newFieldList(() => [
360 { no: 1, name: "token", kind: "message", T: EnvironmentToken },
361 ]);
362
363 static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListEnvironmentTokenResponse_ListItem {
364 return new ListEnvironmentTokenResponse_ListItem().fromBinary(bytes, options);
365 }
366
367 static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListEnvironmentTokenResponse_ListItem {
368 return new ListEnvironmentTokenResponse_ListItem().fromJson(jsonValue, options);
369 }
370
371 static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListEnvironmentTokenResponse_ListItem {
372 return new ListEnvironmentTokenResponse_ListItem().fromJsonString(jsonString, options);
373 }
374
375 static equals(a: ListEnvironmentTokenResponse_ListItem | PlainMessage<ListEnvironmentTokenResponse_ListItem> | undefined, b: ListEnvironmentTokenResponse_ListItem | PlainMessage<ListEnvironmentTokenResponse_ListItem> | undefined): boolean {
376 return proto3.util.equals(ListEnvironmentTokenResponse_ListItem, a, b);
377 }
378 }
379