@google-analytics/data 4.7.0 → 4.8.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.
@@ -42889,6 +42889,7 @@
42889
42889
  * @property {string|null} [name] Metadata name
42890
42890
  * @property {Array.<google.analytics.data.v1beta.IDimensionMetadata>|null} [dimensions] Metadata dimensions
42891
42891
  * @property {Array.<google.analytics.data.v1beta.IMetricMetadata>|null} [metrics] Metadata metrics
42892
+ * @property {Array.<google.analytics.data.v1beta.IComparisonMetadata>|null} [comparisons] Metadata comparisons
42892
42893
  */
42893
42894
 
42894
42895
  /**
@@ -42902,6 +42903,7 @@
42902
42903
  function Metadata(properties) {
42903
42904
  this.dimensions = [];
42904
42905
  this.metrics = [];
42906
+ this.comparisons = [];
42905
42907
  if (properties)
42906
42908
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
42907
42909
  if (properties[keys[i]] != null)
@@ -42932,6 +42934,14 @@
42932
42934
  */
42933
42935
  Metadata.prototype.metrics = $util.emptyArray;
42934
42936
 
42937
+ /**
42938
+ * Metadata comparisons.
42939
+ * @member {Array.<google.analytics.data.v1beta.IComparisonMetadata>} comparisons
42940
+ * @memberof google.analytics.data.v1beta.Metadata
42941
+ * @instance
42942
+ */
42943
+ Metadata.prototype.comparisons = $util.emptyArray;
42944
+
42935
42945
  /**
42936
42946
  * Creates a new Metadata instance using the specified properties.
42937
42947
  * @function create
@@ -42964,6 +42974,9 @@
42964
42974
  $root.google.analytics.data.v1beta.MetricMetadata.encode(message.metrics[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
42965
42975
  if (message.name != null && Object.hasOwnProperty.call(message, "name"))
42966
42976
  writer.uint32(/* id 3, wireType 2 =*/26).string(message.name);
42977
+ if (message.comparisons != null && message.comparisons.length)
42978
+ for (var i = 0; i < message.comparisons.length; ++i)
42979
+ $root.google.analytics.data.v1beta.ComparisonMetadata.encode(message.comparisons[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
42967
42980
  return writer;
42968
42981
  };
42969
42982
 
@@ -43014,6 +43027,12 @@
43014
43027
  message.metrics.push($root.google.analytics.data.v1beta.MetricMetadata.decode(reader, reader.uint32()));
43015
43028
  break;
43016
43029
  }
43030
+ case 4: {
43031
+ if (!(message.comparisons && message.comparisons.length))
43032
+ message.comparisons = [];
43033
+ message.comparisons.push($root.google.analytics.data.v1beta.ComparisonMetadata.decode(reader, reader.uint32()));
43034
+ break;
43035
+ }
43017
43036
  default:
43018
43037
  reader.skipType(tag & 7);
43019
43038
  break;
@@ -43070,6 +43089,15 @@
43070
43089
  return "metrics." + error;
43071
43090
  }
43072
43091
  }
43092
+ if (message.comparisons != null && message.hasOwnProperty("comparisons")) {
43093
+ if (!Array.isArray(message.comparisons))
43094
+ return "comparisons: array expected";
43095
+ for (var i = 0; i < message.comparisons.length; ++i) {
43096
+ var error = $root.google.analytics.data.v1beta.ComparisonMetadata.verify(message.comparisons[i]);
43097
+ if (error)
43098
+ return "comparisons." + error;
43099
+ }
43100
+ }
43073
43101
  return null;
43074
43102
  };
43075
43103
 
@@ -43107,6 +43135,16 @@
43107
43135
  message.metrics[i] = $root.google.analytics.data.v1beta.MetricMetadata.fromObject(object.metrics[i]);
43108
43136
  }
43109
43137
  }
43138
+ if (object.comparisons) {
43139
+ if (!Array.isArray(object.comparisons))
43140
+ throw TypeError(".google.analytics.data.v1beta.Metadata.comparisons: array expected");
43141
+ message.comparisons = [];
43142
+ for (var i = 0; i < object.comparisons.length; ++i) {
43143
+ if (typeof object.comparisons[i] !== "object")
43144
+ throw TypeError(".google.analytics.data.v1beta.Metadata.comparisons: object expected");
43145
+ message.comparisons[i] = $root.google.analytics.data.v1beta.ComparisonMetadata.fromObject(object.comparisons[i]);
43146
+ }
43147
+ }
43110
43148
  return message;
43111
43149
  };
43112
43150
 
@@ -43126,6 +43164,7 @@
43126
43164
  if (options.arrays || options.defaults) {
43127
43165
  object.dimensions = [];
43128
43166
  object.metrics = [];
43167
+ object.comparisons = [];
43129
43168
  }
43130
43169
  if (options.defaults)
43131
43170
  object.name = "";
@@ -43141,6 +43180,11 @@
43141
43180
  }
43142
43181
  if (message.name != null && message.hasOwnProperty("name"))
43143
43182
  object.name = message.name;
