@miradorlabs/web-grpc 2.5.0 → 2.7.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@miradorlabs/web-grpc",
3
- "version": "2.5.0",
3
+ "version": "2.7.0",
4
4
  "description": "Generated gRPC (grpc-js) client stubs for the Mirador web gateway.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -75,6 +75,11 @@ export interface LogEntry {
75
75
  eventName: string;
76
76
  scopeName: string;
77
77
  scopeVersion: string;
78
+ /** Raw OTLP LogRecord flags word (low byte = W3C trace flags). */
79
+ flags: number;
80
+ /** Unset for records ingested before observed time was stored. */
81
+ observedTime: Date | undefined;
82
+ droppedAttributesCount: number;
78
83
  }
79
84
 
80
85
  export interface LogEntry_AttributesEntry {
@@ -482,6 +487,9 @@ function createBaseLogEntry(): LogEntry {
482
487
  eventName: "",
483
488
  scopeName: "",
484
489
  scopeVersion: "",
490
+ flags: 0,
491
+ observedTime: undefined,
492
+ droppedAttributesCount: 0,
485
493
  };
486
494
  }
487
495
 
@@ -523,6 +531,15 @@ export const LogEntry: MessageFns<LogEntry> = {
523
531
  if (message.scopeVersion !== "") {
524
532
  writer.uint32(98).string(message.scopeVersion);
525
533
  }
534
+ if (message.flags !== 0) {
535
+ writer.uint32(104).uint32(message.flags);
536
+ }
537
+ if (message.observedTime !== undefined) {
538
+ Timestamp.encode(toTimestamp(message.observedTime), writer.uint32(114).fork()).join();
539
+ }
540
+ if (message.droppedAttributesCount !== 0) {
541
+ writer.uint32(120).uint32(message.droppedAttributesCount);
542
+ }
526
543
  return writer;
527
544
  },
528
545
 
@@ -635,6 +652,30 @@ export const LogEntry: MessageFns<LogEntry> = {
635
652
  message.scopeVersion = reader.string();
636
653
  continue;
637
654
  }
655
+ case 13: {
656
+ if (tag !== 104) {
657
+ break;
658
+ }
659
+
660
+ message.flags = reader.uint32();
661
+ continue;
662
+ }
663
+ case 14: {
664
+ if (tag !== 114) {
665
+ break;
666
+ }
667
+
668
+ message.observedTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
669
+ continue;
670
+ }
671
+ case 15: {
672
+ if (tag !== 120) {
673
+ break;
674
+ }
675
+
676
+ message.droppedAttributesCount = reader.uint32();
677
+ continue;
678
+ }
638
679
  }
639
680
  if ((tag & 7) === 4 || tag === 0) {
640
681
  break;
@@ -714,6 +755,17 @@ export const LogEntry: MessageFns<LogEntry> = {
714
755
  : isSet(object.scope_version)
715
756
  ? globalThis.String(object.scope_version)
716
757
  : "",
758
+ flags: isSet(object.flags) ? globalThis.Number(object.flags) : 0,
759
+ observedTime: isSet(object.observedTime)
760
+ ? fromJsonTimestamp(object.observedTime)
761
+ : isSet(object.observed_time)
762
+ ? fromJsonTimestamp(object.observed_time)
763
+ : undefined,
764
+ droppedAttributesCount: isSet(object.droppedAttributesCount)
765
+ ? globalThis.Number(object.droppedAttributesCount)
766
+ : isSet(object.dropped_attributes_count)
767
+ ? globalThis.Number(object.dropped_attributes_count)
768
+ : 0,
717
769
  };
718
770
  },
719
771
 
@@ -767,6 +819,15 @@ export const LogEntry: MessageFns<LogEntry> = {
767
819
  if (message.scopeVersion !== "") {
768
820
  obj.scopeVersion = message.scopeVersion;
769
821
  }
822
+ if (message.flags !== 0) {
823
+ obj.flags = Math.round(message.flags);
824
+ }
825
+ if (message.observedTime !== undefined) {
826
+ obj.observedTime = message.observedTime.toISOString();
827
+ }
828
+ if (message.droppedAttributesCount !== 0) {
829
+ obj.droppedAttributesCount = Math.round(message.droppedAttributesCount);
830
+ }
770
831
  return obj;
771
832
  },
772
833
 
