@milaboratories/pl-drivers 1.6.4 → 1.6.5

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 (82) hide show
  1. package/dist/index.js +2 -2
  2. package/dist/index.js.map +1 -1
  3. package/dist/index.mjs +2026 -2480
  4. package/dist/index.mjs.map +1 -1
  5. package/dist/proto/github.com/googleapis/googleapis/google/rpc/status.d.ts +48 -0
  6. package/dist/proto/github.com/googleapis/googleapis/google/rpc/status.d.ts.map +1 -0
  7. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.client.d.ts +2 -2
  8. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.client.d.ts.map +1 -1
  9. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.d.ts +13 -5
  10. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.d.ts.map +1 -1
  11. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.client.d.ts +2 -2
  12. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.client.d.ts.map +1 -1
  13. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.d.ts +11 -11
  14. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.d.ts.map +1 -1
  15. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.client.d.ts +4 -4
  16. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.client.d.ts.map +1 -1
  17. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.d.ts +10 -10
  18. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.d.ts.map +1 -1
  19. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.client.d.ts +10 -10
  20. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.client.d.ts.map +1 -1
  21. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.d.ts +25 -25
  22. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.d.ts.map +1 -1
  23. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.client.d.ts +8 -8
  24. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.client.d.ts.map +1 -1
  25. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.d.ts +24 -16
  26. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.d.ts.map +1 -1
  27. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/api.client.d.ts +277 -0
  28. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/api.client.d.ts.map +1 -0
  29. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/api.d.ts +5344 -0
  30. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/api.d.ts.map +1 -0
  31. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/api_types.d.ts +530 -0
  32. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/api_types.d.ts.map +1 -0
  33. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/base_types.d.ts +82 -0
  34. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/base_types.d.ts.map +1 -0
  35. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/import.d.ts +91 -0
  36. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/import.d.ts.map +1 -0
  37. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/resource_types.d.ts +251 -0
  38. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/resource_types.d.ts.map +1 -0
  39. package/dist/proto/google/api/http.d.ts +46 -42
  40. package/dist/proto/google/api/http.d.ts.map +1 -1
  41. package/dist/proto/google/protobuf/any.d.ts +172 -0
  42. package/dist/proto/google/protobuf/any.d.ts.map +1 -0
  43. package/dist/proto/google/protobuf/descriptor.d.ts +1003 -170
  44. package/dist/proto/google/protobuf/descriptor.d.ts.map +1 -1
  45. package/dist/proto/google/protobuf/duration.d.ts +2 -3
  46. package/dist/proto/google/protobuf/duration.d.ts.map +1 -1
  47. package/dist/proto/google/protobuf/empty.d.ts +27 -0
  48. package/dist/proto/google/protobuf/empty.d.ts.map +1 -0
  49. package/dist/proto/google/protobuf/struct.d.ts +179 -0
  50. package/dist/proto/google/protobuf/struct.d.ts.map +1 -0
  51. package/dist/proto/google/protobuf/timestamp.d.ts +3 -6
  52. package/dist/proto/google/protobuf/timestamp.d.ts.map +1 -1
  53. package/dist/proto/google/protobuf/wrappers.d.ts +327 -0
  54. package/dist/proto/google/protobuf/wrappers.d.ts.map +1 -0
  55. package/package.json +5 -5
  56. package/src/clients/download.ts +1 -1
  57. package/src/clients/upload.ts +1 -1
  58. package/src/proto/github.com/googleapis/googleapis/google/rpc/status.ts +125 -0
  59. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.client.ts +25 -40
  60. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.ts +252 -396
  61. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.client.ts +25 -37
  62. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.ts +341 -453
  63. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.client.ts +39 -65
  64. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.ts +398 -630
  65. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.client.ts +126 -194
  66. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.ts +626 -964
  67. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.client.ts +102 -153
  68. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.ts +741 -1082
  69. package/src/proto/github.com/milaboratory/pl/plapi/plapiproto/api.client.ts +406 -0
  70. package/src/proto/github.com/milaboratory/pl/plapi/plapiproto/api.ts +14986 -0
  71. package/src/proto/github.com/milaboratory/pl/plapi/plapiproto/api_types.ts +1474 -0
  72. package/src/proto/github.com/milaboratory/pl/plapi/plapiproto/base_types.ts +181 -0
  73. package/src/proto/github.com/milaboratory/pl/plapi/plapiproto/import.ts +251 -0
  74. package/src/proto/github.com/milaboratory/pl/plapi/plapiproto/resource_types.ts +693 -0
  75. package/src/proto/google/api/http.ts +336 -492
  76. package/src/proto/google/protobuf/any.ts +326 -0
  77. package/src/proto/google/protobuf/descriptor.ts +4383 -4772
  78. package/src/proto/google/protobuf/duration.ts +122 -169
  79. package/src/proto/google/protobuf/empty.ts +94 -0
  80. package/src/proto/google/protobuf/struct.ts +484 -0
  81. package/src/proto/google/protobuf/timestamp.ts +150 -225
  82. package/src/proto/google/protobuf/wrappers.ts +785 -0
@@ -1,234 +1,246 @@
1
- // @generated by protobuf-ts 2.9.4 with parameter client_generic,optimize_speed,generate_dependencies,force_server_none
1
+ // @generated by protobuf-ts 2.11.0 with parameter client_generic,optimize_speed,generate_dependencies,force_server_none
2
2
  // @generated from protobuf file "github.com/milaboratory/pl/controllers/shared/grpc/uploadapi/protocol.proto" (package "MiLaboratories.Controller.Shared", syntax proto3)
3
3
  // tslint:disable
4
- import { ServiceType } from '@protobuf-ts/runtime-rpc';
5
- import { WireType } from '@protobuf-ts/runtime';
6
- import type { BinaryWriteOptions } from '@protobuf-ts/runtime';
7
- import type { IBinaryWriter } from '@protobuf-ts/runtime';
8
- import { UnknownFieldHandler } from '@protobuf-ts/runtime';
9
- import type { BinaryReadOptions } from '@protobuf-ts/runtime';
10
- import type { IBinaryReader } 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';
4
+ import { ServiceType } from "@protobuf-ts/runtime-rpc";
5
+ import { WireType } from "@protobuf-ts/runtime";
6
+ import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
7
+ import type { IBinaryWriter } 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
14
  /**
15
15
  * @generated from protobuf message MiLaboratories.Controller.Shared.uploadapi
16
16
  */
17
- export interface uploadapi {}
17
+ export interface uploadapi {
18
+ }
18
19
  /**
19
20
  * @generated from protobuf message MiLaboratories.Controller.Shared.uploadapi.Init
20
21
  */
21
- export interface uploadapi_Init {}
22
+ export interface uploadapi_Init {
23
+ }
22
24
  /**
23
25
  * @generated from protobuf message MiLaboratories.Controller.Shared.uploadapi.Init.Request
24
26
  */
25
27
  export interface uploadapi_Init_Request {
26
- /**
27
- * Id of upload resource
28
- *
29
- * @generated from protobuf field: uint64 resource_id = 1;
30
- */
31
- resourceId: bigint;
28
+ /**
29
+ * Id of upload resource
30
+ *
31
+ * @generated from protobuf field: uint64 resource_id = 1
32
+ */
33
+ resourceId: bigint;
32
34
  }
33
35
  /**
34
36
  * @generated from protobuf message MiLaboratories.Controller.Shared.uploadapi.Init.Response
35
37
  */
36
38
  export interface uploadapi_Init_Response {
37
- /**
38
- * Number of parts in this upload.
39
- * For parallel upload support, client can generate any number of part upload URLs
40
- * at the moment and upload them in parallel.
41
- * <parts_count> keeps the number of chunks supported by this upload.
42
- * The parts count is calculated from the planned size of the upload, controller
43
- * configuration and underlying storage restrictions.
44
- *
45
- * @generated from protobuf field: uint64 parts_count = 1;
46
- */
47
- partsCount: bigint;
48
- /**
49
- * List of IDs of parts that were already uploaded by client.
50
- * Helps client to recover upload and skip already done parts
51
- * after being interrupted in the middle of the upload
52
- * (say, because of the restart).
53
- * Parts enumeration starts from 1.
54
- *
55
- * @generated from protobuf field: repeated uint64 uploaded_parts = 2;
56
- */
57
- uploadedParts: bigint[];
39
+ /**
40
+ * Number of parts in this upload.
41
+ * For parallel upload support, client can generate any number of part upload URLs
42
+ * at the moment and upload them in parallel.
43
+ * <parts_count> keeps the number of chunks supported by this upload.
44
+ * The parts count is calculated from the planned size of the upload, controller
45
+ * configuration and underlying storage restrictions.
46
+ *
47
+ * @generated from protobuf field: uint64 parts_count = 1
48
+ */
49
+ partsCount: bigint;
50
+ /**
51
+ * List of IDs of parts that were already uploaded by client.
52
+ * Helps client to recover upload and skip already done parts
53
+ * after being interrupted in the middle of the upload
54
+ * (say, because of the restart).
55
+ * Parts enumeration starts from 1.
56
+ *
57
+ * @generated from protobuf field: repeated uint64 uploaded_parts = 2
58
+ */
59
+ uploadedParts: bigint[];
58
60
  }
59
61
  /**
60
62
  * @generated from protobuf message MiLaboratories.Controller.Shared.uploadapi.UpdateProgress
61
63
  */
62
- export interface uploadapi_UpdateProgress {}
64
+ export interface uploadapi_UpdateProgress {
65
+ }
63
66
  /**
64
67
  * @generated from protobuf message MiLaboratories.Controller.Shared.uploadapi.UpdateProgress.Request
65
68
  */
66
69
  export interface uploadapi_UpdateProgress_Request {
67
- /**
68
- * Id of upload resource
69
- *
70
- * @generated from protobuf field: uint64 resource_id = 1;
71
- */
72
- resourceId: bigint;
73
- /**
74
- * Amount of bytes, uploaded since the earlier call to UpdateProgress.
75
- * This value is just blindly added to the 'bytes_processed' of progress report,
76
- * so other clients can see the upload progress.
77
- * If client uploads the data in several streams (several chunks in parallel), it
78
- * can safely send progress updates individually for each of the streams, just counting
79
- * bytes uploaded by particular stream.
80
- *
81
- * Negative value can be used to report about upload retry: when upload was interrupted,
82
- * part of the uploaded data is lost and require re-upload.
83
- *
84
- * @generated from protobuf field: int64 bytes_processed = 2;
85
- */
86
- bytesProcessed: bigint;
70
+ /**
71
+ * Id of upload resource
72
+ *
73
+ * @generated from protobuf field: uint64 resource_id = 1
74
+ */
75
+ resourceId: bigint;
76
+ /**
77
+ * Amount of bytes, uploaded since the earlier call to UpdateProgress.
78
+ * This value is just blindly added to the 'bytes_processed' of progress report,
79
+ * so other clients can see the upload progress.
80
+ * If client uploads the data in several streams (several chunks in parallel), it
81
+ * can safely send progress updates individually for each of the streams, just counting
82
+ * bytes uploaded by particular stream.
83
+ *
84
+ * Negative value can be used to report about upload retry: when upload was interrupted,
85
+ * part of the uploaded data is lost and require re-upload.
86
+ *
87
+ * @generated from protobuf field: int64 bytes_processed = 2
88
+ */
89
+ bytesProcessed: bigint;
87
90
  }
