@milaboratories/pl-client 2.7.13 → 2.7.14

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 (116) hide show
  1. package/dist/core/auth.d.ts.map +1 -1
  2. package/dist/core/cache.d.ts.map +1 -1
  3. package/dist/core/client.d.ts +1 -1
  4. package/dist/core/client.d.ts.map +1 -1
  5. package/dist/core/default_client.d.ts.map +1 -1
  6. package/dist/core/driver.d.ts.map +1 -1
  7. package/dist/core/errors.d.ts.map +1 -1
  8. package/dist/core/final.d.ts.map +1 -1
  9. package/dist/core/ll_client.d.ts.map +1 -1
  10. package/dist/core/ll_transaction.d.ts.map +1 -1
  11. package/dist/core/transaction.d.ts +1 -1
  12. package/dist/core/transaction.d.ts.map +1 -1
  13. package/dist/core/type_conversion.d.ts.map +1 -1
  14. package/dist/core/types.d.ts +1 -1
  15. package/dist/core/types.d.ts.map +1 -1
  16. package/dist/core/unauth_client.d.ts.map +1 -1
  17. package/dist/helpers/pl.d.ts.map +1 -1
  18. package/dist/helpers/poll.d.ts.map +1 -1
  19. package/dist/helpers/state_helpers.d.ts.map +1 -1
  20. package/dist/helpers/tx_helpers.d.ts.map +1 -1
  21. package/dist/index.js +1 -1
  22. package/dist/index.js.map +1 -1
  23. package/dist/index.mjs +4069 -4075
  24. package/dist/index.mjs.map +1 -1
  25. package/dist/proto/github.com/googleapis/googleapis/google/rpc/status.d.ts +15 -15
  26. package/dist/proto/github.com/googleapis/googleapis/google/rpc/status.d.ts.map +1 -1
  27. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.client.d.ts +4 -4
  28. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.client.d.ts.map +1 -1
  29. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.d.ts +16 -16
  30. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.d.ts.map +1 -1
  31. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.client.d.ts +4 -4
  32. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.client.d.ts.map +1 -1
  33. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.d.ts +59 -59
  34. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.d.ts.map +1 -1
  35. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.client.d.ts +8 -8
  36. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.client.d.ts.map +1 -1
  37. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.d.ts +22 -22
  38. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.d.ts.map +1 -1
  39. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.client.d.ts +72 -72
  40. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.client.d.ts.map +1 -1
  41. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.d.ts +152 -152
  42. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.d.ts.map +1 -1
  43. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/api.client.d.ts +156 -156
  44. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/api.client.d.ts.map +1 -1
  45. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/api.d.ts +773 -773
  46. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/api.d.ts.map +1 -1
  47. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/api_types.d.ts +163 -163
  48. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/api_types.d.ts.map +1 -1
  49. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/base_types.d.ts +22 -22
  50. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/base_types.d.ts.map +1 -1
  51. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/import.d.ts +32 -32
  52. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/import.d.ts.map +1 -1
  53. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/resource_types.d.ts +78 -78
  54. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/resource_types.d.ts.map +1 -1
  55. package/dist/proto/google/api/http.d.ts +89 -89
  56. package/dist/proto/google/api/http.d.ts.map +1 -1
  57. package/dist/proto/google/protobuf/any.d.ts +52 -52
  58. package/dist/proto/google/protobuf/any.d.ts.map +1 -1
  59. package/dist/proto/google/protobuf/descriptor.d.ts +1151 -1151
  60. package/dist/proto/google/protobuf/descriptor.d.ts.map +1 -1
  61. package/dist/proto/google/protobuf/duration.d.ts +19 -19
  62. package/dist/proto/google/protobuf/duration.d.ts.map +1 -1
  63. package/dist/proto/google/protobuf/empty.d.ts.map +1 -1
  64. package/dist/proto/google/protobuf/struct.d.ts +56 -56
  65. package/dist/proto/google/protobuf/struct.d.ts.map +1 -1
  66. package/dist/proto/google/protobuf/timestamp.d.ts +25 -25
  67. package/dist/proto/google/protobuf/timestamp.d.ts.map +1 -1
  68. package/dist/proto/google/protobuf/wrappers.d.ts +72 -72
  69. package/dist/proto/google/protobuf/wrappers.d.ts.map +1 -1
  70. package/dist/test/test_config.d.ts.map +1 -1
  71. package/dist/util/util.d.ts.map +1 -1
  72. package/package.json +7 -3
  73. package/src/core/auth.ts +3 -3
  74. package/src/core/cache.ts +1 -1
  75. package/src/core/client.ts +39 -31
  76. package/src/core/config.ts +21 -21
  77. package/src/core/default_client.ts +15 -14
  78. package/src/core/driver.ts +4 -4
  79. package/src/core/errors.ts +3 -3
  80. package/src/core/final.ts +7 -4
  81. package/src/core/ll_client.ts +31 -27
  82. package/src/core/ll_transaction.ts +17 -17
  83. package/src/core/stat.ts +2 -2
  84. package/src/core/transaction.ts +93 -95
  85. package/src/core/type_conversion.ts +11 -8
  86. package/src/core/types.ts +25 -26
  87. package/src/core/unauth_client.ts +6 -6
  88. package/src/helpers/pl.ts +8 -7
  89. package/src/helpers/poll.ts +25 -21
  90. package/src/helpers/state_helpers.ts +2 -1
  91. package/src/helpers/tx_helpers.ts +4 -3
  92. package/src/proto/github.com/googleapis/googleapis/google/rpc/status.ts +74 -71
  93. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.client.ts +21 -20
  94. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.ts +240 -225
  95. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.client.ts +21 -20
  96. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.ts +290 -275
  97. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.client.ts +32 -30
  98. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.ts +388 -364
  99. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.client.ts +58 -53
  100. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.ts +490 -469
  101. package/src/proto/github.com/milaboratory/pl/plapi/plapiproto/api.client.ts +262 -237
  102. package/src/proto/github.com/milaboratory/pl/plapi/plapiproto/api.ts +11751 -11032
  103. package/src/proto/github.com/milaboratory/pl/plapi/plapiproto/api_types.ts +1155 -1114
  104. package/src/proto/github.com/milaboratory/pl/plapi/plapiproto/base_types.ts +131 -125
  105. package/src/proto/github.com/milaboratory/pl/plapi/plapiproto/import.ts +203 -200
  106. package/src/proto/github.com/milaboratory/pl/plapi/plapiproto/resource_types.ts +559 -540
  107. package/src/proto/google/api/http.ts +280 -271
  108. package/src/proto/google/protobuf/any.ts +149 -139
  109. package/src/proto/google/protobuf/descriptor.ts +2952 -2853
  110. package/src/proto/google/protobuf/duration.ts +107 -102
  111. package/src/proto/google/protobuf/empty.ts +41 -38
  112. package/src/proto/google/protobuf/struct.ts +336 -322
  113. package/src/proto/google/protobuf/timestamp.ts +131 -123
  114. package/src/proto/google/protobuf/wrappers.ts +536 -491
  115. package/src/test/test_config.ts +21 -19
  116. package/src/util/util.ts +1 -0