@@ -801,6 +862,9 @@ export const LogEntry: MessageFns<LogEntry> = {
801
862
  message.eventName = object.eventName ?? "";
802
863
  message.scopeName = object.scopeName ?? "";
803
864
  message.scopeVersion = object.scopeVersion ?? "";
865
+ message.flags = object.flags ?? 0;
866
+ message.observedTime = object.observedTime ?? undefined;
867
+ message.droppedAttributesCount = object.droppedAttributesCount ?? 0;
804
868
  return message;
805
869
  },
806
870
  };
@@ -1098,7 +1098,10 @@ traceId: jspb.Message.getFieldWithDefault(msg, 8, ""),
1098
1098
  spanId: jspb.Message.getFieldWithDefault(msg, 9, ""),
1099
1099
  eventName: jspb.Message.getFieldWithDefault(msg, 10, ""),
1100
1100
  scopeName: jspb.Message.getFieldWithDefault(msg, 11, ""),
1101
- scopeVersion: jspb.Message.getFieldWithDefault(msg, 12, "")
1101
+ scopeVersion: jspb.Message.getFieldWithDefault(msg, 12, ""),
1102
+ flags: jspb.Message.getFieldWithDefault(msg, 13, 0),
1103
+ observedTime: (f = msg.getObservedTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
1104
+ droppedAttributesCount: jspb.Message.getFieldWithDefault(msg, 15, 0)
1102
1105
  };
1103
1106
 
1104
1107
  if (includeInstance) {
@@ -1188,6 +1191,19 @@ proto.gateway.web.v1.LogEntry.deserializeBinaryFromReader = function(msg, reader
1188
1191
  var value = /** @type {string} */ (reader.readString());
1189
1192
  msg.setScopeVersion(value);
1190
1193
  break;
1194
+ case 13:
1195
+ var value = /** @type {number} */ (reader.readUint32());
1196
+ msg.setFlags(value);
1197
+ break;
1198
+ case 14:
1199
+ var value = new google_protobuf_timestamp_pb.Timestamp;
1200
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
1201
+ msg.setObservedTime(value);
1202
+ break;
1203
+ case 15:
1204
+ var value = /** @type {number} */ (reader.readUint32());
1205
+ msg.setDroppedAttributesCount(value);
1206
+ break;
1191
1207
  default:
1192
1208
  reader.skipField();
1193
1209
  break;
@@ -1296,6 +1312,28 @@ proto.gateway.web.v1.LogEntry.serializeBinaryToWriter = function(message, writer
1296
1312
  f
1297
1313
  );
1298
1314
  }
1315
+ f = message.getFlags();
1316
+ if (f !== 0) {
1317
+ writer.writeUint32(
1318
+ 13,
1319
+ f
1320
+ );
1321
+ }
1322
+ f = message.getObservedTime();
1323
+ if (f != null) {
1324
+ writer.writeMessage(
1325
+ 14,
1326
+ f,
1327
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
1328
+ );
1329
+ }
1330
+ f = message.getDroppedAttributesCount();
1331
+ if (f !== 0) {
1332
+ writer.writeUint32(
1333
+ 15,
1334
+ f
1335
+ );
1336
+ }
1299
1337
  };
1300
1338
 
1301
1339
 
@@ -1544,6 +1582,79 @@ proto.gateway.web.v1.LogEntry.prototype.setScopeVersion = function(value) {
1544
1582
  };
1545
1583
 
1546
1584
 