88
91
  /**
89
92
  * @generated from protobuf message MiLaboratories.Controller.Shared.uploadapi.UpdateProgress.Response
90
93
  */
91
- export interface uploadapi_UpdateProgress_Response {}
94
+ export interface uploadapi_UpdateProgress_Response {
95
+ }
92
96
  /**
93
97
  * @generated from protobuf message MiLaboratories.Controller.Shared.uploadapi.GetPartURL
94
98
  */
95
- export interface uploadapi_GetPartURL {}
99
+ export interface uploadapi_GetPartURL {
100
+ }
96
101
  /**
97
102
  * @generated from protobuf message MiLaboratories.Controller.Shared.uploadapi.GetPartURL.Request
98
103
  */
99
104
  export interface uploadapi_GetPartURL_Request {
100
- /**
101
- * Id of upload resource
102
- *
103
- * @generated from protobuf field: uint64 resource_id = 1;
104
- */
105
- resourceId: bigint;
106
- /**
107
- * Part to be uploaded. It is responsibility of the Client to watch after already uploaded parts:
108
- * - client can request an URL for the same part twice (request -> request) without errors;
109
- * - client can request an URL for alrady uploaded part (request -> upload -> request) without errors.
110
- *
111
- * Parts enumeration starts from 1.
112
- *
113
- * @generated from protobuf field: uint64 part_number = 2;
114
- */
115
- partNumber: bigint;
116
- /**
117
- * Size of the part uploaded by client earlier. Allows controller to count upload progress
118
- * based on client's input.
119
- * Client is free to never sent this value (send zeroes in each request).
120
- *
121
- * @generated from protobuf field: uint64 uploaded_part_size = 3;
122
- */
123
- uploadedPartSize: bigint;
105
+ /**
106
+ * Id of upload resource
107
+ *
108
+ * @generated from protobuf field: uint64 resource_id = 1
109
+ */
110
+ resourceId: bigint;
111
+ /**
112
+ * Part to be uploaded. It is responsibility of the Client to watch after already uploaded parts:
113
+ * - client can request an URL for the same part twice (request -> request) without errors;
114
+ * - client can request an URL for alrady uploaded part (request -> upload -> request) without errors.
115
+ *
116
+ * Parts enumeration starts from 1.
117
+ *
118
+ * @generated from protobuf field: uint64 part_number = 2
119
+ */
120
+ partNumber: bigint;
121
+ /**
122
+ * Size of the part uploaded by client earlier. Allows controller to count upload progress
123
+ * based on client's input.
124
+ * Client is free to never sent this value (send zeroes in each request).
125
+ *
126
+ * @generated from protobuf field: uint64 uploaded_part_size = 3
127
+ */
128
+ uploadedPartSize: bigint;
129
+ /**
130
+ * Do we need to presign URL for internal use.
131
+ * Controllers could use this if they are trying to download something from internal network.
132
+ * For backward compatibility, by default pl backend will presign external urls.
133
+ *
134
+ * @generated from protobuf field: bool is_internal_use = 4
135
+ */
136
+ isInternalUse: boolean;
124
137
  }
125
138
  /**
126
139
  * @generated from protobuf message MiLaboratories.Controller.Shared.uploadapi.GetPartURL.HTTPHeader
127
140
  */
128
141
  export interface uploadapi_GetPartURL_HTTPHeader {
129
- /**
130
- * @generated from protobuf field: string Name = 1 [json_name = "Name"];
131
- */
132
- name: string;
133
- /**
134
- * @generated from protobuf field: string Value = 2 [json_name = "Value"];
135
- */
136
- value: string;
142
+ /**
143
+ * @generated from protobuf field: string Name = 1
144
+ */
145
+ name: string;
146
+ /**
147
+ * @generated from protobuf field: string Value = 2
148
+ */
149
+ value: string;
137
150
  }
138
151
  /**
139
152
  * @generated from protobuf message MiLaboratories.Controller.Shared.uploadapi.GetPartURL.Response
140
153
  */
141
154
  export interface uploadapi_GetPartURL_Response {
142
- /**
143
- * URL for chunk upload
144
- *
145
- * @generated from protobuf field: string upload_url = 1;
146
- */
147
- uploadUrl: string;
148
- /**
149
- * HTTP method to use for chunk upload, say 'PUT' or 'POST'.
150
- *
151
- * @generated from protobuf field: string method = 2;
152
- */
153
- method: string;
154
- /**
155
- * List of headers with their values, MANDATORY to be sent by the client for the upload.
156
- * The destination service (the one, that will handle upload request for specific part)
157
- * may reject the request if it would not keep the given headers.
158
- *
159
- * @generated from protobuf field: repeated MiLaboratories.Controller.Shared.uploadapi.GetPartURL.HTTPHeader headers = 3;
160
- */
161
- headers: uploadapi_GetPartURL_HTTPHeader[];
162
- /**
163
- * The number of the _first_ byte in the chunk.
164
- * Absolute position from the start of the file ( file.seek(<chunk_start>, SEEK_START) ).
165
- * The client is expected to send [<chunk_start>; <chunk_end>) range.
166
- *
167
- * @generated from protobuf field: uint64 chunk_start = 4;
168
- */
169
- chunkStart: bigint;
170
- /**
171
- * The number of the byte _after_ the last to be sent in the chunk.
172
- * Absolute position from the start of the file.
173
- * The client is expected to send [<chunk_start>; <chunk_end>) range.
174
- *
175
- * @generated from protobuf field: uint64 chunk_end = 5;
176
- */
177
- chunkEnd: bigint;
155
+ /**
156
+ * URL for chunk upload
157
+ *
158
+ * @generated from protobuf field: string upload_url = 1
159
+ */
160
+ uploadUrl: string;
161
+ /**
162
+ * HTTP method to use for chunk upload, say 'PUT' or 'POST'.
163
+ *
164
+ * @generated from protobuf field: string method = 2
165
+ */
166
+ method: string;
167
+ /**
168
+ * List of headers with their values, MANDATORY to be sent by the client for the upload.
169
+ * The destination service (the one, that will handle upload request for specific part)
170
+ * may reject the request if it would not keep the given headers.
171
+ *
172
+ * @generated from protobuf field: repeated MiLaboratories.Controller.Shared.uploadapi.GetPartURL.HTTPHeader headers = 3
173
+ */
174
+ headers: uploadapi_GetPartURL_HTTPHeader[];
175
+ /**
176
+ * The number of the _first_ byte in the chunk.
177
+ * Absolute position from the start of the file ( file.seek(<chunk_start>, SEEK_START) ).
178
+ * The client is expected to send [<chunk_start>; <chunk_end>) range.
179
+ *
180
+ * @generated from protobuf field: uint64 chunk_start = 4
181
+ */
182
+ chunkStart: bigint;
183
+ /**
184
+ * The number of the byte _after_ the last to be sent in the chunk.
185
+ * Absolute position from the start of the file.
186
+ * The client is expected to send [<chunk_start>; <chunk_end>) range.
187
+ *
188
+ * @generated from protobuf field: uint64 chunk_end = 5
189
+ */
190
+ chunkEnd: bigint;
178
191
  }
179
192
  /**
180
193
  * @generated from protobuf message MiLaboratories.Controller.Shared.uploadapi.Finalize
181
194
  */
182
- export interface uploadapi_Finalize {}
195
+ export interface uploadapi_Finalize {
196
+ }
183
197
  /**
184
198
  * @generated from protobuf message MiLaboratories.Controller.Shared.uploadapi.Finalize.Request
185
199
  */
186
200
  export interface uploadapi_Finalize_Request {
187
- /**
188
- * @generated from protobuf field: uint64 resource_id = 1;
189
- */
190
- resourceId: bigint;
201
+ /**
202
+ * @generated from protobuf field: uint64 resource_id = 1
203
+ */
204
+ resourceId: bigint;
191
205
  }
192
206
  /**
193
207
  * @generated from protobuf message MiLaboratories.Controller.Shared.uploadapi.Finalize.Response
194
208
  */
195
- export interface uploadapi_Finalize_Response {}
209
+ export interface uploadapi_Finalize_Response {
210
+ }
196
211
  // @generated message type with reflection information, may provide speed optimized methods
197
212
  class uploadapi$Type extends MessageType<uploadapi> {
198
- constructor() {
199
- super('MiLaboratories.Controller.Shared.uploadapi', []);
200
- }
201
-
202
- create(value?: PartialMessage<uploadapi>): uploadapi {
203
- const message = globalThis.Object.create(this.messagePrototype!);
204
- if (value !== undefined)
205
- reflectionMergePartial<uploadapi>(this, message, value);
206
- return message;
207
- }
208
-
209
- internalBinaryRead(
210
- reader: IBinaryReader,
211
- length: number,
212
- options: BinaryReadOptions,
213
- target?: uploadapi,
214
- ): uploadapi {
215
- return target ?? this.create();
216
- }
217
-
218
- internalBinaryWrite(
219
- message: uploadapi,
220
- writer: IBinaryWriter,
221
- options: BinaryWriteOptions,
222
- ): IBinaryWriter {
223
- const u = options.writeUnknownFields;
224
- if (u !== false)
225
- (u == true ? UnknownFieldHandler.onWrite : u)(
226
- this.typeName,
227
- message,
228
- writer,
229
- );
230
- return writer;
231
- }
213
+ constructor() {
214
+ super("MiLaboratories.Controller.Shared.uploadapi", []);
215
+ }
216
+ create(value?: PartialMessage<uploadapi>): uploadapi {
217
+ const message = globalThis.Object.create((this.messagePrototype!));
218
+ if (value !== undefined)
219
+ reflectionMergePartial<uploadapi>(this, message, value);
220
+ return message;
221
+ }
222
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: uploadapi): uploadapi {
223
+ let message = target ?? this.create(), end = reader.pos + length;
224
+ while (reader.pos < end) {
225
+ let [fieldNo, wireType] = reader.tag();
226
+ switch (fieldNo) {
227
+ default:
228
+ let u = options.readUnknownField;
229
+ if (u === "throw")
230
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
231
+ let d = reader.skip(wireType);
232
+ if (u !== false)
233
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
234
+ }
235
+ }
236
+ return message;
237
+ }
238
+ internalBinaryWrite(message: uploadapi, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
239
+ let u = options.writeUnknownFields;
240
+ if (u !== false)
241
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
242
+ return writer;
243
+ }
232
244
  }