@@ -32,20 +32,20 @@
32
32
  // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33
33
  // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
34
  //
35
- import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
36
- import type { IBinaryWriter } from "@protobuf-ts/runtime";
37
- import { WireType } from "@protobuf-ts/runtime";
38
- import type { BinaryReadOptions } from "@protobuf-ts/runtime";
39
- import type { IBinaryReader } from "@protobuf-ts/runtime";
40
- import { UnknownFieldHandler } from "@protobuf-ts/runtime";
41
- import type { PartialMessage } from "@protobuf-ts/runtime";
42
- import { reflectionMergePartial } from "@protobuf-ts/runtime";
43
- import { typeofJsonValue } from "@protobuf-ts/runtime";
44
- import type { JsonValue } from "@protobuf-ts/runtime";
45
- import type { JsonReadOptions } from "@protobuf-ts/runtime";
46
- import type { JsonWriteOptions } from "@protobuf-ts/runtime";
47
- import { PbLong } from "@protobuf-ts/runtime";
48
- import { MessageType } from "@protobuf-ts/runtime";
35
+ import type { BinaryWriteOptions } from '@protobuf-ts/runtime';
36
+ import type { IBinaryWriter } from '@protobuf-ts/runtime';
37
+ import { WireType } from '@protobuf-ts/runtime';
38
+ import type { BinaryReadOptions } from '@protobuf-ts/runtime';
39
+ import type { IBinaryReader } from '@protobuf-ts/runtime';
40
+ import { UnknownFieldHandler } from '@protobuf-ts/runtime';
41
+ import type { PartialMessage } from '@protobuf-ts/runtime';
42
+ import { reflectionMergePartial } from '@protobuf-ts/runtime';
43
+ import { typeofJsonValue } from '@protobuf-ts/runtime';
44
+ import type { JsonValue } from '@protobuf-ts/runtime';
45
+ import type { JsonReadOptions } from '@protobuf-ts/runtime';
46
+ import type { JsonWriteOptions } from '@protobuf-ts/runtime';
47
+ import { PbLong } from '@protobuf-ts/runtime';
48
+ import { MessageType } from '@protobuf-ts/runtime';
49
49
  /**
50
50
  * A Timestamp represents a point in time independent of any time zone or local
51
51
  * calendar, encoded as a count of seconds and fractions of seconds at
@@ -141,15 +141,15 @@ import { MessageType } from "@protobuf-ts/runtime";
141
141
  * @generated from protobuf message google.protobuf.Timestamp
142
142
  */
