@raystack/proton 0.1.0-881c92a4cab2490e6c680462a94660b551b1040f → 0.1.0-8cb19702a3e47d173732860d58084b83d6941865

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/package.json +1 -1
  2. package/raystack/assets/index.ts +29 -29
  3. package/raystack/common/index.ts +1 -1
  4. package/raystack/compass/index.ts +1 -1
  5. package/raystack/entropy/index.ts +2 -2
  6. package/raystack/frontier/index.ts +3 -3
  7. package/raystack/guardian/index.ts +1 -1
  8. package/raystack/predator/index.ts +2 -2
  9. package/raystack/raccoon/index.ts +1 -1
  10. package/raystack/siren/index.ts +1 -1
  11. package/raystack/stencil/index.ts +1 -1
  12. package/google/api/field_behavior.ts +0 -95
  13. package/google/api/http.ts +0 -695
  14. package/google/api/httpbody.ts +0 -159
  15. package/google/protobuf/any.ts +0 -322
  16. package/google/protobuf/descriptor.ts +0 -3475
  17. package/google/protobuf/duration.ts +0 -231
  18. package/google/protobuf/struct.ts +0 -484
  19. package/google/protobuf/timestamp.ts +0 -290
  20. package/google/protobuf/wrappers.ts +0 -752
  21. package/protoc-gen-openapiv2/options/openapiv2.ts +0 -3110
  22. package/raystack/assets/v1beta1/bucket.ts +0 -362
  23. package/raystack/assets/v1beta1/dashboard.ts +0 -426
  24. package/raystack/assets/v1beta1/event.ts +0 -105
  25. package/raystack/assets/v1beta1/group.ts +0 -223
  26. package/raystack/assets/v1beta1/job.ts +0 -147
  27. package/raystack/assets/v1beta1/lineage.ts +0 -90
  28. package/raystack/assets/v1beta1/ownership.ts +0 -179
  29. package/raystack/assets/v1beta1/preview.ts +0 -87
  30. package/raystack/assets/v1beta1/properties.ts +0 -116
  31. package/raystack/assets/v1beta1/resource.ts +0 -149
  32. package/raystack/assets/v1beta1/schema.ts +0 -421
  33. package/raystack/assets/v1beta1/table.ts +0 -408
  34. package/raystack/assets/v1beta1/timestamp.ts +0 -158
  35. package/raystack/assets/v1beta1/topic.ts +0 -253
  36. package/raystack/assets/v1beta1/user.ts +0 -451
  37. package/raystack/assets/v1beta2/application.ts +0 -125
  38. package/raystack/assets/v1beta2/asset.ts +0 -269
  39. package/raystack/assets/v1beta2/bucket.ts +0 -341
  40. package/raystack/assets/v1beta2/common.ts +0 -392
  41. package/raystack/assets/v1beta2/dashboard.ts +0 -393
  42. package/raystack/assets/v1beta2/experiment.ts +0 -274
  43. package/raystack/assets/v1beta2/feature_table.ts +0 -387
  44. package/raystack/assets/v1beta2/group.ts +0 -178
  45. package/raystack/assets/v1beta2/job.ts +0 -99
  46. package/raystack/assets/v1beta2/metric.ts +0 -163
  47. package/raystack/assets/v1beta2/model.ts +0 -519
  48. package/raystack/assets/v1beta2/table.ts +0 -663
  49. package/raystack/assets/v1beta2/topic.ts +0 -275
  50. package/raystack/assets/v1beta2/user.ts +0 -433
  51. package/raystack/common/v1/service.client.ts +0 -37
  52. package/raystack/common/v1/service.ts +0 -245
  53. package/raystack/compass/v1beta1/service.client.ts +0 -594
  54. package/raystack/compass/v1beta1/service.ts +0 -8169
  55. package/raystack/entropy/v1beta1/module.client.ts +0 -89
  56. package/raystack/entropy/v1beta1/module.ts +0 -692
  57. package/raystack/entropy/v1beta1/resource.client.ts +0 -129
  58. package/raystack/entropy/v1beta1/resource.ts +0 -1817
  59. package/raystack/frontier/v1beta1/admin.client.ts +0 -866
  60. package/raystack/frontier/v1beta1/admin.ts +0 -9117
  61. package/raystack/frontier/v1beta1/frontier.client.ts +0 -2307
  62. package/raystack/frontier/v1beta1/frontier.ts +0 -23706
  63. package/raystack/frontier/v1beta1/models.ts +0 -7433
  64. package/raystack/guardian/v1beta1/guardian.client.ts +0 -552
  65. package/raystack/guardian/v1beta1/guardian.ts +0 -9688
  66. package/raystack/optimus/core/v1beta1/backup.client.ts +0 -63
  67. package/raystack/optimus/core/v1beta1/backup.ts +0 -708
  68. package/raystack/optimus/core/v1beta1/job_run.client.ts +0 -96
  69. package/raystack/optimus/core/v1beta1/job_run.ts +0 -1008
  70. package/raystack/optimus/core/v1beta1/job_spec.client.ts +0 -363
  71. package/raystack/optimus/core/v1beta1/job_spec.ts +0 -5134
  72. package/raystack/optimus/core/v1beta1/namespace.client.ts +0 -75
  73. package/raystack/optimus/core/v1beta1/namespace.ts +0 -477
  74. package/raystack/optimus/core/v1beta1/project.client.ts +0 -75
  75. package/raystack/optimus/core/v1beta1/project.ts +0 -520
  76. package/raystack/optimus/core/v1beta1/replay.client.ts +0 -76
  77. package/raystack/optimus/core/v1beta1/replay.ts +0 -881
  78. package/raystack/optimus/core/v1beta1/resource.client.ts +0 -148
  79. package/raystack/optimus/core/v1beta1/resource.ts +0 -1329
  80. package/raystack/optimus/core/v1beta1/runtime.client.ts +0 -45
  81. package/raystack/optimus/core/v1beta1/runtime.ts +0 -131
  82. package/raystack/optimus/core/v1beta1/secret.client.ts +0 -92
  83. package/raystack/optimus/core/v1beta1/secret.ts +0 -619
  84. package/raystack/optimus/core/v1beta1/status.ts +0 -113
  85. package/raystack/optimus/integration/v1beta1/event.ts +0 -531
  86. package/raystack/optimus/plugins/v1beta1/dependency_resolver.client.ts +0 -100
  87. package/raystack/optimus/plugins/v1beta1/dependency_resolver.ts +0 -950
  88. package/raystack/predator/v1beta1/metrics_log.ts +0 -457
  89. package/raystack/predator/v1beta1/result_log.ts +0 -390
  90. package/raystack/raccoon/v1beta1/raccoon.client.ts +0 -37
  91. package/raystack/raccoon/v1beta1/raccoon.ts +0 -442
  92. package/raystack/siren/v1beta1/siren.client.ts +0 -479
  93. package/raystack/siren/v1beta1/siren.ts +0 -6507
  94. package/raystack/stencil/v1beta1/stencil.client.ts +0 -232
  95. package/raystack/stencil/v1beta1/stencil.ts +0 -2716
  96. package/validate/validate.ts +0 -4130