233
245
  /**
234
246
  * @generated MessageType for protobuf message MiLaboratories.Controller.Shared.uploadapi
@@ -236,40 +248,37 @@ class uploadapi$Type extends MessageType<uploadapi> {
236
248
  export const uploadapi = new uploadapi$Type();
237
249
  // @generated message type with reflection information, may provide speed optimized methods
238
250
  class uploadapi_Init$Type extends MessageType<uploadapi_Init> {
239
- constructor() {
240
- super('MiLaboratories.Controller.Shared.uploadapi.Init', []);
241
- }
242
-
243
- create(value?: PartialMessage<uploadapi_Init>): uploadapi_Init {
244
- const message = globalThis.Object.create(this.messagePrototype!);
245
- if (value !== undefined)
246
- reflectionMergePartial<uploadapi_Init>(this, message, value);
247
- return message;
248
- }
249
-
250
- internalBinaryRead(
251
- reader: IBinaryReader,
252
- length: number,
253
- options: BinaryReadOptions,
254
- target?: uploadapi_Init,
255
- ): uploadapi_Init {
256
- return target ?? this.create();
257
- }
258
-
259
- internalBinaryWrite(
260
- message: uploadapi_Init,
261
- writer: IBinaryWriter,
262
- options: BinaryWriteOptions,
263
- ): IBinaryWriter {
264
- const u = options.writeUnknownFields;
265
- if (u !== false)
266
- (u == true ? UnknownFieldHandler.onWrite : u)(
267
- this.typeName,
268
- message,
269
- writer,
270
- );
271
- return writer;
272
- }
251
+ constructor() {
252
+ super("MiLaboratories.Controller.Shared.uploadapi.Init", []);
253
+ }
254
+ create(value?: PartialMessage<uploadapi_Init>): uploadapi_Init {
255
+ const message = globalThis.Object.create((this.messagePrototype!));
256
+ if (value !== undefined)
257
+ reflectionMergePartial<uploadapi_Init>(this, message, value);
258
+ return message;
259
+ }
260
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: uploadapi_Init): uploadapi_Init {
261
+ let message = target ?? this.create(), end = reader.pos + length;
262
+ while (reader.pos < end) {
263
+ let [fieldNo, wireType] = reader.tag();
264
+ switch (fieldNo) {
265
+ default:
266
+ let u = options.readUnknownField;
267
+ if (u === "throw")
268
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
269
+ let d = reader.skip(wireType);
270
+ if (u !== false)
271
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
272
+ }
273
+ }
274
+ return message;
275
+ }
276
+ internalBinaryWrite(message: uploadapi_Init, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
277
+ let u = options.writeUnknownFields;
278
+ if (u !== false)
279
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
280
+ return writer;
281
+ }
273
282
  }
274
283
  /**
275
284
  * @generated MessageType for protobuf message MiLaboratories.Controller.Shared.uploadapi.Init
@@ -277,79 +286,46 @@ class uploadapi_Init$Type extends MessageType<uploadapi_Init> {
277
286
  export const uploadapi_Init = new uploadapi_Init$Type();
278
287
  // @generated message type with reflection information, may provide speed optimized methods
279
288
  class uploadapi_Init_Request$Type extends MessageType<uploadapi_Init_Request> {
280
- constructor() {
281
- super('MiLaboratories.Controller.Shared.uploadapi.Init.Request', [
282
- {
283
- no: 1,
284
- name: 'resource_id',
285
- kind: 'scalar',
286
- T: 4 /* ScalarType.UINT64 */,
287
- L: 0, /* LongType.BIGINT */
288
- },
289
- ]);
290
- }
291
-
292
- create(
293
- value?: PartialMessage<uploadapi_Init_Request>,
294
- ): uploadapi_Init_Request {
295
- const message = globalThis.Object.create(this.messagePrototype!);
296
- message.resourceId = 0n;
297
- if (value !== undefined)
298
- reflectionMergePartial<uploadapi_Init_Request>(this, message, value);
299
- return message;
300
- }
301
-
302
- internalBinaryRead(
303
- reader: IBinaryReader,
304
- length: number,
305
- options: BinaryReadOptions,
306
- target?: uploadapi_Init_Request,
307
- ): uploadapi_Init_Request {
308
- const message = target ?? this.create(),
309
- end = reader.pos + length;
310
- while (reader.pos < end) {
311
- const [fieldNo, wireType] = reader.tag();
312
- switch (fieldNo) {
313
- case /* uint64 resource_id */ 1:
314
- message.resourceId = reader.uint64().toBigInt();
315
- break;
316
- default:
317
- const u = options.readUnknownField;
318
- if (u === 'throw')
319
- throw new globalThis.Error(
320
- `Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`,
321
- );
322
- const d = reader.skip(wireType);
323
- if (u !== false)
324
- (u === true ? UnknownFieldHandler.onRead : u)(
325
- this.typeName,
326
- message,
327
- fieldNo,
328
- wireType,
329
- d,
330
- );
331
- }
289
+ constructor() {
290
+ super("MiLaboratories.Controller.Shared.uploadapi.Init.Request", [
291
+ { no: 1, name: "resource_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ }
292
+ ]);
293
+ }
294
+ create(value?: PartialMessage<uploadapi_Init_Request>): uploadapi_Init_Request {
295
+ const message = globalThis.Object.create((this.messagePrototype!));
296
+ message.resourceId = 0n;
297
+ if (value !== undefined)
298
+ reflectionMergePartial<uploadapi_Init_Request>(this, message, value);
299
+ return message;
300
+ }
301
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: uploadapi_Init_Request): uploadapi_Init_Request {
302
+ let message = target ?? this.create(), end = reader.pos + length;
303
+ while (reader.pos < end) {
304
+ let [fieldNo, wireType] = reader.tag();
305
+ switch (fieldNo) {
306
+ case /* uint64 resource_id */ 1:
307
+ message.resourceId = reader.uint64().toBigInt();
308
+ break;
309
+ default:
310
+ let u = options.readUnknownField;
311
+ if (u === "throw")
312
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
313
+ let d = reader.skip(wireType);
314
+ if (u !== false)
315
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
316
+ }
317
+ }
318
+ return message;
319
+ }
320
+ internalBinaryWrite(message: uploadapi_Init_Request, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
321
+ /* uint64 resource_id = 1; */
322
+ if (message.resourceId !== 0n)
323
+ writer.tag(1, WireType.Varint).uint64(message.resourceId);
324
+ let u = options.writeUnknownFields;
325
+ if (u !== false)
326
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
327
+ return writer;
332
328
  }
333
- return message;
334
- }
335
-
336
- internalBinaryWrite(
337
- message: uploadapi_Init_Request,
338
- writer: IBinaryWriter,
339
- options: BinaryWriteOptions,
340
- ): IBinaryWriter {
341
- /* uint64 resource_id = 1; */
342
- if (message.resourceId !== 0n)
343
- writer.tag(1, WireType.Varint).uint64(message.resourceId);
344
- const u = options.writeUnknownFields;
345
- if (u !== false)
346
- (u == true ? UnknownFieldHandler.onWrite : u)(
347
- this.typeName,
348
- message,
349
- writer,
350
- );
351
- return writer;
352
- }
353
329
  }