143
143
  export interface Timestamp {
144
- /**
144
+ /**
145
145
  * Represents seconds of UTC time since Unix epoch
146
146
  * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
147
147
  * 9999-12-31T23:59:59Z inclusive.
148
148
  *
149
149
  * @generated from protobuf field: int64 seconds = 1;
150
150
  */
151
- seconds: bigint;
152
- /**
151
+ seconds: bigint;
152
+ /**
153
153
  * Non-negative fractions of a second at nanosecond resolution. Negative
154
154
  * second values with fractions must still have non-negative nanos values
155
155
  * that count forward in time. Must be from 0 to 999,999,999
@@ -157,129 +157,137 @@ export interface Timestamp {
157
157
  *
158
158
  * @generated from protobuf field: int32 nanos = 2;
159
159
  */
160
- nanos: number;
160
+ nanos: number;
161
161
  }
162
162
  // @generated message type with reflection information, may provide speed optimized methods
163
163
  class Timestamp$Type extends MessageType<Timestamp> {
164
- constructor() {
165
- super("google.protobuf.Timestamp", [
166
- { no: 1, name: "seconds", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
167
- { no: 2, name: "nanos", kind: "scalar", T: 5 /*ScalarType.INT32*/ }
168
- ]);
169
- }
170
- /**
164
+ constructor() {
165
+ super('google.protobuf.Timestamp', [
166
+ { no: 1, name: 'seconds', kind: 'scalar', T: 3 /* ScalarType.INT64 */, L: 0 /* LongType.BIGINT */ },
167
+ { no: 2, name: 'nanos', kind: 'scalar', T: 5 /* ScalarType.INT32 */ },
168
+ ]);
169
+ }
170
+
171
+ /**
171
172
  * Creates a new `Timestamp` for the current time.
172
173
  */
173
- now(): Timestamp {
174
- const msg = this.create();
175
- const ms = Date.now();
176
- msg.seconds = PbLong.from(Math.floor(ms / 1000)).toBigInt();
177
- msg.nanos = (ms % 1000) * 1000000;
178
- return msg;
179
- }
180
- /**
174
+ now(): Timestamp {
175
+ const msg = this.create();
176
+ const ms = Date.now();
177
+ msg.seconds = PbLong.from(Math.floor(ms / 1000)).toBigInt();
178
+ msg.nanos = (ms % 1000) * 1000000;
179
+ return msg;
180
+ }
181
+
182
+ /**
181
183
  * Converts a `Timestamp` to a JavaScript Date.
182
184
  */
183
- toDate(message: Timestamp): Date {
184
- return new Date(PbLong.from(message.seconds).toNumber() * 1000 + Math.ceil(message.nanos / 1000000));
185
- }
186
- /**
185
+ toDate(message: Timestamp): Date {
186
+ return new Date(PbLong.from(message.seconds).toNumber() * 1000 + Math.ceil(message.nanos / 1000000));
187
+ }
188
+
189
+ /**
187
190
  * Converts a JavaScript Date to a `Timestamp`.
188
191
  */