43183
+ if (message.comparisons && message.comparisons.length) {
43184
+ object.comparisons = [];
43185
+ for (var j = 0; j < message.comparisons.length; ++j)
43186
+ object.comparisons[j] = $root.google.analytics.data.v1beta.ComparisonMetadata.toObject(message.comparisons[j], options);
43187
+ }
43144
43188
  return object;
43145
43189
  };
43146
43190
 
@@ -43193,6 +43237,7 @@
43193
43237
  * @property {google.analytics.data.v1beta.ICohortSpec|null} [cohortSpec] RunReportRequest cohortSpec
43194
43238
  * @property {boolean|null} [keepEmptyRows] RunReportRequest keepEmptyRows
43195
43239
  * @property {boolean|null} [returnPropertyQuota] RunReportRequest returnPropertyQuota
43240
+ * @property {Array.<google.analytics.data.v1beta.IComparison>|null} [comparisons] RunReportRequest comparisons
43196
43241
  */
43197
43242
 
43198
43243
  /**
@@ -43209,6 +43254,7 @@
43209
43254
  this.dateRanges = [];
43210
43255
  this.metricAggregations = [];
43211
43256
  this.orderBys = [];
43257
+ this.comparisons = [];
43212
43258
  if (properties)
43213
43259
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
43214
43260
  if (properties[keys[i]] != null)
@@ -43327,6 +43373,14 @@
43327
43373
  */
43328
43374
  RunReportRequest.prototype.returnPropertyQuota = false;
43329
43375
 
43376
+ /**
43377
+ * RunReportRequest comparisons.
43378
+ * @member {Array.<google.analytics.data.v1beta.IComparison>} comparisons
43379
+ * @memberof google.analytics.data.v1beta.RunReportRequest
43380
+ * @instance
43381
+ */
43382
+ RunReportRequest.prototype.comparisons = $util.emptyArray;
43383
+
43330
43384
  /**
43331
43385
  * Creates a new RunReportRequest instance using the specified properties.
43332
43386
  * @function create
@@ -43387,6 +43441,9 @@
43387
43441
  writer.uint32(/* id 13, wireType 0 =*/104).bool(message.keepEmptyRows);
43388
43442
  if (message.returnPropertyQuota != null && Object.hasOwnProperty.call(message, "returnPropertyQuota"))
43389
43443
  writer.uint32(/* id 14, wireType 0 =*/112).bool(message.returnPropertyQuota);
43444
+ if (message.comparisons != null && message.comparisons.length)
43445
+ for (var i = 0; i < message.comparisons.length; ++i)
43446
+ $root.google.analytics.data.v1beta.Comparison.encode(message.comparisons[i], writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim();
43390
43447
  return writer;
43391
43448
  };
43392
43449
 
@@ -43492,6 +43549,12 @@
43492
43549
  message.returnPropertyQuota = reader.bool();
43493
43550
  break;
43494
43551
  }
43552
+ case 15: {
43553
+ if (!(message.comparisons && message.comparisons.length))
43554
+ message.comparisons = [];
43555
+ message.comparisons.push($root.google.analytics.data.v1beta.Comparison.decode(reader, reader.uint32()));
43556
+ break;
43557
+ }
43495
43558
  default:
43496
43559
  reader.skipType(tag & 7);
43497
43560
  break;
@@ -43611,6 +43674,15 @@
43611
43674
  if (message.returnPropertyQuota != null && message.hasOwnProperty("returnPropertyQuota"))
43612
43675
  if (typeof message.returnPropertyQuota !== "boolean")
43613
43676
  return "returnPropertyQuota: boolean expected";
43677
+ if (message.comparisons != null && message.hasOwnProperty("comparisons")) {
43678
+ if (!Array.isArray(message.comparisons))
43679
+ return "comparisons: array expected";
43680
+ for (var i = 0; i < message.comparisons.length; ++i) {
43681
+ var error = $root.google.analytics.data.v1beta.Comparison.verify(message.comparisons[i]);
43682
+ if (error)
43683
+ return "comparisons." + error;
43684
+ }
43685
+ }
43614
43686
  return null;
43615
43687
  };
43616
43688
 
@@ -43740,6 +43812,16 @@
43740
43812
  message.keepEmptyRows = Boolean(object.keepEmptyRows);
43741
43813
  if (object.returnPropertyQuota != null)
43742
43814
  message.returnPropertyQuota = Boolean(object.returnPropertyQuota);
43815
+ if (object.comparisons) {
43816
+ if (!Array.isArray(object.comparisons))
43817
+ throw TypeError(".google.analytics.data.v1beta.RunReportRequest.comparisons: array expected");
43818
+ message.comparisons = [];
43819
+ for (var i = 0; i < object.comparisons.length; ++i) {
43820
+ if (typeof object.comparisons[i] !== "object")
43821
+ throw TypeError(".google.analytics.data.v1beta.RunReportRequest.comparisons: object expected");
43822
+ message.comparisons[i] = $root.google.analytics.data.v1beta.Comparison.fromObject(object.comparisons[i]);
43823
+ }
43824
+ }
43743
43825
  return message;
43744
43826
  };
43745
43827
 