354
330
  /**
355
331
  * @generated MessageType for protobuf message MiLaboratories.Controller.Shared.uploadapi.Init.Request
@@ -357,101 +333,62 @@ class uploadapi_Init_Request$Type extends MessageType<uploadapi_Init_Request> {
357
333
  export const uploadapi_Init_Request = new uploadapi_Init_Request$Type();
358
334
  // @generated message type with reflection information, may provide speed optimized methods
359
335
  class uploadapi_Init_Response$Type extends MessageType<uploadapi_Init_Response> {
360
- constructor() {
361
- super('MiLaboratories.Controller.Shared.uploadapi.Init.Response', [
362
- {
363
- no: 1,
364
- name: 'parts_count',
365
- kind: 'scalar',
366
- T: 4 /* ScalarType.UINT64 */,
367
- L: 0, /* LongType.BIGINT */
368
- },
369
- {
370
- no: 2,
371
- name: 'uploaded_parts',
372
- kind: 'scalar',
373
- repeat: 1 /* RepeatType.PACKED */,
374
- T: 4 /* ScalarType.UINT64 */,
375
- L: 0, /* LongType.BIGINT */
376
- },
377
- ]);
378
- }
379
-
380
- create(
381
- value?: PartialMessage<uploadapi_Init_Response>,
382
- ): uploadapi_Init_Response {
383
- const message = globalThis.Object.create(this.messagePrototype!);
384
- message.partsCount = 0n;
385
- message.uploadedParts = [];
386
- if (value !== undefined)
387
- reflectionMergePartial<uploadapi_Init_Response>(this, message, value);
388
- return message;
389
- }
390
-
391
- internalBinaryRead(
392
- reader: IBinaryReader,
393
- length: number,
394
- options: BinaryReadOptions,
395
- target?: uploadapi_Init_Response,
396
- ): uploadapi_Init_Response {
397
- const message = target ?? this.create(),
398
- end = reader.pos + length;
399
- while (reader.pos < end) {
400
- const [fieldNo, wireType] = reader.tag();
401
- switch (fieldNo) {
402
- case /* uint64 parts_count */ 1:
403
- message.partsCount = reader.uint64().toBigInt();
404
- break;
405
- case /* repeated uint64 uploaded_parts */ 2:
406
- if (wireType === WireType.LengthDelimited)
407
- for (let e = reader.int32() + reader.pos; reader.pos < e;)
408
- message.uploadedParts.push(reader.uint64().toBigInt());
409
- else message.uploadedParts.push(reader.uint64().toBigInt());
410
- break;
411
- default:
412
- const u = options.readUnknownField;
413
- if (u === 'throw')
414
- throw new globalThis.Error(
415
- `Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`,
416
- );
417
- const d = reader.skip(wireType);
418
- if (u !== false)
419
- (u === true ? UnknownFieldHandler.onRead : u)(
420
- this.typeName,
421
- message,
422
- fieldNo,
423
- wireType,
424
- d,
425
- );
426
- }
336
+ constructor() {
337
+ super("MiLaboratories.Controller.Shared.uploadapi.Init.Response", [
338
+ { no: 1, name: "parts_count", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ },
339
+ { no: 2, name: "uploaded_parts", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ }
340
+ ]);
427
341
  }
428
- return message;
429
- }
430
-
431
- internalBinaryWrite(
432
- message: uploadapi_Init_Response,
433
- writer: IBinaryWriter,
434
- options: BinaryWriteOptions,
435
- ): IBinaryWriter {
436
- /* uint64 parts_count = 1; */
437
- if (message.partsCount !== 0n)
438
- writer.tag(1, WireType.Varint).uint64(message.partsCount);
439
- /* repeated uint64 uploaded_parts = 2; */
440
- if (message.uploadedParts.length) {
441
- writer.tag(2, WireType.LengthDelimited).fork();
442
- for (let i = 0; i < message.uploadedParts.length; i++)
443
- writer.uint64(message.uploadedParts[i]);
444
- writer.join();
342
+ create(value?: PartialMessage<uploadapi_Init_Response>): uploadapi_Init_Response {
343
+ const message = globalThis.Object.create((this.messagePrototype!));
344
+ message.partsCount = 0n;
345
+ message.uploadedParts = [];
346
+ if (value !== undefined)
347
+ reflectionMergePartial<uploadapi_Init_Response>(this, message, value);
348
+ return message;
349
+ }
350
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: uploadapi_Init_Response): uploadapi_Init_Response {
351
+ let message = target ?? this.create(), end = reader.pos + length;
352
+ while (reader.pos < end) {
353
+ let [fieldNo, wireType] = reader.tag();
354
+ switch (fieldNo) {
355
+ case /* uint64 parts_count */ 1:
356
+ message.partsCount = reader.uint64().toBigInt();
357
+ break;
358
+ case /* repeated uint64 uploaded_parts */ 2:
359
+ if (wireType === WireType.LengthDelimited)
360
+ for (let e = reader.int32() + reader.pos; reader.pos < e;)
361
+ message.uploadedParts.push(reader.uint64().toBigInt());
362
+ else
363
+ message.uploadedParts.push(reader.uint64().toBigInt());
364
+ break;
365
+ default:
366
+ let u = options.readUnknownField;
367
+ if (u === "throw")
368
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
369
+ let d = reader.skip(wireType);
370
+ if (u !== false)
371
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
372
+ }
373
+ }
374
+ return message;
375
+ }
376
+ internalBinaryWrite(message: uploadapi_Init_Response, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
377
+ /* uint64 parts_count = 1; */
378
+ if (message.partsCount !== 0n)
379
+ writer.tag(1, WireType.Varint).uint64(message.partsCount);
380
+ /* repeated uint64 uploaded_parts = 2; */
381
+ if (message.uploadedParts.length) {
382
+ writer.tag(2, WireType.LengthDelimited).fork();
383
+ for (let i = 0; i < message.uploadedParts.length; i++)
384
+ writer.uint64(message.uploadedParts[i]);
385
+ writer.join();
386
+ }
387
+ let u = options.writeUnknownFields;
388
+ if (u !== false)
389
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
390
+ return writer;
445
391
  }
446
- const u = options.writeUnknownFields;
447
- if (u !== false)
448
- (u == true ? UnknownFieldHandler.onWrite : u)(
449
- this.typeName,
450
- message,
451
- writer,
452
- );
453
- return writer;
454
- }
455
392
  }
456
393
  /**
457
394
  * @generated MessageType for protobuf message MiLaboratories.Controller.Shared.uploadapi.Init.Response
@@ -459,42 +396,37 @@ class uploadapi_Init_Response$Type extends MessageType<uploadapi_Init_Response>
459
396
  export const uploadapi_Init_Response = new uploadapi_Init_Response$Type();
460
397
  // @generated message type with reflection information, may provide speed optimized methods
461
398
  class uploadapi_UpdateProgress$Type extends MessageType<uploadapi_UpdateProgress> {
462
- constructor() {
463
- super('MiLaboratories.Controller.Shared.uploadapi.UpdateProgress', []);
464
- }
465
-
466
- create(
467
- value?: PartialMessage<uploadapi_UpdateProgress>,
468
- ): uploadapi_UpdateProgress {
469
- const message = globalThis.Object.create(this.messagePrototype!);
470
- if (value !== undefined)
471
- reflectionMergePartial<uploadapi_UpdateProgress>(this, message, value);
472
- return message;
473
- }
474
-
475
- internalBinaryRead(
476
- reader: IBinaryReader,
477
- length: number,
478
- options: BinaryReadOptions,
479
- target?: uploadapi_UpdateProgress,
480
- ): uploadapi_UpdateProgress {
481
- return target ?? this.create();
482
- }
483
-
484
- internalBinaryWrite(
485
- message: uploadapi_UpdateProgress,
486
- writer: IBinaryWriter,
487
- options: BinaryWriteOptions,
488
- ): IBinaryWriter {
489
- const u = options.writeUnknownFields;
490
- if (u !== false)
491
- (u == true ? UnknownFieldHandler.onWrite : u)(
492
- this.typeName,
493
- message,
494
- writer,
495
- );
496
- return writer;
497
- }
399
+ constructor() {
400
+ super("MiLaboratories.Controller.Shared.uploadapi.UpdateProgress", []);
401
+ }
402
+ create(value?: PartialMessage<uploadapi_UpdateProgress>): uploadapi_UpdateProgress {
403
+ const message = globalThis.Object.create((this.messagePrototype!));
404
+ if (value !== undefined)
405
+ reflectionMergePartial<uploadapi_UpdateProgress>(this, message, value);
406
+ return message;
407
+ }
408
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: uploadapi_UpdateProgress): uploadapi_UpdateProgress {
409
+ let message = target ?? this.create(), end = reader.pos + length;
410
+ while (reader.pos < end) {
411
+ let [fieldNo, wireType] = reader.tag();
412
+ switch (fieldNo) {
413
+ default:
414
+ let u = options.readUnknownField;
415
+ if (u === "throw")
416
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
417
+ let d = reader.skip(wireType);
418
+ if (u !== false)
419
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
420
+ }
421
+ }
422
+ return message;
423
+ }
424
+ internalBinaryWrite(message: uploadapi_UpdateProgress, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
425
+ let u = options.writeUnknownFields;
426
+ if (u !== false)
427
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
428
+ return writer;
429
+ }
498
430
  }
499
431
  /**
500
432
  * @generated MessageType for protobuf message MiLaboratories.Controller.Shared.uploadapi.UpdateProgress
@@ -502,190 +434,130 @@ class uploadapi_UpdateProgress$Type extends MessageType<uploadapi_UpdateProgress
502
434
  export const uploadapi_UpdateProgress = new uploadapi_UpdateProgress$Type();
503
435
  // @generated message type with reflection information, may provide speed optimized methods
504
436
  class uploadapi_UpdateProgress_Request$Type extends MessageType<uploadapi_UpdateProgress_Request> {
505
- constructor() {
506
- super('MiLaboratories.Controller.Shared.uploadapi.UpdateProgress.Request', [
507
- {
508
- no: 1,
509
- name: 'resource_id',
510
- kind: 'scalar',
511
- T: 4 /* ScalarType.UINT64 */,
512
- L: 0, /* LongType.BIGINT */
513
- },
514
- {
515
- no: 2,
516
- name: 'bytes_processed',
517
- kind: 'scalar',
518
- T: 3 /* ScalarType.INT64 */,
519
- L: 0, /* LongType.BIGINT */
520
- },
521
- ]);
522
- }
523
-
524
- create(
525
- value?: PartialMessage<uploadapi_UpdateProgress_Request>,
526
- ): uploadapi_UpdateProgress_Request {
527
- const message = globalThis.Object.create(this.messagePrototype!);
528
- message.resourceId = 0n;
529
- message.bytesProcessed = 0n;
530
- if (value !== undefined)
531
- reflectionMergePartial<uploadapi_UpdateProgress_Request>(
532
- this,
533
- message,
534
- value,
535
- );
536
- return message;
537
- }
538
-
539
- internalBinaryRead(
540
- reader: IBinaryReader,
541
- length: number,
542
- options: BinaryReadOptions,
543
- target?: uploadapi_UpdateProgress_Request,
544
- ): uploadapi_UpdateProgress_Request {
545
- const message = target ?? this.create(),
546
- end = reader.pos + length;
547
- while (reader.pos < end) {
548
- const [fieldNo, wireType] = reader.tag();
549
- switch (fieldNo) {
550
- case /* uint64 resource_id */ 1:
551
- message.resourceId = reader.uint64().toBigInt();
552
- break;
553
- case /* int64 bytes_processed */ 2:
554
- message.bytesProcessed = reader.int64().toBigInt();
555
- break;
556
- default:
557
- const u = options.readUnknownField;
558
- if (u === 'throw')
559
- throw new globalThis.Error(
560
- `Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`,
561
- );
562
- const d = reader.skip(wireType);
563
- if (u !== false)
564
- (u === true ? UnknownFieldHandler.onRead : u)(
565
- this.typeName,
566
- message,
567
- fieldNo,
568
- wireType,
569
- d,
570
- );
571
- }
437
+ constructor() {
438
+ super("MiLaboratories.Controller.Shared.uploadapi.UpdateProgress.Request", [
439
+ { no: 1, name: "resource_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ },
440
+ { no: 2, name: "bytes_processed", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }
441
+ ]);
442
+ }
443
+ create(value?: PartialMessage<uploadapi_UpdateProgress_Request>): uploadapi_UpdateProgress_Request {
444
+ const message = globalThis.Object.create((this.messagePrototype!));
445
+ message.resourceId = 0n;
446
+ message.bytesProcessed = 0n;
447
+ if (value !== undefined)
448
+ reflectionMergePartial<uploadapi_UpdateProgress_Request>(this, message, value);
449
+ return message;
450
+ }
451
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: uploadapi_UpdateProgress_Request): uploadapi_UpdateProgress_Request {
452
+ let message = target ?? this.create(), end = reader.pos + length;
453
+ while (reader.pos < end) {
454
+ let [fieldNo, wireType] = reader.tag();
455
+ switch (fieldNo) {
456
+ case /* uint64 resource_id */ 1:
457
+ message.resourceId = reader.uint64().toBigInt();
458
+ break;
459
+ case /* int64 bytes_processed */ 2:
460
+ message.bytesProcessed = reader.int64().toBigInt();
461
+ break;
462
+ default:
463
+ let u = options.readUnknownField;
464
+ if (u === "throw")
465
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
466
+ let d = reader.skip(wireType);
467
+ if (u !== false)
468
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
469
+ }
470
+ }
471
+ return message;
472
+ }
473
+ internalBinaryWrite(message: uploadapi_UpdateProgress_Request, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
474
+ /* uint64 resource_id = 1; */
475
+ if (message.resourceId !== 0n)
476
+ writer.tag(1, WireType.Varint).uint64(message.resourceId);
477
+ /* int64 bytes_processed = 2; */
478
+ if (message.bytesProcessed !== 0n)
479
+ writer.tag(2, WireType.Varint).int64(message.bytesProcessed);
480
+ let u = options.writeUnknownFields;
481
+ if (u !== false)
482
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
483
+ return writer;
572
484
  }
573
- return message;
574
- }
575
-
576
- internalBinaryWrite(
577
- message: uploadapi_UpdateProgress_Request,
578
- writer: IBinaryWriter,
579
- options: BinaryWriteOptions,
580
- ): IBinaryWriter {
581
- /* uint64 resource_id = 1; */
582
- if (message.resourceId !== 0n)
583
- writer.tag(1, WireType.Varint).uint64(message.resourceId);
584
- /* int64 bytes_processed = 2; */
585
- if (message.bytesProcessed !== 0n)
586
- writer.tag(2, WireType.Varint).int64(message.bytesProcessed);
587
- const u = options.writeUnknownFields;
588
- if (u !== false)
589
- (u == true ? UnknownFieldHandler.onWrite : u)(
590
- this.typeName,
591
- message,
592
- writer,
593
- );
594
- return writer;
595
- }
596
485
  }