189
- fromDate(date: Date): Timestamp {
190
- const msg = this.create();
191
- const ms = date.getTime();
192
- msg.seconds = PbLong.from(Math.floor(ms / 1000)).toBigInt();
193
- msg.nanos = (ms % 1000) * 1000000;
194
- return msg;
195
- }
196
- /**
192
+ fromDate(date: Date): Timestamp {
193
+ const msg = this.create();
194
+ const ms = date.getTime();
195
+ msg.seconds = PbLong.from(Math.floor(ms / 1000)).toBigInt();
196
+ msg.nanos = (ms % 1000) * 1000000;
197
+ return msg;
198
+ }
199
+
200
+ /**
197
201
  * In JSON format, the `Timestamp` type is encoded as a string
198
202
  * in the RFC 3339 format.
199
203
  */
200
- internalJsonWrite(message: Timestamp, options: JsonWriteOptions): JsonValue {
201
- let ms = PbLong.from(message.seconds).toNumber() * 1000;
202
- if (ms < Date.parse("0001-01-01T00:00:00Z") || ms > Date.parse("9999-12-31T23:59:59Z"))
203
- throw new Error("Unable to encode Timestamp to JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.");
204
- if (message.nanos < 0)
205
- throw new Error("Unable to encode invalid Timestamp to JSON. Nanos must not be negative.");
206
- let z = "Z";
207
- if (message.nanos > 0) {
208
- let nanosStr = (message.nanos + 1000000000).toString().substring(1);
209
- if (nanosStr.substring(3) === "000000")
210
- z = "." + nanosStr.substring(0, 3) + "Z";
211
- else if (nanosStr.substring(6) === "000")
212
- z = "." + nanosStr.substring(0, 6) + "Z";
213
- else
214
- z = "." + nanosStr + "Z";
215
- }
216
- return new Date(ms).toISOString().replace(".000Z", z);
204
+ internalJsonWrite(message: Timestamp, options: JsonWriteOptions): JsonValue {
205
+ const ms = PbLong.from(message.seconds).toNumber() * 1000;
206
+ if (ms < Date.parse('0001-01-01T00:00:00Z') || ms > Date.parse('9999-12-31T23:59:59Z'))
207
+ throw new Error('Unable to encode Timestamp to JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.');
208
+ if (message.nanos < 0)
209
+ throw new Error('Unable to encode invalid Timestamp to JSON. Nanos must not be negative.');
210
+ let z = 'Z';
211
+ if (message.nanos > 0) {
212
+ const nanosStr = (message.nanos + 1000000000).toString().substring(1);
213
+ if (nanosStr.substring(3) === '000000')
214
+ z = '.' + nanosStr.substring(0, 3) + 'Z';
215
+ else if (nanosStr.substring(6) === '000')
216
+ z = '.' + nanosStr.substring(0, 6) + 'Z';
217
+ else
218
+ z = '.' + nanosStr + 'Z';
217
219
  }
218
- /**
220
+ return new Date(ms).toISOString().replace('.000Z', z);
221
+ }
222
+
223
+ /**
219
224
  * In JSON format, the `Timestamp` type is encoded as a string
220
225
  * in the RFC 3339 format.
221
226
  */
222
- internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Timestamp): Timestamp {
223
- if (typeof json !== "string")
224
- throw new Error("Unable to parse Timestamp from JSON " + typeofJsonValue(json) + ".");
225
- let matches = json.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/);
226
- if (!matches)
227
- throw new Error("Unable to parse Timestamp from JSON. Invalid format.");
228
- let ms = Date.parse(matches[1] + "-" + matches[2] + "-" + matches[3] + "T" + matches[4] + ":" + matches[5] + ":" + matches[6] + (matches[8] ? matches[8] : "Z"));
229
- if (Number.isNaN(ms))
230
- throw new Error("Unable to parse Timestamp from JSON. Invalid value.");
231
- if (ms < Date.parse("0001-01-01T00:00:00Z") || ms > Date.parse("9999-12-31T23:59:59Z"))
232
- throw new globalThis.Error("Unable to parse Timestamp from JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.");
233
- if (!target)
234
- target = this.create();
235
- target.seconds = PbLong.from(ms / 1000).toBigInt();
236
- target.nanos = 0;
237
- if (matches[7])
238
- target.nanos = (parseInt("1" + matches[7] + "0".repeat(9 - matches[7].length)) - 1000000000);
239
- return target;
240
- }
241
- create(value?: PartialMessage<Timestamp>): Timestamp {
242
- const message = globalThis.Object.create((this.messagePrototype!));
243
- message.seconds = 0n;
244
- message.nanos = 0;
245
- if (value !== undefined)
246
- reflectionMergePartial<Timestamp>(this, message, value);
247
- return message;
248
- }
249
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Timestamp): Timestamp {
250
- let message = target ?? this.create(), end = reader.pos + length;
251
- while (reader.pos < end) {
252
- let [fieldNo, wireType] = reader.tag();
253
- switch (fieldNo) {
254
- case /* int64 seconds */ 1:
255
- message.seconds = reader.int64().toBigInt();
256
- break;
257
- case /* int32 nanos */ 2:
258
- message.nanos = reader.int32();
259
- break;
260
- default:
261
- let u = options.readUnknownField;
262
- if (u === "throw")
263
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
264
- let d = reader.skip(wireType);
265
- if (u !== false)
266
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
267
- }
268
- }
269
- return message;
270
- }
271
- internalBinaryWrite(message: Timestamp, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
272
- /* int64 seconds = 1; */
273
- if (message.seconds !== 0n)
274
- writer.tag(1, WireType.Varint).int64(message.seconds);
275
- /* int32 nanos = 2; */
276
- if (message.nanos !== 0)
277
- writer.tag(2, WireType.Varint).int32(message.nanos);
278
- let u = options.writeUnknownFields;
279
- if (u !== false)
280
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
281
- return writer;
227
+ internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Timestamp): Timestamp {
228
+ if (typeof json !== 'string')
229
+ throw new Error('Unable to parse Timestamp from JSON ' + typeofJsonValue(json) + '.');
230
+ const matches = json.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/);
231
+ if (!matches)
232
+ throw new Error('Unable to parse Timestamp from JSON. Invalid format.');
233
+ const ms = Date.parse(matches[1] + '-' + matches[2] + '-' + matches[3] + 'T' + matches[4] + ':' + matches[5] + ':' + matches[6] + (matches[8] ? matches[8] : 'Z'));
234
+ if (Number.isNaN(ms))
235
+ throw new Error('Unable to parse Timestamp from JSON. Invalid value.');
236
+ if (ms < Date.parse('0001-01-01T00:00:00Z') || ms > Date.parse('9999-12-31T23:59:59Z'))
237
+ throw new globalThis.Error('Unable to parse Timestamp from JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.');
238
+ if (!target)
239
+ target = this.create();
240
+ target.seconds = PbLong.from(ms / 1000).toBigInt();
241
+ target.nanos = 0;
242
+ if (matches[7])
243
+ target.nanos = (parseInt('1' + matches[7] + '0'.repeat(9 - matches[7].length)) - 1000000000);
244
+ return target;
245
+ }
246
+
247
+ create(value?: PartialMessage<Timestamp>): Timestamp {
248
+ const message = globalThis.Object.create((this.messagePrototype!));
249
+ message.seconds = 0n;
250
+ message.nanos = 0;
251
+ if (value !== undefined)
252
+ reflectionMergePartial<Timestamp>(this, message, value);
253
+ return message;
254
+ }
255
+
256
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Timestamp): Timestamp {
257
+ const message = target ?? this.create(), end = reader.pos + length;
258
+ while (reader.pos < end) {
259
+ const [fieldNo, wireType] = reader.tag();
260
+ switch (fieldNo) {
261
+ case /* int64 seconds */ 1:
262
+ message.seconds = reader.int64().toBigInt();
263
+ break;
264
+ case /* int32 nanos */ 2:
265
+ message.nanos = reader.int32();
266
+ break;
267
+ default:
268
+ const u = options.readUnknownField;
269
+ if (u === 'throw')
270
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
271
+ const d = reader.skip(wireType);
272
+ if (u !== false)
273
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
274
+ }
282
275
  }
276
+ return message;
277
+ }
278
+
279
+ internalBinaryWrite(message: Timestamp, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
280
+ /* int64 seconds = 1; */
281
+ if (message.seconds !== 0n)
282
+ writer.tag(1, WireType.Varint).int64(message.seconds);
283
+ /* int32 nanos = 2; */
284
+ if (message.nanos !== 0)
285
+ writer.tag(2, WireType.Varint).int32(message.nanos);
286
+ const u = options.writeUnknownFields;
287
+ if (u !== false)
288
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
289
+ return writer;
290
+ }
283
291
  }
284
292
  /**
285
293
  * @generated MessageType for protobuf message google.protobuf.Timestamp