@@ -1,1329 +0,0 @@
1
- // @generated by protobuf-ts 2.11.1
2
- // @generated from protobuf file "raystack/optimus/core/v1beta1/resource.proto" (package "raystack.optimus.core.v1beta1", syntax proto3)
3
- // tslint:disable
4
- import { ServiceType } from "@protobuf-ts/runtime-rpc";
5
- import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
6
- import type { IBinaryWriter } from "@protobuf-ts/runtime";
7
- import { WireType } from "@protobuf-ts/runtime";
8
- import type { BinaryReadOptions } from "@protobuf-ts/runtime";
9
- import type { IBinaryReader } from "@protobuf-ts/runtime";
10
- import { UnknownFieldHandler } from "@protobuf-ts/runtime";
11
- import type { PartialMessage } from "@protobuf-ts/runtime";
12
- import { reflectionMergePartial } from "@protobuf-ts/runtime";
13
- import { MessageType } from "@protobuf-ts/runtime";
14
- import { Struct } from "../../../../google/protobuf/struct";
15
- import { Log } from "./status";
16
- /**
17
- * @generated from protobuf message raystack.optimus.core.v1beta1.DeployResourceSpecificationRequest
18
- */
19
- export interface DeployResourceSpecificationRequest {
20
- /**
21
- * @generated from protobuf field: string project_name = 1
22
- */
23
- projectName: string;
24
- /**
25
- * @generated from protobuf field: string datastore_name = 2
26
- */
27
- datastoreName: string;
28
- /**
29
- * @generated from protobuf field: repeated raystack.optimus.core.v1beta1.ResourceSpecification resources = 3
30
- */
31
- resources: ResourceSpecification[];
32
- /**
33
- * @generated from protobuf field: string namespace_name = 4
34
- */
35
- namespaceName: string;
36
- }
37
- /**
38
- * @generated from protobuf message raystack.optimus.core.v1beta1.DeployResourceSpecificationResponse
39
- */
40
- export interface DeployResourceSpecificationResponse {
41
- /**
42
- * @generated from protobuf field: raystack.optimus.core.v1beta1.Log log_status = 5
43
- */
44
- logStatus?: Log;
45
- }
46
- /**
47
- * ListResourceSpecificationRequest lists all resource specifications of a datastore in project
48
- *
49
- * @generated from protobuf message raystack.optimus.core.v1beta1.ListResourceSpecificationRequest
50
- */
51
- export interface ListResourceSpecificationRequest {
52
- /**
53
- * @generated from protobuf field: string project_name = 1
54
- */
55
- projectName: string;
56
- /**
57
- * @generated from protobuf field: string datastore_name = 2
58
- */
59
- datastoreName: string;
60
- /**
61
- * @generated from protobuf field: string namespace_name = 3
62
- */
63
- namespaceName: string;
64
- }
65
- /**
66
- * @generated from protobuf message raystack.optimus.core.v1beta1.ListResourceSpecificationResponse
67
- */
68
- export interface ListResourceSpecificationResponse {
69
- /**
70
- * @generated from protobuf field: repeated raystack.optimus.core.v1beta1.ResourceSpecification resources = 1
71
- */
72
- resources: ResourceSpecification[];
73
- }
74
- /**
75
- * @generated from protobuf message raystack.optimus.core.v1beta1.CreateResourceRequest
76
- */
77
- export interface CreateResourceRequest {
78
- /**
79
- * @generated from protobuf field: string project_name = 1
80
- */
81
- projectName: string;
82
- /**
83
- * @generated from protobuf field: string datastore_name = 2
84
- */
85
- datastoreName: string;
86
- /**
87
- * @generated from protobuf field: raystack.optimus.core.v1beta1.ResourceSpecification resource = 3
88
- */
89
- resource?: ResourceSpecification;
90
- /**
91
- * @generated from protobuf field: string namespace_name = 4
92
- */
93
- namespaceName: string;
94
- }
95
- /**
96
- * @generated from protobuf message raystack.optimus.core.v1beta1.CreateResourceResponse
97
- */
98
- export interface CreateResourceResponse {
99
- /**
100
- * @generated from protobuf field: bool success = 1
101
- */
102
- success: boolean;
103
- /**
104
- * @generated from protobuf field: string message = 2
105
- */
106
- message: string;
107
- }
108
- /**
109
- * @generated from protobuf message raystack.optimus.core.v1beta1.ReadResourceRequest
110
- */
111
- export interface ReadResourceRequest {
112
- /**
113
- * @generated from protobuf field: string project_name = 1
114
- */
115
- projectName: string;
116
- /**
117
- * @generated from protobuf field: string datastore_name = 2
118
- */
119
- datastoreName: string;
120
- /**
121
- * @generated from protobuf field: string resource_name = 3
122
- */
123
- resourceName: string;
124
- /**
125
- * @generated from protobuf field: string namespace_name = 4
126
- */
127
- namespaceName: string;
128
- }
129
- /**
130
- * @generated from protobuf message raystack.optimus.core.v1beta1.ReadResourceResponse
131
- */
132
- export interface ReadResourceResponse {
133
- /**
134
- * @generated from protobuf field: bool success = 1
135
- */
136
- success: boolean;
137
- /**
138
- * @generated from protobuf field: string message = 2
139
- */
140
- message: string;
141
- /**
142
- * @generated from protobuf field: raystack.optimus.core.v1beta1.ResourceSpecification resource = 3
143
- */
144
- resource?: ResourceSpecification;
145
- }
146
- /**
147
- * @generated from protobuf message raystack.optimus.core.v1beta1.UpdateResourceRequest
148
- */
149
- export interface UpdateResourceRequest {
150
- /**
151
- * @generated from protobuf field: string project_name = 1
152
- */
153
- projectName: string;
154
- /**
155
- * @generated from protobuf field: string datastore_name = 2
156
- */
157
- datastoreName: string;
158
- /**
159
- * @generated from protobuf field: raystack.optimus.core.v1beta1.ResourceSpecification resource = 3
160
- */
161
- resource?: ResourceSpecification;
162
- /**
163
- * @generated from protobuf field: string namespace_name = 4
164
- */
165
- namespaceName: string;
166
- }
167
- /**
168
- * @generated from protobuf message raystack.optimus.core.v1beta1.UpdateResourceResponse
169
- */
170
- export interface UpdateResourceResponse {
171
- /**
172
- * @generated from protobuf field: bool success = 1
173
- */
174
- success: boolean;
175
- /**
176
- * @generated from protobuf field: string message = 2
177
- */
178
- message: string;
179
- }
180
- /**
181
- * ResourceSpecification are datastore specification representation of a resource
182
- *
183
- * @generated from protobuf message raystack.optimus.core.v1beta1.ResourceSpecification
184
- */
185
- export interface ResourceSpecification {
186
- /**
187
- * @generated from protobuf field: int32 version = 1
188
- */
189
- version: number;
190
- /**
191
- * @generated from protobuf field: string name = 2
192
- */
193
- name: string;
194
- /**
195
- * @generated from protobuf field: string type = 4
196
- */
197
- type: string;
198
- /**
199
- * @generated from protobuf field: google.protobuf.Struct spec = 5
200
- */
201
- spec?: Struct;
202
- /**
203
- * @generated from protobuf field: map<string, string> assets = 6
204
- */
205
- assets: {
206
- [key: string]: string;
207
- };
208
- /**
209
- * @generated from protobuf field: map<string, string> labels = 7
210
- */
211
- labels: {
212
- [key: string]: string;
213
- };
214
- }
215
- /**
216
- * @generated from protobuf message raystack.optimus.core.v1beta1.ChangeResourceNamespaceRequest
217
- */
218
- export interface ChangeResourceNamespaceRequest {
219
- /**
220
- * @generated from protobuf field: string project_name = 1
221
- */
222
- projectName: string;
223
- /**
224
- * @generated from protobuf field: string namespace_name = 2
225
- */
226
- namespaceName: string;
227
- /**
228
- * @generated from protobuf field: string datastore_name = 3
229
- */
230
- datastoreName: string;
231
- /**
232
- * @generated from protobuf field: string resource_name = 4
233
- */
234
- resourceName: string;
235
- /**
236
- * @generated from protobuf field: string new_namespace_name = 5
237
- */
238
- newNamespaceName: string;
239
- }
240
- /**
241
- * @generated from protobuf message raystack.optimus.core.v1beta1.ChangeResourceNamespaceResponse
242
- */
243
- export interface ChangeResourceNamespaceResponse {
244
- }
245
- /**
246
- * @generated from protobuf message raystack.optimus.core.v1beta1.ApplyResourcesRequest
247
- */
248
- export interface ApplyResourcesRequest {
249
- /**
250
- * @generated from protobuf field: string project_name = 1
251
- */
252
- projectName: string;
253
- /**
254
- * @generated from protobuf field: string namespace_name = 2
255
- */
256
- namespaceName: string;
257
- /**
258
- * @generated from protobuf field: string datastore_name = 3
259
- */
260
- datastoreName: string;
261
- /**
262
- * @generated from protobuf field: repeated string resource_names = 4
263
- */
264
- resourceNames: string[];
265
- }
266
- /**
267
- * @generated from protobuf message raystack.optimus.core.v1beta1.ApplyResourcesResponse
268
- */
269
- export interface ApplyResourcesResponse {
270
- /**
271
- * @generated from protobuf field: repeated raystack.optimus.core.v1beta1.ApplyResourcesResponse.ResourceStatus statuses = 1
272
- */
273
- statuses: ApplyResourcesResponse_ResourceStatus[];
274
- }
275
- /**
276
- * @generated from protobuf message raystack.optimus.core.v1beta1.ApplyResourcesResponse.ResourceStatus
277
- */
278
- export interface ApplyResourcesResponse_ResourceStatus {
279
- /**
280
- * @generated from protobuf field: string resource_name = 1
281
- */
282
- resourceName: string;
283
- /**
284
- * @generated from protobuf field: string status = 2
285
- */
286
- status: string;
287
- /**
288
- * @generated from protobuf field: string reason = 3
289
- */
290
- reason: string;
291
- }
292
- // @generated message type with reflection information, may provide speed optimized methods
293
- class DeployResourceSpecificationRequest$Type extends MessageType<DeployResourceSpecificationRequest> {
294
- constructor() {
295
- super("raystack.optimus.core.v1beta1.DeployResourceSpecificationRequest", [
296
- { no: 1, name: "project_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
297
- { no: 2, name: "datastore_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
298
- { no: 3, name: "resources", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => ResourceSpecification },
299
- { no: 4, name: "namespace_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
300
- ]);
301
- }
302
- create(value?: PartialMessage<DeployResourceSpecificationRequest>): DeployResourceSpecificationRequest {
303
- const message = globalThis.Object.create((this.messagePrototype!));
304
- message.projectName = "";
305
- message.datastoreName = "";
306
- message.resources = [];
307
- message.namespaceName = "";
308
- if (value !== undefined)
309
- reflectionMergePartial<DeployResourceSpecificationRequest>(this, message, value);
310
- return message;
311
- }
312
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeployResourceSpecificationRequest): DeployResourceSpecificationRequest {
313
- let message = target ?? this.create(), end = reader.pos + length;
314
- while (reader.pos < end) {
315
- let [fieldNo, wireType] = reader.tag();
316
- switch (fieldNo) {
317
- case /* string project_name */ 1:
318
- message.projectName = reader.string();
319
- break;
320
- case /* string datastore_name */ 2:
321
- message.datastoreName = reader.string();
322
- break;
323
- case /* repeated raystack.optimus.core.v1beta1.ResourceSpecification resources */ 3:
324
- message.resources.push(ResourceSpecification.internalBinaryRead(reader, reader.uint32(), options));
325
- break;
326
- case /* string namespace_name */ 4:
327
- message.namespaceName = reader.string();
328
- break;
329
- default:
330
- let u = options.readUnknownField;
331
- if (u === "throw")
332
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
333
- let d = reader.skip(wireType);
334
- if (u !== false)
335
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
336
- }
337
- }
338
- return message;
339
- }
340
- internalBinaryWrite(message: DeployResourceSpecificationRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
341
- /* string project_name = 1; */
342
- if (message.projectName !== "")
343
- writer.tag(1, WireType.LengthDelimited).string(message.projectName);
344
- /* string datastore_name = 2; */
345
- if (message.datastoreName !== "")
346
- writer.tag(2, WireType.LengthDelimited).string(message.datastoreName);
347
- /* repeated raystack.optimus.core.v1beta1.ResourceSpecification resources = 3; */
348
- for (let i = 0; i < message.resources.length; i++)
349
- ResourceSpecification.internalBinaryWrite(message.resources[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();
350
- /* string namespace_name = 4; */
351
- if (message.namespaceName !== "")
352
- writer.tag(4, WireType.LengthDelimited).string(message.namespaceName);
353
- let u = options.writeUnknownFields;
354
- if (u !== false)
355
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
356
- return writer;
357
- }
358
- }
359
- /**
360
- * @generated MessageType for protobuf message raystack.optimus.core.v1beta1.DeployResourceSpecificationRequest
361
- */
362
- export const DeployResourceSpecificationRequest = new DeployResourceSpecificationRequest$Type();
363
- // @generated message type with reflection information, may provide speed optimized methods
364
- class DeployResourceSpecificationResponse$Type extends MessageType<DeployResourceSpecificationResponse> {
365
- constructor() {
366
- super("raystack.optimus.core.v1beta1.DeployResourceSpecificationResponse", [
367
- { no: 5, name: "log_status", kind: "message", T: () => Log }
368
- ]);
369
- }
370
- create(value?: PartialMessage<DeployResourceSpecificationResponse>): DeployResourceSpecificationResponse {
371
- const message = globalThis.Object.create((this.messagePrototype!));
372
- if (value !== undefined)
373
- reflectionMergePartial<DeployResourceSpecificationResponse>(this, message, value);
374
- return message;
375
- }
376
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeployResourceSpecificationResponse): DeployResourceSpecificationResponse {
377
- let message = target ?? this.create(), end = reader.pos + length;
378
- while (reader.pos < end) {
379
- let [fieldNo, wireType] = reader.tag();
380
- switch (fieldNo) {
381
- case /* raystack.optimus.core.v1beta1.Log log_status */ 5:
382
- message.logStatus = Log.internalBinaryRead(reader, reader.uint32(), options, message.logStatus);
383
- break;
384
- default:
385
- let u = options.readUnknownField;
386
- if (u === "throw")
387
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
388
- let d = reader.skip(wireType);
389
- if (u !== false)
390
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
391
- }
392
- }
393
- return message;
394
- }
395
- internalBinaryWrite(message: DeployResourceSpecificationResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
396
- /* raystack.optimus.core.v1beta1.Log log_status = 5; */
397
- if (message.logStatus)
398
- Log.internalBinaryWrite(message.logStatus, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
399
- let u = options.writeUnknownFields;
400
- if (u !== false)
401
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
402
- return writer;
403
- }
404
- }
405
- /**
406
- * @generated MessageType for protobuf message raystack.optimus.core.v1beta1.DeployResourceSpecificationResponse
407
- */
408
- export const DeployResourceSpecificationResponse = new DeployResourceSpecificationResponse$Type();
409
- // @generated message type with reflection information, may provide speed optimized methods
410
- class ListResourceSpecificationRequest$Type extends MessageType<ListResourceSpecificationRequest> {
411
- constructor() {
412
- super("raystack.optimus.core.v1beta1.ListResourceSpecificationRequest", [
413
- { no: 1, name: "project_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
414
- { no: 2, name: "datastore_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
415
- { no: 3, name: "namespace_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
416
- ]);
417
- }
418
- create(value?: PartialMessage<ListResourceSpecificationRequest>): ListResourceSpecificationRequest {
419
- const message = globalThis.Object.create((this.messagePrototype!));
420
- message.projectName = "";
421
- message.datastoreName = "";
422
- message.namespaceName = "";
423
- if (value !== undefined)
424
- reflectionMergePartial<ListResourceSpecificationRequest>(this, message, value);
425
- return message;
426
- }
427
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListResourceSpecificationRequest): ListResourceSpecificationRequest {
428
- let message = target ?? this.create(), end = reader.pos + length;
429
- while (reader.pos < end) {
430
- let [fieldNo, wireType] = reader.tag();
431
- switch (fieldNo) {
432
- case /* string project_name */ 1:
433
- message.projectName = reader.string();
434
- break;
435
- case /* string datastore_name */ 2:
436
- message.datastoreName = reader.string();
437
- break;
438
- case /* string namespace_name */ 3:
439
- message.namespaceName = reader.string();
440
- break;
441
- default:
442
- let u = options.readUnknownField;
443
- if (u === "throw")
444
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
445
- let d = reader.skip(wireType);
446
- if (u !== false)
447
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
448
- }
449
- }
450
- return message;
451
- }
452
- internalBinaryWrite(message: ListResourceSpecificationRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
453
- /* string project_name = 1; */
454
- if (message.projectName !== "")
455
- writer.tag(1, WireType.LengthDelimited).string(message.projectName);
456
- /* string datastore_name = 2; */
457
- if (message.datastoreName !== "")
458
- writer.tag(2, WireType.LengthDelimited).string(message.datastoreName);
459
- /* string namespace_name = 3; */
460
- if (message.namespaceName !== "")
461
- writer.tag(3, WireType.LengthDelimited).string(message.namespaceName);
462
- let u = options.writeUnknownFields;
463
- if (u !== false)
464
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
465
- return writer;
466
- }
467
- }
468
- /**
469
- * @generated MessageType for protobuf message raystack.optimus.core.v1beta1.ListResourceSpecificationRequest
470
- */
471
- export const ListResourceSpecificationRequest = new ListResourceSpecificationRequest$Type();
472
- // @generated message type with reflection information, may provide speed optimized methods
473
- class ListResourceSpecificationResponse$Type extends MessageType<ListResourceSpecificationResponse> {
474
- constructor() {
475
- super("raystack.optimus.core.v1beta1.ListResourceSpecificationResponse", [
476
- { no: 1, name: "resources", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => ResourceSpecification }
477
- ]);
478
- }
479
- create(value?: PartialMessage<ListResourceSpecificationResponse>): ListResourceSpecificationResponse {
480
- const message = globalThis.Object.create((this.messagePrototype!));
481
- message.resources = [];
482
- if (value !== undefined)
483
- reflectionMergePartial<ListResourceSpecificationResponse>(this, message, value);
484
- return message;
485
- }
486
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListResourceSpecificationResponse): ListResourceSpecificationResponse {
487
- let message = target ?? this.create(), end = reader.pos + length;
488
- while (reader.pos < end) {
489
- let [fieldNo, wireType] = reader.tag();
490
- switch (fieldNo) {
491
- case /* repeated raystack.optimus.core.v1beta1.ResourceSpecification resources */ 1:
492
- message.resources.push(ResourceSpecification.internalBinaryRead(reader, reader.uint32(), options));
493
- break;
494
- default:
495
- let u = options.readUnknownField;
496
- if (u === "throw")
497
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
498
- let d = reader.skip(wireType);
499
- if (u !== false)
500
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
501
- }
502
- }
503
- return message;
504
- }
505
- internalBinaryWrite(message: ListResourceSpecificationResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
506
- /* repeated raystack.optimus.core.v1beta1.ResourceSpecification resources = 1; */
507
- for (let i = 0; i < message.resources.length; i++)
508
- ResourceSpecification.internalBinaryWrite(message.resources[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
509
- let u = options.writeUnknownFields;
510
- if (u !== false)
511
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
512
- return writer;
513
- }
514
- }
515
- /**
516
- * @generated MessageType for protobuf message raystack.optimus.core.v1beta1.ListResourceSpecificationResponse
517
- */
518
- export const ListResourceSpecificationResponse = new ListResourceSpecificationResponse$Type();
519
- // @generated message type with reflection information, may provide speed optimized methods
520
- class CreateResourceRequest$Type extends MessageType<CreateResourceRequest> {
521
- constructor() {
522
- super("raystack.optimus.core.v1beta1.CreateResourceRequest", [
523
- { no: 1, name: "project_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
524
- { no: 2, name: "datastore_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
525
- { no: 3, name: "resource", kind: "message", T: () => ResourceSpecification },
526
- { no: 4, name: "namespace_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
527
- ]);
528
- }
529
- create(value?: PartialMessage<CreateResourceRequest>): CreateResourceRequest {
530
- const message = globalThis.Object.create((this.messagePrototype!));
531
- message.projectName = "";
532
- message.datastoreName = "";
533
- message.namespaceName = "";
534
- if (value !== undefined)
535
- reflectionMergePartial<CreateResourceRequest>(this, message, value);
536
- return message;
537
- }
538
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreateResourceRequest): CreateResourceRequest {
539
- let message = target ?? this.create(), end = reader.pos + length;
540
- while (reader.pos < end) {
541
- let [fieldNo, wireType] = reader.tag();
542
- switch (fieldNo) {
543
- case /* string project_name */ 1:
544
- message.projectName = reader.string();
545
- break;
546
- case /* string datastore_name */ 2:
547
- message.datastoreName = reader.string();
548
- break;
549
- case /* raystack.optimus.core.v1beta1.ResourceSpecification resource */ 3:
550
- message.resource = ResourceSpecification.internalBinaryRead(reader, reader.uint32(), options, message.resource);
551
- break;
552
- case /* string namespace_name */ 4:
553
- message.namespaceName = reader.string();
554
- break;
555
- default:
556
- let u = options.readUnknownField;
557
- if (u === "throw")
558
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
559
- let d = reader.skip(wireType);
560
- if (u !== false)
561
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
562
- }
563
- }
564
- return message;
565
- }
566
- internalBinaryWrite(message: CreateResourceRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
567
- /* string project_name = 1; */
568
- if (message.projectName !== "")
569
- writer.tag(1, WireType.LengthDelimited).string(message.projectName);
570
- /* string datastore_name = 2; */
571
- if (message.datastoreName !== "")
572
- writer.tag(2, WireType.LengthDelimited).string(message.datastoreName);
573
- /* raystack.optimus.core.v1beta1.ResourceSpecification resource = 3; */
574
- if (message.resource)
575
- ResourceSpecification.internalBinaryWrite(message.resource, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
576
- /* string namespace_name = 4; */
577
- if (message.namespaceName !== "")
578
- writer.tag(4, WireType.LengthDelimited).string(message.namespaceName);
579
- let u = options.writeUnknownFields;
580
- if (u !== false)
581
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
582
- return writer;
583
- }
584
- }
585
- /**
586
- * @generated MessageType for protobuf message raystack.optimus.core.v1beta1.CreateResourceRequest
587
- */
588
- export const CreateResourceRequest = new CreateResourceRequest$Type();
589
- // @generated message type with reflection information, may provide speed optimized methods
590
- class CreateResourceResponse$Type extends MessageType<CreateResourceResponse> {
591
- constructor() {
592
- super("raystack.optimus.core.v1beta1.CreateResourceResponse", [
593
- { no: 1, name: "success", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
594
- { no: 2, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
595
- ]);
596
- }
597
- create(value?: PartialMessage<CreateResourceResponse>): CreateResourceResponse {
598
- const message = globalThis.Object.create((this.messagePrototype!));
599
- message.success = false;
600
- message.message = "";
601
- if (value !== undefined)
602
- reflectionMergePartial<CreateResourceResponse>(this, message, value);
603
- return message;
604
- }
605
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreateResourceResponse): CreateResourceResponse {
606
- let message = target ?? this.create(), end = reader.pos + length;
607
- while (reader.pos < end) {
608
- let [fieldNo, wireType] = reader.tag();
609
- switch (fieldNo) {
610
- case /* bool success */ 1:
611
- message.success = reader.bool();
612
- break;
613
- case /* string message */ 2:
614
- message.message = reader.string();
615
- break;
616
- default:
617
- let u = options.readUnknownField;
618
- if (u === "throw")
619
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
620
- let d = reader.skip(wireType);
621
- if (u !== false)
622
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
623
- }
624
- }
625
- return message;
626
- }
627
- internalBinaryWrite(message: CreateResourceResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
628
- /* bool success = 1; */
629
- if (message.success !== false)
630
- writer.tag(1, WireType.Varint).bool(message.success);
631
- /* string message = 2; */
632
- if (message.message !== "")
633
- writer.tag(2, WireType.LengthDelimited).string(message.message);
634
- let u = options.writeUnknownFields;
635
- if (u !== false)
636
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
637
- return writer;
638
- }
639
- }
640
- /**
641
- * @generated MessageType for protobuf message raystack.optimus.core.v1beta1.CreateResourceResponse
642
- */
643
- export const CreateResourceResponse = new CreateResourceResponse$Type();
644
- // @generated message type with reflection information, may provide speed optimized methods
645
- class ReadResourceRequest$Type extends MessageType<ReadResourceRequest> {
646
- constructor() {
647
- super("raystack.optimus.core.v1beta1.ReadResourceRequest", [
648
- { no: 1, name: "project_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
649
- { no: 2, name: "datastore_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
650
- { no: 3, name: "resource_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
651
- { no: 4, name: "namespace_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
652
- ]);
653
- }
654
- create(value?: PartialMessage<ReadResourceRequest>): ReadResourceRequest {
655
- const message = globalThis.Object.create((this.messagePrototype!));
656
- message.projectName = "";
657
- message.datastoreName = "";
658
- message.resourceName = "";
659
- message.namespaceName = "";
660
- if (value !== undefined)
661
- reflectionMergePartial<ReadResourceRequest>(this, message, value);
662
- return message;
663
- }
664
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ReadResourceRequest): ReadResourceRequest {
665
- let message = target ?? this.create(), end = reader.pos + length;
666
- while (reader.pos < end) {
667
- let [fieldNo, wireType] = reader.tag();
668
- switch (fieldNo) {
669
- case /* string project_name */ 1:
670
- message.projectName = reader.string();
671
- break;
672
- case /* string datastore_name */ 2:
673
- message.datastoreName = reader.string();
674
- break;
675
- case /* string resource_name */ 3:
676
- message.resourceName = reader.string();
677
- break;
678
- case /* string namespace_name */ 4:
679
- message.namespaceName = reader.string();
680
- break;
681
- default:
682
- let u = options.readUnknownField;
683
- if (u === "throw")
684
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
685
- let d = reader.skip(wireType);
686
- if (u !== false)
687
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
688
- }
689
- }
690
- return message;
691
- }
692
- internalBinaryWrite(message: ReadResourceRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
693
- /* string project_name = 1; */
694
- if (message.projectName !== "")
695
- writer.tag(1, WireType.LengthDelimited).string(message.projectName);
696
- /* string datastore_name = 2; */
697
- if (message.datastoreName !== "")
698
- writer.tag(2, WireType.LengthDelimited).string(message.datastoreName);
699
- /* string resource_name = 3; */
700
- if (message.resourceName !== "")
701
- writer.tag(3, WireType.LengthDelimited).string(message.resourceName);
702
- /* string namespace_name = 4; */
703
- if (message.namespaceName !== "")
704
- writer.tag(4, WireType.LengthDelimited).string(message.namespaceName);
705
- let u = options.writeUnknownFields;
706
- if (u !== false)
707
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
708
- return writer;
709
- }
710
- }
711
- /**
712
- * @generated MessageType for protobuf message raystack.optimus.core.v1beta1.ReadResourceRequest
713
- */
714
- export const ReadResourceRequest = new ReadResourceRequest$Type();
715
- // @generated message type with reflection information, may provide speed optimized methods
716
- class ReadResourceResponse$Type extends MessageType<ReadResourceResponse> {
717
- constructor() {
718
- super("raystack.optimus.core.v1beta1.ReadResourceResponse", [
719
- { no: 1, name: "success", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
720
- { no: 2, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
721
- { no: 3, name: "resource", kind: "message", T: () => ResourceSpecification }
722
- ]);
723
- }
724
- create(value?: PartialMessage<ReadResourceResponse>): ReadResourceResponse {
725
- const message = globalThis.Object.create((this.messagePrototype!));
726
- message.success = false;
727
- message.message = "";
728
- if (value !== undefined)
729
- reflectionMergePartial<ReadResourceResponse>(this, message, value);
730
- return message;
731
- }
732
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ReadResourceResponse): ReadResourceResponse {
733
- let message = target ?? this.create(), end = reader.pos + length;
734
- while (reader.pos < end) {
735
- let [fieldNo, wireType] = reader.tag();
736
- switch (fieldNo) {
737
- case /* bool success */ 1:
738
- message.success = reader.bool();
739
- break;
740
- case /* string message */ 2:
741
- message.message = reader.string();
742
- break;
743
- case /* raystack.optimus.core.v1beta1.ResourceSpecification resource */ 3:
744
- message.resource = ResourceSpecification.internalBinaryRead(reader, reader.uint32(), options, message.resource);
745
- break;
746
- default:
747
- let u = options.readUnknownField;
748
- if (u === "throw")
749
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
750
- let d = reader.skip(wireType);
751
- if (u !== false)
752
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
753
- }
754
- }
755
- return message;
756
- }
757
- internalBinaryWrite(message: ReadResourceResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
758
- /* bool success = 1; */
759
- if (message.success !== false)
760
- writer.tag(1, WireType.Varint).bool(message.success);
761
- /* string message = 2; */
762
- if (message.message !== "")
763
- writer.tag(2, WireType.LengthDelimited).string(message.message);
764
- /* raystack.optimus.core.v1beta1.ResourceSpecification resource = 3; */
765
- if (message.resource)
766
- ResourceSpecification.internalBinaryWrite(message.resource, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
767
- let u = options.writeUnknownFields;
768
- if (u !== false)
769
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
770
- return writer;
771
- }
772
- }
773
- /**
774
- * @generated MessageType for protobuf message raystack.optimus.core.v1beta1.ReadResourceResponse
775
- */
776
- export const ReadResourceResponse = new ReadResourceResponse$Type();
777
- // @generated message type with reflection information, may provide speed optimized methods
778
- class UpdateResourceRequest$Type extends MessageType<UpdateResourceRequest> {
779
- constructor() {
780
- super("raystack.optimus.core.v1beta1.UpdateResourceRequest", [
781
- { no: 1, name: "project_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
782
- { no: 2, name: "datastore_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
783
- { no: 3, name: "resource", kind: "message", T: () => ResourceSpecification },
784
- { no: 4, name: "namespace_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
785
- ]);
786
- }
787
- create(value?: PartialMessage<UpdateResourceRequest>): UpdateResourceRequest {
788
- const message = globalThis.Object.create((this.messagePrototype!));
789
- message.projectName = "";
790
- message.datastoreName = "";
791
- message.namespaceName = "";
792
- if (value !== undefined)
793
- reflectionMergePartial<UpdateResourceRequest>(this, message, value);
794
- return message;
795
- }
796
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateResourceRequest): UpdateResourceRequest {
797
- let message = target ?? this.create(), end = reader.pos + length;
798
- while (reader.pos < end) {
799
- let [fieldNo, wireType] = reader.tag();
800
- switch (fieldNo) {
801
- case /* string project_name */ 1:
802
- message.projectName = reader.string();
803
- break;
804
- case /* string datastore_name */ 2:
805
- message.datastoreName = reader.string();
806
- break;
807
- case /* raystack.optimus.core.v1beta1.ResourceSpecification resource */ 3:
808
- message.resource = ResourceSpecification.internalBinaryRead(reader, reader.uint32(), options, message.resource);
809
- break;
810
- case /* string namespace_name */ 4:
811
- message.namespaceName = reader.string();
812
- break;
813
- default:
814
- let u = options.readUnknownField;
815
- if (u === "throw")
816
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
817
- let d = reader.skip(wireType);
818
- if (u !== false)
819
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
820
- }
821
- }
822
- return message;
823
- }
824
- internalBinaryWrite(message: UpdateResourceRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
825
- /* string project_name = 1; */
826
- if (message.projectName !== "")
827
- writer.tag(1, WireType.LengthDelimited).string(message.projectName);
828
- /* string datastore_name = 2; */
829
- if (message.datastoreName !== "")
830
- writer.tag(2, WireType.LengthDelimited).string(message.datastoreName);
831
- /* raystack.optimus.core.v1beta1.ResourceSpecification resource = 3; */
832
- if (message.resource)
833
- ResourceSpecification.internalBinaryWrite(message.resource, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
834
- /* string namespace_name = 4; */
835
- if (message.namespaceName !== "")
836
- writer.tag(4, WireType.LengthDelimited).string(message.namespaceName);
837
- let u = options.writeUnknownFields;
838
- if (u !== false)
839
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
840
- return writer;
841
- }
842
- }
843
- /**
844
- * @generated MessageType for protobuf message raystack.optimus.core.v1beta1.UpdateResourceRequest
845
- */
846
- export const UpdateResourceRequest = new UpdateResourceRequest$Type();
847
- // @generated message type with reflection information, may provide speed optimized methods
848
- class UpdateResourceResponse$Type extends MessageType<UpdateResourceResponse> {
849
- constructor() {
850
- super("raystack.optimus.core.v1beta1.UpdateResourceResponse", [
851
- { no: 1, name: "success", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
852
- { no: 2, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
853
- ]);
854
- }
855
- create(value?: PartialMessage<UpdateResourceResponse>): UpdateResourceResponse {
856
- const message = globalThis.Object.create((this.messagePrototype!));
857
- message.success = false;
858
- message.message = "";
859
- if (value !== undefined)
860
- reflectionMergePartial<UpdateResourceResponse>(this, message, value);
861
- return message;
862
- }
863
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateResourceResponse): UpdateResourceResponse {
864
- let message = target ?? this.create(), end = reader.pos + length;
865
- while (reader.pos < end) {
866
- let [fieldNo, wireType] = reader.tag();
867
- switch (fieldNo) {
868
- case /* bool success */ 1:
869
- message.success = reader.bool();
870
- break;
871
- case /* string message */ 2:
872
- message.message = reader.string();
873
- break;
874
- default:
875
- let u = options.readUnknownField;
876
- if (u === "throw")
877
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
878
- let d = reader.skip(wireType);
879
- if (u !== false)
880
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
881
- }
882
- }
883
- return message;
884
- }
885
- internalBinaryWrite(message: UpdateResourceResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
886
- /* bool success = 1; */
887
- if (message.success !== false)
888
- writer.tag(1, WireType.Varint).bool(message.success);
889
- /* string message = 2; */
890
- if (message.message !== "")
891
- writer.tag(2, WireType.LengthDelimited).string(message.message);
892
- let u = options.writeUnknownFields;
893
- if (u !== false)
894
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
895
- return writer;
896
- }
897
- }
898
- /**
899
- * @generated MessageType for protobuf message raystack.optimus.core.v1beta1.UpdateResourceResponse
900
- */
901
- export const UpdateResourceResponse = new UpdateResourceResponse$Type();
902
- // @generated message type with reflection information, may provide speed optimized methods
903
- class ResourceSpecification$Type extends MessageType<ResourceSpecification> {
904
- constructor() {
905
- super("raystack.optimus.core.v1beta1.ResourceSpecification", [
906
- { no: 1, name: "version", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
907
- { no: 2, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
908
- { no: 4, name: "type", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
909
- { no: 5, name: "spec", kind: "message", T: () => Struct },
910
- { no: 6, name: "assets", kind: "map", K: 9 /*ScalarType.STRING*/, V: { kind: "scalar", T: 9 /*ScalarType.STRING*/ } },
911
- { no: 7, name: "labels", kind: "map", K: 9 /*ScalarType.STRING*/, V: { kind: "scalar", T: 9 /*ScalarType.STRING*/ } }
912
- ]);
913
- }
914
- create(value?: PartialMessage<ResourceSpecification>): ResourceSpecification {
915
- const message = globalThis.Object.create((this.messagePrototype!));
916
- message.version = 0;
917
- message.name = "";
918
- message.type = "";
919
- message.assets = {};
920
- message.labels = {};
921
- if (value !== undefined)
922
- reflectionMergePartial<ResourceSpecification>(this, message, value);
923
- return message;
924
- }
925
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ResourceSpecification): ResourceSpecification {
926
- let message = target ?? this.create(), end = reader.pos + length;
927
- while (reader.pos < end) {
928
- let [fieldNo, wireType] = reader.tag();
929
- switch (fieldNo) {
930
- case /* int32 version */ 1:
931
- message.version = reader.int32();
932
- break;
933
- case /* string name */ 2:
934
- message.name = reader.string();
935
- break;
936
- case /* string type */ 4:
937
- message.type = reader.string();
938
- break;
939
- case /* google.protobuf.Struct spec */ 5:
940
- message.spec = Struct.internalBinaryRead(reader, reader.uint32(), options, message.spec);
941
- break;
942
- case /* map<string, string> assets */ 6:
943
- this.binaryReadMap6(message.assets, reader, options);
944
- break;
945
- case /* map<string, string> labels */ 7:
946
- this.binaryReadMap7(message.labels, reader, options);
947
- break;
948
- default:
949
- let u = options.readUnknownField;
950
- if (u === "throw")
951
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
952
- let d = reader.skip(wireType);
953
- if (u !== false)
954
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
955
- }
956
- }
957
- return message;
958
- }
959
- private binaryReadMap6(map: ResourceSpecification["assets"], reader: IBinaryReader, options: BinaryReadOptions): void {
960
- let len = reader.uint32(), end = reader.pos + len, key: keyof ResourceSpecification["assets"] | undefined, val: ResourceSpecification["assets"][any] | undefined;
961
- while (reader.pos < end) {
962
- let [fieldNo, wireType] = reader.tag();
963
- switch (fieldNo) {
964
- case 1:
965
- key = reader.string();
966
- break;
967
- case 2:
968
- val = reader.string();
969
- break;
970
- default: throw new globalThis.Error("unknown map entry field for raystack.optimus.core.v1beta1.ResourceSpecification.assets");
971
- }
972
- }
973
- map[key ?? ""] = val ?? "";
974
- }
975
- private binaryReadMap7(map: ResourceSpecification["labels"], reader: IBinaryReader, options: BinaryReadOptions): void {
976
- let len = reader.uint32(), end = reader.pos + len, key: keyof ResourceSpecification["labels"] | undefined, val: ResourceSpecification["labels"][any] | undefined;
977
- while (reader.pos < end) {
978
- let [fieldNo, wireType] = reader.tag();
979
- switch (fieldNo) {
980
- case 1:
981
- key = reader.string();
982
- break;
983
- case 2:
984
- val = reader.string();
985
- break;
986
- default: throw new globalThis.Error("unknown map entry field for raystack.optimus.core.v1beta1.ResourceSpecification.labels");
987
- }
988
- }
989
- map[key ?? ""] = val ?? "";
990
- }
991
- internalBinaryWrite(message: ResourceSpecification, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
992
- /* int32 version = 1; */
993
- if (message.version !== 0)
994
- writer.tag(1, WireType.Varint).int32(message.version);
995
- /* string name = 2; */
996
- if (message.name !== "")
997
- writer.tag(2, WireType.LengthDelimited).string(message.name);
998
- /* string type = 4; */
999
- if (message.type !== "")
1000
- writer.tag(4, WireType.LengthDelimited).string(message.type);
1001
- /* google.protobuf.Struct spec = 5; */
1002
- if (message.spec)
1003
- Struct.internalBinaryWrite(message.spec, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
1004
- /* map<string, string> assets = 6; */
1005
- for (let k of globalThis.Object.keys(message.assets))
1006
- writer.tag(6, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k).tag(2, WireType.LengthDelimited).string(message.assets[k]).join();
1007
- /* map<string, string> labels = 7; */
1008
- for (let k of globalThis.Object.keys(message.labels))
1009
- writer.tag(7, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k).tag(2, WireType.LengthDelimited).string(message.labels[k]).join();
1010
- let u = options.writeUnknownFields;
1011
- if (u !== false)
1012
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1013
- return writer;
1014
- }
1015
- }
1016
- /**
1017
- * @generated MessageType for protobuf message raystack.optimus.core.v1beta1.ResourceSpecification
1018
- */
1019
- export const ResourceSpecification = new ResourceSpecification$Type();
1020
- // @generated message type with reflection information, may provide speed optimized methods
1021
- class ChangeResourceNamespaceRequest$Type extends MessageType<ChangeResourceNamespaceRequest> {
1022
- constructor() {
1023
- super("raystack.optimus.core.v1beta1.ChangeResourceNamespaceRequest", [
1024
- { no: 1, name: "project_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1025
- { no: 2, name: "namespace_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1026
- { no: 3, name: "datastore_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1027
- { no: 4, name: "resource_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1028
- { no: 5, name: "new_namespace_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
1029
- ]);
1030
- }
1031
- create(value?: PartialMessage<ChangeResourceNamespaceRequest>): ChangeResourceNamespaceRequest {
1032
- const message = globalThis.Object.create((this.messagePrototype!));
1033
- message.projectName = "";
1034
- message.namespaceName = "";
1035
- message.datastoreName = "";
1036
- message.resourceName = "";
1037
- message.newNamespaceName = "";
1038
- if (value !== undefined)
1039
- reflectionMergePartial<ChangeResourceNamespaceRequest>(this, message, value);
1040
- return message;
1041
- }
1042
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ChangeResourceNamespaceRequest): ChangeResourceNamespaceRequest {
1043
- let message = target ?? this.create(), end = reader.pos + length;
1044
- while (reader.pos < end) {
1045
- let [fieldNo, wireType] = reader.tag();
1046
- switch (fieldNo) {
1047
- case /* string project_name */ 1:
1048
- message.projectName = reader.string();
1049
- break;
1050
- case /* string namespace_name */ 2:
1051
- message.namespaceName = reader.string();
1052
- break;
1053
- case /* string datastore_name */ 3:
1054
- message.datastoreName = reader.string();
1055
- break;
1056
- case /* string resource_name */ 4:
1057
- message.resourceName = reader.string();
1058
- break;
1059
- case /* string new_namespace_name */ 5:
1060
- message.newNamespaceName = reader.string();
1061
- break;
1062
- default:
1063
- let u = options.readUnknownField;
1064
- if (u === "throw")
1065
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1066
- let d = reader.skip(wireType);
1067
- if (u !== false)
1068
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1069
- }
1070
- }
1071
- return message;
1072
- }
1073
- internalBinaryWrite(message: ChangeResourceNamespaceRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1074
- /* string project_name = 1; */
1075
- if (message.projectName !== "")
1076
- writer.tag(1, WireType.LengthDelimited).string(message.projectName);
1077
- /* string namespace_name = 2; */
1078
- if (message.namespaceName !== "")
1079
- writer.tag(2, WireType.LengthDelimited).string(message.namespaceName);
1080
- /* string datastore_name = 3; */
1081
- if (message.datastoreName !== "")
1082
- writer.tag(3, WireType.LengthDelimited).string(message.datastoreName);
1083
- /* string resource_name = 4; */
1084
- if (message.resourceName !== "")
1085
- writer.tag(4, WireType.LengthDelimited).string(message.resourceName);
1086
- /* string new_namespace_name = 5; */
1087
- if (message.newNamespaceName !== "")
1088
- writer.tag(5, WireType.LengthDelimited).string(message.newNamespaceName);
1089
- let u = options.writeUnknownFields;
1090
- if (u !== false)
1091
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1092
- return writer;
1093
- }
1094
- }
1095
- /**
1096
- * @generated MessageType for protobuf message raystack.optimus.core.v1beta1.ChangeResourceNamespaceRequest
1097
- */
1098
- export const ChangeResourceNamespaceRequest = new ChangeResourceNamespaceRequest$Type();
1099
- // @generated message type with reflection information, may provide speed optimized methods
1100
- class ChangeResourceNamespaceResponse$Type extends MessageType<ChangeResourceNamespaceResponse> {
1101
- constructor() {
1102
- super("raystack.optimus.core.v1beta1.ChangeResourceNamespaceResponse", []);
1103
- }
1104
- create(value?: PartialMessage<ChangeResourceNamespaceResponse>): ChangeResourceNamespaceResponse {
1105
- const message = globalThis.Object.create((this.messagePrototype!));
1106
- if (value !== undefined)
1107
- reflectionMergePartial<ChangeResourceNamespaceResponse>(this, message, value);
1108
- return message;
1109
- }
1110
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ChangeResourceNamespaceResponse): ChangeResourceNamespaceResponse {
1111
- let message = target ?? this.create(), end = reader.pos + length;
1112
- while (reader.pos < end) {
1113
- let [fieldNo, wireType] = reader.tag();
1114
- switch (fieldNo) {
1115
- default:
1116
- let u = options.readUnknownField;
1117
- if (u === "throw")
1118
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1119
- let d = reader.skip(wireType);
1120
- if (u !== false)
1121
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1122
- }
1123
- }
1124
- return message;
1125
- }
1126
- internalBinaryWrite(message: ChangeResourceNamespaceResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1127
- let u = options.writeUnknownFields;
1128
- if (u !== false)
1129
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1130
- return writer;
1131
- }
1132
- }
1133
- /**
1134
- * @generated MessageType for protobuf message raystack.optimus.core.v1beta1.ChangeResourceNamespaceResponse
1135
- */
1136
- export const ChangeResourceNamespaceResponse = new ChangeResourceNamespaceResponse$Type();
1137
- // @generated message type with reflection information, may provide speed optimized methods
1138
- class ApplyResourcesRequest$Type extends MessageType<ApplyResourcesRequest> {
1139
- constructor() {
1140
- super("raystack.optimus.core.v1beta1.ApplyResourcesRequest", [
1141
- { no: 1, name: "project_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1142
- { no: 2, name: "namespace_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1143
- { no: 3, name: "datastore_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1144
- { no: 4, name: "resource_names", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }
1145
- ]);
1146
- }
1147
- create(value?: PartialMessage<ApplyResourcesRequest>): ApplyResourcesRequest {
1148
- const message = globalThis.Object.create((this.messagePrototype!));
1149
- message.projectName = "";
1150
- message.namespaceName = "";
1151
- message.datastoreName = "";
1152
- message.resourceNames = [];
1153
- if (value !== undefined)
1154
- reflectionMergePartial<ApplyResourcesRequest>(this, message, value);
1155
- return message;
1156
- }
1157
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ApplyResourcesRequest): ApplyResourcesRequest {
1158
- let message = target ?? this.create(), end = reader.pos + length;
1159
- while (reader.pos < end) {
1160
- let [fieldNo, wireType] = reader.tag();
1161
- switch (fieldNo) {
1162
- case /* string project_name */ 1:
1163
- message.projectName = reader.string();
1164
- break;
1165
- case /* string namespace_name */ 2:
1166
- message.namespaceName = reader.string();
1167
- break;
1168
- case /* string datastore_name */ 3:
1169
- message.datastoreName = reader.string();
1170
- break;
1171
- case /* repeated string resource_names */ 4:
1172
- message.resourceNames.push(reader.string());
1173
- break;
1174
- default:
1175
- let u = options.readUnknownField;
1176
- if (u === "throw")
1177
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1178
- let d = reader.skip(wireType);
1179
- if (u !== false)
1180
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1181
- }
1182
- }
1183
- return message;
1184
- }
1185
- internalBinaryWrite(message: ApplyResourcesRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1186
- /* string project_name = 1; */
1187
- if (message.projectName !== "")
1188
- writer.tag(1, WireType.LengthDelimited).string(message.projectName);
1189
- /* string namespace_name = 2; */
1190
- if (message.namespaceName !== "")
1191
- writer.tag(2, WireType.LengthDelimited).string(message.namespaceName);
1192
- /* string datastore_name = 3; */
1193
- if (message.datastoreName !== "")
1194
- writer.tag(3, WireType.LengthDelimited).string(message.datastoreName);
1195
- /* repeated string resource_names = 4; */
1196
- for (let i = 0; i < message.resourceNames.length; i++)
1197
- writer.tag(4, WireType.LengthDelimited).string(message.resourceNames[i]);
1198
- let u = options.writeUnknownFields;
1199
- if (u !== false)
1200
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1201
- return writer;
1202
- }
1203
- }
1204
- /**
1205
- * @generated MessageType for protobuf message raystack.optimus.core.v1beta1.ApplyResourcesRequest
1206
- */
1207
- export const ApplyResourcesRequest = new ApplyResourcesRequest$Type();
1208
- // @generated message type with reflection information, may provide speed optimized methods
1209
- class ApplyResourcesResponse$Type extends MessageType<ApplyResourcesResponse> {
1210
- constructor() {
1211
- super("raystack.optimus.core.v1beta1.ApplyResourcesResponse", [
1212
- { no: 1, name: "statuses", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => ApplyResourcesResponse_ResourceStatus }
1213
- ]);
1214
- }
1215
- create(value?: PartialMessage<ApplyResourcesResponse>): ApplyResourcesResponse {
1216
- const message = globalThis.Object.create((this.messagePrototype!));
1217
- message.statuses = [];
1218
- if (value !== undefined)
1219
- reflectionMergePartial<ApplyResourcesResponse>(this, message, value);
1220
- return message;
1221
- }
1222
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ApplyResourcesResponse): ApplyResourcesResponse {
1223
- let message = target ?? this.create(), end = reader.pos + length;
1224
- while (reader.pos < end) {
1225
- let [fieldNo, wireType] = reader.tag();
1226
- switch (fieldNo) {
1227
- case /* repeated raystack.optimus.core.v1beta1.ApplyResourcesResponse.ResourceStatus statuses */ 1:
1228
- message.statuses.push(ApplyResourcesResponse_ResourceStatus.internalBinaryRead(reader, reader.uint32(), options));
1229
- break;
1230
- default:
1231
- let u = options.readUnknownField;
1232
- if (u === "throw")
1233
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1234
- let d = reader.skip(wireType);
1235
- if (u !== false)
1236
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1237
- }
1238
- }
1239
- return message;
1240
- }
1241
- internalBinaryWrite(message: ApplyResourcesResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1242
- /* repeated raystack.optimus.core.v1beta1.ApplyResourcesResponse.ResourceStatus statuses = 1; */
1243
- for (let i = 0; i < message.statuses.length; i++)
1244
- ApplyResourcesResponse_ResourceStatus.internalBinaryWrite(message.statuses[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
1245
- let u = options.writeUnknownFields;
1246
- if (u !== false)
1247
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1248
- return writer;
1249
- }
1250
- }
1251
- /**
1252
- * @generated MessageType for protobuf message raystack.optimus.core.v1beta1.ApplyResourcesResponse
1253
- */
1254
- export const ApplyResourcesResponse = new ApplyResourcesResponse$Type();
1255
- // @generated message type with reflection information, may provide speed optimized methods
1256
- class ApplyResourcesResponse_ResourceStatus$Type extends MessageType<ApplyResourcesResponse_ResourceStatus> {
1257
- constructor() {
1258
- super("raystack.optimus.core.v1beta1.ApplyResourcesResponse.ResourceStatus", [
1259
- { no: 1, name: "resource_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1260
- { no: 2, name: "status", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
1261
- { no: 3, name: "reason", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
1262
- ]);
1263
- }
1264
- create(value?: PartialMessage<ApplyResourcesResponse_ResourceStatus>): ApplyResourcesResponse_ResourceStatus {
1265
- const message = globalThis.Object.create((this.messagePrototype!));
1266
- message.resourceName = "";
1267
- message.status = "";
1268
- message.reason = "";
1269
- if (value !== undefined)
1270
- reflectionMergePartial<ApplyResourcesResponse_ResourceStatus>(this, message, value);
1271
- return message;
1272
- }
1273
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ApplyResourcesResponse_ResourceStatus): ApplyResourcesResponse_ResourceStatus {
1274
- let message = target ?? this.create(), end = reader.pos + length;
1275
- while (reader.pos < end) {
1276
- let [fieldNo, wireType] = reader.tag();
1277
- switch (fieldNo) {
1278
- case /* string resource_name */ 1:
1279
- message.resourceName = reader.string();
1280
- break;
1281
- case /* string status */ 2:
1282
- message.status = reader.string();
1283
- break;
1284
- case /* string reason */ 3:
1285
- message.reason = reader.string();
1286
- break;
1287
- default:
1288
- let u = options.readUnknownField;
1289
- if (u === "throw")
1290
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1291
- let d = reader.skip(wireType);
1292
- if (u !== false)
1293
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1294
- }
1295
- }
1296
- return message;
1297
- }
1298
- internalBinaryWrite(message: ApplyResourcesResponse_ResourceStatus, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1299
- /* string resource_name = 1; */
1300
- if (message.resourceName !== "")
1301
- writer.tag(1, WireType.LengthDelimited).string(message.resourceName);
1302
- /* string status = 2; */
1303
- if (message.status !== "")
1304
- writer.tag(2, WireType.LengthDelimited).string(message.status);
1305
- /* string reason = 3; */
1306
- if (message.reason !== "")
1307
- writer.tag(3, WireType.LengthDelimited).string(message.reason);
1308
- let u = options.writeUnknownFields;
1309
- if (u !== false)
1310
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1311
- return writer;
1312
- }
1313
- }
1314
- /**
1315
- * @generated MessageType for protobuf message raystack.optimus.core.v1beta1.ApplyResourcesResponse.ResourceStatus
1316
- */
1317
- export const ApplyResourcesResponse_ResourceStatus = new ApplyResourcesResponse_ResourceStatus$Type();
1318
- /**
1319
- * @generated ServiceType for protobuf service raystack.optimus.core.v1beta1.ResourceService
1320
- */
1321
- export const ResourceService = new ServiceType("raystack.optimus.core.v1beta1.ResourceService", [
1322
- { name: "DeployResourceSpecification", serverStreaming: true, clientStreaming: true, options: {}, I: DeployResourceSpecificationRequest, O: DeployResourceSpecificationResponse },
1323
- { name: "ListResourceSpecification", options: { "google.api.http": { get: "/v1beta1/project/{project_name}/namespace/{namespace_name}/datastore/{datastore_name}/resource" } }, I: ListResourceSpecificationRequest, O: ListResourceSpecificationResponse },
1324
- { name: "CreateResource", options: { "google.api.http": { post: "/v1beta1/project/{project_name}/namespace/{namespace_name}/datastore/{datastore_name}/resource", body: "*" } }, I: CreateResourceRequest, O: CreateResourceResponse },
1325
- { name: "ReadResource", options: { "google.api.http": { get: "/v1beta1/project/{project_name}/namespace/{namespace_name}/datastore/{datastore_name}/resource/{resource_name}" } }, I: ReadResourceRequest, O: ReadResourceResponse },
1326
- { name: "UpdateResource", options: { "google.api.http": { put: "/v1beta1/project/{project_name}/namespace/{namespace_name}/datastore/{datastore_name}/resource", body: "*" } }, I: UpdateResourceRequest, O: UpdateResourceResponse },
1327
- { name: "ChangeResourceNamespace", options: { "google.api.http": { post: "/v1beta1/project/{project_name}/change-resource-namespace", body: "*" } }, I: ChangeResourceNamespaceRequest, O: ChangeResourceNamespaceResponse },
1328
- { name: "ApplyResources", options: { "google.api.http": { post: "/v1beta1/project/{project_name}/namespace/{namespace_name}/datastore/{datastore_name}/resources-apply", body: "*" } }, I: ApplyResourcesRequest, O: ApplyResourcesResponse }
1329
- ]);