597
486
  /**
598
487
  * @generated MessageType for protobuf message MiLaboratories.Controller.Shared.uploadapi.UpdateProgress.Request
599
488
  */
600
- export const uploadapi_UpdateProgress_Request
601
- = new uploadapi_UpdateProgress_Request$Type();
489
+ export const uploadapi_UpdateProgress_Request = new uploadapi_UpdateProgress_Request$Type();
602
490
  // @generated message type with reflection information, may provide speed optimized methods
603
491
  class uploadapi_UpdateProgress_Response$Type extends MessageType<uploadapi_UpdateProgress_Response> {
604
- constructor() {
605
- super(
606
- 'MiLaboratories.Controller.Shared.uploadapi.UpdateProgress.Response',
607
- [],
608
- );
609
- }
610
-
611
- create(
612
- value?: PartialMessage<uploadapi_UpdateProgress_Response>,
613
- ): uploadapi_UpdateProgress_Response {
614
- const message = globalThis.Object.create(this.messagePrototype!);
615
- if (value !== undefined)
616
- reflectionMergePartial<uploadapi_UpdateProgress_Response>(
617
- this,
618
- message,
619
- value,
620
- );
621
- return message;
622
- }
623
-
624
- internalBinaryRead(
625
- reader: IBinaryReader,
626
- length: number,
627
- options: BinaryReadOptions,
628
- target?: uploadapi_UpdateProgress_Response,
629
- ): uploadapi_UpdateProgress_Response {
630
- return target ?? this.create();
631
- }
632
-
633
- internalBinaryWrite(
634
- message: uploadapi_UpdateProgress_Response,
635
- writer: IBinaryWriter,
636
- options: BinaryWriteOptions,
637
- ): IBinaryWriter {
638
- const u = options.writeUnknownFields;
639
- if (u !== false)
640
- (u == true ? UnknownFieldHandler.onWrite : u)(
641
- this.typeName,
642
- message,
643
- writer,
644
- );
645
- return writer;
646
- }
492
+ constructor() {
493
+ super("MiLaboratories.Controller.Shared.uploadapi.UpdateProgress.Response", []);
494
+ }
495
+ create(value?: PartialMessage<uploadapi_UpdateProgress_Response>): uploadapi_UpdateProgress_Response {
496
+ const message = globalThis.Object.create((this.messagePrototype!));
497
+ if (value !== undefined)
498
+ reflectionMergePartial<uploadapi_UpdateProgress_Response>(this, message, value);
499
+ return message;
500
+ }
501
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: uploadapi_UpdateProgress_Response): uploadapi_UpdateProgress_Response {
502
+ let message = target ?? this.create(), end = reader.pos + length;
503
+ while (reader.pos < end) {
504
+ let [fieldNo, wireType] = reader.tag();
505
+ switch (fieldNo) {
506
+ default:
507
+ let u = options.readUnknownField;
508
+ if (u === "throw")
509
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
510
+ let d = reader.skip(wireType);
511
+ if (u !== false)
512
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
513
+ }
514
+ }
515
+ return message;
516
+ }
517
+ internalBinaryWrite(message: uploadapi_UpdateProgress_Response, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
518
+ let u = options.writeUnknownFields;
519
+ if (u !== false)
520
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
521
+ return writer;
522
+ }
647
523
  }
648
524
  /**
649
525
  * @generated MessageType for protobuf message MiLaboratories.Controller.Shared.uploadapi.UpdateProgress.Response
650
526
  */
651
- export const uploadapi_UpdateProgress_Response
652
- = new uploadapi_UpdateProgress_Response$Type();
527
+ export const uploadapi_UpdateProgress_Response = new uploadapi_UpdateProgress_Response$Type();
653
528
  // @generated message type with reflection information, may provide speed optimized methods
654
529
  class uploadapi_GetPartURL$Type extends MessageType<uploadapi_GetPartURL> {
655
- constructor() {
656
- super('MiLaboratories.Controller.Shared.uploadapi.GetPartURL', []);
657
- }
658
-
659
- create(value?: PartialMessage<uploadapi_GetPartURL>): uploadapi_GetPartURL {
660
- const message = globalThis.Object.create(this.messagePrototype!);
661
- if (value !== undefined)
662
- reflectionMergePartial<uploadapi_GetPartURL>(this, message, value);
663
- return message;
664
- }
665
-
666
- internalBinaryRead(
667
- reader: IBinaryReader,
668
- length: number,
669
- options: BinaryReadOptions,
670
- target?: uploadapi_GetPartURL,
671
- ): uploadapi_GetPartURL {
672
- return target ?? this.create();
673
- }
674
-
675
- internalBinaryWrite(
676
- message: uploadapi_GetPartURL,
677
- writer: IBinaryWriter,
678
- options: BinaryWriteOptions,
679
- ): IBinaryWriter {
680
- const u = options.writeUnknownFields;
681
- if (u !== false)
682
- (u == true ? UnknownFieldHandler.onWrite : u)(
683
- this.typeName,
684
- message,
685
- writer,
686
- );
687
- return writer;
688
- }
530
+ constructor() {
531
+ super("MiLaboratories.Controller.Shared.uploadapi.GetPartURL", []);
532
+ }
533
+ create(value?: PartialMessage<uploadapi_GetPartURL>): uploadapi_GetPartURL {
534
+ const message = globalThis.Object.create((this.messagePrototype!));
535
+ if (value !== undefined)
536
+ reflectionMergePartial<uploadapi_GetPartURL>(this, message, value);
537
+ return message;
538
+ }
539
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: uploadapi_GetPartURL): uploadapi_GetPartURL {
540
+ let message = target ?? this.create(), end = reader.pos + length;
541
+ while (reader.pos < end) {
542
+ let [fieldNo, wireType] = reader.tag();
543
+ switch (fieldNo) {
544
+ default:
545
+ let u = options.readUnknownField;
546
+ if (u === "throw")
547
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
548
+ let d = reader.skip(wireType);
549
+ if (u !== false)
550
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
551
+ }
552
+ }
553
+ return message;
554
+ }
555
+ internalBinaryWrite(message: uploadapi_GetPartURL, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
556
+ let u = options.writeUnknownFields;
557
+ if (u !== false)
558
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
559
+ return writer;
560
+ }
689
561
  }