@@ -43762,6 +43844,7 @@
43762
43844
  object.dateRanges = [];
43763
43845
  object.metricAggregations = [];
43764
43846
  object.orderBys = [];
43847
+ object.comparisons = [];
43765
43848
  }
43766
43849
  if (options.defaults) {
43767
43850
  object.property = "";
@@ -43831,6 +43914,11 @@
43831
43914
  object.keepEmptyRows = message.keepEmptyRows;
43832
43915
  if (message.returnPropertyQuota != null && message.hasOwnProperty("returnPropertyQuota"))
43833
43916
  object.returnPropertyQuota = message.returnPropertyQuota;
43917
+ if (message.comparisons && message.comparisons.length) {
43918
+ object.comparisons = [];
43919
+ for (var j = 0; j < message.comparisons.length; ++j)
43920
+ object.comparisons[j] = $root.google.analytics.data.v1beta.Comparison.toObject(message.comparisons[j], options);
43921
+ }
43834
43922
  return object;
43835
43923
  };
43836
43924
 
@@ -44429,6 +44517,7 @@
44429
44517
  * @property {google.analytics.data.v1beta.ICohortSpec|null} [cohortSpec] RunPivotReportRequest cohortSpec
44430
44518
  * @property {boolean|null} [keepEmptyRows] RunPivotReportRequest keepEmptyRows
44431
44519
  * @property {boolean|null} [returnPropertyQuota] RunPivotReportRequest returnPropertyQuota
44520
+ * @property {Array.<google.analytics.data.v1beta.IComparison>|null} [comparisons] RunPivotReportRequest comparisons
44432
44521
  */
44433
44522
 
44434
44523
  /**
@@ -44444,6 +44533,7 @@
44444
44533
  this.metrics = [];
44445
44534
  this.dateRanges = [];
44446
44535
  this.pivots = [];
44536
+ this.comparisons = [];
44447
44537
  if (properties)
44448
44538
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
44449
44539
  if (properties[keys[i]] != null)
@@ -44538,6 +44628,14 @@
44538
44628
  */
44539
44629
  RunPivotReportRequest.prototype.returnPropertyQuota = false;
44540
44630
 
44631
+ /**
44632
+ * RunPivotReportRequest comparisons.
44633
+ * @member {Array.<google.analytics.data.v1beta.IComparison>} comparisons
44634
+ * @memberof google.analytics.data.v1beta.RunPivotReportRequest
44635
+ * @instance
44636
+ */
44637
+ RunPivotReportRequest.prototype.comparisons = $util.emptyArray;
44638
+
44541
44639
  /**
44542
44640
  * Creates a new RunPivotReportRequest instance using the specified properties.
44543
44641
  * @function create
@@ -44588,6 +44686,9 @@
44588
44686
  writer.uint32(/* id 10, wireType 0 =*/80).bool(message.keepEmptyRows);
44589
44687
  if (message.returnPropertyQuota != null && Object.hasOwnProperty.call(message, "returnPropertyQuota"))
44590
44688
  writer.uint32(/* id 11, wireType 0 =*/88).bool(message.returnPropertyQuota);
44689
+ if (message.comparisons != null && message.comparisons.length)
44690
+ for (var i = 0; i < message.comparisons.length; ++i)
44691
+ $root.google.analytics.data.v1beta.Comparison.encode(message.comparisons[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
44591
44692
  return writer;
44592
44693
  };
44593
44694
 
@@ -44674,6 +44775,12 @@
44674
44775
  message.returnPropertyQuota = reader.bool();
44675
44776
  break;
44676
44777
  }
44778
+ case 12: {
44779
+ if (!(message.comparisons && message.comparisons.length))
44780
+ message.comparisons = [];
44781
+ message.comparisons.push($root.google.analytics.data.v1beta.Comparison.decode(reader, reader.uint32()));
44782
+ break;
44783
+ }
44677
44784
  default:
44678
44785
  reader.skipType(tag & 7);
44679
44786
  break;
@@ -44772,6 +44879,15 @@
44772
44879
  if (message.returnPropertyQuota != null && message.hasOwnProperty("returnPropertyQuota"))
44773
44880
  if (typeof message.returnPropertyQuota !== "boolean")
44774
44881
  return "returnPropertyQuota: boolean expected";
44882
+ if (message.comparisons != null && message.hasOwnProperty("comparisons")) {
44883
+ if (!Array.isArray(message.comparisons))
44884
+ return "comparisons: array expected";
44885
+ for (var i = 0; i < message.comparisons.length; ++i) {
44886
+ var error = $root.google.analytics.data.v1beta.Comparison.verify(message.comparisons[i]);
44887
+ if (error)
44888
+ return "comparisons." + error;
44889
+ }
44890
+ }
44775
44891
  return null;
44776
44892
  };
44777
44893
 
@@ -44850,6 +44966,16 @@
44850
44966
  message.keepEmptyRows = Boolean(object.keepEmptyRows);
44851
44967
  if (object.returnPropertyQuota != null)
44852
44968
  message.returnPropertyQuota = Boolean(object.returnPropertyQuota);