1585
+ /**
1586
+ * optional uint32 flags = 13;
1587
+ * @return {number}
1588
+ */
1589
+ proto.gateway.web.v1.LogEntry.prototype.getFlags = function() {
1590
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0));
1591
+ };
1592
+
1593
+
1594
+ /**
1595
+ * @param {number} value
1596
+ * @return {!proto.gateway.web.v1.LogEntry} returns this
1597
+ */
1598
+ proto.gateway.web.v1.LogEntry.prototype.setFlags = function(value) {
1599
+ return jspb.Message.setProto3IntField(this, 13, value);
1600
+ };
1601
+
1602
+
1603
+ /**
1604
+ * optional google.protobuf.Timestamp observed_time = 14;
1605
+ * @return {?proto.google.protobuf.Timestamp}
1606
+ */
1607
+ proto.gateway.web.v1.LogEntry.prototype.getObservedTime = function() {
1608
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
1609
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 14));
1610
+ };
1611
+
1612
+
1613
+ /**
1614
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
1615
+ * @return {!proto.gateway.web.v1.LogEntry} returns this
1616
+ */
1617
+ proto.gateway.web.v1.LogEntry.prototype.setObservedTime = function(value) {
1618
+ return jspb.Message.setWrapperField(this, 14, value);
1619
+ };
1620
+
1621
+
1622
+ /**
1623
+ * Clears the message field making it undefined.
1624
+ * @return {!proto.gateway.web.v1.LogEntry} returns this
1625
+ */
1626
+ proto.gateway.web.v1.LogEntry.prototype.clearObservedTime = function() {
1627
+ return this.setObservedTime(undefined);
1628
+ };
1629
+
1630
+
1631
+ /**
1632
+ * Returns whether this field is set.
1633
+ * @return {boolean}
1634
+ */
1635
+ proto.gateway.web.v1.LogEntry.prototype.hasObservedTime = function() {
1636
+ return jspb.Message.getField(this, 14) != null;
1637
+ };
1638
+
1639
+
1640
+ /**
1641
+ * optional uint32 dropped_attributes_count = 15;
1642
+ * @return {number}
1643
+ */
1644
+ proto.gateway.web.v1.LogEntry.prototype.getDroppedAttributesCount = function() {
1645
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0));
1646
+ };
1647
+
1648
+
1649
+ /**
1650
+ * @param {number} value
1651
+ * @return {!proto.gateway.web.v1.LogEntry} returns this
1652
+ */
1653
+ proto.gateway.web.v1.LogEntry.prototype.setDroppedAttributesCount = function(value) {
1654
+ return jspb.Message.setProto3IntField(this, 15, value);
1655
+ };
1656
+
1657
+
1547
1658
 
1548
1659
 
1549
1660
 
@@ -27,6 +27,7 @@ export enum MetricKind {
27
27
  METRIC_KIND_GAUGE = 1,
28
28
  METRIC_KIND_SUM = 2,
29
29
  METRIC_KIND_HISTOGRAM = 3,
30
+ METRIC_KIND_EXPONENTIAL_HISTOGRAM = 4,
30
31
  UNRECOGNIZED = -1,
31
32
  }
32
33
 
@@ -44,6 +45,9 @@ export function metricKindFromJSON(object: any): MetricKind {
44
45
  case 3:
45
46
  case "METRIC_KIND_HISTOGRAM":
46
47
  return MetricKind.METRIC_KIND_HISTOGRAM;
48
+ case 4:
49
+ case "METRIC_KIND_EXPONENTIAL_HISTOGRAM":
50
+ return MetricKind.METRIC_KIND_EXPONENTIAL_HISTOGRAM;
47
51
  case -1:
48
52
  case "UNRECOGNIZED":
49
53
  default:
@@ -61,6 +65,8 @@ export function metricKindToJSON(object: MetricKind): string {
61
65
  return "METRIC_KIND_SUM";
62
66
  case MetricKind.METRIC_KIND_HISTOGRAM:
63
67
  return "METRIC_KIND_HISTOGRAM";
68
+ case MetricKind.METRIC_KIND_EXPONENTIAL_HISTOGRAM:
69
+ return "METRIC_KIND_EXPONENTIAL_HISTOGRAM";
64
70
  case MetricKind.UNRECOGNIZED:
65
71
  default:
66
72
  return "UNRECOGNIZED";
@@ -242,6 +248,64 @@ export function histogramAggregationToJSON(object: HistogramAggregation): string
242
248
  }
243
249
  }
244
250
 