690
562
  /**
691
563
  * @generated MessageType for protobuf message MiLaboratories.Controller.Shared.uploadapi.GetPartURL
@@ -693,393 +565,242 @@ class uploadapi_GetPartURL$Type extends MessageType<uploadapi_GetPartURL> {
693
565
  export const uploadapi_GetPartURL = new uploadapi_GetPartURL$Type();
694
566
  // @generated message type with reflection information, may provide speed optimized methods
695
567
  class uploadapi_GetPartURL_Request$Type extends MessageType<uploadapi_GetPartURL_Request> {
696
- constructor() {
697
- super('MiLaboratories.Controller.Shared.uploadapi.GetPartURL.Request', [
698
- {
699
- no: 1,
700
- name: 'resource_id',
701
- kind: 'scalar',
702
- T: 4 /* ScalarType.UINT64 */,
703
- L: 0, /* LongType.BIGINT */
704
- },
705
- {
706
- no: 2,
707
- name: 'part_number',
708
- kind: 'scalar',
709
- T: 4 /* ScalarType.UINT64 */,
710
- L: 0, /* LongType.BIGINT */
711
- },
712
- {
713
- no: 3,
714
- name: 'uploaded_part_size',
715
- kind: 'scalar',
716
- T: 4 /* ScalarType.UINT64 */,
717
- L: 0, /* LongType.BIGINT */
718
- },
719
- ]);
720
- }
721
-
722
- create(
723
- value?: PartialMessage<uploadapi_GetPartURL_Request>,
724
- ): uploadapi_GetPartURL_Request {
725
- const message = globalThis.Object.create(this.messagePrototype!);
726
- message.resourceId = 0n;
727
- message.partNumber = 0n;
728
- message.uploadedPartSize = 0n;
729
- if (value !== undefined)
730
- reflectionMergePartial<uploadapi_GetPartURL_Request>(
731
- this,
732
- message,
733
- value,
734
- );
735
- return message;
736
- }
737
-
738
- internalBinaryRead(
739
- reader: IBinaryReader,
740
- length: number,
741
- options: BinaryReadOptions,
742
- target?: uploadapi_GetPartURL_Request,
743
- ): uploadapi_GetPartURL_Request {
744
- const message = target ?? this.create(),
745
- end = reader.pos + length;
746
- while (reader.pos < end) {
747
- const [fieldNo, wireType] = reader.tag();
748
- switch (fieldNo) {
749
- case /* uint64 resource_id */ 1:
750
- message.resourceId = reader.uint64().toBigInt();
751
- break;
752
- case /* uint64 part_number */ 2:
753
- message.partNumber = reader.uint64().toBigInt();
754
- break;
755
- case /* uint64 uploaded_part_size */ 3:
756
- message.uploadedPartSize = reader.uint64().toBigInt();
757
- break;
758
- default:
759
- const u = options.readUnknownField;
760
- if (u === 'throw')
761
- throw new globalThis.Error(
762
- `Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`,
763
- );
764
- const d = reader.skip(wireType);
765
- if (u !== false)
766
- (u === true ? UnknownFieldHandler.onRead : u)(
767
- this.typeName,
768
- message,
769
- fieldNo,
770
- wireType,
771
- d,
772
- );
773
- }
568
+ constructor() {
569
+ super("MiLaboratories.Controller.Shared.uploadapi.GetPartURL.Request", [
570
+ { no: 1, name: "resource_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ },
571
+ { no: 2, name: "part_number", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ },
572
+ { no: 3, name: "uploaded_part_size", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ },
573
+ { no: 4, name: "is_internal_use", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
574
+ ]);
575
+ }
576
+ create(value?: PartialMessage<uploadapi_GetPartURL_Request>): uploadapi_GetPartURL_Request {
577
+ const message = globalThis.Object.create((this.messagePrototype!));
578
+ message.resourceId = 0n;
579
+ message.partNumber = 0n;
580
+ message.uploadedPartSize = 0n;
581
+ message.isInternalUse = false;
582
+ if (value !== undefined)
583
+ reflectionMergePartial<uploadapi_GetPartURL_Request>(this, message, value);
584
+ return message;
585
+ }
586
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: uploadapi_GetPartURL_Request): uploadapi_GetPartURL_Request {
587
+ let message = target ?? this.create(), end = reader.pos + length;
588
+ while (reader.pos < end) {
589
+ let [fieldNo, wireType] = reader.tag();
590
+ switch (fieldNo) {
591
+ case /* uint64 resource_id */ 1:
592
+ message.resourceId = reader.uint64().toBigInt();
593
+ break;
594
+ case /* uint64 part_number */ 2:
595
+ message.partNumber = reader.uint64().toBigInt();
596
+ break;
597
+ case /* uint64 uploaded_part_size */ 3:
598
+ message.uploadedPartSize = reader.uint64().toBigInt();
599
+ break;
600
+ case /* bool is_internal_use */ 4:
601
+ message.isInternalUse = reader.bool();
602
+ break;
603
+ default:
604
+ let u = options.readUnknownField;
605
+ if (u === "throw")
606
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
607
+ let d = reader.skip(wireType);
608
+ if (u !== false)
609
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
610
+ }
611
+ }
612
+ return message;
613
+ }
614
+ internalBinaryWrite(message: uploadapi_GetPartURL_Request, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
615
+ /* uint64 resource_id = 1; */
616
+ if (message.resourceId !== 0n)
617
+ writer.tag(1, WireType.Varint).uint64(message.resourceId);
618
+ /* uint64 part_number = 2; */
619
+ if (message.partNumber !== 0n)
620
+ writer.tag(2, WireType.Varint).uint64(message.partNumber);
621
+ /* uint64 uploaded_part_size = 3; */
622
+ if (message.uploadedPartSize !== 0n)
623
+ writer.tag(3, WireType.Varint).uint64(message.uploadedPartSize);
624
+ /* bool is_internal_use = 4; */
625
+ if (message.isInternalUse !== false)
626
+ writer.tag(4, WireType.Varint).bool(message.isInternalUse);
627
+ let u = options.writeUnknownFields;
628
+ if (u !== false)
629
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
630
+ return writer;
774
631
  }
775
- return message;
776
- }
777
-
778
- internalBinaryWrite(
779
- message: uploadapi_GetPartURL_Request,
780
- writer: IBinaryWriter,
781
- options: BinaryWriteOptions,
782
- ): IBinaryWriter {
783
- /* uint64 resource_id = 1; */
784
- if (message.resourceId !== 0n)
785
- writer.tag(1, WireType.Varint).uint64(message.resourceId);
786
- /* uint64 part_number = 2; */
787
- if (message.partNumber !== 0n)
788
- writer.tag(2, WireType.Varint).uint64(message.partNumber);
789
- /* uint64 uploaded_part_size = 3; */
790
- if (message.uploadedPartSize !== 0n)
791
- writer.tag(3, WireType.Varint).uint64(message.uploadedPartSize);
792
- const u = options.writeUnknownFields;
793
- if (u !== false)
794
- (u == true ? UnknownFieldHandler.onWrite : u)(
795
- this.typeName,
796
- message,
797
- writer,
798
- );
799
- return writer;
800
- }
801
632
  }
802
633
  /**
803
634
  * @generated MessageType for protobuf message MiLaboratories.Controller.Shared.uploadapi.GetPartURL.Request
804
635
  */
805
- export const uploadapi_GetPartURL_Request
806
- = new uploadapi_GetPartURL_Request$Type();
636
+ export const uploadapi_GetPartURL_Request = new uploadapi_GetPartURL_Request$Type();
807
637
  // @generated message type with reflection information, may provide speed optimized methods
808
638
  class uploadapi_GetPartURL_HTTPHeader$Type extends MessageType<uploadapi_GetPartURL_HTTPHeader> {
809
- constructor() {
810
- super('MiLaboratories.Controller.Shared.uploadapi.GetPartURL.HTTPHeader', [
811
- {
812
- no: 1,
813
- name: 'Name',
814
- kind: 'scalar',
815
- jsonName: 'Name',
816
- T: 9, /* ScalarType.STRING */
817
- },
818
- {
819
- no: 2,
820
- name: 'Value',
821
- kind: 'scalar',
822
- jsonName: 'Value',
823
- T: 9, /* ScalarType.STRING */
824
- },
825
- ]);
826
- }
827
-
828
- create(
829
- value?: PartialMessage<uploadapi_GetPartURL_HTTPHeader>,
830
- ): uploadapi_GetPartURL_HTTPHeader {
831
- const message = globalThis.Object.create(this.messagePrototype!);
832
- message.name = '';
833
- message.value = '';
834
- if (value !== undefined)
835
- reflectionMergePartial<uploadapi_GetPartURL_HTTPHeader>(
836
- this,
837
- message,
838
- value,
839
- );
840
- return message;
841
- }
842
-
843
- internalBinaryRead(
844
- reader: IBinaryReader,
845
- length: number,
846
- options: BinaryReadOptions,
847
- target?: uploadapi_GetPartURL_HTTPHeader,
848
- ): uploadapi_GetPartURL_HTTPHeader {
849
- const message = target ?? this.create(),
850
- end = reader.pos + length;
851
- while (reader.pos < end) {
852
- const [fieldNo, wireType] = reader.tag();
853
- switch (fieldNo) {
854
- case /* string Name = 1 [json_name = "Name"]; */ 1:
855
- message.name = reader.string();
856
- break;
857
- case /* string Value = 2 [json_name = "Value"]; */ 2:
858
- message.value = reader.string();
859
- break;
860
- default:
861
- const u = options.readUnknownField;
862
- if (u === 'throw')
863
- throw new globalThis.Error(
864
- `Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`,
865
- );
866
- const d = reader.skip(wireType);
867
- if (u !== false)
868
- (u === true ? UnknownFieldHandler.onRead : u)(
869
- this.typeName,
870
- message,
871
- fieldNo,
872
- wireType,
873
- d,
874
- );
875
- }
639
+ constructor() {
640
+ super("MiLaboratories.Controller.Shared.uploadapi.GetPartURL.HTTPHeader", [
641
+ { no: 1, name: "Name", kind: "scalar", jsonName: "Name", T: 9 /*ScalarType.STRING*/ },
642
+ { no: 2, name: "Value", kind: "scalar", jsonName: "Value", T: 9 /*ScalarType.STRING*/ }
643
+ ]);
644
+ }
645
+ create(value?: PartialMessage<uploadapi_GetPartURL_HTTPHeader>): uploadapi_GetPartURL_HTTPHeader {
646
+ const message = globalThis.Object.create((this.messagePrototype!));
647
+ message.name = "";
648
+ message.value = "";
649
+ if (value !== undefined)
650
+ reflectionMergePartial<uploadapi_GetPartURL_HTTPHeader>(this, message, value);
651
+ return message;
652
+ }
653
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: uploadapi_GetPartURL_HTTPHeader): uploadapi_GetPartURL_HTTPHeader {
654
+ let message = target ?? this.create(), end = reader.pos + length;
655
+ while (reader.pos < end) {
656
+ let [fieldNo, wireType] = reader.tag();
657
+ switch (fieldNo) {
658
+ case /* string Name */ 1:
659
+ message.name = reader.string();
660
+ break;
661
+ case /* string Value */ 2:
662
+ message.value = reader.string();
663
+ break;
664
+ default:
665
+ let u = options.readUnknownField;
666
+ if (u === "throw")
667
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
668
+ let d = reader.skip(wireType);
669
+ if (u !== false)
670
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
671
+ }
672
+ }
673
+ return message;
674
+ }
675
+ internalBinaryWrite(message: uploadapi_GetPartURL_HTTPHeader, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
676
+ /* string Name = 1; */
677
+ if (message.name !== "")
678
+ writer.tag(1, WireType.LengthDelimited).string(message.name);
679
+ /* string Value = 2; */
680
+ if (message.value !== "")
681
+ writer.tag(2, WireType.LengthDelimited).string(message.value);
682
+ let u = options.writeUnknownFields;
683
+ if (u !== false)
684
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
685
+ return writer;
876
686
  }
877
- return message;
878
- }
879
-
880
- internalBinaryWrite(
881
- message: uploadapi_GetPartURL_HTTPHeader,
882
- writer: IBinaryWriter,
883
- options: BinaryWriteOptions,
884
- ): IBinaryWriter {
885
- /* string Name = 1 [json_name = "Name"]; */
886
- if (message.name !== '')
887
- writer.tag(1, WireType.LengthDelimited).string(message.name);
888
- /* string Value = 2 [json_name = "Value"]; */
889
- if (message.value !== '')
890
- writer.tag(2, WireType.LengthDelimited).string(message.value);
891
- const u = options.writeUnknownFields;
892
- if (u !== false)
893
- (u == true ? UnknownFieldHandler.onWrite : u)(
894
- this.typeName,
895
- message,
896
- writer,
897
- );
898
- return writer;
899
- }
900
687
  }
901
688
  /**
902
689
  * @generated MessageType for protobuf message MiLaboratories.Controller.Shared.uploadapi.GetPartURL.HTTPHeader
903
690
  */
904
- export const uploadapi_GetPartURL_HTTPHeader
905
- = new uploadapi_GetPartURL_HTTPHeader$Type();
691
+ export const uploadapi_GetPartURL_HTTPHeader = new uploadapi_GetPartURL_HTTPHeader$Type();
906
692
  // @generated message type with reflection information, may provide speed optimized methods
907
693
  class uploadapi_GetPartURL_Response$Type extends MessageType<uploadapi_GetPartURL_Response> {
908
- constructor() {
909
- super('MiLaboratories.Controller.Shared.uploadapi.GetPartURL.Response', [
910
- { no: 1, name: 'upload_url', kind: 'scalar', T: 9 /* ScalarType.STRING */ },
911
- { no: 2, name: 'method', kind: 'scalar', T: 9 /* ScalarType.STRING */ },
912
- {
913
- no: 3,
914
- name: 'headers',
915
- kind: 'message',
916
- repeat: 1 /* RepeatType.PACKED */,
917
- T: () => uploadapi_GetPartURL_HTTPHeader,
918
- },
919
- {
920
- no: 4,
921
- name: 'chunk_start',
922
- kind: 'scalar',
923
- T: 4 /* ScalarType.UINT64 */,
924
- L: 0, /* LongType.BIGINT */
925
- },
926
- {
927
- no: 5,
928
- name: 'chunk_end',
929
- kind: 'scalar',
930
- T: 4 /* ScalarType.UINT64 */,
931
- L: 0, /* LongType.BIGINT */
932
- },
933
- ]);
934
- }
935
-
936
- create(
937
- value?: PartialMessage<uploadapi_GetPartURL_Response>,
938
- ): uploadapi_GetPartURL_Response {
939
- const message = globalThis.Object.create(this.messagePrototype!);
940
- message.uploadUrl = '';
941
- message.method = '';
942
- message.headers = [];
943
- message.chunkStart = 0n;
944
- message.chunkEnd = 0n;
945
- if (value !== undefined)
946
- reflectionMergePartial<uploadapi_GetPartURL_Response>(
947
- this,
948
- message,
949
- value,
950
- );
951
- return message;
952
- }
953
-
954
- internalBinaryRead(
955
- reader: IBinaryReader,
956
- length: number,
957
- options: BinaryReadOptions,
958
- target?: uploadapi_GetPartURL_Response,
959
- ): uploadapi_GetPartURL_Response {
960
- const message = target ?? this.create(),
961
- end = reader.pos + length;
962
- while (reader.pos < end) {
963
- const [fieldNo, wireType] = reader.tag();
964
- switch (fieldNo) {
965
- case /* string upload_url */ 1:
966
- message.uploadUrl = reader.string();
967
- break;
968
- case /* string method */ 2:
969
- message.method = reader.string();
970
- break;
971
- case /* repeated MiLaboratories.Controller.Shared.uploadapi.GetPartURL.HTTPHeader headers */ 3:
972
- message.headers.push(
973
- uploadapi_GetPartURL_HTTPHeader.internalBinaryRead(
974
- reader,
975
- reader.uint32(),
976
- options,
977
- ),
978
- );
979
- break;
980
- case /* uint64 chunk_start */ 4:
981
- message.chunkStart = reader.uint64().toBigInt();
982
- break;
983
- case /* uint64 chunk_end */ 5:
984
- message.chunkEnd = reader.uint64().toBigInt();
985
- break;
986
- default:
987
- const u = options.readUnknownField;
988
- if (u === 'throw')
989
- throw new globalThis.Error(
990
- `Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`,
991
- );
992
- const d = reader.skip(wireType);
993
- if (u !== false)
994
- (u === true ? UnknownFieldHandler.onRead : u)(
995
- this.typeName,
996
- message,
997
- fieldNo,
998
- wireType,
999
- d,
1000
- );
1001
- }
694
+ constructor() {
695
+ super("MiLaboratories.Controller.Shared.uploadapi.GetPartURL.Response", [
696
+ { no: 1, name: "upload_url", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
697
+ { no: 2, name: "method", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
698
+ { no: 3, name: "headers", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => uploadapi_GetPartURL_HTTPHeader },
699
+ { no: 4, name: "chunk_start", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ },
700
+ { no: 5, name: "chunk_end", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ }
701
+ ]);
702
+ }
703
+ create(value?: PartialMessage<uploadapi_GetPartURL_Response>): uploadapi_GetPartURL_Response {
704
+ const message = globalThis.Object.create((this.messagePrototype!));
705
+ message.uploadUrl = "";
706
+ message.method = "";
707
+ message.headers = [];
708
+ message.chunkStart = 0n;
709
+ message.chunkEnd = 0n;
710
+ if (value !== undefined)
711
+ reflectionMergePartial<uploadapi_GetPartURL_Response>(this, message, value);
712
+ return message;
713
+ }
714
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: uploadapi_GetPartURL_Response): uploadapi_GetPartURL_Response {
715
+ let message = target ?? this.create(), end = reader.pos + length;
716
+ while (reader.pos < end) {
717
+ let [fieldNo, wireType] = reader.tag();
718
+ switch (fieldNo) {
719
+ case /* string upload_url */ 1:
720
+ message.uploadUrl = reader.string();
721
+ break;
722
+ case /* string method */ 2:
723
+ message.method = reader.string();
724
+ break;
725
+ case /* repeated MiLaboratories.Controller.Shared.uploadapi.GetPartURL.HTTPHeader headers */ 3:
726
+ message.headers.push(uploadapi_GetPartURL_HTTPHeader.internalBinaryRead(reader, reader.uint32(), options));
727
+ break;
728
+ case /* uint64 chunk_start */ 4:
729
+ message.chunkStart = reader.uint64().toBigInt();
730
+ break;
731
+ case /* uint64 chunk_end */ 5:
732
+ message.chunkEnd = reader.uint64().toBigInt();
733
+ break;
734
+ default:
735
+ let u = options.readUnknownField;
736
+ if (u === "throw")
737
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
738
+ let d = reader.skip(wireType);
739
+ if (u !== false)
740
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
741
+ }
742
+ }
743
+ return message;
744
+ }
745
+ internalBinaryWrite(message: uploadapi_GetPartURL_Response, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
746
+ /* string upload_url = 1; */
747
+ if (message.uploadUrl !== "")
748
+ writer.tag(1, WireType.LengthDelimited).string(message.uploadUrl);
749
+ /* string method = 2; */
750
+ if (message.method !== "")
751
+ writer.tag(2, WireType.LengthDelimited).string(message.method);
752
+ /* repeated MiLaboratories.Controller.Shared.uploadapi.GetPartURL.HTTPHeader headers = 3; */
753
+ for (let i = 0; i < message.headers.length; i++)
754
+ uploadapi_GetPartURL_HTTPHeader.internalBinaryWrite(message.headers[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();
755
+ /* uint64 chunk_start = 4; */
756
+ if (message.chunkStart !== 0n)
757
+ writer.tag(4, WireType.Varint).uint64(message.chunkStart);
758
+ /* uint64 chunk_end = 5; */
759
+ if (message.chunkEnd !== 0n)
760
+ writer.tag(5, WireType.Varint).uint64(message.chunkEnd);
761
+ let u = options.writeUnknownFields;
762
+ if (u !== false)
763
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
764
+ return writer;
1002
765
  }
1003
- return message;
1004
- }
1005
-
1006
- internalBinaryWrite(
1007
- message: uploadapi_GetPartURL_Response,
1008
- writer: IBinaryWriter,
1009
- options: BinaryWriteOptions,
1010
- ): IBinaryWriter {
1011
- /* string upload_url = 1; */
1012
- if (message.uploadUrl !== '')
1013
- writer.tag(1, WireType.LengthDelimited).string(message.uploadUrl);
1014
- /* string method = 2; */
1015
- if (message.method !== '')
1016
- writer.tag(2, WireType.LengthDelimited).string(message.method);
1017
- /* repeated MiLaboratories.Controller.Shared.uploadapi.GetPartURL.HTTPHeader headers = 3; */
1018
- for (let i = 0; i < message.headers.length; i++)
1019
- uploadapi_GetPartURL_HTTPHeader
1020
- .internalBinaryWrite(
1021
- message.headers[i],
1022
- writer.tag(3, WireType.LengthDelimited).fork(),
1023
- options,
1024
- )
1025
- .join();
1026
- /* uint64 chunk_start = 4; */
1027
- if (message.chunkStart !== 0n)
1028
- writer.tag(4, WireType.Varint).uint64(message.chunkStart);
1029
- /* uint64 chunk_end = 5; */
1030
- if (message.chunkEnd !== 0n)
1031
- writer.tag(5, WireType.Varint).uint64(message.chunkEnd);
1032
- const u = options.writeUnknownFields;
1033
- if (u !== false)
1034
- (u == true ? UnknownFieldHandler.onWrite : u)(
1035
- this.typeName,
1036
- message,
1037
- writer,
1038
- );
1039
- return writer;
1040
- }
1041
766
  }
1042
767
  /**
1043
768
  * @generated MessageType for protobuf message MiLaboratories.Controller.Shared.uploadapi.GetPartURL.Response
1044
769
  */
1045
- export const uploadapi_GetPartURL_Response
1046
- = new uploadapi_GetPartURL_Response$Type();
770
+ export const uploadapi_GetPartURL_Response = new uploadapi_GetPartURL_Response$Type();
1047
771
  // @generated message type with reflection information, may provide speed optimized methods
1048
772
  class uploadapi_Finalize$Type extends MessageType<uploadapi_Finalize> {
1049
- constructor() {
1050
- super('MiLaboratories.Controller.Shared.uploadapi.Finalize', []);
1051
- }
1052
-
1053
- create(value?: PartialMessage<uploadapi_Finalize>): uploadapi_Finalize {
1054
- const message = globalThis.Object.create(this.messagePrototype!);
1055
- if (value !== undefined)
1056
- reflectionMergePartial<uploadapi_Finalize>(this, message, value);
1057
- return message;
1058
- }
1059
-
1060
- internalBinaryRead(
1061
- reader: IBinaryReader,
1062
- length: number,
1063
- options: BinaryReadOptions,
1064
- target?: uploadapi_Finalize,
1065
- ): uploadapi_Finalize {
1066
- return target ?? this.create();
1067
- }
1068
-
1069
- internalBinaryWrite(
1070
- message: uploadapi_Finalize,
1071
- writer: IBinaryWriter,
1072
- options: BinaryWriteOptions,
1073
- ): IBinaryWriter {
1074
- const u = options.writeUnknownFields;
1075
- if (u !== false)
1076
- (u == true ? UnknownFieldHandler.onWrite : u)(
1077
- this.typeName,
1078
- message,
1079
- writer,
1080
- );
1081
- return writer;
1082
- }
773
+ constructor() {
774
+ super("MiLaboratories.Controller.Shared.uploadapi.Finalize", []);
775
+ }
776
+ create(value?: PartialMessage<uploadapi_Finalize>): uploadapi_Finalize {
777
+ const message = globalThis.Object.create((this.messagePrototype!));
778
+ if (value !== undefined)
779
+ reflectionMergePartial<uploadapi_Finalize>(this, message, value);
780
+ return message;
781
+ }
782
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: uploadapi_Finalize): uploadapi_Finalize {
783
+ let message = target ?? this.create(), end = reader.pos + length;
784
+ while (reader.pos < end) {
785
+ let [fieldNo, wireType] = reader.tag();
786
+ switch (fieldNo) {
787
+ default:
788
+ let u = options.readUnknownField;
789
+ if (u === "throw")
790
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
791
+ let d = reader.skip(wireType);
792
+ if (u !== false)
793
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
794
+ }
795
+ }
796
+ return message;
797
+ }
798
+ internalBinaryWrite(message: uploadapi_Finalize, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
799
+ let u = options.writeUnknownFields;
800
+ if (u !== false)
801
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
802
+ return writer;
803
+ }
1083
804
  }
1084
805
  /**
1085
806
  * @generated MessageType for protobuf message MiLaboratories.Controller.Shared.uploadapi.Finalize
@@ -1087,79 +808,46 @@ class uploadapi_Finalize$Type extends MessageType<uploadapi_Finalize> {
1087
808
  export const uploadapi_Finalize = new uploadapi_Finalize$Type();
1088
809
  // @generated message type with reflection information, may provide speed optimized methods
1089
810
  class uploadapi_Finalize_Request$Type extends MessageType<uploadapi_Finalize_Request> {
1090
- constructor() {
1091
- super('MiLaboratories.Controller.Shared.uploadapi.Finalize.Request', [
1092
- {
1093
- no: 1,
1094
- name: 'resource_id',
1095
- kind: 'scalar',
1096
- T: 4 /* ScalarType.UINT64 */,
1097
- L: 0, /* LongType.BIGINT */
1098
- },
1099
- ]);
1100
- }
1101
-
1102
- create(
1103
- value?: PartialMessage<uploadapi_Finalize_Request>,
1104
- ): uploadapi_Finalize_Request {
1105
- const message = globalThis.Object.create(this.messagePrototype!);
1106
- message.resourceId = 0n;
1107
- if (value !== undefined)
1108
- reflectionMergePartial<uploadapi_Finalize_Request>(this, message, value);
1109
- return message;
1110
- }
1111
-
1112
- internalBinaryRead(
1113
- reader: IBinaryReader,
1114
- length: number,
1115
- options: BinaryReadOptions,
1116
- target?: uploadapi_Finalize_Request,
1117
- ): uploadapi_Finalize_Request {
1118
- const message = target ?? this.create(),
1119
- end = reader.pos + length;
1120
- while (reader.pos < end) {
1121
- const [fieldNo, wireType] = reader.tag();
1122
- switch (fieldNo) {
1123
- case /* uint64 resource_id */ 1:
1124
- message.resourceId = reader.uint64().toBigInt();
1125
- break;
1126
- default:
1127
- const u = options.readUnknownField;
1128
- if (u === 'throw')
1129
- throw new globalThis.Error(
1130
- `Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`,
1131
- );
1132
- const d = reader.skip(wireType);
1133
- if (u !== false)
1134
- (u === true ? UnknownFieldHandler.onRead : u)(
1135
- this.typeName,
1136
- message,
1137
- fieldNo,
1138
- wireType,
1139
- d,
1140
- );
1141
- }
811
+ constructor() {
812
+ super("MiLaboratories.Controller.Shared.uploadapi.Finalize.Request", [
813
+ { no: 1, name: "resource_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ }
814
+ ]);
815
+ }
816
+ create(value?: PartialMessage<uploadapi_Finalize_Request>): uploadapi_Finalize_Request {
817
+ const message = globalThis.Object.create((this.messagePrototype!));
818
+ message.resourceId = 0n;
819
+ if (value !== undefined)
820
+ reflectionMergePartial<uploadapi_Finalize_Request>(this, message, value);
821
+ return message;
822
+ }
823
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: uploadapi_Finalize_Request): uploadapi_Finalize_Request {
824
+ let message = target ?? this.create(), end = reader.pos + length;
825
+ while (reader.pos < end) {
826
+ let [fieldNo, wireType] = reader.tag();
827
+ switch (fieldNo) {
828
+ case /* uint64 resource_id */ 1:
829
+ message.resourceId = reader.uint64().toBigInt();
830
+ break;
831
+ default:
832
+ let u = options.readUnknownField;
833
+ if (u === "throw")
834
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
835
+ let d = reader.skip(wireType);
836
+ if (u !== false)
837
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
838
+ }
839
+ }
840
+ return message;
841
+ }
842
+ internalBinaryWrite(message: uploadapi_Finalize_Request, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
843
+ /* uint64 resource_id = 1; */
844
+ if (message.resourceId !== 0n)
845
+ writer.tag(1, WireType.Varint).uint64(message.resourceId);
846
+ let u = options.writeUnknownFields;
847
+ if (u !== false)
848
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
849
+ return writer;
1142
850
  }
1143
- return message;
1144
- }
1145
-
1146
- internalBinaryWrite(
1147
- message: uploadapi_Finalize_Request,
1148
- writer: IBinaryWriter,
1149
- options: BinaryWriteOptions,
1150
- ): IBinaryWriter {
1151
- /* uint64 resource_id = 1; */
1152
- if (message.resourceId !== 0n)
1153
- writer.tag(1, WireType.Varint).uint64(message.resourceId);
1154
- const u = options.writeUnknownFields;
1155
- if (u !== false)
1156
- (u == true ? UnknownFieldHandler.onWrite : u)(
1157
- this.typeName,
1158
- message,
1159
- writer,
1160
- );
1161
- return writer;
1162
- }
1163
851
  }
