@nxtedition/types 23.0.22 → 23.0.24

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.
@@ -1202,3 +1202,1264 @@ export const assertStringifyFileRestrictionsRecord = (input, errorFactory) => {
1202
1202
  return ""; return `${JSON.stringify(key)}:${`{"asset":${$string(value.asset)},"date":${$string(value.date)},"user":${$string(value.user)},"text":${$string(value.text)},"start":${value.start},"end":${value.end}}`}`; }).filter(str => "" !== str).join(",")}}`;
1203
1203
  return $so0(input);
1204
1204
  }; return stringify(assert(input, errorFactory)); };
1205
+ export const isFileDomainStatsRecord = input => {
1206
+ const $io0 = input => (null === input.position || "number" === typeof input.position && (0 <= input.position && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <= 18446744073709552000))) && (null === input.uploading || "boolean" === typeof input.uploading) && (Array.isArray(input.zones) && input.zones.every(elem => "string" === typeof elem)) && (Array.isArray(input.replicas) && input.replicas.every(elem => "string" === typeof elem)) && (Array.isArray(input.locations) && input.locations.every(elem => "string" === typeof elem)) && ("number" === typeof input.progress && (0 <= input.progress && input.progress <= 1)) && (Array.isArray(input.ranges) && input.ranges.every(elem => Array.isArray(elem) && (elem.length === 2 && ("number" === typeof elem[0] && 0 <= elem[0]) && ("number" === typeof elem[1] && 0 <= elem[1])))) && ("string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id)) && (null === input.size || "number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && "string" === typeof input.resumable && "string" === typeof input.mimeType && "string" === typeof input.encoding && ("string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && ("number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000))) && "boolean" === typeof input.completed && (undefined !== input.error && (null === input.error || (Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem)) || "object" === typeof input.error && null !== input.error && $io2(input.error))));
1207
+ const $io1 = input => (undefined === input.file || "string" === typeof input.file) && (undefined === input.offset || "number" === typeof input.offset) && (undefined === input.start || "number" === typeof input.start) && (undefined === input.end || "number" === typeof input.end);
1208
+ const $io2 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode) && (undefined === input.signalCode || "number" === typeof input.signalCode) && (undefined === input.statusCode || "number" === typeof input.statusCode) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io3(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io4(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io2(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io2(elem)));
1209
+ const $io3 = input => Object.keys(input).every(key => {
1210
+ const value = input[key];
1211
+ if (undefined === value)
1212
+ return true;
1213
+ return "string" === typeof value;
1214
+ });
1215
+ const $io4 = input => true;
1216
+ return "object" === typeof input && null !== input && $io0(input);
1217
+ };
1218
+ export const assertFileDomainStatsRecord = (input, errorFactory) => {
1219
+ const __is = input => {
1220
+ const $io0 = input => (null === input.position || "number" === typeof input.position && (0 <= input.position && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <= 18446744073709552000))) && (null === input.uploading || "boolean" === typeof input.uploading) && (Array.isArray(input.zones) && input.zones.every(elem => "string" === typeof elem)) && (Array.isArray(input.replicas) && input.replicas.every(elem => "string" === typeof elem)) && (Array.isArray(input.locations) && input.locations.every(elem => "string" === typeof elem)) && ("number" === typeof input.progress && (0 <= input.progress && input.progress <= 1)) && (Array.isArray(input.ranges) && input.ranges.every(elem => Array.isArray(elem) && (elem.length === 2 && ("number" === typeof elem[0] && 0 <= elem[0]) && ("number" === typeof elem[1] && 0 <= elem[1])))) && ("string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id)) && (null === input.size || "number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && "string" === typeof input.resumable && "string" === typeof input.mimeType && "string" === typeof input.encoding && ("string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && ("number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000))) && "boolean" === typeof input.completed && (undefined !== input.error && (null === input.error || (Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem)) || "object" === typeof input.error && null !== input.error && $io2(input.error))));
1221
+ const $io1 = input => (undefined === input.file || "string" === typeof input.file) && (undefined === input.offset || "number" === typeof input.offset) && (undefined === input.start || "number" === typeof input.start) && (undefined === input.end || "number" === typeof input.end);
1222
+ const $io2 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode) && (undefined === input.signalCode || "number" === typeof input.signalCode) && (undefined === input.statusCode || "number" === typeof input.statusCode) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io3(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io4(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io2(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io2(elem)));
1223
+ const $io3 = input => Object.keys(input).every(key => {
1224
+ const value = input[key];
1225
+ if (undefined === value)
1226
+ return true;
1227
+ return "string" === typeof value;
1228
+ });
1229
+ const $io4 = input => true;
1230
+ return "object" === typeof input && null !== input && $io0(input);
1231
+ };
1232
+ if (false === __is(input))
1233
+ ((input, _path, _exceptionable = true) => {
1234
+ const $guard = __typia.createAssert.guard;
1235
+ const $join = __typia.createAssert.join;
1236
+ const $ao0 = (input, _path, _exceptionable = true) => (null === input.position || "number" === typeof input.position && (0 <= input.position || $guard(_exceptionable, {
1237
+ path: _path + ".position",
1238
+ expected: "number & Minimum<0>",
1239
+ value: input.position
1240
+ }, errorFactory)) && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <= 18446744073709552000 || $guard(_exceptionable, {
1241
+ path: _path + ".position",
1242
+ expected: "number & Type<\"uint64\">",
1243
+ value: input.position
1244
+ }, errorFactory)) || $guard(_exceptionable, {
1245
+ path: _path + ".position",
1246
+ expected: "((number & Minimum<0> & Type<\"uint64\">) | null)",
1247
+ value: input.position
1248
+ }, errorFactory)) && (null === input.uploading || "boolean" === typeof input.uploading || $guard(_exceptionable, {
1249
+ path: _path + ".uploading",
1250
+ expected: "(boolean | null)",
1251
+ value: input.uploading
1252
+ }, errorFactory)) && ((Array.isArray(input.zones) || $guard(_exceptionable, {
1253
+ path: _path + ".zones",
1254
+ expected: "Array<string>",
1255
+ value: input.zones
1256
+ }, errorFactory)) && input.zones.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
1257
+ path: _path + ".zones[" + _index1 + "]",
1258
+ expected: "string",
1259
+ value: elem
1260
+ }, errorFactory)) || $guard(_exceptionable, {
1261
+ path: _path + ".zones",
1262
+ expected: "Array<string>",
1263
+ value: input.zones
1264
+ }, errorFactory)) && ((Array.isArray(input.replicas) || $guard(_exceptionable, {
1265
+ path: _path + ".replicas",
1266
+ expected: "Array<string>",
1267
+ value: input.replicas
1268
+ }, errorFactory)) && input.replicas.every((elem, _index2) => "string" === typeof elem || $guard(_exceptionable, {
1269
+ path: _path + ".replicas[" + _index2 + "]",
1270
+ expected: "string",
1271
+ value: elem
1272
+ }, errorFactory)) || $guard(_exceptionable, {
1273
+ path: _path + ".replicas",
1274
+ expected: "Array<string>",
1275
+ value: input.replicas
1276
+ }, errorFactory)) && ((Array.isArray(input.locations) || $guard(_exceptionable, {
1277
+ path: _path + ".locations",
1278
+ expected: "Array<string>",
1279
+ value: input.locations
1280
+ }, errorFactory)) && input.locations.every((elem, _index3) => "string" === typeof elem || $guard(_exceptionable, {
1281
+ path: _path + ".locations[" + _index3 + "]",
1282
+ expected: "string",
1283
+ value: elem
1284
+ }, errorFactory)) || $guard(_exceptionable, {
1285
+ path: _path + ".locations",
1286
+ expected: "Array<string>",
1287
+ value: input.locations
1288
+ }, errorFactory)) && ("number" === typeof input.progress && (0 <= input.progress || $guard(_exceptionable, {
1289
+ path: _path + ".progress",
1290
+ expected: "number & Minimum<0>",
1291
+ value: input.progress
1292
+ }, errorFactory)) && (input.progress <= 1 || $guard(_exceptionable, {
1293
+ path: _path + ".progress",
1294
+ expected: "number & Maximum<1>",
1295
+ value: input.progress
1296
+ }, errorFactory)) || $guard(_exceptionable, {
1297
+ path: _path + ".progress",
1298
+ expected: "(number & Minimum<0> & Maximum<1>)",
1299
+ value: input.progress
1300
+ }, errorFactory)) && ((Array.isArray(input.ranges) || $guard(_exceptionable, {
1301
+ path: _path + ".ranges",
1302
+ expected: "Array<[start: number & Minimum<0>, end: number & Minimum<0>]>",
1303
+ value: input.ranges
1304
+ }, errorFactory)) && input.ranges.every((elem, _index4) => (Array.isArray(elem) || $guard(_exceptionable, {
1305
+ path: _path + ".ranges[" + _index4 + "]",
1306
+ expected: "[start: number & Minimum<0>, end: number & Minimum<0>]",
1307
+ value: elem
1308
+ }, errorFactory)) && ((elem.length === 2 || $guard(_exceptionable, {
1309
+ path: _path + ".ranges[" + _index4 + "]",
1310
+ expected: "[(number & Minimum<0>), (number & Minimum<0>)]",
1311
+ value: elem
1312
+ }, errorFactory)) && ("number" === typeof elem[0] && (0 <= elem[0] || $guard(_exceptionable, {
1313
+ path: _path + ".ranges[" + _index4 + "][0]",
1314
+ expected: "number & Minimum<0>",
1315
+ value: elem[0]
1316
+ }, errorFactory)) || $guard(_exceptionable, {
1317
+ path: _path + ".ranges[" + _index4 + "][0]",
1318
+ expected: "(number & Minimum<0>)",
1319
+ value: elem[0]
1320
+ }, errorFactory)) && ("number" === typeof elem[1] && (0 <= elem[1] || $guard(_exceptionable, {
1321
+ path: _path + ".ranges[" + _index4 + "][1]",
1322
+ expected: "number & Minimum<0>",
1323
+ value: elem[1]
1324
+ }, errorFactory)) || $guard(_exceptionable, {
1325
+ path: _path + ".ranges[" + _index4 + "][1]",
1326
+ expected: "(number & Minimum<0>)",
1327
+ value: elem[1]
1328
+ }, errorFactory))) || $guard(_exceptionable, {
1329
+ path: _path + ".ranges[" + _index4 + "]",
1330
+ expected: "[start: number & Minimum<0>, end: number & Minimum<0>]",
1331
+ value: elem
1332
+ }, errorFactory)) || $guard(_exceptionable, {
1333
+ path: _path + ".ranges",
1334
+ expected: "Array<[start: number & Minimum<0>, end: number & Minimum<0>]>",
1335
+ value: input.ranges
1336
+ }, errorFactory)) && ("string" === typeof input.id && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) || $guard(_exceptionable, {
1337
+ path: _path + ".id",
1338
+ expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
1339
+ value: input.id
1340
+ }, errorFactory)) || $guard(_exceptionable, {
1341
+ path: _path + ".id",
1342
+ expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
1343
+ value: input.id
1344
+ }, errorFactory)) && (null === input.size || "number" === typeof input.size && (0 <= input.size || $guard(_exceptionable, {
1345
+ path: _path + ".size",
1346
+ expected: "number & Minimum<0>",
1347
+ value: input.size
1348
+ }, errorFactory)) && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000 || $guard(_exceptionable, {
1349
+ path: _path + ".size",
1350
+ expected: "number & Type<\"uint64\">",
1351
+ value: input.size
1352
+ }, errorFactory)) || $guard(_exceptionable, {
1353
+ path: _path + ".size",
1354
+ expected: "((number & Minimum<0> & Type<\"uint64\">) | null)",
1355
+ value: input.size
1356
+ }, errorFactory)) && ("boolean" === typeof input.seekable || $guard(_exceptionable, {
1357
+ path: _path + ".seekable",
1358
+ expected: "boolean",
1359
+ value: input.seekable
1360
+ }, errorFactory)) && ("boolean" === typeof input.deleted || $guard(_exceptionable, {
1361
+ path: _path + ".deleted",
1362
+ expected: "boolean",
1363
+ value: input.deleted
1364
+ }, errorFactory)) && ((Array.isArray(input.refs) || $guard(_exceptionable, {
1365
+ path: _path + ".refs",
1366
+ expected: "Array<__type>",
1367
+ value: input.refs
1368
+ }, errorFactory)) && input.refs.every((elem, _index5) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || $guard(_exceptionable, {
1369
+ path: _path + ".refs[" + _index5 + "]",
1370
+ expected: "__type",
1371
+ value: elem
1372
+ }, errorFactory)) && $ao1(elem, _path + ".refs[" + _index5 + "]", true && _exceptionable) || $guard(_exceptionable, {
1373
+ path: _path + ".refs[" + _index5 + "]",
1374
+ expected: "__type",
1375
+ value: elem
1376
+ }, errorFactory)) || $guard(_exceptionable, {
1377
+ path: _path + ".refs",
1378
+ expected: "Array<__type>",
1379
+ value: input.refs
1380
+ }, errorFactory)) && ((Array.isArray(input.tags) || $guard(_exceptionable, {
1381
+ path: _path + ".tags",
1382
+ expected: "Array<string>",
1383
+ value: input.tags
1384
+ }, errorFactory)) && input.tags.every((elem, _index6) => "string" === typeof elem || $guard(_exceptionable, {
1385
+ path: _path + ".tags[" + _index6 + "]",
1386
+ expected: "string",
1387
+ value: elem
1388
+ }, errorFactory)) || $guard(_exceptionable, {
1389
+ path: _path + ".tags",
1390
+ expected: "Array<string>",
1391
+ value: input.tags
1392
+ }, errorFactory)) && ("string" === typeof input.resumable || $guard(_exceptionable, {
1393
+ path: _path + ".resumable",
1394
+ expected: "string",
1395
+ value: input.resumable
1396
+ }, errorFactory)) && ("string" === typeof input.mimeType || $guard(_exceptionable, {
1397
+ path: _path + ".mimeType",
1398
+ expected: "string",
1399
+ value: input.mimeType
1400
+ }, errorFactory)) && ("string" === typeof input.encoding || $guard(_exceptionable, {
1401
+ path: _path + ".encoding",
1402
+ expected: "string",
1403
+ value: input.encoding
1404
+ }, errorFactory)) && ("string" === typeof input.hash && (/^([A-Fa-f0-9]{32})?$/.test(input.hash) || $guard(_exceptionable, {
1405
+ path: _path + ".hash",
1406
+ expected: "string & Pattern<\"^([A-Fa-f0-9]{32})?$\">",
1407
+ value: input.hash
1408
+ }, errorFactory)) || $guard(_exceptionable, {
1409
+ path: _path + ".hash",
1410
+ expected: "(string & Pattern<\"^([A-Fa-f0-9]{32})?$\">)",
1411
+ value: input.hash
1412
+ }, errorFactory)) && ("number" === typeof input.btime && (0 <= input.btime || $guard(_exceptionable, {
1413
+ path: _path + ".btime",
1414
+ expected: "number & Minimum<0>",
1415
+ value: input.btime
1416
+ }, errorFactory)) && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000 || $guard(_exceptionable, {
1417
+ path: _path + ".btime",
1418
+ expected: "number & Type<\"uint64\">",
1419
+ value: input.btime
1420
+ }, errorFactory)) || $guard(_exceptionable, {
1421
+ path: _path + ".btime",
1422
+ expected: "(number & Minimum<0> & Type<\"uint64\">)",
1423
+ value: input.btime
1424
+ }, errorFactory)) && ("boolean" === typeof input.completed || $guard(_exceptionable, {
1425
+ path: _path + ".completed",
1426
+ expected: "boolean",
1427
+ value: input.completed
1428
+ }, errorFactory)) && ((undefined !== input.error || $guard(_exceptionable, {
1429
+ path: _path + ".error",
1430
+ expected: "(Array<NxtError> | NxtError | null)",
1431
+ value: input.error
1432
+ }, errorFactory)) && (null === input.error || (Array.isArray(input.error) && input.error.every((elem, _index7) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
1433
+ path: _path + ".error[" + _index7 + "]",
1434
+ expected: "NxtError",
1435
+ value: elem
1436
+ }, errorFactory)) && $ao2(elem, _path + ".error[" + _index7 + "]", true && _exceptionable) || $guard(_exceptionable, {
1437
+ path: _path + ".error[" + _index7 + "]",
1438
+ expected: "NxtError",
1439
+ value: elem
1440
+ }, errorFactory)) || "object" === typeof input.error && null !== input.error && $ao2(input.error, _path + ".error", true && _exceptionable) || $guard(_exceptionable, {
1441
+ path: _path + ".error",
1442
+ expected: "(Array<NxtError> | NxtError | null)",
1443
+ value: input.error
1444
+ }, errorFactory)) || $guard(_exceptionable, {
1445
+ path: _path + ".error",
1446
+ expected: "(Array<NxtError> | NxtError | null)",
1447
+ value: input.error
1448
+ }, errorFactory)));
1449
+ const $ao1 = (input, _path, _exceptionable = true) => (undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
1450
+ path: _path + ".file",
1451
+ expected: "(string | undefined)",
1452
+ value: input.file
1453
+ }, errorFactory)) && (undefined === input.offset || "number" === typeof input.offset || $guard(_exceptionable, {
1454
+ path: _path + ".offset",
1455
+ expected: "(number | undefined)",
1456
+ value: input.offset
1457
+ }, errorFactory)) && (undefined === input.start || "number" === typeof input.start || $guard(_exceptionable, {
1458
+ path: _path + ".start",
1459
+ expected: "(number | undefined)",
1460
+ value: input.start
1461
+ }, errorFactory)) && (undefined === input.end || "number" === typeof input.end || $guard(_exceptionable, {
1462
+ path: _path + ".end",
1463
+ expected: "(number | undefined)",
1464
+ value: input.end
1465
+ }, errorFactory));
1466
+ const $ao2 = (input, _path, _exceptionable = true) => ("string" === typeof input.message || $guard(_exceptionable, {
1467
+ path: _path + ".message",
1468
+ expected: "string",
1469
+ value: input.message
1470
+ }, errorFactory)) && (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
1471
+ path: _path + ".type",
1472
+ expected: "(string | undefined)",
1473
+ value: input.type
1474
+ }, errorFactory)) && (undefined === input.code || "string" === typeof input.code || $guard(_exceptionable, {
1475
+ path: _path + ".code",
1476
+ expected: "(string | undefined)",
1477
+ value: input.code
1478
+ }, errorFactory)) && (undefined === input.exitCode || "number" === typeof input.exitCode || $guard(_exceptionable, {
1479
+ path: _path + ".exitCode",
1480
+ expected: "(number | undefined)",
1481
+ value: input.exitCode
1482
+ }, errorFactory)) && (undefined === input.signalCode || "number" === typeof input.signalCode || $guard(_exceptionable, {
1483
+ path: _path + ".signalCode",
1484
+ expected: "(number | undefined)",
1485
+ value: input.signalCode
1486
+ }, errorFactory)) && (undefined === input.statusCode || "number" === typeof input.statusCode || $guard(_exceptionable, {
1487
+ path: _path + ".statusCode",
1488
+ expected: "(number | undefined)",
1489
+ value: input.statusCode
1490
+ }, errorFactory)) && (undefined === input.headers || ("object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) || $guard(_exceptionable, {
1491
+ path: _path + ".headers",
1492
+ expected: "(Record<string, string> | undefined)",
1493
+ value: input.headers
1494
+ }, errorFactory)) && $ao3(input.headers, _path + ".headers", true && _exceptionable) || $guard(_exceptionable, {
1495
+ path: _path + ".headers",
1496
+ expected: "(Record<string, string> | undefined)",
1497
+ value: input.headers
1498
+ }, errorFactory)) && (undefined === input.data || ("object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) || $guard(_exceptionable, {
1499
+ path: _path + ".data",
1500
+ expected: "(object | undefined)",
1501
+ value: input.data
1502
+ }, errorFactory)) && $ao4(input.data, _path + ".data", true && _exceptionable) || $guard(_exceptionable, {
1503
+ path: _path + ".data",
1504
+ expected: "(object | undefined)",
1505
+ value: input.data
1506
+ }, errorFactory)) && (null === input.cause || undefined === input.cause || ("object" === typeof input.cause && null !== input.cause || $guard(_exceptionable, {
1507
+ path: _path + ".cause",
1508
+ expected: "(NxtError | null | undefined)",
1509
+ value: input.cause
1510
+ }, errorFactory)) && $ao2(input.cause, _path + ".cause", true && _exceptionable) || $guard(_exceptionable, {
1511
+ path: _path + ".cause",
1512
+ expected: "(NxtError | null | undefined)",
1513
+ value: input.cause
1514
+ }, errorFactory)) && (null === input.errors || undefined === input.errors || (Array.isArray(input.errors) || $guard(_exceptionable, {
1515
+ path: _path + ".errors",
1516
+ expected: "(Array<NxtError> | null | undefined)",
1517
+ value: input.errors
1518
+ }, errorFactory)) && input.errors.every((elem, _index8) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
1519
+ path: _path + ".errors[" + _index8 + "]",
1520
+ expected: "NxtError",
1521
+ value: elem
1522
+ }, errorFactory)) && $ao2(elem, _path + ".errors[" + _index8 + "]", true && _exceptionable) || $guard(_exceptionable, {
1523
+ path: _path + ".errors[" + _index8 + "]",
1524
+ expected: "NxtError",
1525
+ value: elem
1526
+ }, errorFactory)) || $guard(_exceptionable, {
1527
+ path: _path + ".errors",
1528
+ expected: "(Array<NxtError> | null | undefined)",
1529
+ value: input.errors
1530
+ }, errorFactory));
1531
+ const $ao3 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
1532
+ const value = input[key];
1533
+ if (undefined === value)
1534
+ return true;
1535
+ return "string" === typeof value || $guard(_exceptionable, {
1536
+ path: _path + $join(key),
1537
+ expected: "string",
1538
+ value: value
1539
+ }, errorFactory);
1540
+ });
1541
+ const $ao4 = (input, _path, _exceptionable = true) => true;
1542
+ return ("object" === typeof input && null !== input || $guard(true, {
1543
+ path: _path + "",
1544
+ expected: "FileStats",
1545
+ value: input
1546
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
1547
+ path: _path + "",
1548
+ expected: "FileStats",
1549
+ value: input
1550
+ }, errorFactory);
1551
+ })(input, "$input", true);
1552
+ return input;
1553
+ };
1554
+ export const randomFileDomainStatsRecord = generator => {
1555
+ const $generator = __typia.createRandom.generator;
1556
+ const $pick = __typia.createRandom.pick;
1557
+ const $ro0 = (_recursive = false, _depth = 0) => ({
1558
+ position: $pick([
1559
+ () => null,
1560
+ () => (generator?.customs ?? $generator.customs)?.number?.([
1561
+ {
1562
+ name: "Minimum<0>",
1563
+ kind: "minimum",
1564
+ value: 0
1565
+ },
1566
+ {
1567
+ name: "Type<\"uint64\">",
1568
+ kind: "type",
1569
+ value: "uint64"
1570
+ }
1571
+ ]) ?? (generator?.integer ?? $generator.integer)(0, 10)
1572
+ ])(),
1573
+ uploading: $pick([
1574
+ () => null,
1575
+ () => (generator?.boolean ?? $generator.boolean)()
1576
+ ])(),
1577
+ zones: (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()),
1578
+ replicas: (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()),
1579
+ locations: (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()),
1580
+ progress: (generator?.customs ?? $generator.customs)?.number?.([
1581
+ {
1582
+ name: "Minimum<0>",
1583
+ kind: "minimum",
1584
+ value: 0
1585
+ },
1586
+ {
1587
+ name: "Maximum<1>",
1588
+ kind: "maximum",
1589
+ value: 1
1590
+ }
1591
+ ]) ?? (generator?.number ?? $generator.number)(0, 1),
1592
+ ranges: (generator?.array ?? $generator.array)(() => [
1593
+ (generator?.customs ?? $generator.customs)?.number?.([
1594
+ {
1595
+ name: "Minimum<0>",
1596
+ kind: "minimum",
1597
+ value: 0
1598
+ }
1599
+ ]) ?? (generator?.number ?? $generator.number)(0, 10),
1600
+ (generator?.customs ?? $generator.customs)?.number?.([
1601
+ {
1602
+ name: "Minimum<0>",
1603
+ kind: "minimum",
1604
+ value: 0
1605
+ }
1606
+ ]) ?? (generator?.number ?? $generator.number)(0, 10)
1607
+ ]),
1608
+ id: (generator?.customs ?? $generator.customs)?.string?.([
1609
+ {
1610
+ name: "Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
1611
+ kind: "pattern",
1612
+ value: "^[0-9A-Za-z~][0-9A-Za-z~._: -]*$"
1613
+ }
1614
+ ]) ?? (generator?.pattern ?? $generator.pattern)(/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/),
1615
+ size: $pick([
1616
+ () => null,
1617
+ () => (generator?.customs ?? $generator.customs)?.number?.([
1618
+ {
1619
+ name: "Minimum<0>",
1620
+ kind: "minimum",
1621
+ value: 0
1622
+ },
1623
+ {
1624
+ name: "Type<\"uint64\">",
1625
+ kind: "type",
1626
+ value: "uint64"
1627
+ }
1628
+ ]) ?? (generator?.integer ?? $generator.integer)(0, 10)
1629
+ ])(),
1630
+ seekable: (generator?.boolean ?? $generator.boolean)(),
1631
+ deleted: (generator?.boolean ?? $generator.boolean)(),
1632
+ refs: (generator?.array ?? $generator.array)(() => $ro1(_recursive, _recursive ? 1 + _depth : _depth)),
1633
+ tags: (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()),
1634
+ resumable: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
1635
+ mimeType: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
1636
+ encoding: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
1637
+ hash: (generator?.customs ?? $generator.customs)?.string?.([
1638
+ {
1639
+ name: "Pattern<\"^([A-Fa-f0-9]{32})?$\">",
1640
+ kind: "pattern",
1641
+ value: "^([A-Fa-f0-9]{32})?$"
1642
+ }
1643
+ ]) ?? (generator?.pattern ?? $generator.pattern)(/^([A-Fa-f0-9]{32})?$/),
1644
+ btime: (generator?.customs ?? $generator.customs)?.number?.([
1645
+ {
1646
+ name: "Minimum<0>",
1647
+ kind: "minimum",
1648
+ value: 0
1649
+ },
1650
+ {
1651
+ name: "Type<\"uint64\">",
1652
+ kind: "type",
1653
+ value: "uint64"
1654
+ }
1655
+ ]) ?? (generator?.integer ?? $generator.integer)(0, 10),
1656
+ completed: (generator?.boolean ?? $generator.boolean)(),
1657
+ error: $pick([
1658
+ () => null,
1659
+ () => (generator?.array ?? $generator.array)(() => $ro2(_recursive, _recursive ? 1 + _depth : _depth)),
1660
+ () => $ro2(_recursive, _recursive ? 1 + _depth : _depth)
1661
+ ])()
1662
+ });
1663
+ const $ro1 = (_recursive = false, _depth = 0) => ({
1664
+ file: $pick([
1665
+ () => undefined,
1666
+ () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
1667
+ ])(),
1668
+ offset: $pick([
1669
+ () => undefined,
1670
+ () => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
1671
+ ])(),
1672
+ start: $pick([
1673
+ () => undefined,
1674
+ () => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
1675
+ ])(),
1676
+ end: $pick([
1677
+ () => undefined,
1678
+ () => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
1679
+ ])()
1680
+ });
1681
+ const $ro2 = (_recursive = true, _depth = 0) => ({
1682
+ message: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
1683
+ type: $pick([
1684
+ () => undefined,
1685
+ () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
1686
+ ])(),
1687
+ code: $pick([
1688
+ () => undefined,
1689
+ () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
1690
+ ])(),
1691
+ exitCode: $pick([
1692
+ () => undefined,
1693
+ () => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
1694
+ ])(),
1695
+ signalCode: $pick([
1696
+ () => undefined,
1697
+ () => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
1698
+ ])(),
1699
+ statusCode: $pick([
1700
+ () => undefined,
1701
+ () => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
1702
+ ])(),
1703
+ headers: $pick([
1704
+ () => undefined,
1705
+ () => $ro3(true, _recursive ? 1 + _depth : _depth)
1706
+ ])(),
1707
+ data: $pick([
1708
+ () => undefined,
1709
+ () => $ro4(true, _recursive ? 1 + _depth : _depth)
1710
+ ])(),
1711
+ cause: $pick([
1712
+ () => undefined,
1713
+ () => null,
1714
+ () => $ro2(true, _recursive ? 1 + _depth : _depth)
1715
+ ])(),
1716
+ errors: $pick([
1717
+ () => undefined,
1718
+ () => null,
1719
+ () => _recursive && 5 < _depth ? [] : 5 >= _depth ? (generator?.array ?? $generator.array)(() => $ro2(true, _recursive ? 1 + _depth : _depth)) : []
1720
+ ])()
1721
+ });
1722
+ const $ro3 = (_recursive = false, _depth = 0) => {
1723
+ const output = {};
1724
+ (generator?.array ?? $generator.array)(() => output[(generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()] = (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(), (generator?.integer ?? $generator.integer)(0, 3));
1725
+ return output;
1726
+ };
1727
+ const $ro4 = (_recursive = false, _depth = 0) => {};
1728
+ return $ro0();
1729
+ };
1730
+ export const assertGuardFileDomainStatsRecord = (input, errorFactory) => {
1731
+ const __is = input => {
1732
+ const $io0 = input => (null === input.position || "number" === typeof input.position && (0 <= input.position && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <= 18446744073709552000))) && (null === input.uploading || "boolean" === typeof input.uploading) && (Array.isArray(input.zones) && input.zones.every(elem => "string" === typeof elem)) && (Array.isArray(input.replicas) && input.replicas.every(elem => "string" === typeof elem)) && (Array.isArray(input.locations) && input.locations.every(elem => "string" === typeof elem)) && ("number" === typeof input.progress && (0 <= input.progress && input.progress <= 1)) && (Array.isArray(input.ranges) && input.ranges.every(elem => Array.isArray(elem) && (elem.length === 2 && ("number" === typeof elem[0] && 0 <= elem[0]) && ("number" === typeof elem[1] && 0 <= elem[1])))) && ("string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id)) && (null === input.size || "number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && "string" === typeof input.resumable && "string" === typeof input.mimeType && "string" === typeof input.encoding && ("string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && ("number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000))) && "boolean" === typeof input.completed && (undefined !== input.error && (null === input.error || (Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem)) || "object" === typeof input.error && null !== input.error && $io2(input.error))));
1733
+ const $io1 = input => (undefined === input.file || "string" === typeof input.file) && (undefined === input.offset || "number" === typeof input.offset) && (undefined === input.start || "number" === typeof input.start) && (undefined === input.end || "number" === typeof input.end);
1734
+ const $io2 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode) && (undefined === input.signalCode || "number" === typeof input.signalCode) && (undefined === input.statusCode || "number" === typeof input.statusCode) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io3(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io4(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io2(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io2(elem)));
1735
+ const $io3 = input => Object.keys(input).every(key => {
1736
+ const value = input[key];
1737
+ if (undefined === value)
1738
+ return true;
1739
+ return "string" === typeof value;
1740
+ });
1741
+ const $io4 = input => true;
1742
+ return "object" === typeof input && null !== input && $io0(input);
1743
+ };
1744
+ if (false === __is(input))
1745
+ ((input, _path, _exceptionable = true) => {
1746
+ const $guard = __typia.createAssertGuard.guard;
1747
+ const $join = __typia.createAssertGuard.join;
1748
+ const $ao0 = (input, _path, _exceptionable = true) => (null === input.position || "number" === typeof input.position && (0 <= input.position || $guard(_exceptionable, {
1749
+ path: _path + ".position",
1750
+ expected: "number & Minimum<0>",
1751
+ value: input.position
1752
+ }, errorFactory)) && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <= 18446744073709552000 || $guard(_exceptionable, {
1753
+ path: _path + ".position",
1754
+ expected: "number & Type<\"uint64\">",
1755
+ value: input.position
1756
+ }, errorFactory)) || $guard(_exceptionable, {
1757
+ path: _path + ".position",
1758
+ expected: "((number & Minimum<0> & Type<\"uint64\">) | null)",
1759
+ value: input.position
1760
+ }, errorFactory)) && (null === input.uploading || "boolean" === typeof input.uploading || $guard(_exceptionable, {
1761
+ path: _path + ".uploading",
1762
+ expected: "(boolean | null)",
1763
+ value: input.uploading
1764
+ }, errorFactory)) && ((Array.isArray(input.zones) || $guard(_exceptionable, {
1765
+ path: _path + ".zones",
1766
+ expected: "Array<string>",
1767
+ value: input.zones
1768
+ }, errorFactory)) && input.zones.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
1769
+ path: _path + ".zones[" + _index1 + "]",
1770
+ expected: "string",
1771
+ value: elem
1772
+ }, errorFactory)) || $guard(_exceptionable, {
1773
+ path: _path + ".zones",
1774
+ expected: "Array<string>",
1775
+ value: input.zones
1776
+ }, errorFactory)) && ((Array.isArray(input.replicas) || $guard(_exceptionable, {
1777
+ path: _path + ".replicas",
1778
+ expected: "Array<string>",
1779
+ value: input.replicas
1780
+ }, errorFactory)) && input.replicas.every((elem, _index2) => "string" === typeof elem || $guard(_exceptionable, {
1781
+ path: _path + ".replicas[" + _index2 + "]",
1782
+ expected: "string",
1783
+ value: elem
1784
+ }, errorFactory)) || $guard(_exceptionable, {
1785
+ path: _path + ".replicas",
1786
+ expected: "Array<string>",
1787
+ value: input.replicas
1788
+ }, errorFactory)) && ((Array.isArray(input.locations) || $guard(_exceptionable, {
1789
+ path: _path + ".locations",
1790
+ expected: "Array<string>",
1791
+ value: input.locations
1792
+ }, errorFactory)) && input.locations.every((elem, _index3) => "string" === typeof elem || $guard(_exceptionable, {
1793
+ path: _path + ".locations[" + _index3 + "]",
1794
+ expected: "string",
1795
+ value: elem
1796
+ }, errorFactory)) || $guard(_exceptionable, {
1797
+ path: _path + ".locations",
1798
+ expected: "Array<string>",
1799
+ value: input.locations
1800
+ }, errorFactory)) && ("number" === typeof input.progress && (0 <= input.progress || $guard(_exceptionable, {
1801
+ path: _path + ".progress",
1802
+ expected: "number & Minimum<0>",
1803
+ value: input.progress
1804
+ }, errorFactory)) && (input.progress <= 1 || $guard(_exceptionable, {
1805
+ path: _path + ".progress",
1806
+ expected: "number & Maximum<1>",
1807
+ value: input.progress
1808
+ }, errorFactory)) || $guard(_exceptionable, {
1809
+ path: _path + ".progress",
1810
+ expected: "(number & Minimum<0> & Maximum<1>)",
1811
+ value: input.progress
1812
+ }, errorFactory)) && ((Array.isArray(input.ranges) || $guard(_exceptionable, {
1813
+ path: _path + ".ranges",
1814
+ expected: "Array<[start: number & Minimum<0>, end: number & Minimum<0>]>",
1815
+ value: input.ranges
1816
+ }, errorFactory)) && input.ranges.every((elem, _index4) => (Array.isArray(elem) || $guard(_exceptionable, {
1817
+ path: _path + ".ranges[" + _index4 + "]",
1818
+ expected: "[start: number & Minimum<0>, end: number & Minimum<0>]",
1819
+ value: elem
1820
+ }, errorFactory)) && ((elem.length === 2 || $guard(_exceptionable, {
1821
+ path: _path + ".ranges[" + _index4 + "]",
1822
+ expected: "[(number & Minimum<0>), (number & Minimum<0>)]",
1823
+ value: elem
1824
+ }, errorFactory)) && ("number" === typeof elem[0] && (0 <= elem[0] || $guard(_exceptionable, {
1825
+ path: _path + ".ranges[" + _index4 + "][0]",
1826
+ expected: "number & Minimum<0>",
1827
+ value: elem[0]
1828
+ }, errorFactory)) || $guard(_exceptionable, {
1829
+ path: _path + ".ranges[" + _index4 + "][0]",
1830
+ expected: "(number & Minimum<0>)",
1831
+ value: elem[0]
1832
+ }, errorFactory)) && ("number" === typeof elem[1] && (0 <= elem[1] || $guard(_exceptionable, {
1833
+ path: _path + ".ranges[" + _index4 + "][1]",
1834
+ expected: "number & Minimum<0>",
1835
+ value: elem[1]
1836
+ }, errorFactory)) || $guard(_exceptionable, {
1837
+ path: _path + ".ranges[" + _index4 + "][1]",
1838
+ expected: "(number & Minimum<0>)",
1839
+ value: elem[1]
1840
+ }, errorFactory))) || $guard(_exceptionable, {
1841
+ path: _path + ".ranges[" + _index4 + "]",
1842
+ expected: "[start: number & Minimum<0>, end: number & Minimum<0>]",
1843
+ value: elem
1844
+ }, errorFactory)) || $guard(_exceptionable, {
1845
+ path: _path + ".ranges",
1846
+ expected: "Array<[start: number & Minimum<0>, end: number & Minimum<0>]>",
1847
+ value: input.ranges
1848
+ }, errorFactory)) && ("string" === typeof input.id && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) || $guard(_exceptionable, {
1849
+ path: _path + ".id",
1850
+ expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
1851
+ value: input.id
1852
+ }, errorFactory)) || $guard(_exceptionable, {
1853
+ path: _path + ".id",
1854
+ expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
1855
+ value: input.id
1856
+ }, errorFactory)) && (null === input.size || "number" === typeof input.size && (0 <= input.size || $guard(_exceptionable, {
1857
+ path: _path + ".size",
1858
+ expected: "number & Minimum<0>",
1859
+ value: input.size
1860
+ }, errorFactory)) && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000 || $guard(_exceptionable, {
1861
+ path: _path + ".size",
1862
+ expected: "number & Type<\"uint64\">",
1863
+ value: input.size
1864
+ }, errorFactory)) || $guard(_exceptionable, {
1865
+ path: _path + ".size",
1866
+ expected: "((number & Minimum<0> & Type<\"uint64\">) | null)",
1867
+ value: input.size
1868
+ }, errorFactory)) && ("boolean" === typeof input.seekable || $guard(_exceptionable, {
1869
+ path: _path + ".seekable",
1870
+ expected: "boolean",
1871
+ value: input.seekable
1872
+ }, errorFactory)) && ("boolean" === typeof input.deleted || $guard(_exceptionable, {
1873
+ path: _path + ".deleted",
1874
+ expected: "boolean",
1875
+ value: input.deleted
1876
+ }, errorFactory)) && ((Array.isArray(input.refs) || $guard(_exceptionable, {
1877
+ path: _path + ".refs",
1878
+ expected: "Array<__type>",
1879
+ value: input.refs
1880
+ }, errorFactory)) && input.refs.every((elem, _index5) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || $guard(_exceptionable, {
1881
+ path: _path + ".refs[" + _index5 + "]",
1882
+ expected: "__type",
1883
+ value: elem
1884
+ }, errorFactory)) && $ao1(elem, _path + ".refs[" + _index5 + "]", true && _exceptionable) || $guard(_exceptionable, {
1885
+ path: _path + ".refs[" + _index5 + "]",
1886
+ expected: "__type",
1887
+ value: elem
1888
+ }, errorFactory)) || $guard(_exceptionable, {
1889
+ path: _path + ".refs",
1890
+ expected: "Array<__type>",
1891
+ value: input.refs
1892
+ }, errorFactory)) && ((Array.isArray(input.tags) || $guard(_exceptionable, {
1893
+ path: _path + ".tags",
1894
+ expected: "Array<string>",
1895
+ value: input.tags
1896
+ }, errorFactory)) && input.tags.every((elem, _index6) => "string" === typeof elem || $guard(_exceptionable, {
1897
+ path: _path + ".tags[" + _index6 + "]",
1898
+ expected: "string",
1899
+ value: elem
1900
+ }, errorFactory)) || $guard(_exceptionable, {
1901
+ path: _path + ".tags",
1902
+ expected: "Array<string>",
1903
+ value: input.tags
1904
+ }, errorFactory)) && ("string" === typeof input.resumable || $guard(_exceptionable, {
1905
+ path: _path + ".resumable",
1906
+ expected: "string",
1907
+ value: input.resumable
1908
+ }, errorFactory)) && ("string" === typeof input.mimeType || $guard(_exceptionable, {
1909
+ path: _path + ".mimeType",
1910
+ expected: "string",
1911
+ value: input.mimeType
1912
+ }, errorFactory)) && ("string" === typeof input.encoding || $guard(_exceptionable, {
1913
+ path: _path + ".encoding",
1914
+ expected: "string",
1915
+ value: input.encoding
1916
+ }, errorFactory)) && ("string" === typeof input.hash && (/^([A-Fa-f0-9]{32})?$/.test(input.hash) || $guard(_exceptionable, {
1917
+ path: _path + ".hash",
1918
+ expected: "string & Pattern<\"^([A-Fa-f0-9]{32})?$\">",
1919
+ value: input.hash
1920
+ }, errorFactory)) || $guard(_exceptionable, {
1921
+ path: _path + ".hash",
1922
+ expected: "(string & Pattern<\"^([A-Fa-f0-9]{32})?$\">)",
1923
+ value: input.hash
1924
+ }, errorFactory)) && ("number" === typeof input.btime && (0 <= input.btime || $guard(_exceptionable, {
1925
+ path: _path + ".btime",
1926
+ expected: "number & Minimum<0>",
1927
+ value: input.btime
1928
+ }, errorFactory)) && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000 || $guard(_exceptionable, {
1929
+ path: _path + ".btime",
1930
+ expected: "number & Type<\"uint64\">",
1931
+ value: input.btime
1932
+ }, errorFactory)) || $guard(_exceptionable, {
1933
+ path: _path + ".btime",
1934
+ expected: "(number & Minimum<0> & Type<\"uint64\">)",
1935
+ value: input.btime
1936
+ }, errorFactory)) && ("boolean" === typeof input.completed || $guard(_exceptionable, {
1937
+ path: _path + ".completed",
1938
+ expected: "boolean",
1939
+ value: input.completed
1940
+ }, errorFactory)) && ((undefined !== input.error || $guard(_exceptionable, {
1941
+ path: _path + ".error",
1942
+ expected: "(Array<NxtError> | NxtError | null)",
1943
+ value: input.error
1944
+ }, errorFactory)) && (null === input.error || (Array.isArray(input.error) && input.error.every((elem, _index7) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
1945
+ path: _path + ".error[" + _index7 + "]",
1946
+ expected: "NxtError",
1947
+ value: elem
1948
+ }, errorFactory)) && $ao2(elem, _path + ".error[" + _index7 + "]", true && _exceptionable) || $guard(_exceptionable, {
1949
+ path: _path + ".error[" + _index7 + "]",
1950
+ expected: "NxtError",
1951
+ value: elem
1952
+ }, errorFactory)) || "object" === typeof input.error && null !== input.error && $ao2(input.error, _path + ".error", true && _exceptionable) || $guard(_exceptionable, {
1953
+ path: _path + ".error",
1954
+ expected: "(Array<NxtError> | NxtError | null)",
1955
+ value: input.error
1956
+ }, errorFactory)) || $guard(_exceptionable, {
1957
+ path: _path + ".error",
1958
+ expected: "(Array<NxtError> | NxtError | null)",
1959
+ value: input.error
1960
+ }, errorFactory)));
1961
+ const $ao1 = (input, _path, _exceptionable = true) => (undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
1962
+ path: _path + ".file",
1963
+ expected: "(string | undefined)",
1964
+ value: input.file
1965
+ }, errorFactory)) && (undefined === input.offset || "number" === typeof input.offset || $guard(_exceptionable, {
1966
+ path: _path + ".offset",
1967
+ expected: "(number | undefined)",
1968
+ value: input.offset
1969
+ }, errorFactory)) && (undefined === input.start || "number" === typeof input.start || $guard(_exceptionable, {
1970
+ path: _path + ".start",
1971
+ expected: "(number | undefined)",
1972
+ value: input.start
1973
+ }, errorFactory)) && (undefined === input.end || "number" === typeof input.end || $guard(_exceptionable, {
1974
+ path: _path + ".end",
1975
+ expected: "(number | undefined)",
1976
+ value: input.end
1977
+ }, errorFactory));
1978
+ const $ao2 = (input, _path, _exceptionable = true) => ("string" === typeof input.message || $guard(_exceptionable, {
1979
+ path: _path + ".message",
1980
+ expected: "string",
1981
+ value: input.message
1982
+ }, errorFactory)) && (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
1983
+ path: _path + ".type",
1984
+ expected: "(string | undefined)",
1985
+ value: input.type
1986
+ }, errorFactory)) && (undefined === input.code || "string" === typeof input.code || $guard(_exceptionable, {
1987
+ path: _path + ".code",
1988
+ expected: "(string | undefined)",
1989
+ value: input.code
1990
+ }, errorFactory)) && (undefined === input.exitCode || "number" === typeof input.exitCode || $guard(_exceptionable, {
1991
+ path: _path + ".exitCode",
1992
+ expected: "(number | undefined)",
1993
+ value: input.exitCode
1994
+ }, errorFactory)) && (undefined === input.signalCode || "number" === typeof input.signalCode || $guard(_exceptionable, {
1995
+ path: _path + ".signalCode",
1996
+ expected: "(number | undefined)",
1997
+ value: input.signalCode
1998
+ }, errorFactory)) && (undefined === input.statusCode || "number" === typeof input.statusCode || $guard(_exceptionable, {
1999
+ path: _path + ".statusCode",
2000
+ expected: "(number | undefined)",
2001
+ value: input.statusCode
2002
+ }, errorFactory)) && (undefined === input.headers || ("object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) || $guard(_exceptionable, {
2003
+ path: _path + ".headers",
2004
+ expected: "(Record<string, string> | undefined)",
2005
+ value: input.headers
2006
+ }, errorFactory)) && $ao3(input.headers, _path + ".headers", true && _exceptionable) || $guard(_exceptionable, {
2007
+ path: _path + ".headers",
2008
+ expected: "(Record<string, string> | undefined)",
2009
+ value: input.headers
2010
+ }, errorFactory)) && (undefined === input.data || ("object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) || $guard(_exceptionable, {
2011
+ path: _path + ".data",
2012
+ expected: "(object | undefined)",
2013
+ value: input.data
2014
+ }, errorFactory)) && $ao4(input.data, _path + ".data", true && _exceptionable) || $guard(_exceptionable, {
2015
+ path: _path + ".data",
2016
+ expected: "(object | undefined)",
2017
+ value: input.data
2018
+ }, errorFactory)) && (null === input.cause || undefined === input.cause || ("object" === typeof input.cause && null !== input.cause || $guard(_exceptionable, {
2019
+ path: _path + ".cause",
2020
+ expected: "(NxtError | null | undefined)",
2021
+ value: input.cause
2022
+ }, errorFactory)) && $ao2(input.cause, _path + ".cause", true && _exceptionable) || $guard(_exceptionable, {
2023
+ path: _path + ".cause",
2024
+ expected: "(NxtError | null | undefined)",
2025
+ value: input.cause
2026
+ }, errorFactory)) && (null === input.errors || undefined === input.errors || (Array.isArray(input.errors) || $guard(_exceptionable, {
2027
+ path: _path + ".errors",
2028
+ expected: "(Array<NxtError> | null | undefined)",
2029
+ value: input.errors
2030
+ }, errorFactory)) && input.errors.every((elem, _index8) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
2031
+ path: _path + ".errors[" + _index8 + "]",
2032
+ expected: "NxtError",
2033
+ value: elem
2034
+ }, errorFactory)) && $ao2(elem, _path + ".errors[" + _index8 + "]", true && _exceptionable) || $guard(_exceptionable, {
2035
+ path: _path + ".errors[" + _index8 + "]",
2036
+ expected: "NxtError",
2037
+ value: elem
2038
+ }, errorFactory)) || $guard(_exceptionable, {
2039
+ path: _path + ".errors",
2040
+ expected: "(Array<NxtError> | null | undefined)",
2041
+ value: input.errors
2042
+ }, errorFactory));
2043
+ const $ao3 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
2044
+ const value = input[key];
2045
+ if (undefined === value)
2046
+ return true;
2047
+ return "string" === typeof value || $guard(_exceptionable, {
2048
+ path: _path + $join(key),
2049
+ expected: "string",
2050
+ value: value
2051
+ }, errorFactory);
2052
+ });
2053
+ const $ao4 = (input, _path, _exceptionable = true) => true;
2054
+ return ("object" === typeof input && null !== input || $guard(true, {
2055
+ path: _path + "",
2056
+ expected: "FileStats",
2057
+ value: input
2058
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
2059
+ path: _path + "",
2060
+ expected: "FileStats",
2061
+ value: input
2062
+ }, errorFactory);
2063
+ })(input, "$input", true);
2064
+ };
2065
+ export const stringifyFileDomainStatsRecord = input => {
2066
+ const $io1 = input => (undefined === input.file || "string" === typeof input.file) && (undefined === input.offset || "number" === typeof input.offset) && (undefined === input.start || "number" === typeof input.start) && (undefined === input.end || "number" === typeof input.end);
2067
+ const $io2 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode) && (undefined === input.signalCode || "number" === typeof input.signalCode) && (undefined === input.statusCode || "number" === typeof input.statusCode) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io3(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io4(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io2(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io2(elem)));
2068
+ const $io3 = input => Object.keys(input).every(key => {
2069
+ const value = input[key];
2070
+ if (undefined === value)
2071
+ return true;
2072
+ return "string" === typeof value;
2073
+ });
2074
+ const $io4 = input => true;
2075
+ const $string = __typia.json.createStringify.string;
2076
+ const $throws = __typia.json.createStringify.throws;
2077
+ const $tail = __typia.json.createStringify.tail;
2078
+ const $so0 = input => `{"position":${null !== input.position ? input.position : "null"},"uploading":${null !== input.uploading ? input.uploading : "null"},"zones":${`[${input.zones.map(elem => $string(elem)).join(",")}]`},"replicas":${`[${input.replicas.map(elem => $string(elem)).join(",")}]`},"locations":${`[${input.locations.map(elem => $string(elem)).join(",")}]`},"progress":${input.progress},"ranges":${`[${input.ranges.map(elem => `[${elem[0]},${elem[1]}]`).join(",")}]`},"id":${$string(input.id)},"size":${null !== input.size ? input.size : "null"},"seekable":${input.seekable},"deleted":${input.deleted},"refs":${`[${input.refs.map(elem => $so1(elem)).join(",")}]`},"tags":${`[${input.tags.map(elem => $string(elem)).join(",")}]`},"resumable":${$string(input.resumable)},"mimeType":${$string(input.mimeType)},"encoding":${$string(input.encoding)},"hash":${$string(input.hash)},"btime":${input.btime},"completed":${input.completed},"error":${null !== input.error ? (() => {
2079
+ if (Array.isArray(input.error))
2080
+ return `[${input.error.map(elem => $so2(elem)).join(",")}]`;
2081
+ if ("object" === typeof input.error && null !== input.error)
2082
+ return $so2(input.error);
2083
+ $throws({
2084
+ expected: "(Array<NxtError> | NxtError | null)",
2085
+ value: input.error
2086
+ });
2087
+ })() : "null"}}`;
2088
+ const $so1 = input => `{${$tail(`${undefined === input.file ? "" : `"file":${undefined !== input.file ? $string(input.file) : undefined},`}${undefined === input.offset ? "" : `"offset":${undefined !== input.offset ? input.offset : undefined},`}${undefined === input.start ? "" : `"start":${undefined !== input.start ? input.start : undefined},`}${undefined === input.end ? "" : `"end":${undefined !== input.end ? input.end : undefined}`}`)}}`;
2089
+ const $so2 = input => `{${undefined === input.type ? "" : `"type":${undefined !== input.type ? $string(input.type) : undefined},`}${undefined === input.code ? "" : `"code":${undefined !== input.code ? $string(input.code) : undefined},`}${undefined === input.exitCode ? "" : `"exitCode":${undefined !== input.exitCode ? input.exitCode : undefined},`}${undefined === input.signalCode ? "" : `"signalCode":${undefined !== input.signalCode ? input.signalCode : undefined},`}${undefined === input.statusCode ? "" : `"statusCode":${undefined !== input.statusCode ? input.statusCode : undefined},`}${undefined === input.headers ? "" : `"headers":${undefined !== input.headers ? $so3(input.headers) : undefined},`}${undefined === input.data ? "" : `"data":${undefined !== input.data ? "{}" : undefined},`}${undefined === input.cause ? "" : `"cause":${undefined !== input.cause ? null !== input.cause ? $so2(input.cause) : "null" : undefined},`}${undefined === input.errors ? "" : `"errors":${undefined !== input.errors ? null !== input.errors ? `[${input.errors.map(elem => $so2(elem)).join(",")}]` : "null" : undefined},`}"message":${$string(input.message)}}`;
2090
+ const $so3 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
2091
+ return ""; return `${JSON.stringify(key)}:${$string(value)}`; }).filter(str => "" !== str).join(",")}}`;
2092
+ return $so0(input);
2093
+ };
2094
+ export const assertStringifyFileDomainStatsRecord = (input, errorFactory) => { const assert = (input, errorFactory) => {
2095
+ const __is = input => {
2096
+ const $io0 = input => (null === input.position || "number" === typeof input.position && (0 <= input.position && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <= 18446744073709552000))) && (null === input.uploading || "boolean" === typeof input.uploading) && (Array.isArray(input.zones) && input.zones.every(elem => "string" === typeof elem)) && (Array.isArray(input.replicas) && input.replicas.every(elem => "string" === typeof elem)) && (Array.isArray(input.locations) && input.locations.every(elem => "string" === typeof elem)) && ("number" === typeof input.progress && (0 <= input.progress && input.progress <= 1)) && (Array.isArray(input.ranges) && input.ranges.every(elem => Array.isArray(elem) && (elem.length === 2 && ("number" === typeof elem[0] && (!Number.isNaN(elem[0]) && 0 <= elem[0])) && ("number" === typeof elem[1] && (!Number.isNaN(elem[1]) && 0 <= elem[1]))))) && ("string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id)) && (null === input.size || "number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && "string" === typeof input.resumable && "string" === typeof input.mimeType && "string" === typeof input.encoding && ("string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && ("number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000))) && "boolean" === typeof input.completed && (undefined !== input.error && (null === input.error || (Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem)) || "object" === typeof input.error && null !== input.error && $io2(input.error))));
2097
+ const $io1 = input => (undefined === input.file || "string" === typeof input.file) && (undefined === input.offset || "number" === typeof input.offset && !Number.isNaN(input.offset)) && (undefined === input.start || "number" === typeof input.start && !Number.isNaN(input.start)) && (undefined === input.end || "number" === typeof input.end && !Number.isNaN(input.end));
2098
+ const $io2 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode && !Number.isNaN(input.exitCode)) && (undefined === input.signalCode || "number" === typeof input.signalCode && !Number.isNaN(input.signalCode)) && (undefined === input.statusCode || "number" === typeof input.statusCode && !Number.isNaN(input.statusCode)) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io3(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io4(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io2(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io2(elem)));
2099
+ const $io3 = input => Object.keys(input).every(key => {
2100
+ const value = input[key];
2101
+ if (undefined === value)
2102
+ return true;
2103
+ return "string" === typeof value;
2104
+ });
2105
+ const $io4 = input => true;
2106
+ return "object" === typeof input && null !== input && $io0(input);
2107
+ };
2108
+ if (false === __is(input))
2109
+ ((input, _path, _exceptionable = true) => {
2110
+ const $guard = __typia.json.createAssertStringify.guard;
2111
+ const $join = __typia.json.createAssertStringify.join;
2112
+ const $ao0 = (input, _path, _exceptionable = true) => (null === input.position || "number" === typeof input.position && (0 <= input.position || $guard(_exceptionable, {
2113
+ path: _path + ".position",
2114
+ expected: "number & Minimum<0>",
2115
+ value: input.position
2116
+ }, errorFactory)) && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <= 18446744073709552000 || $guard(_exceptionable, {
2117
+ path: _path + ".position",
2118
+ expected: "number & Type<\"uint64\">",
2119
+ value: input.position
2120
+ }, errorFactory)) || $guard(_exceptionable, {
2121
+ path: _path + ".position",
2122
+ expected: "((number & Minimum<0> & Type<\"uint64\">) | null)",
2123
+ value: input.position
2124
+ }, errorFactory)) && (null === input.uploading || "boolean" === typeof input.uploading || $guard(_exceptionable, {
2125
+ path: _path + ".uploading",
2126
+ expected: "(boolean | null)",
2127
+ value: input.uploading
2128
+ }, errorFactory)) && ((Array.isArray(input.zones) || $guard(_exceptionable, {
2129
+ path: _path + ".zones",
2130
+ expected: "Array<string>",
2131
+ value: input.zones
2132
+ }, errorFactory)) && input.zones.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
2133
+ path: _path + ".zones[" + _index1 + "]",
2134
+ expected: "string",
2135
+ value: elem
2136
+ }, errorFactory)) || $guard(_exceptionable, {
2137
+ path: _path + ".zones",
2138
+ expected: "Array<string>",
2139
+ value: input.zones
2140
+ }, errorFactory)) && ((Array.isArray(input.replicas) || $guard(_exceptionable, {
2141
+ path: _path + ".replicas",
2142
+ expected: "Array<string>",
2143
+ value: input.replicas
2144
+ }, errorFactory)) && input.replicas.every((elem, _index2) => "string" === typeof elem || $guard(_exceptionable, {
2145
+ path: _path + ".replicas[" + _index2 + "]",
2146
+ expected: "string",
2147
+ value: elem
2148
+ }, errorFactory)) || $guard(_exceptionable, {
2149
+ path: _path + ".replicas",
2150
+ expected: "Array<string>",
2151
+ value: input.replicas
2152
+ }, errorFactory)) && ((Array.isArray(input.locations) || $guard(_exceptionable, {
2153
+ path: _path + ".locations",
2154
+ expected: "Array<string>",
2155
+ value: input.locations
2156
+ }, errorFactory)) && input.locations.every((elem, _index3) => "string" === typeof elem || $guard(_exceptionable, {
2157
+ path: _path + ".locations[" + _index3 + "]",
2158
+ expected: "string",
2159
+ value: elem
2160
+ }, errorFactory)) || $guard(_exceptionable, {
2161
+ path: _path + ".locations",
2162
+ expected: "Array<string>",
2163
+ value: input.locations
2164
+ }, errorFactory)) && ("number" === typeof input.progress && (0 <= input.progress || $guard(_exceptionable, {
2165
+ path: _path + ".progress",
2166
+ expected: "number & Minimum<0>",
2167
+ value: input.progress
2168
+ }, errorFactory)) && (input.progress <= 1 || $guard(_exceptionable, {
2169
+ path: _path + ".progress",
2170
+ expected: "number & Maximum<1>",
2171
+ value: input.progress
2172
+ }, errorFactory)) || $guard(_exceptionable, {
2173
+ path: _path + ".progress",
2174
+ expected: "(number & Minimum<0> & Maximum<1>)",
2175
+ value: input.progress
2176
+ }, errorFactory)) && ((Array.isArray(input.ranges) || $guard(_exceptionable, {
2177
+ path: _path + ".ranges",
2178
+ expected: "Array<[start: number & Minimum<0>, end: number & Minimum<0>]>",
2179
+ value: input.ranges
2180
+ }, errorFactory)) && input.ranges.every((elem, _index4) => (Array.isArray(elem) || $guard(_exceptionable, {
2181
+ path: _path + ".ranges[" + _index4 + "]",
2182
+ expected: "[start: number & Minimum<0>, end: number & Minimum<0>]",
2183
+ value: elem
2184
+ }, errorFactory)) && ((elem.length === 2 || $guard(_exceptionable, {
2185
+ path: _path + ".ranges[" + _index4 + "]",
2186
+ expected: "[(number & Minimum<0>), (number & Minimum<0>)]",
2187
+ value: elem
2188
+ }, errorFactory)) && ("number" === typeof elem[0] && (!Number.isNaN(elem[0]) || $guard(_exceptionable, {
2189
+ path: _path + ".ranges[" + _index4 + "][0]",
2190
+ expected: "number",
2191
+ value: elem[0]
2192
+ }, errorFactory)) && (0 <= elem[0] || $guard(_exceptionable, {
2193
+ path: _path + ".ranges[" + _index4 + "][0]",
2194
+ expected: "number & Minimum<0>",
2195
+ value: elem[0]
2196
+ }, errorFactory)) || $guard(_exceptionable, {
2197
+ path: _path + ".ranges[" + _index4 + "][0]",
2198
+ expected: "(number & Minimum<0>)",
2199
+ value: elem[0]
2200
+ }, errorFactory)) && ("number" === typeof elem[1] && (!Number.isNaN(elem[1]) || $guard(_exceptionable, {
2201
+ path: _path + ".ranges[" + _index4 + "][1]",
2202
+ expected: "number",
2203
+ value: elem[1]
2204
+ }, errorFactory)) && (0 <= elem[1] || $guard(_exceptionable, {
2205
+ path: _path + ".ranges[" + _index4 + "][1]",
2206
+ expected: "number & Minimum<0>",
2207
+ value: elem[1]
2208
+ }, errorFactory)) || $guard(_exceptionable, {
2209
+ path: _path + ".ranges[" + _index4 + "][1]",
2210
+ expected: "(number & Minimum<0>)",
2211
+ value: elem[1]
2212
+ }, errorFactory))) || $guard(_exceptionable, {
2213
+ path: _path + ".ranges[" + _index4 + "]",
2214
+ expected: "[start: number & Minimum<0>, end: number & Minimum<0>]",
2215
+ value: elem
2216
+ }, errorFactory)) || $guard(_exceptionable, {
2217
+ path: _path + ".ranges",
2218
+ expected: "Array<[start: number & Minimum<0>, end: number & Minimum<0>]>",
2219
+ value: input.ranges
2220
+ }, errorFactory)) && ("string" === typeof input.id && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) || $guard(_exceptionable, {
2221
+ path: _path + ".id",
2222
+ expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
2223
+ value: input.id
2224
+ }, errorFactory)) || $guard(_exceptionable, {
2225
+ path: _path + ".id",
2226
+ expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
2227
+ value: input.id
2228
+ }, errorFactory)) && (null === input.size || "number" === typeof input.size && (0 <= input.size || $guard(_exceptionable, {
2229
+ path: _path + ".size",
2230
+ expected: "number & Minimum<0>",
2231
+ value: input.size
2232
+ }, errorFactory)) && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000 || $guard(_exceptionable, {
2233
+ path: _path + ".size",
2234
+ expected: "number & Type<\"uint64\">",
2235
+ value: input.size
2236
+ }, errorFactory)) || $guard(_exceptionable, {
2237
+ path: _path + ".size",
2238
+ expected: "((number & Minimum<0> & Type<\"uint64\">) | null)",
2239
+ value: input.size
2240
+ }, errorFactory)) && ("boolean" === typeof input.seekable || $guard(_exceptionable, {
2241
+ path: _path + ".seekable",
2242
+ expected: "boolean",
2243
+ value: input.seekable
2244
+ }, errorFactory)) && ("boolean" === typeof input.deleted || $guard(_exceptionable, {
2245
+ path: _path + ".deleted",
2246
+ expected: "boolean",
2247
+ value: input.deleted
2248
+ }, errorFactory)) && ((Array.isArray(input.refs) || $guard(_exceptionable, {
2249
+ path: _path + ".refs",
2250
+ expected: "Array<__type>",
2251
+ value: input.refs
2252
+ }, errorFactory)) && input.refs.every((elem, _index5) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || $guard(_exceptionable, {
2253
+ path: _path + ".refs[" + _index5 + "]",
2254
+ expected: "__type",
2255
+ value: elem
2256
+ }, errorFactory)) && $ao1(elem, _path + ".refs[" + _index5 + "]", true && _exceptionable) || $guard(_exceptionable, {
2257
+ path: _path + ".refs[" + _index5 + "]",
2258
+ expected: "__type",
2259
+ value: elem
2260
+ }, errorFactory)) || $guard(_exceptionable, {
2261
+ path: _path + ".refs",
2262
+ expected: "Array<__type>",
2263
+ value: input.refs
2264
+ }, errorFactory)) && ((Array.isArray(input.tags) || $guard(_exceptionable, {
2265
+ path: _path + ".tags",
2266
+ expected: "Array<string>",
2267
+ value: input.tags
2268
+ }, errorFactory)) && input.tags.every((elem, _index6) => "string" === typeof elem || $guard(_exceptionable, {
2269
+ path: _path + ".tags[" + _index6 + "]",
2270
+ expected: "string",
2271
+ value: elem
2272
+ }, errorFactory)) || $guard(_exceptionable, {
2273
+ path: _path + ".tags",
2274
+ expected: "Array<string>",
2275
+ value: input.tags
2276
+ }, errorFactory)) && ("string" === typeof input.resumable || $guard(_exceptionable, {
2277
+ path: _path + ".resumable",
2278
+ expected: "string",
2279
+ value: input.resumable
2280
+ }, errorFactory)) && ("string" === typeof input.mimeType || $guard(_exceptionable, {
2281
+ path: _path + ".mimeType",
2282
+ expected: "string",
2283
+ value: input.mimeType
2284
+ }, errorFactory)) && ("string" === typeof input.encoding || $guard(_exceptionable, {
2285
+ path: _path + ".encoding",
2286
+ expected: "string",
2287
+ value: input.encoding
2288
+ }, errorFactory)) && ("string" === typeof input.hash && (/^([A-Fa-f0-9]{32})?$/.test(input.hash) || $guard(_exceptionable, {
2289
+ path: _path + ".hash",
2290
+ expected: "string & Pattern<\"^([A-Fa-f0-9]{32})?$\">",
2291
+ value: input.hash
2292
+ }, errorFactory)) || $guard(_exceptionable, {
2293
+ path: _path + ".hash",
2294
+ expected: "(string & Pattern<\"^([A-Fa-f0-9]{32})?$\">)",
2295
+ value: input.hash
2296
+ }, errorFactory)) && ("number" === typeof input.btime && (0 <= input.btime || $guard(_exceptionable, {
2297
+ path: _path + ".btime",
2298
+ expected: "number & Minimum<0>",
2299
+ value: input.btime
2300
+ }, errorFactory)) && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000 || $guard(_exceptionable, {
2301
+ path: _path + ".btime",
2302
+ expected: "number & Type<\"uint64\">",
2303
+ value: input.btime
2304
+ }, errorFactory)) || $guard(_exceptionable, {
2305
+ path: _path + ".btime",
2306
+ expected: "(number & Minimum<0> & Type<\"uint64\">)",
2307
+ value: input.btime
2308
+ }, errorFactory)) && ("boolean" === typeof input.completed || $guard(_exceptionable, {
2309
+ path: _path + ".completed",
2310
+ expected: "boolean",
2311
+ value: input.completed
2312
+ }, errorFactory)) && ((undefined !== input.error || $guard(_exceptionable, {
2313
+ path: _path + ".error",
2314
+ expected: "(Array<NxtError> | NxtError | null)",
2315
+ value: input.error
2316
+ }, errorFactory)) && (null === input.error || (Array.isArray(input.error) && input.error.every((elem, _index7) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
2317
+ path: _path + ".error[" + _index7 + "]",
2318
+ expected: "NxtError",
2319
+ value: elem
2320
+ }, errorFactory)) && $ao2(elem, _path + ".error[" + _index7 + "]", true && _exceptionable) || $guard(_exceptionable, {
2321
+ path: _path + ".error[" + _index7 + "]",
2322
+ expected: "NxtError",
2323
+ value: elem
2324
+ }, errorFactory)) || "object" === typeof input.error && null !== input.error && $ao2(input.error, _path + ".error", true && _exceptionable) || $guard(_exceptionable, {
2325
+ path: _path + ".error",
2326
+ expected: "(Array<NxtError> | NxtError | null)",
2327
+ value: input.error
2328
+ }, errorFactory)) || $guard(_exceptionable, {
2329
+ path: _path + ".error",
2330
+ expected: "(Array<NxtError> | NxtError | null)",
2331
+ value: input.error
2332
+ }, errorFactory)));
2333
+ const $ao1 = (input, _path, _exceptionable = true) => (undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
2334
+ path: _path + ".file",
2335
+ expected: "(string | undefined)",
2336
+ value: input.file
2337
+ }, errorFactory)) && (undefined === input.offset || "number" === typeof input.offset && !Number.isNaN(input.offset) || $guard(_exceptionable, {
2338
+ path: _path + ".offset",
2339
+ expected: "(number | undefined)",
2340
+ value: input.offset
2341
+ }, errorFactory)) && (undefined === input.start || "number" === typeof input.start && !Number.isNaN(input.start) || $guard(_exceptionable, {
2342
+ path: _path + ".start",
2343
+ expected: "(number | undefined)",
2344
+ value: input.start
2345
+ }, errorFactory)) && (undefined === input.end || "number" === typeof input.end && !Number.isNaN(input.end) || $guard(_exceptionable, {
2346
+ path: _path + ".end",
2347
+ expected: "(number | undefined)",
2348
+ value: input.end
2349
+ }, errorFactory));
2350
+ const $ao2 = (input, _path, _exceptionable = true) => ("string" === typeof input.message || $guard(_exceptionable, {
2351
+ path: _path + ".message",
2352
+ expected: "string",
2353
+ value: input.message
2354
+ }, errorFactory)) && (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
2355
+ path: _path + ".type",
2356
+ expected: "(string | undefined)",
2357
+ value: input.type
2358
+ }, errorFactory)) && (undefined === input.code || "string" === typeof input.code || $guard(_exceptionable, {
2359
+ path: _path + ".code",
2360
+ expected: "(string | undefined)",
2361
+ value: input.code
2362
+ }, errorFactory)) && (undefined === input.exitCode || "number" === typeof input.exitCode && !Number.isNaN(input.exitCode) || $guard(_exceptionable, {
2363
+ path: _path + ".exitCode",
2364
+ expected: "(number | undefined)",
2365
+ value: input.exitCode
2366
+ }, errorFactory)) && (undefined === input.signalCode || "number" === typeof input.signalCode && !Number.isNaN(input.signalCode) || $guard(_exceptionable, {
2367
+ path: _path + ".signalCode",
2368
+ expected: "(number | undefined)",
2369
+ value: input.signalCode
2370
+ }, errorFactory)) && (undefined === input.statusCode || "number" === typeof input.statusCode && !Number.isNaN(input.statusCode) || $guard(_exceptionable, {
2371
+ path: _path + ".statusCode",
2372
+ expected: "(number | undefined)",
2373
+ value: input.statusCode
2374
+ }, errorFactory)) && (undefined === input.headers || ("object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) || $guard(_exceptionable, {
2375
+ path: _path + ".headers",
2376
+ expected: "(Record<string, string> | undefined)",
2377
+ value: input.headers
2378
+ }, errorFactory)) && $ao3(input.headers, _path + ".headers", true && _exceptionable) || $guard(_exceptionable, {
2379
+ path: _path + ".headers",
2380
+ expected: "(Record<string, string> | undefined)",
2381
+ value: input.headers
2382
+ }, errorFactory)) && (undefined === input.data || ("object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) || $guard(_exceptionable, {
2383
+ path: _path + ".data",
2384
+ expected: "(object | undefined)",
2385
+ value: input.data
2386
+ }, errorFactory)) && $ao4(input.data, _path + ".data", true && _exceptionable) || $guard(_exceptionable, {
2387
+ path: _path + ".data",
2388
+ expected: "(object | undefined)",
2389
+ value: input.data
2390
+ }, errorFactory)) && (null === input.cause || undefined === input.cause || ("object" === typeof input.cause && null !== input.cause || $guard(_exceptionable, {
2391
+ path: _path + ".cause",
2392
+ expected: "(NxtError | null | undefined)",
2393
+ value: input.cause
2394
+ }, errorFactory)) && $ao2(input.cause, _path + ".cause", true && _exceptionable) || $guard(_exceptionable, {
2395
+ path: _path + ".cause",
2396
+ expected: "(NxtError | null | undefined)",
2397
+ value: input.cause
2398
+ }, errorFactory)) && (null === input.errors || undefined === input.errors || (Array.isArray(input.errors) || $guard(_exceptionable, {
2399
+ path: _path + ".errors",
2400
+ expected: "(Array<NxtError> | null | undefined)",
2401
+ value: input.errors
2402
+ }, errorFactory)) && input.errors.every((elem, _index8) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
2403
+ path: _path + ".errors[" + _index8 + "]",
2404
+ expected: "NxtError",
2405
+ value: elem
2406
+ }, errorFactory)) && $ao2(elem, _path + ".errors[" + _index8 + "]", true && _exceptionable) || $guard(_exceptionable, {
2407
+ path: _path + ".errors[" + _index8 + "]",
2408
+ expected: "NxtError",
2409
+ value: elem
2410
+ }, errorFactory)) || $guard(_exceptionable, {
2411
+ path: _path + ".errors",
2412
+ expected: "(Array<NxtError> | null | undefined)",
2413
+ value: input.errors
2414
+ }, errorFactory));
2415
+ const $ao3 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
2416
+ const value = input[key];
2417
+ if (undefined === value)
2418
+ return true;
2419
+ return "string" === typeof value || $guard(_exceptionable, {
2420
+ path: _path + $join(key),
2421
+ expected: "string",
2422
+ value: value
2423
+ }, errorFactory);
2424
+ });
2425
+ const $ao4 = (input, _path, _exceptionable = true) => true;
2426
+ return ("object" === typeof input && null !== input || $guard(true, {
2427
+ path: _path + "",
2428
+ expected: "FileStats",
2429
+ value: input
2430
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
2431
+ path: _path + "",
2432
+ expected: "FileStats",
2433
+ value: input
2434
+ }, errorFactory);
2435
+ })(input, "$input", true);
2436
+ return input;
2437
+ }; const stringify = input => {
2438
+ const $io1 = input => (undefined === input.file || "string" === typeof input.file) && (undefined === input.offset || "number" === typeof input.offset) && (undefined === input.start || "number" === typeof input.start) && (undefined === input.end || "number" === typeof input.end);
2439
+ const $io2 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode) && (undefined === input.signalCode || "number" === typeof input.signalCode) && (undefined === input.statusCode || "number" === typeof input.statusCode) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io3(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io4(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io2(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io2(elem)));
2440
+ const $io3 = input => Object.keys(input).every(key => {
2441
+ const value = input[key];
2442
+ if (undefined === value)
2443
+ return true;
2444
+ return "string" === typeof value;
2445
+ });
2446
+ const $io4 = input => true;
2447
+ const $string = __typia.json.createAssertStringify.string;
2448
+ const $throws = __typia.json.createAssertStringify.throws;
2449
+ const $tail = __typia.json.createAssertStringify.tail;
2450
+ const $so0 = input => `{"position":${null !== input.position ? input.position : "null"},"uploading":${null !== input.uploading ? input.uploading : "null"},"zones":${`[${input.zones.map(elem => $string(elem)).join(",")}]`},"replicas":${`[${input.replicas.map(elem => $string(elem)).join(",")}]`},"locations":${`[${input.locations.map(elem => $string(elem)).join(",")}]`},"progress":${input.progress},"ranges":${`[${input.ranges.map(elem => `[${elem[0]},${elem[1]}]`).join(",")}]`},"id":${$string(input.id)},"size":${null !== input.size ? input.size : "null"},"seekable":${input.seekable},"deleted":${input.deleted},"refs":${`[${input.refs.map(elem => $so1(elem)).join(",")}]`},"tags":${`[${input.tags.map(elem => $string(elem)).join(",")}]`},"resumable":${$string(input.resumable)},"mimeType":${$string(input.mimeType)},"encoding":${$string(input.encoding)},"hash":${$string(input.hash)},"btime":${input.btime},"completed":${input.completed},"error":${null !== input.error ? (() => {
2451
+ if (Array.isArray(input.error))
2452
+ return `[${input.error.map(elem => $so2(elem)).join(",")}]`;
2453
+ if ("object" === typeof input.error && null !== input.error)
2454
+ return $so2(input.error);
2455
+ $throws({
2456
+ expected: "(Array<NxtError> | NxtError | null)",
2457
+ value: input.error
2458
+ });
2459
+ })() : "null"}}`;
2460
+ const $so1 = input => `{${$tail(`${undefined === input.file ? "" : `"file":${undefined !== input.file ? $string(input.file) : undefined},`}${undefined === input.offset ? "" : `"offset":${undefined !== input.offset ? input.offset : undefined},`}${undefined === input.start ? "" : `"start":${undefined !== input.start ? input.start : undefined},`}${undefined === input.end ? "" : `"end":${undefined !== input.end ? input.end : undefined}`}`)}}`;
2461
+ const $so2 = input => `{${undefined === input.type ? "" : `"type":${undefined !== input.type ? $string(input.type) : undefined},`}${undefined === input.code ? "" : `"code":${undefined !== input.code ? $string(input.code) : undefined},`}${undefined === input.exitCode ? "" : `"exitCode":${undefined !== input.exitCode ? input.exitCode : undefined},`}${undefined === input.signalCode ? "" : `"signalCode":${undefined !== input.signalCode ? input.signalCode : undefined},`}${undefined === input.statusCode ? "" : `"statusCode":${undefined !== input.statusCode ? input.statusCode : undefined},`}${undefined === input.headers ? "" : `"headers":${undefined !== input.headers ? $so3(input.headers) : undefined},`}${undefined === input.data ? "" : `"data":${undefined !== input.data ? "{}" : undefined},`}${undefined === input.cause ? "" : `"cause":${undefined !== input.cause ? null !== input.cause ? $so2(input.cause) : "null" : undefined},`}${undefined === input.errors ? "" : `"errors":${undefined !== input.errors ? null !== input.errors ? `[${input.errors.map(elem => $so2(elem)).join(",")}]` : "null" : undefined},`}"message":${$string(input.message)}}`;
2462
+ const $so3 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
2463
+ return ""; return `${JSON.stringify(key)}:${$string(value)}`; }).filter(str => "" !== str).join(",")}}`;
2464
+ return $so0(input);
2465
+ }; return stringify(assert(input, errorFactory)); };