-
Notifications
You must be signed in to change notification settings - Fork 55
/
token_pb.ts
399 lines (327 loc) · 14.2 KB
/
token_pb.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
// Copyright 2021-2024 Buf Technologies, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// @generated by protoc-gen-es v1.8.0 with parameter "ts_nocheck=false,target=ts"
// @generated from file buf/alpha/registry/v1alpha1/token.proto (package buf.alpha.registry.v1alpha1, syntax proto3)
/* eslint-disable */
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3, Timestamp } from "@bufbuild/protobuf";
/**
* @generated from message buf.alpha.registry.v1alpha1.Token
*/
export class Token extends Message<Token> {
/**
* @generated from field: string id = 1;
*/
id = "";
/**
* @generated from field: google.protobuf.Timestamp create_time = 2;
*/
createTime?: Timestamp;
/**
* @generated from field: google.protobuf.Timestamp expire_time = 3;
*/
expireTime?: Timestamp;
/**
* @generated from field: string note = 4;
*/
note = "";
constructor(data?: PartialMessage<Token>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "buf.alpha.registry.v1alpha1.Token";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "create_time", kind: "message", T: Timestamp },
{ no: 3, name: "expire_time", kind: "message", T: Timestamp },
{ no: 4, name: "note", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Token {
return new Token().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Token {
return new Token().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Token {
return new Token().fromJsonString(jsonString, options);
}
static equals(a: Token | PlainMessage<Token> | undefined, b: Token | PlainMessage<Token> | undefined): boolean {
return proto3.util.equals(Token, a, b);
}
}
/**
* @generated from message buf.alpha.registry.v1alpha1.CreateTokenRequest
*/
export class CreateTokenRequest extends Message<CreateTokenRequest> {
/**
* @generated from field: string note = 1;
*/
note = "";
/**
* The time until which the token should be valid.
* Must be in the future. May be null for no expiry.
*
* @generated from field: google.protobuf.Timestamp expire_time = 2;
*/
expireTime?: Timestamp;
constructor(data?: PartialMessage<CreateTokenRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "buf.alpha.registry.v1alpha1.CreateTokenRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "note", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "expire_time", kind: "message", T: Timestamp },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CreateTokenRequest {
return new CreateTokenRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CreateTokenRequest {
return new CreateTokenRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CreateTokenRequest {
return new CreateTokenRequest().fromJsonString(jsonString, options);
}
static equals(a: CreateTokenRequest | PlainMessage<CreateTokenRequest> | undefined, b: CreateTokenRequest | PlainMessage<CreateTokenRequest> | undefined): boolean {
return proto3.util.equals(CreateTokenRequest, a, b);
}
}
/**
* @generated from message buf.alpha.registry.v1alpha1.CreateTokenResponse
*/
export class CreateTokenResponse extends Message<CreateTokenResponse> {
/**
* The plaintext token to use for authentication.
*
* @generated from field: string token = 1;
*/
token = "";
constructor(data?: PartialMessage<CreateTokenResponse>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "buf.alpha.registry.v1alpha1.CreateTokenResponse";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "token", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CreateTokenResponse {
return new CreateTokenResponse().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CreateTokenResponse {
return new CreateTokenResponse().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CreateTokenResponse {
return new CreateTokenResponse().fromJsonString(jsonString, options);
}
static equals(a: CreateTokenResponse | PlainMessage<CreateTokenResponse> | undefined, b: CreateTokenResponse | PlainMessage<CreateTokenResponse> | undefined): boolean {
return proto3.util.equals(CreateTokenResponse, a, b);
}
}
/**
* @generated from message buf.alpha.registry.v1alpha1.GetTokenRequest
*/
export class GetTokenRequest extends Message<GetTokenRequest> {
/**
* @generated from field: string token_id = 1;
*/
tokenId = "";
constructor(data?: PartialMessage<GetTokenRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "buf.alpha.registry.v1alpha1.GetTokenRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "token_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetTokenRequest {
return new GetTokenRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetTokenRequest {
return new GetTokenRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetTokenRequest {
return new GetTokenRequest().fromJsonString(jsonString, options);
}
static equals(a: GetTokenRequest | PlainMessage<GetTokenRequest> | undefined, b: GetTokenRequest | PlainMessage<GetTokenRequest> | undefined): boolean {
return proto3.util.equals(GetTokenRequest, a, b);
}
}
/**
* @generated from message buf.alpha.registry.v1alpha1.GetTokenResponse
*/
export class GetTokenResponse extends Message<GetTokenResponse> {
/**
* @generated from field: buf.alpha.registry.v1alpha1.Token token = 1;
*/
token?: Token;
constructor(data?: PartialMessage<GetTokenResponse>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "buf.alpha.registry.v1alpha1.GetTokenResponse";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "token", kind: "message", T: Token },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetTokenResponse {
return new GetTokenResponse().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetTokenResponse {
return new GetTokenResponse().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetTokenResponse {
return new GetTokenResponse().fromJsonString(jsonString, options);
}
static equals(a: GetTokenResponse | PlainMessage<GetTokenResponse> | undefined, b: GetTokenResponse | PlainMessage<GetTokenResponse> | undefined): boolean {
return proto3.util.equals(GetTokenResponse, a, b);
}
}
/**
* @generated from message buf.alpha.registry.v1alpha1.ListTokensRequest
*/
export class ListTokensRequest extends Message<ListTokensRequest> {
/**
* @generated from field: uint32 page_size = 1;
*/
pageSize = 0;
/**
* The first page is returned if this is empty.
*
* @generated from field: string page_token = 2;
*/
pageToken = "";
/**
* @generated from field: bool reverse = 3;
*/
reverse = false;
constructor(data?: PartialMessage<ListTokensRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "buf.alpha.registry.v1alpha1.ListTokensRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "page_size", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
{ no: 2, name: "page_token", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "reverse", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListTokensRequest {
return new ListTokensRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListTokensRequest {
return new ListTokensRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListTokensRequest {
return new ListTokensRequest().fromJsonString(jsonString, options);
}
static equals(a: ListTokensRequest | PlainMessage<ListTokensRequest> | undefined, b: ListTokensRequest | PlainMessage<ListTokensRequest> | undefined): boolean {
return proto3.util.equals(ListTokensRequest, a, b);
}
}
/**
* @generated from message buf.alpha.registry.v1alpha1.ListTokensResponse
*/
export class ListTokensResponse extends Message<ListTokensResponse> {
/**
* @generated from field: repeated buf.alpha.registry.v1alpha1.Token tokens = 1;
*/
tokens: Token[] = [];
/**
* There are no more pages if this is empty.
*
* @generated from field: string next_page_token = 2;
*/
nextPageToken = "";
constructor(data?: PartialMessage<ListTokensResponse>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "buf.alpha.registry.v1alpha1.ListTokensResponse";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "tokens", kind: "message", T: Token, repeated: true },
{ no: 2, name: "next_page_token", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListTokensResponse {
return new ListTokensResponse().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListTokensResponse {
return new ListTokensResponse().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListTokensResponse {
return new ListTokensResponse().fromJsonString(jsonString, options);
}
static equals(a: ListTokensResponse | PlainMessage<ListTokensResponse> | undefined, b: ListTokensResponse | PlainMessage<ListTokensResponse> | undefined): boolean {
return proto3.util.equals(ListTokensResponse, a, b);
}
}
/**
* @generated from message buf.alpha.registry.v1alpha1.DeleteTokenRequest
*/
export class DeleteTokenRequest extends Message<DeleteTokenRequest> {
/**
* @generated from field: string token_id = 1;
*/
tokenId = "";
constructor(data?: PartialMessage<DeleteTokenRequest>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "buf.alpha.registry.v1alpha1.DeleteTokenRequest";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "token_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DeleteTokenRequest {
return new DeleteTokenRequest().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DeleteTokenRequest {
return new DeleteTokenRequest().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DeleteTokenRequest {
return new DeleteTokenRequest().fromJsonString(jsonString, options);
}
static equals(a: DeleteTokenRequest | PlainMessage<DeleteTokenRequest> | undefined, b: DeleteTokenRequest | PlainMessage<DeleteTokenRequest> | undefined): boolean {
return proto3.util.equals(DeleteTokenRequest, a, b);
}
}
/**
* @generated from message buf.alpha.registry.v1alpha1.DeleteTokenResponse
*/
export class DeleteTokenResponse extends Message<DeleteTokenResponse> {
constructor(data?: PartialMessage<DeleteTokenResponse>) {
super();
proto3.util.initPartial(data, this);
}
static readonly runtime: typeof proto3 = proto3;
static readonly typeName = "buf.alpha.registry.v1alpha1.DeleteTokenResponse";
static readonly fields: FieldList = proto3.util.newFieldList(() => [
]);
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DeleteTokenResponse {
return new DeleteTokenResponse().fromBinary(bytes, options);
}
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DeleteTokenResponse {
return new DeleteTokenResponse().fromJson(jsonValue, options);
}
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DeleteTokenResponse {
return new DeleteTokenResponse().fromJsonString(jsonString, options);
}
static equals(a: DeleteTokenResponse | PlainMessage<DeleteTokenResponse> | undefined, b: DeleteTokenResponse | PlainMessage<DeleteTokenResponse> | undefined): boolean {
return proto3.util.equals(DeleteTokenResponse, a, b);
}
}