1164
852
  /**
1165
853
  * @generated MessageType for protobuf message MiLaboratories.Controller.Shared.uploadapi.Finalize.Request
@@ -1167,77 +855,48 @@ class uploadapi_Finalize_Request$Type extends MessageType<uploadapi_Finalize_Req
1167
855
  export const uploadapi_Finalize_Request = new uploadapi_Finalize_Request$Type();
1168
856
  // @generated message type with reflection information, may provide speed optimized methods
1169
857
  class uploadapi_Finalize_Response$Type extends MessageType<uploadapi_Finalize_Response> {
1170
- constructor() {
1171
- super('MiLaboratories.Controller.Shared.uploadapi.Finalize.Response', []);
1172
- }
1173
-
1174
- create(
1175
- value?: PartialMessage<uploadapi_Finalize_Response>,
1176
- ): uploadapi_Finalize_Response {
1177
- const message = globalThis.Object.create(this.messagePrototype!);
1178
- if (value !== undefined)
1179
- reflectionMergePartial<uploadapi_Finalize_Response>(this, message, value);
1180
- return message;
1181
- }
1182
-
1183
- internalBinaryRead(
1184
- reader: IBinaryReader,
1185
- length: number,
1186
- options: BinaryReadOptions,
1187
- target?: uploadapi_Finalize_Response,
1188
- ): uploadapi_Finalize_Response {
1189
- return target ?? this.create();
1190
- }
1191
-
1192
- internalBinaryWrite(
1193
- message: uploadapi_Finalize_Response,
1194
- writer: IBinaryWriter,
1195
- options: BinaryWriteOptions,
1196
- ): IBinaryWriter {
1197
- const u = options.writeUnknownFields;
1198
- if (u !== false)
1199
- (u == true ? UnknownFieldHandler.onWrite : u)(
1200
- this.typeName,
1201
- message,
1202
- writer,
1203
- );
1204
- return writer;
1205
- }
858
+ constructor() {
859
+ super("MiLaboratories.Controller.Shared.uploadapi.Finalize.Response", []);
860
+ }
861
+ create(value?: PartialMessage<uploadapi_Finalize_Response>): uploadapi_Finalize_Response {
862
+ const message = globalThis.Object.create((this.messagePrototype!));
863
+ if (value !== undefined)
864
+ reflectionMergePartial<uploadapi_Finalize_Response>(this, message, value);
865
+ return message;
866
+ }
867
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: uploadapi_Finalize_Response): uploadapi_Finalize_Response {
868
+ let message = target ?? this.create(), end = reader.pos + length;
869
+ while (reader.pos < end) {
870
+ let [fieldNo, wireType] = reader.tag();
871
+ switch (fieldNo) {
872
+ default:
873
+ let u = options.readUnknownField;
874
+ if (u === "throw")
875
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
876
+ let d = reader.skip(wireType);
877
+ if (u !== false)
878
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
879
+ }
880
+ }
881
+ return message;
882
+ }
883
+ internalBinaryWrite(message: uploadapi_Finalize_Response, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
884
+ let u = options.writeUnknownFields;
885
+ if (u !== false)
886
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
887
+ return writer;
888
+ }
1206
889
  }
1207
890
  /**
1208
891
  * @generated MessageType for protobuf message MiLaboratories.Controller.Shared.uploadapi.Finalize.Response
1209
892
  */