44969
+ if (object.comparisons) {
44970
+ if (!Array.isArray(object.comparisons))
44971
+ throw TypeError(".google.analytics.data.v1beta.RunPivotReportRequest.comparisons: array expected");
44972
+ message.comparisons = [];
44973
+ for (var i = 0; i < object.comparisons.length; ++i) {
44974
+ if (typeof object.comparisons[i] !== "object")
44975
+ throw TypeError(".google.analytics.data.v1beta.RunPivotReportRequest.comparisons: object expected");
44976
+ message.comparisons[i] = $root.google.analytics.data.v1beta.Comparison.fromObject(object.comparisons[i]);
44977
+ }
44978
+ }
44853
44979
  return message;
44854
44980
  };
44855
44981
 
@@ -44871,6 +44997,7 @@
44871
44997
  object.metrics = [];
44872
44998
  object.dateRanges = [];
44873
44999
  object.pivots = [];
45000
+ object.comparisons = [];
44874
45001
  }
44875
45002
  if (options.defaults) {
44876
45003
  object.property = "";
@@ -44915,6 +45042,11 @@
44915
45042
  object.keepEmptyRows = message.keepEmptyRows;
44916
45043
  if (message.returnPropertyQuota != null && message.hasOwnProperty("returnPropertyQuota"))
44917
45044
  object.returnPropertyQuota = message.returnPropertyQuota;
45045
+ if (message.comparisons && message.comparisons.length) {
45046
+ object.comparisons = [];
45047
+ for (var j = 0; j < message.comparisons.length; ++j)
45048
+ object.comparisons[j] = $root.google.analytics.data.v1beta.Comparison.toObject(message.comparisons[j], options);
45049
+ }
44918
45050
  return object;
44919
45051
  };
44920
45052
 
@@ -52409,6 +52541,300 @@
52409
52541
  return Metric;
52410
52542
  })();
52411
52543
 
