grpc-dc 0.40.0 → 0.41.0

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.
package/src/kafka_pb.js CHANGED
@@ -127,6 +127,10 @@ export const Compression = { COMPRESSION_NONE: 0, COMPRESSION_GZIP: 1, COMPRESSI
127
127
 
128
128
  export const Acks = { ACKS_UNSPECIFIED: 0, ACKS_NONE: 1, ACKS_LEADER: 2, ACKS_ALL: 3 };
129
129
 
130
+ export const ConfigResourceType = { CONFIG_RESOURCE_UNKNOWN: 0, CONFIG_RESOURCE_TOPIC: 2, CONFIG_RESOURCE_BROKER: 4, CONFIG_RESOURCE_BROKER_LOGGER: 8, CONFIG_RESOURCE_CLIENT_METRICS: 16, CONFIG_RESOURCE_GROUP: 32 };
131
+
132
+ export const ConfigOp = { CONFIG_OP_SET: 0, CONFIG_OP_DELETE: 1 };
133
+
130
134
  export class Header {
131
135
  constructor({ key = "", value = new Uint8Array(0) } = {}) {
132
136
  this.key = key;
@@ -786,7 +790,7 @@ export class ConsumeResponse {
786
790
  }
787
791
 
788
792
  export class GroupSubscribeRequest {
789
- constructor({ groupId = "", topics = [], groupInstanceId = "", sessionTimeoutMs = 0, maxPollRecords = 0, autoOffsetReset = "", readCommitted = false } = {}) {
793
+ constructor({ groupId = "", topics = [], groupInstanceId = "", sessionTimeoutMs = 0, maxPollRecords = 0, autoOffsetReset = "", readCommitted = false, groupProtocol = "" } = {}) {
790
794
  this.groupId = groupId;
791
795
  this.topics = topics;
792
796
  this.groupInstanceId = groupInstanceId;
@@ -794,6 +798,7 @@ export class GroupSubscribeRequest {
794
798
  this.maxPollRecords = maxPollRecords;
795
799
  this.autoOffsetReset = autoOffsetReset;
796
800
  this.readCommitted = readCommitted;
801
+ this.groupProtocol = groupProtocol;
797
802
  this.unknownFields = new Uint8Array(0);
798
803
  }
799
804
  static encode(msg) {
@@ -805,6 +810,7 @@ export class GroupSubscribeRequest {
805
810
  putVarintField(out, 5, BigInt(msg.maxPollRecords));
806
811
  putStringField(out, 6, msg.autoOffsetReset);
807
812
  putVarintField(out, 7, (msg.readCommitted ? 1n : 0n));
813
+ putStringField(out, 8, msg.groupProtocol);
808
814
  putRaw(out, msg.unknownFields);
809
815
  return new Uint8Array(out);
810
816
  }
@@ -822,6 +828,7 @@ export class GroupSubscribeRequest {
822
828
  case 5: msg.maxPollRecords = Number(BigInt.asIntN(32, value)); break;
823
829
  case 6: msg.autoOffsetReset = new TextDecoder().decode(value); break;
824
830
  case 7: msg.readCommitted = value !== 0n; break;
831
+ case 8: msg.groupProtocol = new TextDecoder().decode(value); break;
825
832
  default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
826
833
  }
827
834
  }
@@ -1333,3 +1340,1412 @@ export class DeleteTopicsResponse {
1333
1340
  }
1334
1341
  }
1335
1342
 
1343
+ export class ConfigEntry {
1344
+ constructor({ name = "", value = "" } = {}) {
1345
+ this.name = name;
1346
+ this.value = value;
1347
+ this.unknownFields = new Uint8Array(0);
1348
+ }
1349
+ static encode(msg) {
1350
+ const out = [];
1351
+ putStringField(out, 1, msg.name);
1352
+ putStringField(out, 2, msg.value);
1353
+ putRaw(out, msg.unknownFields);
1354
+ return new Uint8Array(out);
1355
+ }
1356
+ static decode(bytes) {
1357
+ const msg = new ConfigEntry();
1358
+ const reader = new Reader(bytes);
1359
+ let f;
1360
+ while ((f = reader.field()) !== null) {
1361
+ const [num, wire, value, raw] = f;
1362
+ switch (num) {
1363
+ case 1: msg.name = new TextDecoder().decode(value); break;
1364
+ case 2: msg.value = new TextDecoder().decode(value); break;
1365
+ default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
1366
+ }
1367
+ }
1368
+ return msg;
1369
+ }
1370
+ }
1371
+
1372
+ export class AlterConfigEntry {
1373
+ constructor({ name = "", value = "", op = 0 } = {}) {
1374
+ this.name = name;
1375
+ this.value = value;
1376
+ this.op = op;
1377
+ this.unknownFields = new Uint8Array(0);
1378
+ }
1379
+ static encode(msg) {
1380
+ const out = [];
1381
+ putStringField(out, 1, msg.name);
1382
+ putStringField(out, 2, msg.value);
1383
+ putVarintField(out, 3, BigInt(msg.op));
1384
+ putRaw(out, msg.unknownFields);
1385
+ return new Uint8Array(out);
1386
+ }
1387
+ static decode(bytes) {
1388
+ const msg = new AlterConfigEntry();
1389
+ const reader = new Reader(bytes);
1390
+ let f;
1391
+ while ((f = reader.field()) !== null) {
1392
+ const [num, wire, value, raw] = f;
1393
+ switch (num) {
1394
+ case 1: msg.name = new TextDecoder().decode(value); break;
1395
+ case 2: msg.value = new TextDecoder().decode(value); break;
1396
+ case 3: msg.op = Number(BigInt.asIntN(32, value)); break;
1397
+ default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
1398
+ }
1399
+ }
1400
+ return msg;
1401
+ }
1402
+ }
1403
+
1404
+ export class DescribeConfigsRequest {
1405
+ constructor({ resourceType = 0, resourceName = "", configKeys = [], includeSynonyms = false } = {}) {
1406
+ this.resourceType = resourceType;
1407
+ this.resourceName = resourceName;
1408
+ this.configKeys = configKeys;
1409
+ this.includeSynonyms = includeSynonyms;
1410
+ this.unknownFields = new Uint8Array(0);
1411
+ }
1412
+ static encode(msg) {
1413
+ const out = [];
1414
+ putVarintField(out, 1, BigInt(msg.resourceType));
1415
+ putStringField(out, 2, msg.resourceName);
1416
+ if (msg.configKeys) for (const v of msg.configKeys) putBytesField(out, 3, new TextEncoder().encode(v));
1417
+ putVarintField(out, 4, (msg.includeSynonyms ? 1n : 0n));
1418
+ putRaw(out, msg.unknownFields);
1419
+ return new Uint8Array(out);
1420
+ }
1421
+ static decode(bytes) {
1422
+ const msg = new DescribeConfigsRequest();
1423
+ const reader = new Reader(bytes);
1424
+ let f;
1425
+ while ((f = reader.field()) !== null) {
1426
+ const [num, wire, value, raw] = f;
1427
+ switch (num) {
1428
+ case 1: msg.resourceType = Number(BigInt.asIntN(32, value)); break;
1429
+ case 2: msg.resourceName = new TextDecoder().decode(value); break;
1430
+ case 3: msg.configKeys.push(new TextDecoder().decode(value)); break;
1431
+ case 4: msg.includeSynonyms = value !== 0n; break;
1432
+ default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
1433
+ }
1434
+ }
1435
+ return msg;
1436
+ }
1437
+ }
1438
+
1439
+ export class ConfigValue {
1440
+ constructor({ name = "", value = "", readOnly = false, source = 0, isSensitive = false } = {}) {
1441
+ this.name = name;
1442
+ this.value = value;
1443
+ this.readOnly = readOnly;
1444
+ this.source = source;
1445
+ this.isSensitive = isSensitive;
1446
+ this.unknownFields = new Uint8Array(0);
1447
+ }
1448
+ static encode(msg) {
1449
+ const out = [];
1450
+ putStringField(out, 1, msg.name);
1451
+ putStringField(out, 2, msg.value);
1452
+ putVarintField(out, 3, (msg.readOnly ? 1n : 0n));
1453
+ putVarintField(out, 4, BigInt(msg.source));
1454
+ putVarintField(out, 5, (msg.isSensitive ? 1n : 0n));
1455
+ putRaw(out, msg.unknownFields);
1456
+ return new Uint8Array(out);
1457
+ }
1458
+ static decode(bytes) {
1459
+ const msg = new ConfigValue();
1460
+ const reader = new Reader(bytes);
1461
+ let f;
1462
+ while ((f = reader.field()) !== null) {
1463
+ const [num, wire, value, raw] = f;
1464
+ switch (num) {
1465
+ case 1: msg.name = new TextDecoder().decode(value); break;
1466
+ case 2: msg.value = new TextDecoder().decode(value); break;
1467
+ case 3: msg.readOnly = value !== 0n; break;
1468
+ case 4: msg.source = Number(BigInt.asIntN(32, value)); break;
1469
+ case 5: msg.isSensitive = value !== 0n; break;
1470
+ default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
1471
+ }
1472
+ }
1473
+ return msg;
1474
+ }
1475
+ }
1476
+
1477
+ export class DescribeConfigsResponse {
1478
+ constructor({ errorCode = 0, values = [] } = {}) {
1479
+ this.errorCode = errorCode;
1480
+ this.values = values;
1481
+ this.unknownFields = new Uint8Array(0);
1482
+ }
1483
+ static encode(msg) {
1484
+ const out = [];
1485
+ putVarintField(out, 1, BigInt(msg.errorCode));
1486
+ if (msg.values) for (const v of msg.values) putBytesField(out, 2, ConfigValue.encode(v));
1487
+ putRaw(out, msg.unknownFields);
1488
+ return new Uint8Array(out);
1489
+ }
1490
+ static decode(bytes) {
1491
+ const msg = new DescribeConfigsResponse();
1492
+ const reader = new Reader(bytes);
1493
+ let f;
1494
+ while ((f = reader.field()) !== null) {
1495
+ const [num, wire, value, raw] = f;
1496
+ switch (num) {
1497
+ case 1: msg.errorCode = Number(BigInt.asIntN(32, value)); break;
1498
+ case 2: msg.values.push(ConfigValue.decode(value)); break;
1499
+ default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
1500
+ }
1501
+ }
1502
+ return msg;
1503
+ }
1504
+ }
1505
+
1506
+ export class AlterConfigsRequest {
1507
+ constructor({ resourceType = 0, resourceName = "", entries = [], validateOnly = false } = {}) {
1508
+ this.resourceType = resourceType;
1509
+ this.resourceName = resourceName;
1510
+ this.entries = entries;
1511
+ this.validateOnly = validateOnly;
1512
+ this.unknownFields = new Uint8Array(0);
1513
+ }
1514
+ static encode(msg) {
1515
+ const out = [];
1516
+ putVarintField(out, 1, BigInt(msg.resourceType));
1517
+ putStringField(out, 2, msg.resourceName);
1518
+ if (msg.entries) for (const v of msg.entries) putBytesField(out, 3, AlterConfigEntry.encode(v));
1519
+ putVarintField(out, 4, (msg.validateOnly ? 1n : 0n));
1520
+ putRaw(out, msg.unknownFields);
1521
+ return new Uint8Array(out);
1522
+ }
1523
+ static decode(bytes) {
1524
+ const msg = new AlterConfigsRequest();
1525
+ const reader = new Reader(bytes);
1526
+ let f;
1527
+ while ((f = reader.field()) !== null) {
1528
+ const [num, wire, value, raw] = f;
1529
+ switch (num) {
1530
+ case 1: msg.resourceType = Number(BigInt.asIntN(32, value)); break;
1531
+ case 2: msg.resourceName = new TextDecoder().decode(value); break;
1532
+ case 3: msg.entries.push(AlterConfigEntry.decode(value)); break;
1533
+ case 4: msg.validateOnly = value !== 0n; break;
1534
+ default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
1535
+ }
1536
+ }
1537
+ return msg;
1538
+ }
1539
+ }
1540
+
1541
+ export class AlterConfigsResponse {
1542
+ constructor({ errorCode = 0 } = {}) {
1543
+ this.errorCode = errorCode;
1544
+ this.unknownFields = new Uint8Array(0);
1545
+ }
1546
+ static encode(msg) {
1547
+ const out = [];
1548
+ putVarintField(out, 1, BigInt(msg.errorCode));
1549
+ putRaw(out, msg.unknownFields);
1550
+ return new Uint8Array(out);
1551
+ }
1552
+ static decode(bytes) {
1553
+ const msg = new AlterConfigsResponse();
1554
+ const reader = new Reader(bytes);
1555
+ let f;
1556
+ while ((f = reader.field()) !== null) {
1557
+ const [num, wire, value, raw] = f;
1558
+ switch (num) {
1559
+ case 1: msg.errorCode = Number(BigInt.asIntN(32, value)); break;
1560
+ default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
1561
+ }
1562
+ }
1563
+ return msg;
1564
+ }
1565
+ }
1566
+
1567
+ export class CreatePartitionsRequest {
1568
+ constructor({ topic = "", totalCount = 0, validateOnly = false, timeoutMs = 0 } = {}) {
1569
+ this.topic = topic;
1570
+ this.totalCount = totalCount;
1571
+ this.validateOnly = validateOnly;
1572
+ this.timeoutMs = timeoutMs;
1573
+ this.unknownFields = new Uint8Array(0);
1574
+ }
1575
+ static encode(msg) {
1576
+ const out = [];
1577
+ putStringField(out, 1, msg.topic);
1578
+ putVarintField(out, 2, BigInt(msg.totalCount));
1579
+ putVarintField(out, 3, (msg.validateOnly ? 1n : 0n));
1580
+ putVarintField(out, 4, BigInt(msg.timeoutMs));
1581
+ putRaw(out, msg.unknownFields);
1582
+ return new Uint8Array(out);
1583
+ }
1584
+ static decode(bytes) {
1585
+ const msg = new CreatePartitionsRequest();
1586
+ const reader = new Reader(bytes);
1587
+ let f;
1588
+ while ((f = reader.field()) !== null) {
1589
+ const [num, wire, value, raw] = f;
1590
+ switch (num) {
1591
+ case 1: msg.topic = new TextDecoder().decode(value); break;
1592
+ case 2: msg.totalCount = Number(BigInt.asIntN(32, value)); break;
1593
+ case 3: msg.validateOnly = value !== 0n; break;
1594
+ case 4: msg.timeoutMs = Number(BigInt.asIntN(32, value)); break;
1595
+ default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
1596
+ }
1597
+ }
1598
+ return msg;
1599
+ }
1600
+ }
1601
+
1602
+ export class CreatePartitionsResponse {
1603
+ constructor({ errorCode = 0 } = {}) {
1604
+ this.errorCode = errorCode;
1605
+ this.unknownFields = new Uint8Array(0);
1606
+ }
1607
+ static encode(msg) {
1608
+ const out = [];
1609
+ putVarintField(out, 1, BigInt(msg.errorCode));
1610
+ putRaw(out, msg.unknownFields);
1611
+ return new Uint8Array(out);
1612
+ }
1613
+ static decode(bytes) {
1614
+ const msg = new CreatePartitionsResponse();
1615
+ const reader = new Reader(bytes);
1616
+ let f;
1617
+ while ((f = reader.field()) !== null) {
1618
+ const [num, wire, value, raw] = f;
1619
+ switch (num) {
1620
+ case 1: msg.errorCode = Number(BigInt.asIntN(32, value)); break;
1621
+ default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
1622
+ }
1623
+ }
1624
+ return msg;
1625
+ }
1626
+ }
1627
+
1628
+ export class DeleteRecordsRequest {
1629
+ constructor({ topic = "", partition = 0, beforeOffset = 0n } = {}) {
1630
+ this.topic = topic;
1631
+ this.partition = partition;
1632
+ this.beforeOffset = beforeOffset;
1633
+ this.unknownFields = new Uint8Array(0);
1634
+ }
1635
+ static encode(msg) {
1636
+ const out = [];
1637
+ putStringField(out, 1, msg.topic);
1638
+ putVarintField(out, 2, BigInt(msg.partition));
1639
+ putVarintField(out, 3, BigInt(msg.beforeOffset));
1640
+ putRaw(out, msg.unknownFields);
1641
+ return new Uint8Array(out);
1642
+ }
1643
+ static decode(bytes) {
1644
+ const msg = new DeleteRecordsRequest();
1645
+ const reader = new Reader(bytes);
1646
+ let f;
1647
+ while ((f = reader.field()) !== null) {
1648
+ const [num, wire, value, raw] = f;
1649
+ switch (num) {
1650
+ case 1: msg.topic = new TextDecoder().decode(value); break;
1651
+ case 2: msg.partition = Number(BigInt.asIntN(32, value)); break;
1652
+ case 3: msg.beforeOffset = BigInt.asIntN(64, value); break;
1653
+ default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
1654
+ }
1655
+ }
1656
+ return msg;
1657
+ }
1658
+ }
1659
+
1660
+ export class DeleteRecordsResponse {
1661
+ constructor({ lowWatermark = 0n, errorCode = 0 } = {}) {
1662
+ this.lowWatermark = lowWatermark;
1663
+ this.errorCode = errorCode;
1664
+ this.unknownFields = new Uint8Array(0);
1665
+ }
1666
+ static encode(msg) {
1667
+ const out = [];
1668
+ putVarintField(out, 1, BigInt(msg.lowWatermark));
1669
+ putVarintField(out, 2, BigInt(msg.errorCode));
1670
+ putRaw(out, msg.unknownFields);
1671
+ return new Uint8Array(out);
1672
+ }
1673
+ static decode(bytes) {
1674
+ const msg = new DeleteRecordsResponse();
1675
+ const reader = new Reader(bytes);
1676
+ let f;
1677
+ while ((f = reader.field()) !== null) {
1678
+ const [num, wire, value, raw] = f;
1679
+ switch (num) {
1680
+ case 1: msg.lowWatermark = BigInt.asIntN(64, value); break;
1681
+ case 2: msg.errorCode = Number(BigInt.asIntN(32, value)); break;
1682
+ default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
1683
+ }
1684
+ }
1685
+ return msg;
1686
+ }
1687
+ }
1688
+
1689
+ export class ListGroupsRequest {
1690
+ constructor({ } = {}) {
1691
+ this.unknownFields = new Uint8Array(0);
1692
+ }
1693
+ static encode(msg) {
1694
+ const out = [];
1695
+ putRaw(out, msg.unknownFields);
1696
+ return new Uint8Array(out);
1697
+ }
1698
+ static decode(bytes) {
1699
+ const msg = new ListGroupsRequest();
1700
+ const reader = new Reader(bytes);
1701
+ let f;
1702
+ while ((f = reader.field()) !== null) {
1703
+ const [num, wire, value, raw] = f;
1704
+ switch (num) {
1705
+ default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
1706
+ }
1707
+ }
1708
+ return msg;
1709
+ }
1710
+ }
1711
+
1712
+ export class GroupListing {
1713
+ constructor({ groupId = "", protocolType = "", groupState = "" } = {}) {
1714
+ this.groupId = groupId;
1715
+ this.protocolType = protocolType;
1716
+ this.groupState = groupState;
1717
+ this.unknownFields = new Uint8Array(0);
1718
+ }
1719
+ static encode(msg) {
1720
+ const out = [];
1721
+ putStringField(out, 1, msg.groupId);
1722
+ putStringField(out, 2, msg.protocolType);
1723
+ putStringField(out, 3, msg.groupState);
1724
+ putRaw(out, msg.unknownFields);
1725
+ return new Uint8Array(out);
1726
+ }
1727
+ static decode(bytes) {
1728
+ const msg = new GroupListing();
1729
+ const reader = new Reader(bytes);
1730
+ let f;
1731
+ while ((f = reader.field()) !== null) {
1732
+ const [num, wire, value, raw] = f;
1733
+ switch (num) {
1734
+ case 1: msg.groupId = new TextDecoder().decode(value); break;
1735
+ case 2: msg.protocolType = new TextDecoder().decode(value); break;
1736
+ case 3: msg.groupState = new TextDecoder().decode(value); break;
1737
+ default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
1738
+ }
1739
+ }
1740
+ return msg;
1741
+ }
1742
+ }
1743
+
1744
+ export class ListGroupsResponse {
1745
+ constructor({ errorCode = 0, groups = [] } = {}) {
1746
+ this.errorCode = errorCode;
1747
+ this.groups = groups;
1748
+ this.unknownFields = new Uint8Array(0);
1749
+ }
1750
+ static encode(msg) {
1751
+ const out = [];
1752
+ putVarintField(out, 1, BigInt(msg.errorCode));
1753
+ if (msg.groups) for (const v of msg.groups) putBytesField(out, 2, GroupListing.encode(v));
1754
+ putRaw(out, msg.unknownFields);
1755
+ return new Uint8Array(out);
1756
+ }
1757
+ static decode(bytes) {
1758
+ const msg = new ListGroupsResponse();
1759
+ const reader = new Reader(bytes);
1760
+ let f;
1761
+ while ((f = reader.field()) !== null) {
1762
+ const [num, wire, value, raw] = f;
1763
+ switch (num) {
1764
+ case 1: msg.errorCode = Number(BigInt.asIntN(32, value)); break;
1765
+ case 2: msg.groups.push(GroupListing.decode(value)); break;
1766
+ default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
1767
+ }
1768
+ }
1769
+ return msg;
1770
+ }
1771
+ }
1772
+
1773
+ export class DescribeGroupsRequest {
1774
+ constructor({ groupIds = [] } = {}) {
1775
+ this.groupIds = groupIds;
1776
+ this.unknownFields = new Uint8Array(0);
1777
+ }
1778
+ static encode(msg) {
1779
+ const out = [];
1780
+ if (msg.groupIds) for (const v of msg.groupIds) putBytesField(out, 1, new TextEncoder().encode(v));
1781
+ putRaw(out, msg.unknownFields);
1782
+ return new Uint8Array(out);
1783
+ }
1784
+ static decode(bytes) {
1785
+ const msg = new DescribeGroupsRequest();
1786
+ const reader = new Reader(bytes);
1787
+ let f;
1788
+ while ((f = reader.field()) !== null) {
1789
+ const [num, wire, value, raw] = f;
1790
+ switch (num) {
1791
+ case 1: msg.groupIds.push(new TextDecoder().decode(value)); break;
1792
+ default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
1793
+ }
1794
+ }
1795
+ return msg;
1796
+ }
1797
+ }
1798
+
1799
+ export class GroupMember {
1800
+ constructor({ memberId = "", clientId = "", clientHost = "", assignment = [] } = {}) {
1801
+ this.memberId = memberId;
1802
+ this.clientId = clientId;
1803
+ this.clientHost = clientHost;
1804
+ this.assignment = assignment;
1805
+ this.unknownFields = new Uint8Array(0);
1806
+ }
1807
+ static encode(msg) {
1808
+ const out = [];
1809
+ putStringField(out, 1, msg.memberId);
1810
+ putStringField(out, 2, msg.clientId);
1811
+ putStringField(out, 3, msg.clientHost);
1812
+ if (msg.assignment) for (const v of msg.assignment) putBytesField(out, 4, TopicPartition.encode(v));
1813
+ putRaw(out, msg.unknownFields);
1814
+ return new Uint8Array(out);
1815
+ }
1816
+ static decode(bytes) {
1817
+ const msg = new GroupMember();
1818
+ const reader = new Reader(bytes);
1819
+ let f;
1820
+ while ((f = reader.field()) !== null) {
1821
+ const [num, wire, value, raw] = f;
1822
+ switch (num) {
1823
+ case 1: msg.memberId = new TextDecoder().decode(value); break;
1824
+ case 2: msg.clientId = new TextDecoder().decode(value); break;
1825
+ case 3: msg.clientHost = new TextDecoder().decode(value); break;
1826
+ case 4: msg.assignment.push(TopicPartition.decode(value)); break;
1827
+ default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
1828
+ }
1829
+ }
1830
+ return msg;
1831
+ }
1832
+ }
1833
+
1834
+ export class DescribedGroup {
1835
+ constructor({ groupId = "", errorCode = 0, groupState = "", protocolType = "", protocol = "", members = [] } = {}) {
1836
+ this.groupId = groupId;
1837
+ this.errorCode = errorCode;
1838
+ this.groupState = groupState;
1839
+ this.protocolType = protocolType;
1840
+ this.protocol = protocol;
1841
+ this.members = members;
1842
+ this.unknownFields = new Uint8Array(0);
1843
+ }
1844
+ static encode(msg) {
1845
+ const out = [];
1846
+ putStringField(out, 1, msg.groupId);
1847
+ putVarintField(out, 2, BigInt(msg.errorCode));
1848
+ putStringField(out, 3, msg.groupState);
1849
+ putStringField(out, 4, msg.protocolType);
1850
+ putStringField(out, 5, msg.protocol);
1851
+ if (msg.members) for (const v of msg.members) putBytesField(out, 6, GroupMember.encode(v));
1852
+ putRaw(out, msg.unknownFields);
1853
+ return new Uint8Array(out);
1854
+ }
1855
+ static decode(bytes) {
1856
+ const msg = new DescribedGroup();
1857
+ const reader = new Reader(bytes);
1858
+ let f;
1859
+ while ((f = reader.field()) !== null) {
1860
+ const [num, wire, value, raw] = f;
1861
+ switch (num) {
1862
+ case 1: msg.groupId = new TextDecoder().decode(value); break;
1863
+ case 2: msg.errorCode = Number(BigInt.asIntN(32, value)); break;
1864
+ case 3: msg.groupState = new TextDecoder().decode(value); break;
1865
+ case 4: msg.protocolType = new TextDecoder().decode(value); break;
1866
+ case 5: msg.protocol = new TextDecoder().decode(value); break;
1867
+ case 6: msg.members.push(GroupMember.decode(value)); break;
1868
+ default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
1869
+ }
1870
+ }
1871
+ return msg;
1872
+ }
1873
+ }
1874
+
1875
+ export class DescribeGroupsResponse {
1876
+ constructor({ groups = [] } = {}) {
1877
+ this.groups = groups;
1878
+ this.unknownFields = new Uint8Array(0);
1879
+ }
1880
+ static encode(msg) {
1881
+ const out = [];
1882
+ if (msg.groups) for (const v of msg.groups) putBytesField(out, 1, DescribedGroup.encode(v));
1883
+ putRaw(out, msg.unknownFields);
1884
+ return new Uint8Array(out);
1885
+ }
1886
+ static decode(bytes) {
1887
+ const msg = new DescribeGroupsResponse();
1888
+ const reader = new Reader(bytes);
1889
+ let f;
1890
+ while ((f = reader.field()) !== null) {
1891
+ const [num, wire, value, raw] = f;
1892
+ switch (num) {
1893
+ case 1: msg.groups.push(DescribedGroup.decode(value)); break;
1894
+ default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
1895
+ }
1896
+ }
1897
+ return msg;
1898
+ }
1899
+ }
1900
+
1901
+ export class DeleteGroupsRequest {
1902
+ constructor({ groupIds = [] } = {}) {
1903
+ this.groupIds = groupIds;
1904
+ this.unknownFields = new Uint8Array(0);
1905
+ }
1906
+ static encode(msg) {
1907
+ const out = [];
1908
+ if (msg.groupIds) for (const v of msg.groupIds) putBytesField(out, 1, new TextEncoder().encode(v));
1909
+ putRaw(out, msg.unknownFields);
1910
+ return new Uint8Array(out);
1911
+ }
1912
+ static decode(bytes) {
1913
+ const msg = new DeleteGroupsRequest();
1914
+ const reader = new Reader(bytes);
1915
+ let f;
1916
+ while ((f = reader.field()) !== null) {
1917
+ const [num, wire, value, raw] = f;
1918
+ switch (num) {
1919
+ case 1: msg.groupIds.push(new TextDecoder().decode(value)); break;
1920
+ default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
1921
+ }
1922
+ }
1923
+ return msg;
1924
+ }
1925
+ }
1926
+
1927
+ export class GroupErrorResult {
1928
+ constructor({ groupId = "", errorCode = 0 } = {}) {
1929
+ this.groupId = groupId;
1930
+ this.errorCode = errorCode;
1931
+ this.unknownFields = new Uint8Array(0);
1932
+ }
1933
+ static encode(msg) {
1934
+ const out = [];
1935
+ putStringField(out, 1, msg.groupId);
1936
+ putVarintField(out, 2, BigInt(msg.errorCode));
1937
+ putRaw(out, msg.unknownFields);
1938
+ return new Uint8Array(out);
1939
+ }
1940
+ static decode(bytes) {
1941
+ const msg = new GroupErrorResult();
1942
+ const reader = new Reader(bytes);
1943
+ let f;
1944
+ while ((f = reader.field()) !== null) {
1945
+ const [num, wire, value, raw] = f;
1946
+ switch (num) {
1947
+ case 1: msg.groupId = new TextDecoder().decode(value); break;
1948
+ case 2: msg.errorCode = Number(BigInt.asIntN(32, value)); break;
1949
+ default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
1950
+ }
1951
+ }
1952
+ return msg;
1953
+ }
1954
+ }
1955
+
1956
+ export class DeleteGroupsResponse {
1957
+ constructor({ results = [] } = {}) {
1958
+ this.results = results;
1959
+ this.unknownFields = new Uint8Array(0);
1960
+ }
1961
+ static encode(msg) {
1962
+ const out = [];
1963
+ if (msg.results) for (const v of msg.results) putBytesField(out, 1, GroupErrorResult.encode(v));
1964
+ putRaw(out, msg.unknownFields);
1965
+ return new Uint8Array(out);
1966
+ }
1967
+ static decode(bytes) {
1968
+ const msg = new DeleteGroupsResponse();
1969
+ const reader = new Reader(bytes);
1970
+ let f;
1971
+ while ((f = reader.field()) !== null) {
1972
+ const [num, wire, value, raw] = f;
1973
+ switch (num) {
1974
+ case 1: msg.results.push(GroupErrorResult.decode(value)); break;
1975
+ default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
1976
+ }
1977
+ }
1978
+ return msg;
1979
+ }
1980
+ }
1981
+
1982
+ export class DeleteGroupOffsetsRequest {
1983
+ constructor({ groupId = "", topic = "", partitions = [] } = {}) {
1984
+ this.groupId = groupId;
1985
+ this.topic = topic;
1986
+ this.partitions = partitions;
1987
+ this.unknownFields = new Uint8Array(0);
1988
+ }
1989
+ static encode(msg) {
1990
+ const out = [];
1991
+ putStringField(out, 1, msg.groupId);
1992
+ putStringField(out, 2, msg.topic);
1993
+ if (msg.partitions && msg.partitions.length) {
1994
+ const payload = [];
1995
+ for (const x of msg.partitions) payload.push(...varintBytes(BigInt(x)));
1996
+ putBytesField(out, 3, payload);
1997
+ }
1998
+ putRaw(out, msg.unknownFields);
1999
+ return new Uint8Array(out);
2000
+ }
2001
+ static decode(bytes) {
2002
+ const msg = new DeleteGroupOffsetsRequest();
2003
+ const reader = new Reader(bytes);
2004
+ let f;
2005
+ while ((f = reader.field()) !== null) {
2006
+ const [num, wire, value, raw] = f;
2007
+ switch (num) {
2008
+ case 1: msg.groupId = new TextDecoder().decode(value); break;
2009
+ case 2: msg.topic = new TextDecoder().decode(value); break;
2010
+ case 3: if (wire === 2) { const r = new Reader(value); while (!r.done) msg.partitions.push(Number(BigInt.asIntN(32, r.varint()))); } else msg.partitions.push(Number(BigInt.asIntN(32, value))); break;
2011
+ default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
2012
+ }
2013
+ }
2014
+ return msg;
2015
+ }
2016
+ }
2017
+
2018
+ export class DeleteGroupOffsetsResponse {
2019
+ constructor({ errorCode = 0 } = {}) {
2020
+ this.errorCode = errorCode;
2021
+ this.unknownFields = new Uint8Array(0);
2022
+ }
2023
+ static encode(msg) {
2024
+ const out = [];
2025
+ putVarintField(out, 1, BigInt(msg.errorCode));
2026
+ putRaw(out, msg.unknownFields);
2027
+ return new Uint8Array(out);
2028
+ }
2029
+ static decode(bytes) {
2030
+ const msg = new DeleteGroupOffsetsResponse();
2031
+ const reader = new Reader(bytes);
2032
+ let f;
2033
+ while ((f = reader.field()) !== null) {
2034
+ const [num, wire, value, raw] = f;
2035
+ switch (num) {
2036
+ case 1: msg.errorCode = Number(BigInt.asIntN(32, value)); break;
2037
+ default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
2038
+ }
2039
+ }
2040
+ return msg;
2041
+ }
2042
+ }
2043
+
2044
+ export class Acl {
2045
+ constructor({ resourceType = 0, resourceName = "", patternType = 0, principal = "", host = "", operation = 0, permissionType = 0 } = {}) {
2046
+ this.resourceType = resourceType;
2047
+ this.resourceName = resourceName;
2048
+ this.patternType = patternType;
2049
+ this.principal = principal;
2050
+ this.host = host;
2051
+ this.operation = operation;
2052
+ this.permissionType = permissionType;
2053
+ this.unknownFields = new Uint8Array(0);
2054
+ }
2055
+ static encode(msg) {
2056
+ const out = [];
2057
+ putVarintField(out, 1, BigInt(msg.resourceType));
2058
+ putStringField(out, 2, msg.resourceName);
2059
+ putVarintField(out, 3, BigInt(msg.patternType));
2060
+ putStringField(out, 4, msg.principal);
2061
+ putStringField(out, 5, msg.host);
2062
+ putVarintField(out, 6, BigInt(msg.operation));
2063
+ putVarintField(out, 7, BigInt(msg.permissionType));
2064
+ putRaw(out, msg.unknownFields);
2065
+ return new Uint8Array(out);
2066
+ }
2067
+ static decode(bytes) {
2068
+ const msg = new Acl();
2069
+ const reader = new Reader(bytes);
2070
+ let f;
2071
+ while ((f = reader.field()) !== null) {
2072
+ const [num, wire, value, raw] = f;
2073
+ switch (num) {
2074
+ case 1: msg.resourceType = Number(BigInt.asIntN(32, value)); break;
2075
+ case 2: msg.resourceName = new TextDecoder().decode(value); break;
2076
+ case 3: msg.patternType = Number(BigInt.asIntN(32, value)); break;
2077
+ case 4: msg.principal = new TextDecoder().decode(value); break;
2078
+ case 5: msg.host = new TextDecoder().decode(value); break;
2079
+ case 6: msg.operation = Number(BigInt.asIntN(32, value)); break;
2080
+ case 7: msg.permissionType = Number(BigInt.asIntN(32, value)); break;
2081
+ default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
2082
+ }
2083
+ }
2084
+ return msg;
2085
+ }
2086
+ }
2087
+
2088
+ export class DescribeAclsRequest {
2089
+ constructor({ filter = undefined } = {}) {
2090
+ this.filter = filter;
2091
+ this.unknownFields = new Uint8Array(0);
2092
+ }
2093
+ static encode(msg) {
2094
+ const out = [];
2095
+ if (msg.filter) putBytesField(out, 1, Acl.encode(msg.filter));
2096
+ putRaw(out, msg.unknownFields);
2097
+ return new Uint8Array(out);
2098
+ }
2099
+ static decode(bytes) {
2100
+ const msg = new DescribeAclsRequest();
2101
+ const reader = new Reader(bytes);
2102
+ let f;
2103
+ while ((f = reader.field()) !== null) {
2104
+ const [num, wire, value, raw] = f;
2105
+ switch (num) {
2106
+ case 1: msg.filter = Acl.decode(value); break;
2107
+ default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
2108
+ }
2109
+ }
2110
+ return msg;
2111
+ }
2112
+ }
2113
+
2114
+ export class DescribeAclsResponse {
2115
+ constructor({ errorCode = 0, acls = [] } = {}) {
2116
+ this.errorCode = errorCode;
2117
+ this.acls = acls;
2118
+ this.unknownFields = new Uint8Array(0);
2119
+ }
2120
+ static encode(msg) {
2121
+ const out = [];
2122
+ putVarintField(out, 1, BigInt(msg.errorCode));
2123
+ if (msg.acls) for (const v of msg.acls) putBytesField(out, 2, Acl.encode(v));
2124
+ putRaw(out, msg.unknownFields);
2125
+ return new Uint8Array(out);
2126
+ }
2127
+ static decode(bytes) {
2128
+ const msg = new DescribeAclsResponse();
2129
+ const reader = new Reader(bytes);
2130
+ let f;
2131
+ while ((f = reader.field()) !== null) {
2132
+ const [num, wire, value, raw] = f;
2133
+ switch (num) {
2134
+ case 1: msg.errorCode = Number(BigInt.asIntN(32, value)); break;
2135
+ case 2: msg.acls.push(Acl.decode(value)); break;
2136
+ default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
2137
+ }
2138
+ }
2139
+ return msg;
2140
+ }
2141
+ }
2142
+
2143
+ export class CreateAclsRequest {
2144
+ constructor({ acls = [] } = {}) {
2145
+ this.acls = acls;
2146
+ this.unknownFields = new Uint8Array(0);
2147
+ }
2148
+ static encode(msg) {
2149
+ const out = [];
2150
+ if (msg.acls) for (const v of msg.acls) putBytesField(out, 1, Acl.encode(v));
2151
+ putRaw(out, msg.unknownFields);
2152
+ return new Uint8Array(out);
2153
+ }
2154
+ static decode(bytes) {
2155
+ const msg = new CreateAclsRequest();
2156
+ const reader = new Reader(bytes);
2157
+ let f;
2158
+ while ((f = reader.field()) !== null) {
2159
+ const [num, wire, value, raw] = f;
2160
+ switch (num) {
2161
+ case 1: msg.acls.push(Acl.decode(value)); break;
2162
+ default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
2163
+ }
2164
+ }
2165
+ return msg;
2166
+ }
2167
+ }
2168
+
2169
+ export class CreateAclsResponse {
2170
+ constructor({ errorCodes = [] } = {}) {
2171
+ this.errorCodes = errorCodes;
2172
+ this.unknownFields = new Uint8Array(0);
2173
+ }
2174
+ static encode(msg) {
2175
+ const out = [];
2176
+ if (msg.errorCodes && msg.errorCodes.length) {
2177
+ const payload = [];
2178
+ for (const x of msg.errorCodes) payload.push(...varintBytes(BigInt(x)));
2179
+ putBytesField(out, 1, payload);
2180
+ }
2181
+ putRaw(out, msg.unknownFields);
2182
+ return new Uint8Array(out);
2183
+ }
2184
+ static decode(bytes) {
2185
+ const msg = new CreateAclsResponse();
2186
+ const reader = new Reader(bytes);
2187
+ let f;
2188
+ while ((f = reader.field()) !== null) {
2189
+ const [num, wire, value, raw] = f;
2190
+ switch (num) {
2191
+ case 1: if (wire === 2) { const r = new Reader(value); while (!r.done) msg.errorCodes.push(Number(BigInt.asIntN(32, r.varint()))); } else msg.errorCodes.push(Number(BigInt.asIntN(32, value))); break;
2192
+ default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
2193
+ }
2194
+ }
2195
+ return msg;
2196
+ }
2197
+ }
2198
+
2199
+ export class DeleteAclsRequest {
2200
+ constructor({ filters = [] } = {}) {
2201
+ this.filters = filters;
2202
+ this.unknownFields = new Uint8Array(0);
2203
+ }
2204
+ static encode(msg) {
2205
+ const out = [];
2206
+ if (msg.filters) for (const v of msg.filters) putBytesField(out, 1, Acl.encode(v));
2207
+ putRaw(out, msg.unknownFields);
2208
+ return new Uint8Array(out);
2209
+ }
2210
+ static decode(bytes) {
2211
+ const msg = new DeleteAclsRequest();
2212
+ const reader = new Reader(bytes);
2213
+ let f;
2214
+ while ((f = reader.field()) !== null) {
2215
+ const [num, wire, value, raw] = f;
2216
+ switch (num) {
2217
+ case 1: msg.filters.push(Acl.decode(value)); break;
2218
+ default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
2219
+ }
2220
+ }
2221
+ return msg;
2222
+ }
2223
+ }
2224
+
2225
+ export class DeleteAclsResponse {
2226
+ constructor({ errorCodes = [] } = {}) {
2227
+ this.errorCodes = errorCodes;
2228
+ this.unknownFields = new Uint8Array(0);
2229
+ }
2230
+ static encode(msg) {
2231
+ const out = [];
2232
+ if (msg.errorCodes && msg.errorCodes.length) {
2233
+ const payload = [];
2234
+ for (const x of msg.errorCodes) payload.push(...varintBytes(BigInt(x)));
2235
+ putBytesField(out, 1, payload);
2236
+ }
2237
+ putRaw(out, msg.unknownFields);
2238
+ return new Uint8Array(out);
2239
+ }
2240
+ static decode(bytes) {
2241
+ const msg = new DeleteAclsResponse();
2242
+ const reader = new Reader(bytes);
2243
+ let f;
2244
+ while ((f = reader.field()) !== null) {
2245
+ const [num, wire, value, raw] = f;
2246
+ switch (num) {
2247
+ case 1: if (wire === 2) { const r = new Reader(value); while (!r.done) msg.errorCodes.push(Number(BigInt.asIntN(32, r.varint()))); } else msg.errorCodes.push(Number(BigInt.asIntN(32, value))); break;
2248
+ default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
2249
+ }
2250
+ }
2251
+ return msg;
2252
+ }
2253
+ }
2254
+
2255
+ export class ListTransactionsRequest {
2256
+ constructor({ } = {}) {
2257
+ this.unknownFields = new Uint8Array(0);
2258
+ }
2259
+ static encode(msg) {
2260
+ const out = [];
2261
+ putRaw(out, msg.unknownFields);
2262
+ return new Uint8Array(out);
2263
+ }
2264
+ static decode(bytes) {
2265
+ const msg = new ListTransactionsRequest();
2266
+ const reader = new Reader(bytes);
2267
+ let f;
2268
+ while ((f = reader.field()) !== null) {
2269
+ const [num, wire, value, raw] = f;
2270
+ switch (num) {
2271
+ default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
2272
+ }
2273
+ }
2274
+ return msg;
2275
+ }
2276
+ }
2277
+
2278
+ export class TransactionListing {
2279
+ constructor({ transactionalId = "", producerId = 0n, transactionState = "" } = {}) {
2280
+ this.transactionalId = transactionalId;
2281
+ this.producerId = producerId;
2282
+ this.transactionState = transactionState;
2283
+ this.unknownFields = new Uint8Array(0);
2284
+ }
2285
+ static encode(msg) {
2286
+ const out = [];
2287
+ putStringField(out, 1, msg.transactionalId);
2288
+ putVarintField(out, 2, BigInt(msg.producerId));
2289
+ putStringField(out, 3, msg.transactionState);
2290
+ putRaw(out, msg.unknownFields);
2291
+ return new Uint8Array(out);
2292
+ }
2293
+ static decode(bytes) {
2294
+ const msg = new TransactionListing();
2295
+ const reader = new Reader(bytes);
2296
+ let f;
2297
+ while ((f = reader.field()) !== null) {
2298
+ const [num, wire, value, raw] = f;
2299
+ switch (num) {
2300
+ case 1: msg.transactionalId = new TextDecoder().decode(value); break;
2301
+ case 2: msg.producerId = BigInt.asIntN(64, value); break;
2302
+ case 3: msg.transactionState = new TextDecoder().decode(value); break;
2303
+ default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
2304
+ }
2305
+ }
2306
+ return msg;
2307
+ }
2308
+ }
2309
+
2310
+ export class ListTransactionsResponse {
2311
+ constructor({ errorCode = 0, transactions = [] } = {}) {
2312
+ this.errorCode = errorCode;
2313
+ this.transactions = transactions;
2314
+ this.unknownFields = new Uint8Array(0);
2315
+ }
2316
+ static encode(msg) {
2317
+ const out = [];
2318
+ putVarintField(out, 1, BigInt(msg.errorCode));
2319
+ if (msg.transactions) for (const v of msg.transactions) putBytesField(out, 2, TransactionListing.encode(v));
2320
+ putRaw(out, msg.unknownFields);
2321
+ return new Uint8Array(out);
2322
+ }
2323
+ static decode(bytes) {
2324
+ const msg = new ListTransactionsResponse();
2325
+ const reader = new Reader(bytes);
2326
+ let f;
2327
+ while ((f = reader.field()) !== null) {
2328
+ const [num, wire, value, raw] = f;
2329
+ switch (num) {
2330
+ case 1: msg.errorCode = Number(BigInt.asIntN(32, value)); break;
2331
+ case 2: msg.transactions.push(TransactionListing.decode(value)); break;
2332
+ default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
2333
+ }
2334
+ }
2335
+ return msg;
2336
+ }
2337
+ }
2338
+
2339
+ export class DescribeTransactionsRequest {
2340
+ constructor({ transactionalIds = [] } = {}) {
2341
+ this.transactionalIds = transactionalIds;
2342
+ this.unknownFields = new Uint8Array(0);
2343
+ }
2344
+ static encode(msg) {
2345
+ const out = [];
2346
+ if (msg.transactionalIds) for (const v of msg.transactionalIds) putBytesField(out, 1, new TextEncoder().encode(v));
2347
+ putRaw(out, msg.unknownFields);
2348
+ return new Uint8Array(out);
2349
+ }
2350
+ static decode(bytes) {
2351
+ const msg = new DescribeTransactionsRequest();
2352
+ const reader = new Reader(bytes);
2353
+ let f;
2354
+ while ((f = reader.field()) !== null) {
2355
+ const [num, wire, value, raw] = f;
2356
+ switch (num) {
2357
+ case 1: msg.transactionalIds.push(new TextDecoder().decode(value)); break;
2358
+ default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
2359
+ }
2360
+ }
2361
+ return msg;
2362
+ }
2363
+ }
2364
+
2365
+ export class DescribedTransaction {
2366
+ constructor({ transactionalId = "", errorCode = 0, producerId = 0n, producerEpoch = 0, transactionState = "", lastUpdateTimestampMs = 0n } = {}) {
2367
+ this.transactionalId = transactionalId;
2368
+ this.errorCode = errorCode;
2369
+ this.producerId = producerId;
2370
+ this.producerEpoch = producerEpoch;
2371
+ this.transactionState = transactionState;
2372
+ this.lastUpdateTimestampMs = lastUpdateTimestampMs;
2373
+ this.unknownFields = new Uint8Array(0);
2374
+ }
2375
+ static encode(msg) {
2376
+ const out = [];
2377
+ putStringField(out, 1, msg.transactionalId);
2378
+ putVarintField(out, 2, BigInt(msg.errorCode));
2379
+ putVarintField(out, 3, BigInt(msg.producerId));
2380
+ putVarintField(out, 4, BigInt(msg.producerEpoch));
2381
+ putStringField(out, 5, msg.transactionState);
2382
+ putVarintField(out, 6, BigInt(msg.lastUpdateTimestampMs));
2383
+ putRaw(out, msg.unknownFields);
2384
+ return new Uint8Array(out);
2385
+ }
2386
+ static decode(bytes) {
2387
+ const msg = new DescribedTransaction();
2388
+ const reader = new Reader(bytes);
2389
+ let f;
2390
+ while ((f = reader.field()) !== null) {
2391
+ const [num, wire, value, raw] = f;
2392
+ switch (num) {
2393
+ case 1: msg.transactionalId = new TextDecoder().decode(value); break;
2394
+ case 2: msg.errorCode = Number(BigInt.asIntN(32, value)); break;
2395
+ case 3: msg.producerId = BigInt.asIntN(64, value); break;
2396
+ case 4: msg.producerEpoch = Number(BigInt.asIntN(32, value)); break;
2397
+ case 5: msg.transactionState = new TextDecoder().decode(value); break;
2398
+ case 6: msg.lastUpdateTimestampMs = BigInt.asIntN(64, value); break;
2399
+ default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
2400
+ }
2401
+ }
2402
+ return msg;
2403
+ }
2404
+ }
2405
+
2406
+ export class DescribeTransactionsResponse {
2407
+ constructor({ transactions = [] } = {}) {
2408
+ this.transactions = transactions;
2409
+ this.unknownFields = new Uint8Array(0);
2410
+ }
2411
+ static encode(msg) {
2412
+ const out = [];
2413
+ if (msg.transactions) for (const v of msg.transactions) putBytesField(out, 1, DescribedTransaction.encode(v));
2414
+ putRaw(out, msg.unknownFields);
2415
+ return new Uint8Array(out);
2416
+ }
2417
+ static decode(bytes) {
2418
+ const msg = new DescribeTransactionsResponse();
2419
+ const reader = new Reader(bytes);
2420
+ let f;
2421
+ while ((f = reader.field()) !== null) {
2422
+ const [num, wire, value, raw] = f;
2423
+ switch (num) {
2424
+ case 1: msg.transactions.push(DescribedTransaction.decode(value)); break;
2425
+ default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
2426
+ }
2427
+ }
2428
+ return msg;
2429
+ }
2430
+ }
2431
+
2432
+ export class OpenShareGroupRequest {
2433
+ constructor({ groupId = "", topics = [], groupInstanceId = "", sessionTimeoutMs = 0 } = {}) {
2434
+ this.groupId = groupId;
2435
+ this.topics = topics;
2436
+ this.groupInstanceId = groupInstanceId;
2437
+ this.sessionTimeoutMs = sessionTimeoutMs;
2438
+ this.unknownFields = new Uint8Array(0);
2439
+ }
2440
+ static encode(msg) {
2441
+ const out = [];
2442
+ putStringField(out, 1, msg.groupId);
2443
+ if (msg.topics) for (const v of msg.topics) putBytesField(out, 2, new TextEncoder().encode(v));
2444
+ putStringField(out, 3, msg.groupInstanceId);
2445
+ putVarintField(out, 4, BigInt(msg.sessionTimeoutMs));
2446
+ putRaw(out, msg.unknownFields);
2447
+ return new Uint8Array(out);
2448
+ }
2449
+ static decode(bytes) {
2450
+ const msg = new OpenShareGroupRequest();
2451
+ const reader = new Reader(bytes);
2452
+ let f;
2453
+ while ((f = reader.field()) !== null) {
2454
+ const [num, wire, value, raw] = f;
2455
+ switch (num) {
2456
+ case 1: msg.groupId = new TextDecoder().decode(value); break;
2457
+ case 2: msg.topics.push(new TextDecoder().decode(value)); break;
2458
+ case 3: msg.groupInstanceId = new TextDecoder().decode(value); break;
2459
+ case 4: msg.sessionTimeoutMs = Number(BigInt.asIntN(32, value)); break;
2460
+ default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
2461
+ }
2462
+ }
2463
+ return msg;
2464
+ }
2465
+ }
2466
+
2467
+ export class OpenShareGroupResponse {
2468
+ constructor({ sessionId = "", errorCode = 0, assignment = undefined } = {}) {
2469
+ this.sessionId = sessionId;
2470
+ this.errorCode = errorCode;
2471
+ this.assignment = assignment;
2472
+ this.unknownFields = new Uint8Array(0);
2473
+ }
2474
+ static encode(msg) {
2475
+ const out = [];
2476
+ putStringField(out, 1, msg.sessionId);
2477
+ putVarintField(out, 2, BigInt(msg.errorCode));
2478
+ if (msg.assignment) putBytesField(out, 3, Assignment.encode(msg.assignment));
2479
+ putRaw(out, msg.unknownFields);
2480
+ return new Uint8Array(out);
2481
+ }
2482
+ static decode(bytes) {
2483
+ const msg = new OpenShareGroupResponse();
2484
+ const reader = new Reader(bytes);
2485
+ let f;
2486
+ while ((f = reader.field()) !== null) {
2487
+ const [num, wire, value, raw] = f;
2488
+ switch (num) {
2489
+ case 1: msg.sessionId = new TextDecoder().decode(value); break;
2490
+ case 2: msg.errorCode = Number(BigInt.asIntN(32, value)); break;
2491
+ case 3: msg.assignment = Assignment.decode(value); break;
2492
+ default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
2493
+ }
2494
+ }
2495
+ return msg;
2496
+ }
2497
+ }
2498
+
2499
+ export class SharePollRequest {
2500
+ constructor({ sessionId = "", maxRecords = 0, maxWaitMs = 0 } = {}) {
2501
+ this.sessionId = sessionId;
2502
+ this.maxRecords = maxRecords;
2503
+ this.maxWaitMs = maxWaitMs;
2504
+ this.unknownFields = new Uint8Array(0);
2505
+ }
2506
+ static encode(msg) {
2507
+ const out = [];
2508
+ putStringField(out, 1, msg.sessionId);
2509
+ putVarintField(out, 2, BigInt(msg.maxRecords));
2510
+ putVarintField(out, 3, BigInt(msg.maxWaitMs));
2511
+ putRaw(out, msg.unknownFields);
2512
+ return new Uint8Array(out);
2513
+ }
2514
+ static decode(bytes) {
2515
+ const msg = new SharePollRequest();
2516
+ const reader = new Reader(bytes);
2517
+ let f;
2518
+ while ((f = reader.field()) !== null) {
2519
+ const [num, wire, value, raw] = f;
2520
+ switch (num) {
2521
+ case 1: msg.sessionId = new TextDecoder().decode(value); break;
2522
+ case 2: msg.maxRecords = Number(BigInt.asIntN(32, value)); break;
2523
+ case 3: msg.maxWaitMs = Number(BigInt.asIntN(32, value)); break;
2524
+ default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
2525
+ }
2526
+ }
2527
+ return msg;
2528
+ }
2529
+ }
2530
+
2531
+ export class SharePollRecord {
2532
+ constructor({ topic = "", partition = 0, offset = 0n, key = new Uint8Array(0), value = new Uint8Array(0), headers = [], timestampMs = 0n, deliveryCount = 0, nullKey = false } = {}) {
2533
+ this.topic = topic;
2534
+ this.partition = partition;
2535
+ this.offset = offset;
2536
+ this.key = key;
2537
+ this.value = value;
2538
+ this.headers = headers;
2539
+ this.timestampMs = timestampMs;
2540
+ this.deliveryCount = deliveryCount;
2541
+ this.nullKey = nullKey;
2542
+ this.unknownFields = new Uint8Array(0);
2543
+ }
2544
+ static encode(msg) {
2545
+ const out = [];
2546
+ putStringField(out, 1, msg.topic);
2547
+ putVarintField(out, 2, BigInt(msg.partition));
2548
+ putVarintField(out, 3, BigInt(msg.offset));
2549
+ if (msg.key && msg.key.length) putBytesField(out, 4, msg.key);
2550
+ if (msg.value && msg.value.length) putBytesField(out, 5, msg.value);
2551
+ if (msg.headers) for (const v of msg.headers) putBytesField(out, 6, Header.encode(v));
2552
+ putVarintField(out, 7, BigInt(msg.timestampMs));
2553
+ putVarintField(out, 8, BigInt(msg.deliveryCount));
2554
+ putVarintField(out, 9, (msg.nullKey ? 1n : 0n));
2555
+ putRaw(out, msg.unknownFields);
2556
+ return new Uint8Array(out);
2557
+ }
2558
+ static decode(bytes) {
2559
+ const msg = new SharePollRecord();
2560
+ const reader = new Reader(bytes);
2561
+ let f;
2562
+ while ((f = reader.field()) !== null) {
2563
+ const [num, wire, value, raw] = f;
2564
+ switch (num) {
2565
+ case 1: msg.topic = new TextDecoder().decode(value); break;
2566
+ case 2: msg.partition = Number(BigInt.asIntN(32, value)); break;
2567
+ case 3: msg.offset = BigInt.asIntN(64, value); break;
2568
+ case 4: msg.key = value; break;
2569
+ case 5: msg.value = value; break;
2570
+ case 6: msg.headers.push(Header.decode(value)); break;
2571
+ case 7: msg.timestampMs = BigInt.asIntN(64, value); break;
2572
+ case 8: msg.deliveryCount = Number(BigInt.asIntN(32, value)); break;
2573
+ case 9: msg.nullKey = value !== 0n; break;
2574
+ default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
2575
+ }
2576
+ }
2577
+ return msg;
2578
+ }
2579
+ }
2580
+
2581
+ export class SharePollResponse {
2582
+ constructor({ records = [], errorCode = 0 } = {}) {
2583
+ this.records = records;
2584
+ this.errorCode = errorCode;
2585
+ this.unknownFields = new Uint8Array(0);
2586
+ }
2587
+ static encode(msg) {
2588
+ const out = [];
2589
+ if (msg.records) for (const v of msg.records) putBytesField(out, 1, SharePollRecord.encode(v));
2590
+ putVarintField(out, 2, BigInt(msg.errorCode));
2591
+ putRaw(out, msg.unknownFields);
2592
+ return new Uint8Array(out);
2593
+ }
2594
+ static decode(bytes) {
2595
+ const msg = new SharePollResponse();
2596
+ const reader = new Reader(bytes);
2597
+ let f;
2598
+ while ((f = reader.field()) !== null) {
2599
+ const [num, wire, value, raw] = f;
2600
+ switch (num) {
2601
+ case 1: msg.records.push(SharePollRecord.decode(value)); break;
2602
+ case 2: msg.errorCode = Number(BigInt.asIntN(32, value)); break;
2603
+ default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
2604
+ }
2605
+ }
2606
+ return msg;
2607
+ }
2608
+ }
2609
+
2610
+ export class ShareAckEntry {
2611
+ constructor({ topic = "", partition = 0, offset = 0n, ackType = 0 } = {}) {
2612
+ this.topic = topic;
2613
+ this.partition = partition;
2614
+ this.offset = offset;
2615
+ this.ackType = ackType;
2616
+ this.unknownFields = new Uint8Array(0);
2617
+ }
2618
+ static encode(msg) {
2619
+ const out = [];
2620
+ putStringField(out, 1, msg.topic);
2621
+ putVarintField(out, 2, BigInt(msg.partition));
2622
+ putVarintField(out, 3, BigInt(msg.offset));
2623
+ putVarintField(out, 4, BigInt(msg.ackType));
2624
+ putRaw(out, msg.unknownFields);
2625
+ return new Uint8Array(out);
2626
+ }
2627
+ static decode(bytes) {
2628
+ const msg = new ShareAckEntry();
2629
+ const reader = new Reader(bytes);
2630
+ let f;
2631
+ while ((f = reader.field()) !== null) {
2632
+ const [num, wire, value, raw] = f;
2633
+ switch (num) {
2634
+ case 1: msg.topic = new TextDecoder().decode(value); break;
2635
+ case 2: msg.partition = Number(BigInt.asIntN(32, value)); break;
2636
+ case 3: msg.offset = BigInt.asIntN(64, value); break;
2637
+ case 4: msg.ackType = Number(BigInt.asIntN(32, value)); break;
2638
+ default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
2639
+ }
2640
+ }
2641
+ return msg;
2642
+ }
2643
+ }
2644
+
2645
+ export class ShareAckRequest {
2646
+ constructor({ sessionId = "", entries = [] } = {}) {
2647
+ this.sessionId = sessionId;
2648
+ this.entries = entries;
2649
+ this.unknownFields = new Uint8Array(0);
2650
+ }
2651
+ static encode(msg) {
2652
+ const out = [];
2653
+ putStringField(out, 1, msg.sessionId);
2654
+ if (msg.entries) for (const v of msg.entries) putBytesField(out, 2, ShareAckEntry.encode(v));
2655
+ putRaw(out, msg.unknownFields);
2656
+ return new Uint8Array(out);
2657
+ }
2658
+ static decode(bytes) {
2659
+ const msg = new ShareAckRequest();
2660
+ const reader = new Reader(bytes);
2661
+ let f;
2662
+ while ((f = reader.field()) !== null) {
2663
+ const [num, wire, value, raw] = f;
2664
+ switch (num) {
2665
+ case 1: msg.sessionId = new TextDecoder().decode(value); break;
2666
+ case 2: msg.entries.push(ShareAckEntry.decode(value)); break;
2667
+ default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
2668
+ }
2669
+ }
2670
+ return msg;
2671
+ }
2672
+ }
2673
+
2674
+ export class ShareAckResponse {
2675
+ constructor({ errorCode = 0 } = {}) {
2676
+ this.errorCode = errorCode;
2677
+ this.unknownFields = new Uint8Array(0);
2678
+ }
2679
+ static encode(msg) {
2680
+ const out = [];
2681
+ putVarintField(out, 1, BigInt(msg.errorCode));
2682
+ putRaw(out, msg.unknownFields);
2683
+ return new Uint8Array(out);
2684
+ }
2685
+ static decode(bytes) {
2686
+ const msg = new ShareAckResponse();
2687
+ const reader = new Reader(bytes);
2688
+ let f;
2689
+ while ((f = reader.field()) !== null) {
2690
+ const [num, wire, value, raw] = f;
2691
+ switch (num) {
2692
+ case 1: msg.errorCode = Number(BigInt.asIntN(32, value)); break;
2693
+ default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
2694
+ }
2695
+ }
2696
+ return msg;
2697
+ }
2698
+ }
2699
+
2700
+ export class CloseShareGroupRequest {
2701
+ constructor({ sessionId = "" } = {}) {
2702
+ this.sessionId = sessionId;
2703
+ this.unknownFields = new Uint8Array(0);
2704
+ }
2705
+ static encode(msg) {
2706
+ const out = [];
2707
+ putStringField(out, 1, msg.sessionId);
2708
+ putRaw(out, msg.unknownFields);
2709
+ return new Uint8Array(out);
2710
+ }
2711
+ static decode(bytes) {
2712
+ const msg = new CloseShareGroupRequest();
2713
+ const reader = new Reader(bytes);
2714
+ let f;
2715
+ while ((f = reader.field()) !== null) {
2716
+ const [num, wire, value, raw] = f;
2717
+ switch (num) {
2718
+ case 1: msg.sessionId = new TextDecoder().decode(value); break;
2719
+ default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
2720
+ }
2721
+ }
2722
+ return msg;
2723
+ }
2724
+ }
2725
+
2726
+ export class CloseShareGroupResponse {
2727
+ constructor({ errorCode = 0 } = {}) {
2728
+ this.errorCode = errorCode;
2729
+ this.unknownFields = new Uint8Array(0);
2730
+ }
2731
+ static encode(msg) {
2732
+ const out = [];
2733
+ putVarintField(out, 1, BigInt(msg.errorCode));
2734
+ putRaw(out, msg.unknownFields);
2735
+ return new Uint8Array(out);
2736
+ }
2737
+ static decode(bytes) {
2738
+ const msg = new CloseShareGroupResponse();
2739
+ const reader = new Reader(bytes);
2740
+ let f;
2741
+ while ((f = reader.field()) !== null) {
2742
+ const [num, wire, value, raw] = f;
2743
+ switch (num) {
2744
+ case 1: msg.errorCode = Number(BigInt.asIntN(32, value)); break;
2745
+ default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
2746
+ }
2747
+ }
2748
+ return msg;
2749
+ }
2750
+ }
2751
+