1210
- export const uploadapi_Finalize_Response
1211
- = new uploadapi_Finalize_Response$Type();
893
+ export const uploadapi_Finalize_Response = new uploadapi_Finalize_Response$Type();
1212
894
  /**
1213
895
  * @generated ServiceType for protobuf service MiLaboratories.Controller.Shared.Upload
1214
896
  */
1215
- export const Upload = new ServiceType(
1216
- 'MiLaboratories.Controller.Shared.Upload',
1217
- [
1218
- {
1219
- name: 'Init',
1220
- options: {},
1221
- I: uploadapi_Init_Request,
1222
- O: uploadapi_Init_Response,
1223
- },
1224
- {
1225
- name: 'GetPartURL',
1226
- options: {},
1227
- I: uploadapi_GetPartURL_Request,
1228
- O: uploadapi_GetPartURL_Response,
1229
- },
1230
- {
1231
- name: 'UpdateProgress',
1232
- options: {},
1233
- I: uploadapi_UpdateProgress_Request,
1234
- O: uploadapi_UpdateProgress_Response,
1235
- },
1236
- {
1237
- name: 'Finalize',
1238
- options: {},
1239
- I: uploadapi_Finalize_Request,
1240
- O: uploadapi_Finalize_Response,
1241
- },
1242
- ],
1243
- );
897
+ export const Upload = new ServiceType("MiLaboratories.Controller.Shared.Upload", [
898
+ { name: "Init", options: {}, I: uploadapi_Init_Request, O: uploadapi_Init_Response },
899
+ { name: "GetPartURL", options: {}, I: uploadapi_GetPartURL_Request, O: uploadapi_GetPartURL_Response },
900
+ { name: "UpdateProgress", options: {}, I: uploadapi_UpdateProgress_Request, O: uploadapi_UpdateProgress_Response },
901
+ { name: "Finalize", options: {}, I: uploadapi_Finalize_Request, O: uploadapi_Finalize_Response }
902
+ ]);