251
+ export enum ExponentialHistogramAggregation {
252
+ EXPONENTIAL_HISTOGRAM_AGGREGATION_UNSPECIFIED = 0,
253
+ /** EXPONENTIAL_HISTOGRAM_AGGREGATION_QUANTILE - Percentile from exponential buckets; reads ExponentialHistogramQuerySpec.quantile. */
254
+ EXPONENTIAL_HISTOGRAM_AGGREGATION_QUANTILE = 1,
255
+ EXPONENTIAL_HISTOGRAM_AGGREGATION_AVG = 2,
256
+ EXPONENTIAL_HISTOGRAM_AGGREGATION_MIN = 3,
257
+ EXPONENTIAL_HISTOGRAM_AGGREGATION_MAX = 4,
258
+ EXPONENTIAL_HISTOGRAM_AGGREGATION_COUNT = 5,
259
+ UNRECOGNIZED = -1,
260
+ }
261
+
262
+ export function exponentialHistogramAggregationFromJSON(object: any): ExponentialHistogramAggregation {
263
+ switch (object) {
264
+ case 0:
265
+ case "EXPONENTIAL_HISTOGRAM_AGGREGATION_UNSPECIFIED":
266
+ return ExponentialHistogramAggregation.EXPONENTIAL_HISTOGRAM_AGGREGATION_UNSPECIFIED;
267
+ case 1:
268
+ case "EXPONENTIAL_HISTOGRAM_AGGREGATION_QUANTILE":
269
+ return ExponentialHistogramAggregation.EXPONENTIAL_HISTOGRAM_AGGREGATION_QUANTILE;
270
+ case 2:
271
+ case "EXPONENTIAL_HISTOGRAM_AGGREGATION_AVG":
272
+ return ExponentialHistogramAggregation.EXPONENTIAL_HISTOGRAM_AGGREGATION_AVG;
273
+ case 3:
274
+ case "EXPONENTIAL_HISTOGRAM_AGGREGATION_MIN":
275
+ return ExponentialHistogramAggregation.EXPONENTIAL_HISTOGRAM_AGGREGATION_MIN;
276
+ case 4:
277
+ case "EXPONENTIAL_HISTOGRAM_AGGREGATION_MAX":
278
+ return ExponentialHistogramAggregation.EXPONENTIAL_HISTOGRAM_AGGREGATION_MAX;
279
+ case 5:
280
+ case "EXPONENTIAL_HISTOGRAM_AGGREGATION_COUNT":
281
+ return ExponentialHistogramAggregation.EXPONENTIAL_HISTOGRAM_AGGREGATION_COUNT;
282
+ case -1:
283
+ case "UNRECOGNIZED":
284
+ default:
285
+ return ExponentialHistogramAggregation.UNRECOGNIZED;
286
+ }
287
+ }
288
+
289
+ export function exponentialHistogramAggregationToJSON(object: ExponentialHistogramAggregation): string {
290
+ switch (object) {
291
+ case ExponentialHistogramAggregation.EXPONENTIAL_HISTOGRAM_AGGREGATION_UNSPECIFIED:
292
+ return "EXPONENTIAL_HISTOGRAM_AGGREGATION_UNSPECIFIED";
293
+ case ExponentialHistogramAggregation.EXPONENTIAL_HISTOGRAM_AGGREGATION_QUANTILE:
294
+ return "EXPONENTIAL_HISTOGRAM_AGGREGATION_QUANTILE";
295
+ case ExponentialHistogramAggregation.EXPONENTIAL_HISTOGRAM_AGGREGATION_AVG:
296
+ return "EXPONENTIAL_HISTOGRAM_AGGREGATION_AVG";
297
+ case ExponentialHistogramAggregation.EXPONENTIAL_HISTOGRAM_AGGREGATION_MIN:
298
+ return "EXPONENTIAL_HISTOGRAM_AGGREGATION_MIN";
299
+ case ExponentialHistogramAggregation.EXPONENTIAL_HISTOGRAM_AGGREGATION_MAX:
300
+ return "EXPONENTIAL_HISTOGRAM_AGGREGATION_MAX";
301
+ case ExponentialHistogramAggregation.EXPONENTIAL_HISTOGRAM_AGGREGATION_COUNT:
302
+ return "EXPONENTIAL_HISTOGRAM_AGGREGATION_COUNT";
303
+ case ExponentialHistogramAggregation.UNRECOGNIZED:
304
+ default:
305
+ return "UNRECOGNIZED";
306
+ }
307
+ }
308
+
245
309
  export enum AttributeFilterOp {
246
310
  ATTRIBUTE_FILTER_OP_UNSPECIFIED = 0,
247
311
  ATTRIBUTE_FILTER_OP_EQUALS = 1,
@@ -472,8 +536,9 @@ export interface MetricQuery {
472
536
  metricName: string;
473
537
  gauge?: GaugeQuerySpec | undefined;
474
538
  sum?: SumQuerySpec | undefined;
475
- histogram?:
476
- | HistogramQuerySpec
539
+ histogram?: HistogramQuerySpec | undefined;
540
+ exponentialHistogram?:
541
+ | ExponentialHistogramQuerySpec
477
542
  | undefined;
478
543
  /** ≤16 filters, ANDed. Keys resolve point attributes first, then resource. */
479
544
  filters: AttributeFilter[];
@@ -503,6 +568,12 @@ export interface HistogramQuerySpec {
503
568
  quantile: number;
504
569
  }
505
570
 
571
+ export interface ExponentialHistogramQuerySpec {
572
+ aggregation: ExponentialHistogramAggregation;
573
+ /** Quantile level in (0,1); required iff aggregation == QUANTILE. */
574
+ quantile: number;
575
+ }
576
+
506
577
  export interface AttributeFilter {
507
578
  key: string;
508
579
  op: AttributeFilterOp;
@@ -1542,6 +1613,7 @@ function createBaseMetricQuery(): MetricQuery {
1542
1613
  gauge: undefined,
1543
1614
  sum: undefined,
1544
1615
  histogram: undefined,
1616
+ exponentialHistogram: undefined,
1545
1617
  filters: [],
1546
1618
  groupBy: [],
1547
1619
  groupLimit: 0,
@@ -1562,6 +1634,9 @@ export const MetricQuery: MessageFns<MetricQuery> = {
1562
1634
  if (message.histogram !== undefined) {
1563
1635
  HistogramQuerySpec.encode(message.histogram, writer.uint32(34).fork()).join();
1564
1636
  }
1637
+ if (message.exponentialHistogram !== undefined) {
1638
+ ExponentialHistogramQuerySpec.encode(message.exponentialHistogram, writer.uint32(66).fork()).join();
1639
+ }
1565
1640
  for (const v of message.filters) {
1566
1641
  AttributeFilter.encode(v!, writer.uint32(42).fork()).join();
1567
1642
  }
@@ -1613,6 +1688,14 @@ export const MetricQuery: MessageFns<MetricQuery> = {
1613
1688
  message.histogram = HistogramQuerySpec.decode(reader, reader.uint32());
1614
1689
  continue;
1615
1690
  }
1691
+ case 8: {
1692
+ if (tag !== 66) {
1693
+ break;
1694
+ }
1695
+
1696
+ message.exponentialHistogram = ExponentialHistogramQuerySpec.decode(reader, reader.uint32());
1697
+ continue;
1698
+ }
1616
1699
  case 5: {
1617
1700
  if (tag !== 42) {
1618
1701
  break;
@@ -1656,6 +1739,11 @@ export const MetricQuery: MessageFns<MetricQuery> = {
1656
1739
  gauge: isSet(object.gauge) ? GaugeQuerySpec.fromJSON(object.gauge) : undefined,
1657
1740
  sum: isSet(object.sum) ? SumQuerySpec.fromJSON(object.sum) : undefined,
1658
1741
  histogram: isSet(object.histogram) ? HistogramQuerySpec.fromJSON(object.histogram) : undefined,
1742
+ exponentialHistogram: isSet(object.exponentialHistogram)
1743
+ ? ExponentialHistogramQuerySpec.fromJSON(object.exponentialHistogram)
1744
+ : isSet(object.exponential_histogram)
1745
+ ? ExponentialHistogramQuerySpec.fromJSON(object.exponential_histogram)
1746
+ : undefined,
1659
1747
  filters: globalThis.Array.isArray(object?.filters)
1660
1748
  ? object.filters.map((e: any) => AttributeFilter.fromJSON(e))
1661
1749
  : [],
@@ -1686,6 +1774,9 @@ export const MetricQuery: MessageFns<MetricQuery> = {
1686
1774
  if (message.histogram !== undefined) {
1687
1775
  obj.histogram = HistogramQuerySpec.toJSON(message.histogram);
1688
1776
  }
1777
+ if (message.exponentialHistogram !== undefined) {
1778
+ obj.exponentialHistogram = ExponentialHistogramQuerySpec.toJSON(message.exponentialHistogram);
1779
+ }
1689
1780
  if (message.filters?.length) {
1690
1781
  obj.filters = message.filters.map((e) => AttributeFilter.toJSON(e));
1691
1782
  }
@@ -1711,6 +1802,9 @@ export const MetricQuery: MessageFns<MetricQuery> = {
1711
1802
  message.histogram = (object.histogram !== undefined && object.histogram !== null)
1712
1803
  ? HistogramQuerySpec.fromPartial(object.histogram)
1713
1804
  : undefined;
1805
+ message.exponentialHistogram = (object.exponentialHistogram !== undefined && object.exponentialHistogram !== null)
1806
+ ? ExponentialHistogramQuerySpec.fromPartial(object.exponentialHistogram)
1807
+ : undefined;
1714
1808
  message.filters = object.filters?.map((e) => AttributeFilter.fromPartial(e)) || [];
1715
1809
  message.groupBy = object.groupBy?.map((e) => e) || [];
1716
1810
  message.groupLimit = object.groupLimit ?? 0;
@@ -1910,6 +2004,84 @@ export const HistogramQuerySpec: MessageFns<HistogramQuerySpec> = {
1910
2004
  },
1911
2005
  };
1912
2006
 
2007
+ function createBaseExponentialHistogramQuerySpec(): ExponentialHistogramQuerySpec {
2008
+ return { aggregation: 0, quantile: 0 };
2009
+ }
2010
+
2011
+ export const ExponentialHistogramQuerySpec: MessageFns<ExponentialHistogramQuerySpec> = {
2012
+ encode(message: ExponentialHistogramQuerySpec, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
2013
+ if (message.aggregation !== 0) {
2014
+ writer.uint32(8).int32(message.aggregation);
2015
+ }
2016
+ if (message.quantile !== 0) {
2017
+ writer.uint32(17).double(message.quantile);
2018
+ }
2019
+ return writer;
2020
+ },
2021
+
2022
+ decode(input: BinaryReader | Uint8Array, length?: number): ExponentialHistogramQuerySpec {
2023
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2024
+ const end = length === undefined ? reader.len : reader.pos + length;
2025
+ const message = createBaseExponentialHistogramQuerySpec();
2026
+ while (reader.pos < end) {
2027
+ const tag = reader.uint32();
2028
+ switch (tag >>> 3) {
2029
+ case 1: {
2030
+ if (tag !== 8) {
2031
+ break;
2032
+ }
2033
+
2034
+ message.aggregation = reader.int32() as any;
2035
+ continue;
2036
+ }
2037
+ case 2: {
2038
+ if (tag !== 17) {
2039
+ break;
2040
+ }
2041
+
2042
+ message.quantile = reader.double();
2043
+ continue;
2044
+ }
2045
+ }
2046
+ if ((tag & 7) === 4 || tag === 0) {
2047
+ break;
2048
+ }
2049
+ reader.skip(tag & 7);
2050
+ }
2051
+ return message;
2052
+ },
2053
+
2054
+ fromJSON(object: any): ExponentialHistogramQuerySpec {
2055
+ return {
2056
+ aggregation: isSet(object.aggregation) ? exponentialHistogramAggregationFromJSON(object.aggregation) : 0,
2057
+ quantile: isSet(object.quantile) ? globalThis.Number(object.quantile) : 0,
2058
+ };
2059
+ },
2060
+
2061
+ toJSON(message: ExponentialHistogramQuerySpec): unknown {
2062
+ const obj: any = {};
2063
+ if (message.aggregation !== 0) {
2064
+ obj.aggregation = exponentialHistogramAggregationToJSON(message.aggregation);
2065
+ }
2066
+ if (message.quantile !== 0) {
2067
+ obj.quantile = message.quantile;
2068
+ }
2069
+ return obj;
2070
+ },
2071
+
2072
+ create<I extends Exact<DeepPartial<ExponentialHistogramQuerySpec>, I>>(base?: I): ExponentialHistogramQuerySpec {
2073
+ return ExponentialHistogramQuerySpec.fromPartial(base ?? ({} as any));
2074
+ },
2075
+ fromPartial<I extends Exact<DeepPartial<ExponentialHistogramQuerySpec>, I>>(
2076
+ object: I,
2077
+ ): ExponentialHistogramQuerySpec {
2078
+ const message = createBaseExponentialHistogramQuerySpec();
2079
+ message.aggregation = object.aggregation ?? 0;
2080
+ message.quantile = object.quantile ?? 0;
2081
+ return message;
2082
+ },
2083
+ };
2084
+
1913
2085
  function createBaseAttributeFilter(): AttributeFilter {
1914
2086
  return { key: "", op: 0, values: [] };
1915
2087
  }