52544
+ v1beta.Comparison = (function() {
52545
+
52546
+ /**
52547
+ * Properties of a Comparison.
52548
+ * @memberof google.analytics.data.v1beta
52549
+ * @interface IComparison
52550
+ * @property {string|null} [name] Comparison name
52551
+ * @property {google.analytics.data.v1beta.IFilterExpression|null} [dimensionFilter] Comparison dimensionFilter
52552
+ * @property {string|null} [comparison] Comparison comparison
52553
+ */
52554
+
52555
+ /**
52556
+ * Constructs a new Comparison.
52557
+ * @memberof google.analytics.data.v1beta
52558
+ * @classdesc Represents a Comparison.
52559
+ * @implements IComparison
52560
+ * @constructor
52561
+ * @param {google.analytics.data.v1beta.IComparison=} [properties] Properties to set
52562
+ */
52563
+ function Comparison(properties) {
52564
+ if (properties)
52565
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
52566
+ if (properties[keys[i]] != null)
52567
+ this[keys[i]] = properties[keys[i]];
52568
+ }
52569
+
52570
+ /**
52571
+ * Comparison name.
52572
+ * @member {string|null|undefined} name
52573
+ * @memberof google.analytics.data.v1beta.Comparison
52574
+ * @instance
52575
+ */
52576
+ Comparison.prototype.name = null;
52577
+
52578
+ /**
52579
+ * Comparison dimensionFilter.
52580
+ * @member {google.analytics.data.v1beta.IFilterExpression|null|undefined} dimensionFilter
52581
+ * @memberof google.analytics.data.v1beta.Comparison
52582
+ * @instance
52583
+ */
52584
+ Comparison.prototype.dimensionFilter = null;
52585
+
52586
+ /**
52587
+ * Comparison comparison.
52588
+ * @member {string|null|undefined} comparison
52589
+ * @memberof google.analytics.data.v1beta.Comparison
52590
+ * @instance
52591
+ */
52592
+ Comparison.prototype.comparison = null;
52593
+
52594
+ // OneOf field names bound to virtual getters and setters
52595
+ var $oneOfFields;
52596
+
52597
+ /**
52598
+ * Comparison _name.
52599
+ * @member {"name"|undefined} _name
52600
+ * @memberof google.analytics.data.v1beta.Comparison
52601
+ * @instance
52602
+ */
52603
+ Object.defineProperty(Comparison.prototype, "_name", {
52604
+ get: $util.oneOfGetter($oneOfFields = ["name"]),
52605
+ set: $util.oneOfSetter($oneOfFields)
52606
+ });
52607
+
52608
+ /**
52609
+ * Comparison oneComparison.
52610
+ * @member {"dimensionFilter"|"comparison"|undefined} oneComparison
52611
+ * @memberof google.analytics.data.v1beta.Comparison
52612
+ * @instance
52613
+ */
52614
+ Object.defineProperty(Comparison.prototype, "oneComparison", {
52615
+ get: $util.oneOfGetter($oneOfFields = ["dimensionFilter", "comparison"]),
52616
+ set: $util.oneOfSetter($oneOfFields)
52617
+ });
52618
+
52619
+ /**
52620
+ * Creates a new Comparison instance using the specified properties.
52621
+ * @function create
52622
+ * @memberof google.analytics.data.v1beta.Comparison
52623
+ * @static
52624
+ * @param {google.analytics.data.v1beta.IComparison=} [properties] Properties to set
52625
+ * @returns {google.analytics.data.v1beta.Comparison} Comparison instance
52626
+ */
52627
+ Comparison.create = function create(properties) {
52628
+ return new Comparison(properties);
52629
+ };
52630
+
52631
+ /**
52632
+ * Encodes the specified Comparison message. Does not implicitly {@link google.analytics.data.v1beta.Comparison.verify|verify} messages.
52633
+ * @function encode
52634
+ * @memberof google.analytics.data.v1beta.Comparison
52635
+ * @static
52636
+ * @param {google.analytics.data.v1beta.IComparison} message Comparison message or plain object to encode
52637
+ * @param {$protobuf.Writer} [writer] Writer to encode to
52638
+ * @returns {$protobuf.Writer} Writer
52639
+ */
52640
+ Comparison.encode = function encode(message, writer) {
52641
+ if (!writer)
52642
+ writer = $Writer.create();
52643
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
52644
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
52645
+ if (message.dimensionFilter != null && Object.hasOwnProperty.call(message, "dimensionFilter"))
52646
+ $root.google.analytics.data.v1beta.FilterExpression.encode(message.dimensionFilter, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
52647
+ if (message.comparison != null && Object.hasOwnProperty.call(message, "comparison"))
52648
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.comparison);
52649
+ return writer;
52650
+ };
52651
+
52652
+ /**
52653
+ * Encodes the specified Comparison message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Comparison.verify|verify} messages.
52654
+ * @function encodeDelimited
52655
+ * @memberof google.analytics.data.v1beta.Comparison
52656
+ * @static
52657
+ * @param {google.analytics.data.v1beta.IComparison} message Comparison message or plain object to encode
52658
+ * @param {$protobuf.Writer} [writer] Writer to encode to
52659
+ * @returns {$protobuf.Writer} Writer
52660
+ */
52661
+ Comparison.encodeDelimited = function encodeDelimited(message, writer) {
52662
+ return this.encode(message, writer).ldelim();
52663
+ };
52664
+
52665
+ /**
52666
+ * Decodes a Comparison message from the specified reader or buffer.
52667
+ * @function decode
52668
+ * @memberof google.analytics.data.v1beta.Comparison
52669
+ * @static
52670
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
52671
+ * @param {number} [length] Message length if known beforehand
52672
+ * @returns {google.analytics.data.v1beta.Comparison} Comparison
52673
+ * @throws {Error} If the payload is not a reader or valid buffer
52674
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
52675
+ */
52676
+ Comparison.decode = function decode(reader, length) {
52677
+ if (!(reader instanceof $Reader))
52678
+ reader = $Reader.create(reader);
52679
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.Comparison();
52680
+ while (reader.pos < end) {
52681
+ var tag = reader.uint32();
52682
+ switch (tag >>> 3) {
52683
+ case 1: {
52684
+ message.name = reader.string();
52685
+ break;
52686
+ }
52687
+ case 2: {
52688
+ message.dimensionFilter = $root.google.analytics.data.v1beta.FilterExpression.decode(reader, reader.uint32());
52689
+ break;
52690
+ }
52691
+ case 3: {
52692
+ message.comparison = reader.string();
52693
+ break;
52694
+ }
52695
+ default:
52696
+ reader.skipType(tag & 7);
52697
+ break;
52698
+ }
52699
+ }
52700
+ return message;
52701
+ };
52702
+
52703
+ /**
52704
+ * Decodes a Comparison message from the specified reader or buffer, length delimited.
52705
+ * @function decodeDelimited
52706
+ * @memberof google.analytics.data.v1beta.Comparison
52707
+ * @static
52708
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
52709
+ * @returns {google.analytics.data.v1beta.Comparison} Comparison
52710
+ * @throws {Error} If the payload is not a reader or valid buffer
52711
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
52712
+ */
52713
+ Comparison.decodeDelimited = function decodeDelimited(reader) {
52714
+ if (!(reader instanceof $Reader))
52715
+ reader = new $Reader(reader);
52716
+ return this.decode(reader, reader.uint32());
52717
+ };
52718
+
52719
+ /**
52720
+ * Verifies a Comparison message.
52721
+ * @function verify
52722
+ * @memberof google.analytics.data.v1beta.Comparison
52723
+ * @static
52724
+ * @param {Object.<string,*>} message Plain object to verify
52725
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
52726
+ */
52727
+ Comparison.verify = function verify(message) {
52728
+ if (typeof message !== "object" || message === null)
52729
+ return "object expected";
52730
+ var properties = {};
52731
+ if (message.name != null && message.hasOwnProperty("name")) {
52732
+ properties._name = 1;
52733
+ if (!$util.isString(message.name))
52734
+ return "name: string expected";
52735
+ }
52736
+ if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) {
52737
+ properties.oneComparison = 1;
52738
+ {
52739
+ var error = $root.google.analytics.data.v1beta.FilterExpression.verify(message.dimensionFilter);
52740
+ if (error)
52741
+ return "dimensionFilter." + error;
52742
+ }
52743
+ }
52744
+ if (message.comparison != null && message.hasOwnProperty("comparison")) {
52745
+ if (properties.oneComparison === 1)
52746
+ return "oneComparison: multiple values";
52747
+ properties.oneComparison = 1;
52748
+ if (!$util.isString(message.comparison))
52749
+ return "comparison: string expected";
52750
+ }
52751
+ return null;
52752
+ };
52753
+
52754
+ /**
52755
+ * Creates a Comparison message from a plain object. Also converts values to their respective internal types.
52756
+ * @function fromObject
52757
+ * @memberof google.analytics.data.v1beta.Comparison
52758
+ * @static
52759
+ * @param {Object.<string,*>} object Plain object
52760
+ * @returns {google.analytics.data.v1beta.Comparison} Comparison
52761
+ */
52762
+ Comparison.fromObject = function fromObject(object) {
52763
+ if (object instanceof $root.google.analytics.data.v1beta.Comparison)
52764
+ return object;
52765
+ var message = new $root.google.analytics.data.v1beta.Comparison();
52766
+ if (object.name != null)
52767
+ message.name = String(object.name);
52768
+ if (object.dimensionFilter != null) {
52769
+ if (typeof object.dimensionFilter !== "object")
52770
+ throw TypeError(".google.analytics.data.v1beta.Comparison.dimensionFilter: object expected");
52771
+ message.dimensionFilter = $root.google.analytics.data.v1beta.FilterExpression.fromObject(object.dimensionFilter);
52772
+ }
52773
+ if (object.comparison != null)
52774
+ message.comparison = String(object.comparison);
52775
+ return message;
52776
+ };
52777
+
52778
+ /**
52779
+ * Creates a plain object from a Comparison message. Also converts values to other types if specified.
52780
+ * @function toObject
52781
+ * @memberof google.analytics.data.v1beta.Comparison
52782
+ * @static
52783
+ * @param {google.analytics.data.v1beta.Comparison} message Comparison
52784
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
52785
+ * @returns {Object.<string,*>} Plain object
52786
+ */
52787
+ Comparison.toObject = function toObject(message, options) {
52788
+ if (!options)
52789
+ options = {};
52790
+ var object = {};
52791
+ if (message.name != null && message.hasOwnProperty("name")) {
52792
+ object.name = message.name;
52793
+ if (options.oneofs)
52794
+ object._name = "name";
52795
+ }
52796
+ if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) {
52797
+ object.dimensionFilter = $root.google.analytics.data.v1beta.FilterExpression.toObject(message.dimensionFilter, options);
52798
+ if (options.oneofs)
52799
+ object.oneComparison = "dimensionFilter";
52800
+ }
52801
+ if (message.comparison != null && message.hasOwnProperty("comparison")) {
52802
+ object.comparison = message.comparison;
52803
+ if (options.oneofs)
52804
+ object.oneComparison = "comparison";
52805
+ }
52806
+ return object;
52807
+ };
52808
+
52809
+ /**
52810
+ * Converts this Comparison to JSON.
52811
+ * @function toJSON
52812
+ * @memberof google.analytics.data.v1beta.Comparison
52813
+ * @instance
52814
+ * @returns {Object.<string,*>} JSON object
52815
+ */
52816
+ Comparison.prototype.toJSON = function toJSON() {
52817
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
52818
+ };
52819
+
52820
+ /**
52821
+ * Gets the default type url for Comparison
52822
+ * @function getTypeUrl
52823
+ * @memberof google.analytics.data.v1beta.Comparison
52824
+ * @static
52825
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
52826
+ * @returns {string} The default type url
52827
+ */
52828
+ Comparison.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
52829
+ if (typeUrlPrefix === undefined) {
52830
+ typeUrlPrefix = "type.googleapis.com";
52831
+ }
52832
+ return typeUrlPrefix + "/google.analytics.data.v1beta.Comparison";
52833
+ };
52834
+
52835
+ return Comparison;
52836
+ })();
52837
+
52412
52838
  v1beta.FilterExpression = (function() {
52413
52839
 
52414
52840
  /**
@@ -61798,6 +62224,256 @@
61798
62224
  return MetricMetadata;
61799
62225
  })();
61800
62226
 
62227
+ v1beta.ComparisonMetadata = (function() {
62228
+
62229
+ /**
62230
+ * Properties of a ComparisonMetadata.
62231
+ * @memberof google.analytics.data.v1beta
62232
+ * @interface IComparisonMetadata
62233
+ * @property {string|null} [apiName] ComparisonMetadata apiName
62234
+ * @property {string|null} [uiName] ComparisonMetadata uiName
62235
+ * @property {string|null} [description] ComparisonMetadata description
62236
+ */
62237
+
62238
+ /**
62239
+ * Constructs a new ComparisonMetadata.
62240
+ * @memberof google.analytics.data.v1beta
62241
+ * @classdesc Represents a ComparisonMetadata.
62242
+ * @implements IComparisonMetadata
62243
+ * @constructor
62244
+ * @param {google.analytics.data.v1beta.IComparisonMetadata=} [properties] Properties to set
62245
+ */
62246
+ function ComparisonMetadata(properties) {
62247
+ if (properties)
62248
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
62249
+ if (properties[keys[i]] != null)
62250
+ this[keys[i]] = properties[keys[i]];
62251
+ }
62252
+
62253
+ /**
62254
+ * ComparisonMetadata apiName.
62255
+ * @member {string} apiName
62256
+ * @memberof google.analytics.data.v1beta.ComparisonMetadata
62257
+ * @instance
62258
+ */
62259
+ ComparisonMetadata.prototype.apiName = "";
62260
+
62261
+ /**
62262
+ * ComparisonMetadata uiName.
62263
+ * @member {string} uiName
62264
+ * @memberof google.analytics.data.v1beta.ComparisonMetadata
62265
+ * @instance
62266
+ */
62267
+ ComparisonMetadata.prototype.uiName = "";
62268
+
62269
+ /**
62270
+ * ComparisonMetadata description.
62271
+ * @member {string} description
62272
+ * @memberof google.analytics.data.v1beta.ComparisonMetadata
62273
+ * @instance
62274
+ */
62275
+ ComparisonMetadata.prototype.description = "";
62276
+
62277
+ /**
62278
+ * Creates a new ComparisonMetadata instance using the specified properties.
62279
+ * @function create
62280
+ * @memberof google.analytics.data.v1beta.ComparisonMetadata
62281
+ * @static
62282
+ * @param {google.analytics.data.v1beta.IComparisonMetadata=} [properties] Properties to set
62283
+ * @returns {google.analytics.data.v1beta.ComparisonMetadata} ComparisonMetadata instance
62284
+ */
62285
+ ComparisonMetadata.create = function create(properties) {
62286
+ return new ComparisonMetadata(properties);
62287
+ };
62288
+
62289
+ /**
62290
+ * Encodes the specified ComparisonMetadata message. Does not implicitly {@link google.analytics.data.v1beta.ComparisonMetadata.verify|verify} messages.
62291
+ * @function encode
62292
+ * @memberof google.analytics.data.v1beta.ComparisonMetadata
62293
+ * @static
62294
+ * @param {google.analytics.data.v1beta.IComparisonMetadata} message ComparisonMetadata message or plain object to encode
62295
+ * @param {$protobuf.Writer} [writer] Writer to encode to
62296
+ * @returns {$protobuf.Writer} Writer
62297
+ */
62298
+ ComparisonMetadata.encode = function encode(message, writer) {
62299
+ if (!writer)
62300
+ writer = $Writer.create();
62301
+ if (message.apiName != null && Object.hasOwnProperty.call(message, "apiName"))
62302
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.apiName);
62303
+ if (message.uiName != null && Object.hasOwnProperty.call(message, "uiName"))
62304
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.uiName);
62305
+ if (message.description != null && Object.hasOwnProperty.call(message, "description"))
62306
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.description);
62307
+ return writer;
62308
+ };
62309
+
62310
+ /**
62311
+ * Encodes the specified ComparisonMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.ComparisonMetadata.verify|verify} messages.
62312
+ * @function encodeDelimited
62313
+ * @memberof google.analytics.data.v1beta.ComparisonMetadata
62314
+ * @static
62315
+ * @param {google.analytics.data.v1beta.IComparisonMetadata} message ComparisonMetadata message or plain object to encode
62316
+ * @param {$protobuf.Writer} [writer] Writer to encode to
62317
+ * @returns {$protobuf.Writer} Writer
62318
+ */
62319
+ ComparisonMetadata.encodeDelimited = function encodeDelimited(message, writer) {
62320
+ return this.encode(message, writer).ldelim();
62321
+ };
62322
+
62323
+ /**
62324
+ * Decodes a ComparisonMetadata message from the specified reader or buffer.
62325
+ * @function decode
62326
+ * @memberof google.analytics.data.v1beta.ComparisonMetadata
62327
+ * @static
62328
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
62329
+ * @param {number} [length] Message length if known beforehand
62330
+ * @returns {google.analytics.data.v1beta.ComparisonMetadata} ComparisonMetadata
62331
+ * @throws {Error} If the payload is not a reader or valid buffer
62332
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
62333
+ */
62334
+ ComparisonMetadata.decode = function decode(reader, length) {
62335
+ if (!(reader instanceof $Reader))
62336
+ reader = $Reader.create(reader);
62337
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.data.v1beta.ComparisonMetadata();
62338
+ while (reader.pos < end) {
62339
+ var tag = reader.uint32();
62340
+ switch (tag >>> 3) {
62341
+ case 1: {
62342
+ message.apiName = reader.string();
62343
+ break;
62344
+ }
62345
+ case 2: {
62346
+ message.uiName = reader.string();
62347
+ break;
62348
+ }
62349
+ case 3: {
62350
+ message.description = reader.string();
62351
+ break;
62352
+ }
62353
+ default:
62354
+ reader.skipType(tag & 7);
62355
+ break;
62356
+ }
62357
+ }
62358
+ return message;
62359
+ };
62360
+
62361
+ /**
62362
+ * Decodes a ComparisonMetadata message from the specified reader or buffer, length delimited.
62363
+ * @function decodeDelimited
62364
+ * @memberof google.analytics.data.v1beta.ComparisonMetadata
62365
+ * @static
62366
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
62367
+ * @returns {google.analytics.data.v1beta.ComparisonMetadata} ComparisonMetadata
62368
+ * @throws {Error} If the payload is not a reader or valid buffer
62369
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
62370
+ */
62371
+ ComparisonMetadata.decodeDelimited = function decodeDelimited(reader) {
62372
+ if (!(reader instanceof $Reader))
62373
+ reader = new $Reader(reader);
62374
+ return this.decode(reader, reader.uint32());
62375
+ };
62376
+
62377
+ /**
62378
+ * Verifies a ComparisonMetadata message.
62379
+ * @function verify
62380
+ * @memberof google.analytics.data.v1beta.ComparisonMetadata
62381
+ * @static
62382
+ * @param {Object.<string,*>} message Plain object to verify
62383
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
62384
+ */
62385
+ ComparisonMetadata.verify = function verify(message) {
62386
+ if (typeof message !== "object" || message === null)
62387
+ return "object expected";
62388
+ if (message.apiName != null && message.hasOwnProperty("apiName"))
62389
+ if (!$util.isString(message.apiName))
62390
+ return "apiName: string expected";
62391
+ if (message.uiName != null && message.hasOwnProperty("uiName"))
62392
+ if (!$util.isString(message.uiName))
62393
+ return "uiName: string expected";
62394
+ if (message.description != null && message.hasOwnProperty("description"))
62395
+ if (!$util.isString(message.description))
62396
+ return "description: string expected";
62397
+ return null;
62398
+ };
62399
+
62400
+ /**
62401
+ * Creates a ComparisonMetadata message from a plain object. Also converts values to their respective internal types.
62402
+ * @function fromObject
62403
+ * @memberof google.analytics.data.v1beta.ComparisonMetadata
62404
+ * @static
62405
+ * @param {Object.<string,*>} object Plain object
62406
+ * @returns {google.analytics.data.v1beta.ComparisonMetadata} ComparisonMetadata
62407
+ */
62408
+ ComparisonMetadata.fromObject = function fromObject(object) {
62409
+ if (object instanceof $root.google.analytics.data.v1beta.ComparisonMetadata)
62410
+ return object;
62411
+ var message = new $root.google.analytics.data.v1beta.ComparisonMetadata();
62412
+ if (object.apiName != null)
62413
+ message.apiName = String(object.apiName);
62414
+ if (object.uiName != null)
62415
+ message.uiName = String(object.uiName);
62416
+ if (object.description != null)
62417
+ message.description = String(object.description);
62418
+ return message;
62419
+ };
62420
+
62421
+ /**
62422
+ * Creates a plain object from a ComparisonMetadata message. Also converts values to other types if specified.
62423
+ * @function toObject
62424
+ * @memberof google.analytics.data.v1beta.ComparisonMetadata
62425
+ * @static
62426
+ * @param {google.analytics.data.v1beta.ComparisonMetadata} message ComparisonMetadata
62427
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
62428
+ * @returns {Object.<string,*>} Plain object
62429
+ */
62430
+ ComparisonMetadata.toObject = function toObject(message, options) {
62431
+ if (!options)
62432
+ options = {};
62433
+ var object = {};
62434
+ if (options.defaults) {
62435
+ object.apiName = "";
62436
+ object.uiName = "";
62437
+ object.description = "";
62438
+ }
62439
+ if (message.apiName != null && message.hasOwnProperty("apiName"))
62440
+ object.apiName = message.apiName;
62441
+ if (message.uiName != null && message.hasOwnProperty("uiName"))
62442
+ object.uiName = message.uiName;
62443
+ if (message.description != null && message.hasOwnProperty("description"))
62444
+ object.description = message.description;
62445
+ return object;
62446
+ };
62447
+
62448
+ /**
62449
+ * Converts this ComparisonMetadata to JSON.
62450
+ * @function toJSON
62451
+ * @memberof google.analytics.data.v1beta.ComparisonMetadata
62452
+ * @instance
62453
+ * @returns {Object.<string,*>} JSON object
62454
+ */
62455
+ ComparisonMetadata.prototype.toJSON = function toJSON() {
62456
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
62457
+ };
62458
+
62459
+ /**
62460
+ * Gets the default type url for ComparisonMetadata
62461
+ * @function getTypeUrl
62462
+ * @memberof google.analytics.data.v1beta.ComparisonMetadata
62463
+ * @static
62464
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
62465
+ * @returns {string} The default type url
62466
+ */
62467
+ ComparisonMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
62468
+ if (typeUrlPrefix === undefined) {
62469
+ typeUrlPrefix = "type.googleapis.com";
62470
+ }
62471
+ return typeUrlPrefix + "/google.analytics.data.v1beta.ComparisonMetadata";
62472
+ };
62473
+
62474
+ return ComparisonMetadata;
62475
+ })();
62476
+
61801
62477
  v1beta.DimensionCompatibility = (function() {
61802
62478
 
61803
62479
  /**