@headspace/protos-events 1.858.0 → 1.860.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/lib/index.js CHANGED
@@ -196352,6 +196352,2316 @@ $root.AmazonPurchaseAmended = (function() {
196352
196352
  return AmazonPurchaseAmended;
196353
196353
  })();
196354
196354
 
196355
+ $root.AmplitudeProxyEventReceived = (function() {
196356
+
196357
+ /**
196358
+ * Properties of an AmplitudeProxyEventReceived.
196359
+ * @typedef {Object} AmplitudeProxyEventReceived.$Properties
196360
+ * @property {string|null} [eventType] Amplitude event name, as sent by the client. e.g. "content view", "screen_viewed", "$identify".
196361
+ * @property {string|null} [userId] Headspace user identifier as sent to Amplitude, e.g. "HSUSER_J80Y450TCLQ8XZ4T6". Unset for logged-out events.
196362
+ * @legacyUserField
196363
+ * @property {string|null} [deviceId] Amplitude device identifier. The HS install ID on Android (e.g. "HSINSTALL_579B011C2D9346D09DE4EB6D44DCB39D"),
196364
+ * the IDFV on iOS.
196365
+ * @property {number|Long|null} [time] Client event time in UTC epoch milliseconds. e.g. 1791477508256.
196366
+ * @property {number|Long|null} [sessionId] Amplitude session start time in UTC epoch milliseconds, used as the session identifier. e.g. 1791477365063.
196367
+ * @property {number|Long|null} [eventId] Client-side sequential event counter. e.g. 6518.
196368
+ * @property {string|null} [insertId] Client-generated deduplication key.
196369
+ * @property {number|Long|null} [clientUploadTime] Time the SDK uploaded the request batch, in UTC epoch milliseconds. Copied from the request body.
196370
+ * @property {string|null} [library] Amplitude SDK library and version. e.g. "amplitude-flutter/4.6.2_amplitude-swift/1.18.6".
196371
+ * @property {string|null} [platform] Client platform. e.g. "iOS", "Android".
196372
+ * @property {string|null} [osName] Operating system name. e.g. "ios", "ipados", "android".
196373
+ * @property {string|null} [osVersion] Operating system version. e.g. "27.0", "16".
196374
+ * @property {string|null} [deviceBrand] Device brand. e.g. "google", "samsung".
196375
+ * @property {string|null} [deviceManufacturer] Device manufacturer. e.g. "Apple", "Google", "samsung".
196376
+ * @property {string|null} [deviceModel] Device model. e.g. "arm64", "SM-A366E".
196377
+ * @property {string|null} [carrier] Mobile carrier name. e.g. "T-Mobile", "Unknown".
196378
+ * @property {string|null} [language] Device language. e.g. "en", "en-US", "en-MX".
196379
+ * @property {string|null} [versionName] Headspace app version. e.g. "8.36.0".
196380
+ * @property {string|null} [appVersion] Amplitude app_version.
196381
+ * @property {string|null} [ip] IP address as sent by the client. Usually "$remote", meaning Amplitude resolves it server-side.
196382
+ * @property {string|null} [idfv] Apple identifier for vendor. e.g. "B9BF801E-204C-492C-B0B6-A58F1A3BA312".
196383
+ * @property {string|null} [idfa] Apple identifier for advertisers.
196384
+ * @property {string|null} [adid] Google advertising identifier. e.g. "a856fd07-5d28-4763-9c6c-fd514ef0b4ac".
196385
+ * @property {string|null} [country] Client-supplied country.
196386
+ * @property {string|null} [region] Client-supplied region.
196387
+ * @property {string|null} [city] Client-supplied city.
196388
+ * @property {string|null} [dma] Client-supplied designated market area.
196389
+ * @property {number|null} [locationLat] Client-supplied latitude.
196390
+ * @property {number|null} [locationLng] Client-supplied longitude.
196391
+ * @property {string|null} [partnerId] Amplitude partner_id.
196392
+ * @property {number|null} [revenue] Revenue amount.
196393
+ * @property {string|null} [revenueType] Revenue type.
196394
+ * @property {string|null} [productId] Product identifier for revenue events.
196395
+ * @property {number|null} [price] Unit price for revenue events.
196396
+ * @property {number|Long|null} [quantity] Quantity for revenue events.
196397
+ * @property {Array.<TaggedCustomField.$Properties>|null} [eventProperties] Amplitude event_properties, one entry per key. String values are copied verbatim; other JSON types are
196398
+ * JSON-encoded (e.g. 8 -> "8", ["a"] -> "[\"a\"]").
196399
+ * @property {Array.<AmplitudeUserPropertyOperation.$Properties>|null} [userProperties] Amplitude user_properties, grouped by identify operation. Sent on "$identify" events.
196400
+ * @property {Array.<TaggedCustomField.$Properties>|null} [groups] Amplitude groups, encoded like event_properties.
196401
+ * @property {Array.<TaggedCustomField.$Properties>|null} [groupProperties] Amplitude group_properties, encoded like event_properties.
196402
+ * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
196403
+ */
196404
+
196405
+ /**
196406
+ * Properties of an AmplitudeProxyEventReceived.
196407
+ * @name IAmplitudeProxyEventReceived
196408
+ * @interface IAmplitudeProxyEventReceived
196409
+ * @augments AmplitudeProxyEventReceived.$Properties
196410
+ * @deprecated Use AmplitudeProxyEventReceived.$Properties instead.
196411
+ */
196412
+
196413
+ /**
196414
+ * Shape of an AmplitudeProxyEventReceived.
196415
+ * @typedef {AmplitudeProxyEventReceived.$Properties} AmplitudeProxyEventReceived.$Shape
196416
+ */
196417
+
196418
+ /**
196419
+ * Constructs a new AmplitudeProxyEventReceived.
196420
+ * @name AmplitudeProxyEventReceived
196421
+ * @classdesc Represents an AmplitudeProxyEventReceived.
196422
+ * @constructor
196423
+ * @param {AmplitudeProxyEventReceived.$Properties=} [properties] Properties to set
196424
+ * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
196425
+ */
196426
+ function AmplitudeProxyEventReceived(properties) {
196427
+ this.eventProperties = [];
196428
+ this.userProperties = [];
196429
+ this.groups = [];
196430
+ this.groupProperties = [];
196431
+ if (properties)
196432
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
196433
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
196434
+ this[keys[i]] = properties[keys[i]];
196435
+ }
196436
+
196437
+ /**
196438
+ * Amplitude event name, as sent by the client. e.g. "content view", "screen_viewed", "$identify".
196439
+ * @member {string} eventType
196440
+ * @memberof AmplitudeProxyEventReceived
196441
+ * @instance
196442
+ */
196443
+ AmplitudeProxyEventReceived.prototype.eventType = "";
196444
+
196445
+ /**
196446
+ * Headspace user identifier as sent to Amplitude, e.g. "HSUSER_J80Y450TCLQ8XZ4T6". Unset for logged-out events.
196447
+ * @legacyUserField
196448
+ * @member {string|null|undefined} userId
196449
+ * @memberof AmplitudeProxyEventReceived
196450
+ * @instance
196451
+ */
196452
+ AmplitudeProxyEventReceived.prototype.userId = null;
196453
+
196454
+ /**
196455
+ * Amplitude device identifier. The HS install ID on Android (e.g. "HSINSTALL_579B011C2D9346D09DE4EB6D44DCB39D"),
196456
+ * the IDFV on iOS.
196457
+ * @member {string} deviceId
196458
+ * @memberof AmplitudeProxyEventReceived
196459
+ * @instance
196460
+ */
196461
+ AmplitudeProxyEventReceived.prototype.deviceId = "";
196462
+
196463
+ /**
196464
+ * Client event time in UTC epoch milliseconds. e.g. 1791477508256.
196465
+ * @member {number|Long} time
196466
+ * @memberof AmplitudeProxyEventReceived
196467
+ * @instance
196468
+ */
196469
+ AmplitudeProxyEventReceived.prototype.time = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
196470
+
196471
+ /**
196472
+ * Amplitude session start time in UTC epoch milliseconds, used as the session identifier. e.g. 1791477365063.
196473
+ * @member {number|Long} sessionId
196474
+ * @memberof AmplitudeProxyEventReceived
196475
+ * @instance
196476
+ */
196477
+ AmplitudeProxyEventReceived.prototype.sessionId = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
196478
+
196479
+ /**
196480
+ * Client-side sequential event counter. e.g. 6518.
196481
+ * @member {number|Long} eventId
196482
+ * @memberof AmplitudeProxyEventReceived
196483
+ * @instance
196484
+ */
196485
+ AmplitudeProxyEventReceived.prototype.eventId = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
196486
+
196487
+ /**
196488
+ * Client-generated deduplication key.
196489
+ * @member {string} insertId
196490
+ * @memberof AmplitudeProxyEventReceived
196491
+ * @instance
196492
+ */
196493
+ AmplitudeProxyEventReceived.prototype.insertId = "";
196494
+
196495
+ /**
196496
+ * Time the SDK uploaded the request batch, in UTC epoch milliseconds. Copied from the request body.
196497
+ * @member {number|Long} clientUploadTime
196498
+ * @memberof AmplitudeProxyEventReceived
196499
+ * @instance
196500
+ */
196501
+ AmplitudeProxyEventReceived.prototype.clientUploadTime = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
196502
+
196503
+ /**
196504
+ * Amplitude SDK library and version. e.g. "amplitude-flutter/4.6.2_amplitude-swift/1.18.6".
196505
+ * @member {string} library
196506
+ * @memberof AmplitudeProxyEventReceived
196507
+ * @instance
196508
+ */
196509
+ AmplitudeProxyEventReceived.prototype.library = "";
196510
+
196511
+ /**
196512
+ * Client platform. e.g. "iOS", "Android".
196513
+ * @member {string} platform
196514
+ * @memberof AmplitudeProxyEventReceived
196515
+ * @instance
196516
+ */
196517
+ AmplitudeProxyEventReceived.prototype.platform = "";
196518
+
196519
+ /**
196520
+ * Operating system name. e.g. "ios", "ipados", "android".
196521
+ * @member {string} osName
196522
+ * @memberof AmplitudeProxyEventReceived
196523
+ * @instance
196524
+ */
196525
+ AmplitudeProxyEventReceived.prototype.osName = "";
196526
+
196527
+ /**
196528
+ * Operating system version. e.g. "27.0", "16".
196529
+ * @member {string} osVersion
196530
+ * @memberof AmplitudeProxyEventReceived
196531
+ * @instance
196532
+ */
196533
+ AmplitudeProxyEventReceived.prototype.osVersion = "";
196534
+
196535
+ /**
196536
+ * Device brand. e.g. "google", "samsung".
196537
+ * @member {string|null|undefined} deviceBrand
196538
+ * @memberof AmplitudeProxyEventReceived
196539
+ * @instance
196540
+ */
196541
+ AmplitudeProxyEventReceived.prototype.deviceBrand = null;
196542
+
196543
+ /**
196544
+ * Device manufacturer. e.g. "Apple", "Google", "samsung".
196545
+ * @member {string} deviceManufacturer
196546
+ * @memberof AmplitudeProxyEventReceived
196547
+ * @instance
196548
+ */
196549
+ AmplitudeProxyEventReceived.prototype.deviceManufacturer = "";
196550
+
196551
+ /**
196552
+ * Device model. e.g. "arm64", "SM-A366E".
196553
+ * @member {string} deviceModel
196554
+ * @memberof AmplitudeProxyEventReceived
196555
+ * @instance
196556
+ */
196557
+ AmplitudeProxyEventReceived.prototype.deviceModel = "";
196558
+
196559
+ /**
196560
+ * Mobile carrier name. e.g. "T-Mobile", "Unknown".
196561
+ * @member {string} carrier
196562
+ * @memberof AmplitudeProxyEventReceived
196563
+ * @instance
196564
+ */
196565
+ AmplitudeProxyEventReceived.prototype.carrier = "";
196566
+
196567
+ /**
196568
+ * Device language. e.g. "en", "en-US", "en-MX".
196569
+ * @member {string} language
196570
+ * @memberof AmplitudeProxyEventReceived
196571
+ * @instance
196572
+ */
196573
+ AmplitudeProxyEventReceived.prototype.language = "";
196574
+
196575
+ /**
196576
+ * Headspace app version. e.g. "8.36.0".
196577
+ * @member {string|null|undefined} versionName
196578
+ * @memberof AmplitudeProxyEventReceived
196579
+ * @instance
196580
+ */
196581
+ AmplitudeProxyEventReceived.prototype.versionName = null;
196582
+
196583
+ /**
196584
+ * Amplitude app_version.
196585
+ * @member {string|null|undefined} appVersion
196586
+ * @memberof AmplitudeProxyEventReceived
196587
+ * @instance
196588
+ */
196589
+ AmplitudeProxyEventReceived.prototype.appVersion = null;
196590
+
196591
+ /**
196592
+ * IP address as sent by the client. Usually "$remote", meaning Amplitude resolves it server-side.
196593
+ * @member {string} ip
196594
+ * @memberof AmplitudeProxyEventReceived
196595
+ * @instance
196596
+ */
196597
+ AmplitudeProxyEventReceived.prototype.ip = "";
196598
+
196599
+ /**
196600
+ * Apple identifier for vendor. e.g. "B9BF801E-204C-492C-B0B6-A58F1A3BA312".
196601
+ * @member {string|null|undefined} idfv
196602
+ * @memberof AmplitudeProxyEventReceived
196603
+ * @instance
196604
+ */
196605
+ AmplitudeProxyEventReceived.prototype.idfv = null;
196606
+
196607
+ /**
196608
+ * Apple identifier for advertisers.
196609
+ * @member {string|null|undefined} idfa
196610
+ * @memberof AmplitudeProxyEventReceived
196611
+ * @instance
196612
+ */
196613
+ AmplitudeProxyEventReceived.prototype.idfa = null;
196614
+
196615
+ /**
196616
+ * Google advertising identifier. e.g. "a856fd07-5d28-4763-9c6c-fd514ef0b4ac".
196617
+ * @member {string|null|undefined} adid
196618
+ * @memberof AmplitudeProxyEventReceived
196619
+ * @instance
196620
+ */
196621
+ AmplitudeProxyEventReceived.prototype.adid = null;
196622
+
196623
+ /**
196624
+ * Client-supplied country.
196625
+ * @member {string|null|undefined} country
196626
+ * @memberof AmplitudeProxyEventReceived
196627
+ * @instance
196628
+ */
196629
+ AmplitudeProxyEventReceived.prototype.country = null;
196630
+
196631
+ /**
196632
+ * Client-supplied region.
196633
+ * @member {string|null|undefined} region
196634
+ * @memberof AmplitudeProxyEventReceived
196635
+ * @instance
196636
+ */
196637
+ AmplitudeProxyEventReceived.prototype.region = null;
196638
+
196639
+ /**
196640
+ * Client-supplied city.
196641
+ * @member {string|null|undefined} city
196642
+ * @memberof AmplitudeProxyEventReceived
196643
+ * @instance
196644
+ */
196645
+ AmplitudeProxyEventReceived.prototype.city = null;
196646
+
196647
+ /**
196648
+ * Client-supplied designated market area.
196649
+ * @member {string|null|undefined} dma
196650
+ * @memberof AmplitudeProxyEventReceived
196651
+ * @instance
196652
+ */
196653
+ AmplitudeProxyEventReceived.prototype.dma = null;
196654
+
196655
+ /**
196656
+ * Client-supplied latitude.
196657
+ * @member {number|null|undefined} locationLat
196658
+ * @memberof AmplitudeProxyEventReceived
196659
+ * @instance
196660
+ */
196661
+ AmplitudeProxyEventReceived.prototype.locationLat = null;
196662
+
196663
+ /**
196664
+ * Client-supplied longitude.
196665
+ * @member {number|null|undefined} locationLng
196666
+ * @memberof AmplitudeProxyEventReceived
196667
+ * @instance
196668
+ */
196669
+ AmplitudeProxyEventReceived.prototype.locationLng = null;
196670
+
196671
+ /**
196672
+ * Amplitude partner_id.
196673
+ * @member {string|null|undefined} partnerId
196674
+ * @memberof AmplitudeProxyEventReceived
196675
+ * @instance
196676
+ */
196677
+ AmplitudeProxyEventReceived.prototype.partnerId = null;
196678
+
196679
+ /**
196680
+ * Revenue amount.
196681
+ * @member {number|null|undefined} revenue
196682
+ * @memberof AmplitudeProxyEventReceived
196683
+ * @instance
196684
+ */
196685
+ AmplitudeProxyEventReceived.prototype.revenue = null;
196686
+
196687
+ /**
196688
+ * Revenue type.
196689
+ * @member {string|null|undefined} revenueType
196690
+ * @memberof AmplitudeProxyEventReceived
196691
+ * @instance
196692
+ */
196693
+ AmplitudeProxyEventReceived.prototype.revenueType = null;
196694
+
196695
+ /**
196696
+ * Product identifier for revenue events.
196697
+ * @member {string|null|undefined} productId
196698
+ * @memberof AmplitudeProxyEventReceived
196699
+ * @instance
196700
+ */
196701
+ AmplitudeProxyEventReceived.prototype.productId = null;
196702
+
196703
+ /**
196704
+ * Unit price for revenue events.
196705
+ * @member {number|null|undefined} price
196706
+ * @memberof AmplitudeProxyEventReceived
196707
+ * @instance
196708
+ */
196709
+ AmplitudeProxyEventReceived.prototype.price = null;
196710
+
196711
+ /**
196712
+ * Quantity for revenue events.
196713
+ * @member {number|Long|null|undefined} quantity
196714
+ * @memberof AmplitudeProxyEventReceived
196715
+ * @instance
196716
+ */
196717
+ AmplitudeProxyEventReceived.prototype.quantity = null;
196718
+
196719
+ /**
196720
+ * Amplitude event_properties, one entry per key. String values are copied verbatim; other JSON types are
196721
+ * JSON-encoded (e.g. 8 -> "8", ["a"] -> "[\"a\"]").
196722
+ * @member {Array.<TaggedCustomField.$Properties>} eventProperties
196723
+ * @memberof AmplitudeProxyEventReceived
196724
+ * @instance
196725
+ */
196726
+ AmplitudeProxyEventReceived.prototype.eventProperties = $util.emptyArray;
196727
+
196728
+ /**
196729
+ * Amplitude user_properties, grouped by identify operation. Sent on "$identify" events.
196730
+ * @member {Array.<AmplitudeUserPropertyOperation.$Properties>} userProperties
196731
+ * @memberof AmplitudeProxyEventReceived
196732
+ * @instance
196733
+ */
196734
+ AmplitudeProxyEventReceived.prototype.userProperties = $util.emptyArray;
196735
+
196736
+ /**
196737
+ * Amplitude groups, encoded like event_properties.
196738
+ * @member {Array.<TaggedCustomField.$Properties>} groups
196739
+ * @memberof AmplitudeProxyEventReceived
196740
+ * @instance
196741
+ */
196742
+ AmplitudeProxyEventReceived.prototype.groups = $util.emptyArray;
196743
+
196744
+ /**
196745
+ * Amplitude group_properties, encoded like event_properties.
196746
+ * @member {Array.<TaggedCustomField.$Properties>} groupProperties
196747
+ * @memberof AmplitudeProxyEventReceived
196748
+ * @instance
196749
+ */
196750
+ AmplitudeProxyEventReceived.prototype.groupProperties = $util.emptyArray;
196751
+
196752
+ // OneOf field names bound to virtual getters and setters
196753
+ var $oneOfFields;
196754
+
196755
+ // Virtual OneOf for proto3 optional field
196756
+ Object.defineProperty(AmplitudeProxyEventReceived.prototype, "_userId", {
196757
+ get: $util.oneOfGetter($oneOfFields = ["userId"]),
196758
+ set: $util.oneOfSetter($oneOfFields)
196759
+ });
196760
+
196761
+ // Virtual OneOf for proto3 optional field
196762
+ Object.defineProperty(AmplitudeProxyEventReceived.prototype, "_deviceBrand", {
196763
+ get: $util.oneOfGetter($oneOfFields = ["deviceBrand"]),
196764
+ set: $util.oneOfSetter($oneOfFields)
196765
+ });
196766
+
196767
+ // Virtual OneOf for proto3 optional field
196768
+ Object.defineProperty(AmplitudeProxyEventReceived.prototype, "_versionName", {
196769
+ get: $util.oneOfGetter($oneOfFields = ["versionName"]),
196770
+ set: $util.oneOfSetter($oneOfFields)
196771
+ });
196772
+
196773
+ // Virtual OneOf for proto3 optional field
196774
+ Object.defineProperty(AmplitudeProxyEventReceived.prototype, "_appVersion", {
196775
+ get: $util.oneOfGetter($oneOfFields = ["appVersion"]),
196776
+ set: $util.oneOfSetter($oneOfFields)
196777
+ });
196778
+
196779
+ // Virtual OneOf for proto3 optional field
196780
+ Object.defineProperty(AmplitudeProxyEventReceived.prototype, "_idfv", {
196781
+ get: $util.oneOfGetter($oneOfFields = ["idfv"]),
196782
+ set: $util.oneOfSetter($oneOfFields)
196783
+ });
196784
+
196785
+ // Virtual OneOf for proto3 optional field
196786
+ Object.defineProperty(AmplitudeProxyEventReceived.prototype, "_idfa", {
196787
+ get: $util.oneOfGetter($oneOfFields = ["idfa"]),
196788
+ set: $util.oneOfSetter($oneOfFields)
196789
+ });
196790
+
196791
+ // Virtual OneOf for proto3 optional field
196792
+ Object.defineProperty(AmplitudeProxyEventReceived.prototype, "_adid", {
196793
+ get: $util.oneOfGetter($oneOfFields = ["adid"]),
196794
+ set: $util.oneOfSetter($oneOfFields)
196795
+ });
196796
+
196797
+ // Virtual OneOf for proto3 optional field
196798
+ Object.defineProperty(AmplitudeProxyEventReceived.prototype, "_country", {
196799
+ get: $util.oneOfGetter($oneOfFields = ["country"]),
196800
+ set: $util.oneOfSetter($oneOfFields)
196801
+ });
196802
+
196803
+ // Virtual OneOf for proto3 optional field
196804
+ Object.defineProperty(AmplitudeProxyEventReceived.prototype, "_region", {
196805
+ get: $util.oneOfGetter($oneOfFields = ["region"]),
196806
+ set: $util.oneOfSetter($oneOfFields)
196807
+ });
196808
+
196809
+ // Virtual OneOf for proto3 optional field
196810
+ Object.defineProperty(AmplitudeProxyEventReceived.prototype, "_city", {
196811
+ get: $util.oneOfGetter($oneOfFields = ["city"]),
196812
+ set: $util.oneOfSetter($oneOfFields)
196813
+ });
196814
+
196815
+ // Virtual OneOf for proto3 optional field
196816
+ Object.defineProperty(AmplitudeProxyEventReceived.prototype, "_dma", {
196817
+ get: $util.oneOfGetter($oneOfFields = ["dma"]),
196818
+ set: $util.oneOfSetter($oneOfFields)
196819
+ });
196820
+
196821
+ // Virtual OneOf for proto3 optional field
196822
+ Object.defineProperty(AmplitudeProxyEventReceived.prototype, "_locationLat", {
196823
+ get: $util.oneOfGetter($oneOfFields = ["locationLat"]),
196824
+ set: $util.oneOfSetter($oneOfFields)
196825
+ });
196826
+
196827
+ // Virtual OneOf for proto3 optional field
196828
+ Object.defineProperty(AmplitudeProxyEventReceived.prototype, "_locationLng", {
196829
+ get: $util.oneOfGetter($oneOfFields = ["locationLng"]),
196830
+ set: $util.oneOfSetter($oneOfFields)
196831
+ });
196832
+
196833
+ // Virtual OneOf for proto3 optional field
196834
+ Object.defineProperty(AmplitudeProxyEventReceived.prototype, "_partnerId", {
196835
+ get: $util.oneOfGetter($oneOfFields = ["partnerId"]),
196836
+ set: $util.oneOfSetter($oneOfFields)
196837
+ });
196838
+
196839
+ // Virtual OneOf for proto3 optional field
196840
+ Object.defineProperty(AmplitudeProxyEventReceived.prototype, "_revenue", {
196841
+ get: $util.oneOfGetter($oneOfFields = ["revenue"]),
196842
+ set: $util.oneOfSetter($oneOfFields)
196843
+ });
196844
+
196845
+ // Virtual OneOf for proto3 optional field
196846
+ Object.defineProperty(AmplitudeProxyEventReceived.prototype, "_revenueType", {
196847
+ get: $util.oneOfGetter($oneOfFields = ["revenueType"]),
196848
+ set: $util.oneOfSetter($oneOfFields)
196849
+ });
196850
+
196851
+ // Virtual OneOf for proto3 optional field
196852
+ Object.defineProperty(AmplitudeProxyEventReceived.prototype, "_productId", {
196853
+ get: $util.oneOfGetter($oneOfFields = ["productId"]),
196854
+ set: $util.oneOfSetter($oneOfFields)
196855
+ });
196856
+
196857
+ // Virtual OneOf for proto3 optional field
196858
+ Object.defineProperty(AmplitudeProxyEventReceived.prototype, "_price", {
196859
+ get: $util.oneOfGetter($oneOfFields = ["price"]),
196860
+ set: $util.oneOfSetter($oneOfFields)
196861
+ });
196862
+
196863
+ // Virtual OneOf for proto3 optional field
196864
+ Object.defineProperty(AmplitudeProxyEventReceived.prototype, "_quantity", {
196865
+ get: $util.oneOfGetter($oneOfFields = ["quantity"]),
196866
+ set: $util.oneOfSetter($oneOfFields)
196867
+ });
196868
+
196869
+ /**
196870
+ * Creates a new AmplitudeProxyEventReceived instance using the specified properties.
196871
+ * @function create
196872
+ * @memberof AmplitudeProxyEventReceived
196873
+ * @static
196874
+ * @param {AmplitudeProxyEventReceived.$Properties=} [properties] Properties to set
196875
+ * @returns {AmplitudeProxyEventReceived} AmplitudeProxyEventReceived instance
196876
+ * @type {{
196877
+ * (properties: AmplitudeProxyEventReceived.$Shape): AmplitudeProxyEventReceived & AmplitudeProxyEventReceived.$Shape;
196878
+ * (properties?: AmplitudeProxyEventReceived.$Properties): AmplitudeProxyEventReceived;
196879
+ * }}
196880
+ */
196881
+ AmplitudeProxyEventReceived.create = function create(properties) {
196882
+ return new AmplitudeProxyEventReceived(properties);
196883
+ };
196884
+
196885
+ /**
196886
+ * Encodes the specified AmplitudeProxyEventReceived message. Does not implicitly {@link AmplitudeProxyEventReceived.verify|verify} messages.
196887
+ * @function encode
196888
+ * @memberof AmplitudeProxyEventReceived
196889
+ * @static
196890
+ * @param {AmplitudeProxyEventReceived.$Properties} message AmplitudeProxyEventReceived message or plain object to encode
196891
+ * @param {$protobuf.Writer} [writer] Writer to encode to
196892
+ * @returns {$protobuf.Writer} Writer
196893
+ */
196894
+ AmplitudeProxyEventReceived.encode = function encode(message, writer) {
196895
+ if (!writer)
196896
+ writer = $Writer.create();
196897
+ if (message.eventType != null && Object.hasOwnProperty.call(message, "eventType"))
196898
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.eventType);
196899
+ if (message.userId != null && Object.hasOwnProperty.call(message, "userId"))
196900
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.userId);
196901
+ if (message.deviceId != null && Object.hasOwnProperty.call(message, "deviceId"))
196902
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.deviceId);
196903
+ if (message.time != null && Object.hasOwnProperty.call(message, "time"))
196904
+ writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.time);
196905
+ if (message.sessionId != null && Object.hasOwnProperty.call(message, "sessionId"))
196906
+ writer.uint32(/* id 5, wireType 0 =*/40).int64(message.sessionId);
196907
+ if (message.eventId != null && Object.hasOwnProperty.call(message, "eventId"))
196908
+ writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.eventId);
196909
+ if (message.insertId != null && Object.hasOwnProperty.call(message, "insertId"))
196910
+ writer.uint32(/* id 7, wireType 2 =*/58).string(message.insertId);
196911
+ if (message.clientUploadTime != null && Object.hasOwnProperty.call(message, "clientUploadTime"))
196912
+ writer.uint32(/* id 8, wireType 0 =*/64).uint64(message.clientUploadTime);
196913
+ if (message.library != null && Object.hasOwnProperty.call(message, "library"))
196914
+ writer.uint32(/* id 9, wireType 2 =*/74).string(message.library);
196915
+ if (message.platform != null && Object.hasOwnProperty.call(message, "platform"))
196916
+ writer.uint32(/* id 10, wireType 2 =*/82).string(message.platform);
196917
+ if (message.osName != null && Object.hasOwnProperty.call(message, "osName"))
196918
+ writer.uint32(/* id 11, wireType 2 =*/90).string(message.osName);
196919
+ if (message.osVersion != null && Object.hasOwnProperty.call(message, "osVersion"))
196920
+ writer.uint32(/* id 12, wireType 2 =*/98).string(message.osVersion);
196921
+ if (message.deviceBrand != null && Object.hasOwnProperty.call(message, "deviceBrand"))
196922
+ writer.uint32(/* id 13, wireType 2 =*/106).string(message.deviceBrand);
196923
+ if (message.deviceManufacturer != null && Object.hasOwnProperty.call(message, "deviceManufacturer"))
196924
+ writer.uint32(/* id 14, wireType 2 =*/114).string(message.deviceManufacturer);
196925
+ if (message.deviceModel != null && Object.hasOwnProperty.call(message, "deviceModel"))
196926
+ writer.uint32(/* id 15, wireType 2 =*/122).string(message.deviceModel);
196927
+ if (message.carrier != null && Object.hasOwnProperty.call(message, "carrier"))
196928
+ writer.uint32(/* id 16, wireType 2 =*/130).string(message.carrier);
196929
+ if (message.language != null && Object.hasOwnProperty.call(message, "language"))
196930
+ writer.uint32(/* id 17, wireType 2 =*/138).string(message.language);
196931
+ if (message.versionName != null && Object.hasOwnProperty.call(message, "versionName"))
196932
+ writer.uint32(/* id 18, wireType 2 =*/146).string(message.versionName);
196933
+ if (message.appVersion != null && Object.hasOwnProperty.call(message, "appVersion"))
196934
+ writer.uint32(/* id 19, wireType 2 =*/154).string(message.appVersion);
196935
+ if (message.ip != null && Object.hasOwnProperty.call(message, "ip"))
196936
+ writer.uint32(/* id 20, wireType 2 =*/162).string(message.ip);
196937
+ if (message.idfv != null && Object.hasOwnProperty.call(message, "idfv"))
196938
+ writer.uint32(/* id 21, wireType 2 =*/170).string(message.idfv);
196939
+ if (message.idfa != null && Object.hasOwnProperty.call(message, "idfa"))
196940
+ writer.uint32(/* id 22, wireType 2 =*/178).string(message.idfa);
196941
+ if (message.adid != null && Object.hasOwnProperty.call(message, "adid"))
196942
+ writer.uint32(/* id 23, wireType 2 =*/186).string(message.adid);
196943
+ if (message.country != null && Object.hasOwnProperty.call(message, "country"))
196944
+ writer.uint32(/* id 24, wireType 2 =*/194).string(message.country);
196945
+ if (message.region != null && Object.hasOwnProperty.call(message, "region"))
196946
+ writer.uint32(/* id 25, wireType 2 =*/202).string(message.region);
196947
+ if (message.city != null && Object.hasOwnProperty.call(message, "city"))
196948
+ writer.uint32(/* id 26, wireType 2 =*/210).string(message.city);
196949
+ if (message.dma != null && Object.hasOwnProperty.call(message, "dma"))
196950
+ writer.uint32(/* id 27, wireType 2 =*/218).string(message.dma);
196951
+ if (message.locationLat != null && Object.hasOwnProperty.call(message, "locationLat"))
196952
+ writer.uint32(/* id 28, wireType 1 =*/225).double(message.locationLat);
196953
+ if (message.locationLng != null && Object.hasOwnProperty.call(message, "locationLng"))
196954
+ writer.uint32(/* id 29, wireType 1 =*/233).double(message.locationLng);
196955
+ if (message.partnerId != null && Object.hasOwnProperty.call(message, "partnerId"))
196956
+ writer.uint32(/* id 30, wireType 2 =*/242).string(message.partnerId);
196957
+ if (message.revenue != null && Object.hasOwnProperty.call(message, "revenue"))
196958
+ writer.uint32(/* id 31, wireType 1 =*/249).double(message.revenue);
196959
+ if (message.revenueType != null && Object.hasOwnProperty.call(message, "revenueType"))
196960
+ writer.uint32(/* id 32, wireType 2 =*/258).string(message.revenueType);
196961
+ if (message.productId != null && Object.hasOwnProperty.call(message, "productId"))
196962
+ writer.uint32(/* id 33, wireType 2 =*/266).string(message.productId);
196963
+ if (message.price != null && Object.hasOwnProperty.call(message, "price"))
196964
+ writer.uint32(/* id 34, wireType 1 =*/273).double(message.price);
196965
+ if (message.quantity != null && Object.hasOwnProperty.call(message, "quantity"))
196966
+ writer.uint32(/* id 35, wireType 0 =*/280).int64(message.quantity);
196967
+ if (message.eventProperties != null && message.eventProperties.length)
196968
+ for (var i = 0; i < message.eventProperties.length; ++i)
196969
+ $root.TaggedCustomField.encode(message.eventProperties[i], writer.uint32(/* id 36, wireType 2 =*/290).fork()).ldelim();
196970
+ if (message.userProperties != null && message.userProperties.length)
196971
+ for (var i = 0; i < message.userProperties.length; ++i)
196972
+ $root.AmplitudeUserPropertyOperation.encode(message.userProperties[i], writer.uint32(/* id 37, wireType 2 =*/298).fork()).ldelim();
196973
+ if (message.groups != null && message.groups.length)
196974
+ for (var i = 0; i < message.groups.length; ++i)
196975
+ $root.TaggedCustomField.encode(message.groups[i], writer.uint32(/* id 38, wireType 2 =*/306).fork()).ldelim();
196976
+ if (message.groupProperties != null && message.groupProperties.length)
196977
+ for (var i = 0; i < message.groupProperties.length; ++i)
196978
+ $root.TaggedCustomField.encode(message.groupProperties[i], writer.uint32(/* id 39, wireType 2 =*/314).fork()).ldelim();
196979
+ if (message.$unknowns != null && Object.hasOwnProperty.call(message, "$unknowns"))
196980
+ for (var i = 0; i < message.$unknowns.length; ++i)
196981
+ writer.raw(message.$unknowns[i]);
196982
+ return writer;
196983
+ };
196984
+
196985
+ /**
196986
+ * Encodes the specified AmplitudeProxyEventReceived message, length delimited. Does not implicitly {@link AmplitudeProxyEventReceived.verify|verify} messages.
196987
+ * @function encodeDelimited
196988
+ * @memberof AmplitudeProxyEventReceived
196989
+ * @static
196990
+ * @param {AmplitudeProxyEventReceived.$Properties} message AmplitudeProxyEventReceived message or plain object to encode
196991
+ * @param {$protobuf.Writer} [writer] Writer to encode to
196992
+ * @returns {$protobuf.Writer} Writer
196993
+ */
196994
+ AmplitudeProxyEventReceived.encodeDelimited = function encodeDelimited(message, writer) {
196995
+ return this.encode(message, writer).ldelim();
196996
+ };
196997
+
196998
+ /**
196999
+ * Decodes an AmplitudeProxyEventReceived message from the specified reader or buffer.
197000
+ * @function decode
197001
+ * @memberof AmplitudeProxyEventReceived
197002
+ * @static
197003
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
197004
+ * @param {number} [length] Message length if known beforehand
197005
+ * @returns {AmplitudeProxyEventReceived & AmplitudeProxyEventReceived.$Shape} AmplitudeProxyEventReceived
197006
+ * @throws {Error} If the payload is not a reader or valid buffer
197007
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
197008
+ */
197009
+ AmplitudeProxyEventReceived.decode = function decode(reader, length, _end, _depth, _target) {
197010
+ if (!(reader instanceof $Reader))
197011
+ reader = $Reader.create(reader);
197012
+ if (_depth === undefined)
197013
+ _depth = 0;
197014
+ if (_depth > $Reader.recursionLimit)
197015
+ throw Error("max depth exceeded");
197016
+ var end = length === undefined ? reader.len : reader.pos + length, message = _target || new $root.AmplitudeProxyEventReceived(), value;
197017
+ while (reader.pos < end) {
197018
+ var start = reader.pos;
197019
+ var tag = reader.tag();
197020
+ if (tag === _end) {
197021
+ _end = undefined;
197022
+ break;
197023
+ }
197024
+ var wireType = tag & 7;
197025
+ switch (tag >>>= 3) {
197026
+ case 1: {
197027
+ if (wireType !== 2)
197028
+ break;
197029
+ if ((value = reader.string()).length)
197030
+ message.eventType = value;
197031
+ else
197032
+ delete message.eventType;
197033
+ continue;
197034
+ }
197035
+ case 2: {
197036
+ if (wireType !== 2)
197037
+ break;
197038
+ message.userId = reader.string();
197039
+ message._userId = "userId";
197040
+ continue;
197041
+ }
197042
+ case 3: {
197043
+ if (wireType !== 2)
197044
+ break;
197045
+ if ((value = reader.string()).length)
197046
+ message.deviceId = value;
197047
+ else
197048
+ delete message.deviceId;
197049
+ continue;
197050
+ }
197051
+ case 4: {
197052
+ if (wireType !== 0)
197053
+ break;
197054
+ if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0)
197055
+ message.time = value;
197056
+ else
197057
+ delete message.time;
197058
+ continue;
197059
+ }
197060
+ case 5: {
197061
+ if (wireType !== 0)
197062
+ break;
197063
+ if (typeof (value = reader.int64()) === "object" ? value.low || value.high : value !== 0)
197064
+ message.sessionId = value;
197065
+ else
197066
+ delete message.sessionId;
197067
+ continue;
197068
+ }
197069
+ case 6: {
197070
+ if (wireType !== 0)
197071
+ break;
197072
+ if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0)
197073
+ message.eventId = value;
197074
+ else
197075
+ delete message.eventId;
197076
+ continue;
197077
+ }
197078
+ case 7: {
197079
+ if (wireType !== 2)
197080
+ break;
197081
+ if ((value = reader.string()).length)
197082
+ message.insertId = value;
197083
+ else
197084
+ delete message.insertId;
197085
+ continue;
197086
+ }
197087
+ case 8: {
197088
+ if (wireType !== 0)
197089
+ break;
197090
+ if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0)
197091
+ message.clientUploadTime = value;
197092
+ else
197093
+ delete message.clientUploadTime;
197094
+ continue;
197095
+ }
197096
+ case 9: {
197097
+ if (wireType !== 2)
197098
+ break;
197099
+ if ((value = reader.string()).length)
197100
+ message.library = value;
197101
+ else
197102
+ delete message.library;
197103
+ continue;
197104
+ }
197105
+ case 10: {
197106
+ if (wireType !== 2)
197107
+ break;
197108
+ if ((value = reader.string()).length)
197109
+ message.platform = value;
197110
+ else
197111
+ delete message.platform;
197112
+ continue;
197113
+ }
197114
+ case 11: {
197115
+ if (wireType !== 2)
197116
+ break;
197117
+ if ((value = reader.string()).length)
197118
+ message.osName = value;
197119
+ else
197120
+ delete message.osName;
197121
+ continue;
197122
+ }
197123
+ case 12: {
197124
+ if (wireType !== 2)
197125
+ break;
197126
+ if ((value = reader.string()).length)
197127
+ message.osVersion = value;
197128
+ else
197129
+ delete message.osVersion;
197130
+ continue;
197131
+ }
197132
+ case 13: {
197133
+ if (wireType !== 2)
197134
+ break;
197135
+ message.deviceBrand = reader.string();
197136
+ message._deviceBrand = "deviceBrand";
197137
+ continue;
197138
+ }
197139
+ case 14: {
197140
+ if (wireType !== 2)
197141
+ break;
197142
+ if ((value = reader.string()).length)
197143
+ message.deviceManufacturer = value;
197144
+ else
197145
+ delete message.deviceManufacturer;
197146
+ continue;
197147
+ }
197148
+ case 15: {
197149
+ if (wireType !== 2)
197150
+ break;
197151
+ if ((value = reader.string()).length)
197152
+ message.deviceModel = value;
197153
+ else
197154
+ delete message.deviceModel;
197155
+ continue;
197156
+ }
197157
+ case 16: {
197158
+ if (wireType !== 2)
197159
+ break;
197160
+ if ((value = reader.string()).length)
197161
+ message.carrier = value;
197162
+ else
197163
+ delete message.carrier;
197164
+ continue;
197165
+ }
197166
+ case 17: {
197167
+ if (wireType !== 2)
197168
+ break;
197169
+ if ((value = reader.string()).length)
197170
+ message.language = value;
197171
+ else
197172
+ delete message.language;
197173
+ continue;
197174
+ }
197175
+ case 18: {
197176
+ if (wireType !== 2)
197177
+ break;
197178
+ message.versionName = reader.string();
197179
+ message._versionName = "versionName";
197180
+ continue;
197181
+ }
197182
+ case 19: {
197183
+ if (wireType !== 2)
197184
+ break;
197185
+ message.appVersion = reader.string();
197186
+ message._appVersion = "appVersion";
197187
+ continue;
197188
+ }
197189
+ case 20: {
197190
+ if (wireType !== 2)
197191
+ break;
197192
+ if ((value = reader.string()).length)
197193
+ message.ip = value;
197194
+ else
197195
+ delete message.ip;
197196
+ continue;
197197
+ }
197198
+ case 21: {
197199
+ if (wireType !== 2)
197200
+ break;
197201
+ message.idfv = reader.string();
197202
+ message._idfv = "idfv";
197203
+ continue;
197204
+ }
197205
+ case 22: {
197206
+ if (wireType !== 2)
197207
+ break;
197208
+ message.idfa = reader.string();
197209
+ message._idfa = "idfa";
197210
+ continue;
197211
+ }
197212
+ case 23: {
197213
+ if (wireType !== 2)
197214
+ break;
197215
+ message.adid = reader.string();
197216
+ message._adid = "adid";
197217
+ continue;
197218
+ }
197219
+ case 24: {
197220
+ if (wireType !== 2)
197221
+ break;
197222
+ message.country = reader.string();
197223
+ message._country = "country";
197224
+ continue;
197225
+ }
197226
+ case 25: {
197227
+ if (wireType !== 2)
197228
+ break;
197229
+ message.region = reader.string();
197230
+ message._region = "region";
197231
+ continue;
197232
+ }
197233
+ case 26: {
197234
+ if (wireType !== 2)
197235
+ break;
197236
+ message.city = reader.string();
197237
+ message._city = "city";
197238
+ continue;
197239
+ }
197240
+ case 27: {
197241
+ if (wireType !== 2)
197242
+ break;
197243
+ message.dma = reader.string();
197244
+ message._dma = "dma";
197245
+ continue;
197246
+ }
197247
+ case 28: {
197248
+ if (wireType !== 1)
197249
+ break;
197250
+ message.locationLat = reader.double();
197251
+ message._locationLat = "locationLat";
197252
+ continue;
197253
+ }
197254
+ case 29: {
197255
+ if (wireType !== 1)
197256
+ break;
197257
+ message.locationLng = reader.double();
197258
+ message._locationLng = "locationLng";
197259
+ continue;
197260
+ }
197261
+ case 30: {
197262
+ if (wireType !== 2)
197263
+ break;
197264
+ message.partnerId = reader.string();
197265
+ message._partnerId = "partnerId";
197266
+ continue;
197267
+ }
197268
+ case 31: {
197269
+ if (wireType !== 1)
197270
+ break;
197271
+ message.revenue = reader.double();
197272
+ message._revenue = "revenue";
197273
+ continue;
197274
+ }
197275
+ case 32: {
197276
+ if (wireType !== 2)
197277
+ break;
197278
+ message.revenueType = reader.string();
197279
+ message._revenueType = "revenueType";
197280
+ continue;
197281
+ }
197282
+ case 33: {
197283
+ if (wireType !== 2)
197284
+ break;
197285
+ message.productId = reader.string();
197286
+ message._productId = "productId";
197287
+ continue;
197288
+ }
197289
+ case 34: {
197290
+ if (wireType !== 1)
197291
+ break;
197292
+ message.price = reader.double();
197293
+ message._price = "price";
197294
+ continue;
197295
+ }
197296
+ case 35: {
197297
+ if (wireType !== 0)
197298
+ break;
197299
+ message.quantity = reader.int64();
197300
+ message._quantity = "quantity";
197301
+ continue;
197302
+ }
197303
+ case 36: {
197304
+ if (wireType !== 2)
197305
+ break;
197306
+ if (!(message.eventProperties && message.eventProperties.length))
197307
+ message.eventProperties = [];
197308
+ message.eventProperties.push($root.TaggedCustomField.decode(reader, reader.uint32(), undefined, _depth + 1));
197309
+ continue;
197310
+ }
197311
+ case 37: {
197312
+ if (wireType !== 2)
197313
+ break;
197314
+ if (!(message.userProperties && message.userProperties.length))
197315
+ message.userProperties = [];
197316
+ message.userProperties.push($root.AmplitudeUserPropertyOperation.decode(reader, reader.uint32(), undefined, _depth + 1));
197317
+ continue;
197318
+ }
197319
+ case 38: {
197320
+ if (wireType !== 2)
197321
+ break;
197322
+ if (!(message.groups && message.groups.length))
197323
+ message.groups = [];
197324
+ message.groups.push($root.TaggedCustomField.decode(reader, reader.uint32(), undefined, _depth + 1));
197325
+ continue;
197326
+ }
197327
+ case 39: {
197328
+ if (wireType !== 2)
197329
+ break;
197330
+ if (!(message.groupProperties && message.groupProperties.length))
197331
+ message.groupProperties = [];
197332
+ message.groupProperties.push($root.TaggedCustomField.decode(reader, reader.uint32(), undefined, _depth + 1));
197333
+ continue;
197334
+ }
197335
+ }
197336
+ reader.skipType(wireType, _depth, tag);
197337
+ $util.makeProp(message, "$unknowns", false);
197338
+ (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos));
197339
+ }
197340
+ if (_end !== undefined)
197341
+ throw Error("missing end group");
197342
+ return message;
197343
+ };
197344
+
197345
+ /**
197346
+ * Decodes an AmplitudeProxyEventReceived message from the specified reader or buffer, length delimited.
197347
+ * @function decodeDelimited
197348
+ * @memberof AmplitudeProxyEventReceived
197349
+ * @static
197350
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
197351
+ * @returns {AmplitudeProxyEventReceived & AmplitudeProxyEventReceived.$Shape} AmplitudeProxyEventReceived
197352
+ * @throws {Error} If the payload is not a reader or valid buffer
197353
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
197354
+ */
197355
+ AmplitudeProxyEventReceived.decodeDelimited = function decodeDelimited(reader) {
197356
+ if (!(reader instanceof $Reader))
197357
+ reader = new $Reader(reader);
197358
+ return this.decode(reader, reader.uint32());
197359
+ };
197360
+
197361
+ /**
197362
+ * Verifies an AmplitudeProxyEventReceived message.
197363
+ * @function verify
197364
+ * @memberof AmplitudeProxyEventReceived
197365
+ * @static
197366
+ * @param {Object.<string,*>} message Plain object to verify
197367
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
197368
+ */
197369
+ AmplitudeProxyEventReceived.verify = function verify(message, _depth) {
197370
+ if (typeof message !== "object" || message === null)
197371
+ return "object expected";
197372
+ if (_depth === undefined)
197373
+ _depth = 0;
197374
+ if (_depth > $util.recursionLimit)
197375
+ return "max depth exceeded";
197376
+ var properties = {};
197377
+ if (message.eventType != null && message.hasOwnProperty("eventType"))
197378
+ if (!$util.isString(message.eventType))
197379
+ return "eventType: string expected";
197380
+ if (message.userId != null && message.hasOwnProperty("userId")) {
197381
+ properties._userId = 1;
197382
+ if (!$util.isString(message.userId))
197383
+ return "userId: string expected";
197384
+ }
197385
+ if (message.deviceId != null && message.hasOwnProperty("deviceId"))
197386
+ if (!$util.isString(message.deviceId))
197387
+ return "deviceId: string expected";
197388
+ if (message.time != null && message.hasOwnProperty("time"))
197389
+ if (!$util.isInteger(message.time) && !(message.time && $util.isInteger(message.time.low) && $util.isInteger(message.time.high)))
197390
+ return "time: integer|Long expected";
197391
+ if (message.sessionId != null && message.hasOwnProperty("sessionId"))
197392
+ if (!$util.isInteger(message.sessionId) && !(message.sessionId && $util.isInteger(message.sessionId.low) && $util.isInteger(message.sessionId.high)))
197393
+ return "sessionId: integer|Long expected";
197394
+ if (message.eventId != null && message.hasOwnProperty("eventId"))
197395
+ if (!$util.isInteger(message.eventId) && !(message.eventId && $util.isInteger(message.eventId.low) && $util.isInteger(message.eventId.high)))
197396
+ return "eventId: integer|Long expected";
197397
+ if (message.insertId != null && message.hasOwnProperty("insertId"))
197398
+ if (!$util.isString(message.insertId))
197399
+ return "insertId: string expected";
197400
+ if (message.clientUploadTime != null && message.hasOwnProperty("clientUploadTime"))
197401
+ if (!$util.isInteger(message.clientUploadTime) && !(message.clientUploadTime && $util.isInteger(message.clientUploadTime.low) && $util.isInteger(message.clientUploadTime.high)))
197402
+ return "clientUploadTime: integer|Long expected";
197403
+ if (message.library != null && message.hasOwnProperty("library"))
197404
+ if (!$util.isString(message.library))
197405
+ return "library: string expected";
197406
+ if (message.platform != null && message.hasOwnProperty("platform"))
197407
+ if (!$util.isString(message.platform))
197408
+ return "platform: string expected";
197409
+ if (message.osName != null && message.hasOwnProperty("osName"))
197410
+ if (!$util.isString(message.osName))
197411
+ return "osName: string expected";
197412
+ if (message.osVersion != null && message.hasOwnProperty("osVersion"))
197413
+ if (!$util.isString(message.osVersion))
197414
+ return "osVersion: string expected";
197415
+ if (message.deviceBrand != null && message.hasOwnProperty("deviceBrand")) {
197416
+ properties._deviceBrand = 1;
197417
+ if (!$util.isString(message.deviceBrand))
197418
+ return "deviceBrand: string expected";
197419
+ }
197420
+ if (message.deviceManufacturer != null && message.hasOwnProperty("deviceManufacturer"))
197421
+ if (!$util.isString(message.deviceManufacturer))
197422
+ return "deviceManufacturer: string expected";
197423
+ if (message.deviceModel != null && message.hasOwnProperty("deviceModel"))
197424
+ if (!$util.isString(message.deviceModel))
197425
+ return "deviceModel: string expected";
197426
+ if (message.carrier != null && message.hasOwnProperty("carrier"))
197427
+ if (!$util.isString(message.carrier))
197428
+ return "carrier: string expected";
197429
+ if (message.language != null && message.hasOwnProperty("language"))
197430
+ if (!$util.isString(message.language))
197431
+ return "language: string expected";
197432
+ if (message.versionName != null && message.hasOwnProperty("versionName")) {
197433
+ properties._versionName = 1;
197434
+ if (!$util.isString(message.versionName))
197435
+ return "versionName: string expected";
197436
+ }
197437
+ if (message.appVersion != null && message.hasOwnProperty("appVersion")) {
197438
+ properties._appVersion = 1;
197439
+ if (!$util.isString(message.appVersion))
197440
+ return "appVersion: string expected";
197441
+ }
197442
+ if (message.ip != null && message.hasOwnProperty("ip"))
197443
+ if (!$util.isString(message.ip))
197444
+ return "ip: string expected";
197445
+ if (message.idfv != null && message.hasOwnProperty("idfv")) {
197446
+ properties._idfv = 1;
197447
+ if (!$util.isString(message.idfv))
197448
+ return "idfv: string expected";
197449
+ }
197450
+ if (message.idfa != null && message.hasOwnProperty("idfa")) {
197451
+ properties._idfa = 1;
197452
+ if (!$util.isString(message.idfa))
197453
+ return "idfa: string expected";
197454
+ }
197455
+ if (message.adid != null && message.hasOwnProperty("adid")) {
197456
+ properties._adid = 1;
197457
+ if (!$util.isString(message.adid))
197458
+ return "adid: string expected";
197459
+ }
197460
+ if (message.country != null && message.hasOwnProperty("country")) {
197461
+ properties._country = 1;
197462
+ if (!$util.isString(message.country))
197463
+ return "country: string expected";
197464
+ }
197465
+ if (message.region != null && message.hasOwnProperty("region")) {
197466
+ properties._region = 1;
197467
+ if (!$util.isString(message.region))
197468
+ return "region: string expected";
197469
+ }
197470
+ if (message.city != null && message.hasOwnProperty("city")) {
197471
+ properties._city = 1;
197472
+ if (!$util.isString(message.city))
197473
+ return "city: string expected";
197474
+ }
197475
+ if (message.dma != null && message.hasOwnProperty("dma")) {
197476
+ properties._dma = 1;
197477
+ if (!$util.isString(message.dma))
197478
+ return "dma: string expected";
197479
+ }
197480
+ if (message.locationLat != null && message.hasOwnProperty("locationLat")) {
197481
+ properties._locationLat = 1;
197482
+ if (typeof message.locationLat !== "number")
197483
+ return "locationLat: number expected";
197484
+ }
197485
+ if (message.locationLng != null && message.hasOwnProperty("locationLng")) {
197486
+ properties._locationLng = 1;
197487
+ if (typeof message.locationLng !== "number")
197488
+ return "locationLng: number expected";
197489
+ }
197490
+ if (message.partnerId != null && message.hasOwnProperty("partnerId")) {
197491
+ properties._partnerId = 1;
197492
+ if (!$util.isString(message.partnerId))
197493
+ return "partnerId: string expected";
197494
+ }
197495
+ if (message.revenue != null && message.hasOwnProperty("revenue")) {
197496
+ properties._revenue = 1;
197497
+ if (typeof message.revenue !== "number")
197498
+ return "revenue: number expected";
197499
+ }
197500
+ if (message.revenueType != null && message.hasOwnProperty("revenueType")) {
197501
+ properties._revenueType = 1;
197502
+ if (!$util.isString(message.revenueType))
197503
+ return "revenueType: string expected";
197504
+ }
197505
+ if (message.productId != null && message.hasOwnProperty("productId")) {
197506
+ properties._productId = 1;
197507
+ if (!$util.isString(message.productId))
197508
+ return "productId: string expected";
197509
+ }
197510
+ if (message.price != null && message.hasOwnProperty("price")) {
197511
+ properties._price = 1;
197512
+ if (typeof message.price !== "number")
197513
+ return "price: number expected";
197514
+ }
197515
+ if (message.quantity != null && message.hasOwnProperty("quantity")) {
197516
+ properties._quantity = 1;
197517
+ if (!$util.isInteger(message.quantity) && !(message.quantity && $util.isInteger(message.quantity.low) && $util.isInteger(message.quantity.high)))
197518
+ return "quantity: integer|Long expected";
197519
+ }
197520
+ if (message.eventProperties != null && message.hasOwnProperty("eventProperties")) {
197521
+ if (!Array.isArray(message.eventProperties))
197522
+ return "eventProperties: array expected";
197523
+ for (var i = 0; i < message.eventProperties.length; ++i) {
197524
+ var error = $root.TaggedCustomField.verify(message.eventProperties[i], _depth + 1);
197525
+ if (error)
197526
+ return "eventProperties." + error;
197527
+ }
197528
+ }
197529
+ if (message.userProperties != null && message.hasOwnProperty("userProperties")) {
197530
+ if (!Array.isArray(message.userProperties))
197531
+ return "userProperties: array expected";
197532
+ for (var i = 0; i < message.userProperties.length; ++i) {
197533
+ var error = $root.AmplitudeUserPropertyOperation.verify(message.userProperties[i], _depth + 1);
197534
+ if (error)
197535
+ return "userProperties." + error;
197536
+ }
197537
+ }
197538
+ if (message.groups != null && message.hasOwnProperty("groups")) {
197539
+ if (!Array.isArray(message.groups))
197540
+ return "groups: array expected";
197541
+ for (var i = 0; i < message.groups.length; ++i) {
197542
+ var error = $root.TaggedCustomField.verify(message.groups[i], _depth + 1);
197543
+ if (error)
197544
+ return "groups." + error;
197545
+ }
197546
+ }
197547
+ if (message.groupProperties != null && message.hasOwnProperty("groupProperties")) {
197548
+ if (!Array.isArray(message.groupProperties))
197549
+ return "groupProperties: array expected";
197550
+ for (var i = 0; i < message.groupProperties.length; ++i) {
197551
+ var error = $root.TaggedCustomField.verify(message.groupProperties[i], _depth + 1);
197552
+ if (error)
197553
+ return "groupProperties." + error;
197554
+ }
197555
+ }
197556
+ return null;
197557
+ };
197558
+
197559
+ /**
197560
+ * Creates an AmplitudeProxyEventReceived message from a plain object. Also converts values to their respective internal types.
197561
+ * @function fromObject
197562
+ * @memberof AmplitudeProxyEventReceived
197563
+ * @static
197564
+ * @param {Object.<string,*>} object Plain object
197565
+ * @returns {AmplitudeProxyEventReceived} AmplitudeProxyEventReceived
197566
+ */
197567
+ AmplitudeProxyEventReceived.fromObject = function fromObject(object, _depth) {
197568
+ if (object instanceof $root.AmplitudeProxyEventReceived)
197569
+ return object;
197570
+ if (_depth === undefined)
197571
+ _depth = 0;
197572
+ if (_depth > $util.recursionLimit)
197573
+ throw Error("max depth exceeded");
197574
+ var message = new $root.AmplitudeProxyEventReceived();
197575
+ if (object.eventType != null)
197576
+ if (typeof object.eventType !== "string" || object.eventType.length)
197577
+ message.eventType = String(object.eventType);
197578
+ if (object.userId != null)
197579
+ message.userId = String(object.userId);
197580
+ if (object.deviceId != null)
197581
+ if (typeof object.deviceId !== "string" || object.deviceId.length)
197582
+ message.deviceId = String(object.deviceId);
197583
+ if (object.time != null)
197584
+ if (typeof object.time === "object" ? object.time.low || object.time.high : Number(object.time) !== 0)
197585
+ if ($util.Long)
197586
+ (message.time = $util.Long.fromValue(object.time)).unsigned = true;
197587
+ else if (typeof object.time === "string")
197588
+ message.time = parseInt(object.time, 10);
197589
+ else if (typeof object.time === "number")
197590
+ message.time = object.time;
197591
+ else if (typeof object.time === "object")
197592
+ message.time = new $util.LongBits(object.time.low >>> 0, object.time.high >>> 0).toNumber(true);
197593
+ if (object.sessionId != null)
197594
+ if (typeof object.sessionId === "object" ? object.sessionId.low || object.sessionId.high : Number(object.sessionId) !== 0)
197595
+ if ($util.Long)
197596
+ (message.sessionId = $util.Long.fromValue(object.sessionId)).unsigned = false;
197597
+ else if (typeof object.sessionId === "string")
197598
+ message.sessionId = parseInt(object.sessionId, 10);
197599
+ else if (typeof object.sessionId === "number")
197600
+ message.sessionId = object.sessionId;
197601
+ else if (typeof object.sessionId === "object")
197602
+ message.sessionId = new $util.LongBits(object.sessionId.low >>> 0, object.sessionId.high >>> 0).toNumber();
197603
+ if (object.eventId != null)
197604
+ if (typeof object.eventId === "object" ? object.eventId.low || object.eventId.high : Number(object.eventId) !== 0)
197605
+ if ($util.Long)
197606
+ (message.eventId = $util.Long.fromValue(object.eventId)).unsigned = true;
197607
+ else if (typeof object.eventId === "string")
197608
+ message.eventId = parseInt(object.eventId, 10);
197609
+ else if (typeof object.eventId === "number")
197610
+ message.eventId = object.eventId;
197611
+ else if (typeof object.eventId === "object")
197612
+ message.eventId = new $util.LongBits(object.eventId.low >>> 0, object.eventId.high >>> 0).toNumber(true);
197613
+ if (object.insertId != null)
197614
+ if (typeof object.insertId !== "string" || object.insertId.length)
197615
+ message.insertId = String(object.insertId);
197616
+ if (object.clientUploadTime != null)
197617
+ if (typeof object.clientUploadTime === "object" ? object.clientUploadTime.low || object.clientUploadTime.high : Number(object.clientUploadTime) !== 0)
197618
+ if ($util.Long)
197619
+ (message.clientUploadTime = $util.Long.fromValue(object.clientUploadTime)).unsigned = true;
197620
+ else if (typeof object.clientUploadTime === "string")
197621
+ message.clientUploadTime = parseInt(object.clientUploadTime, 10);
197622
+ else if (typeof object.clientUploadTime === "number")
197623
+ message.clientUploadTime = object.clientUploadTime;
197624
+ else if (typeof object.clientUploadTime === "object")
197625
+ message.clientUploadTime = new $util.LongBits(object.clientUploadTime.low >>> 0, object.clientUploadTime.high >>> 0).toNumber(true);
197626
+ if (object.library != null)
197627
+ if (typeof object.library !== "string" || object.library.length)
197628
+ message.library = String(object.library);
197629
+ if (object.platform != null)
197630
+ if (typeof object.platform !== "string" || object.platform.length)
197631
+ message.platform = String(object.platform);
197632
+ if (object.osName != null)
197633
+ if (typeof object.osName !== "string" || object.osName.length)
197634
+ message.osName = String(object.osName);
197635
+ if (object.osVersion != null)
197636
+ if (typeof object.osVersion !== "string" || object.osVersion.length)
197637
+ message.osVersion = String(object.osVersion);
197638
+ if (object.deviceBrand != null)
197639
+ message.deviceBrand = String(object.deviceBrand);
197640
+ if (object.deviceManufacturer != null)
197641
+ if (typeof object.deviceManufacturer !== "string" || object.deviceManufacturer.length)
197642
+ message.deviceManufacturer = String(object.deviceManufacturer);
197643
+ if (object.deviceModel != null)
197644
+ if (typeof object.deviceModel !== "string" || object.deviceModel.length)
197645
+ message.deviceModel = String(object.deviceModel);
197646
+ if (object.carrier != null)
197647
+ if (typeof object.carrier !== "string" || object.carrier.length)
197648
+ message.carrier = String(object.carrier);
197649
+ if (object.language != null)
197650
+ if (typeof object.language !== "string" || object.language.length)
197651
+ message.language = String(object.language);
197652
+ if (object.versionName != null)
197653
+ message.versionName = String(object.versionName);
197654
+ if (object.appVersion != null)
197655
+ message.appVersion = String(object.appVersion);
197656
+ if (object.ip != null)
197657
+ if (typeof object.ip !== "string" || object.ip.length)
197658
+ message.ip = String(object.ip);
197659
+ if (object.idfv != null)
197660
+ message.idfv = String(object.idfv);
197661
+ if (object.idfa != null)
197662
+ message.idfa = String(object.idfa);
197663
+ if (object.adid != null)
197664
+ message.adid = String(object.adid);
197665
+ if (object.country != null)
197666
+ message.country = String(object.country);
197667
+ if (object.region != null)
197668
+ message.region = String(object.region);
197669
+ if (object.city != null)
197670
+ message.city = String(object.city);
197671
+ if (object.dma != null)
197672
+ message.dma = String(object.dma);
197673
+ if (object.locationLat != null)
197674
+ message.locationLat = Number(object.locationLat);
197675
+ if (object.locationLng != null)
197676
+ message.locationLng = Number(object.locationLng);
197677
+ if (object.partnerId != null)
197678
+ message.partnerId = String(object.partnerId);
197679
+ if (object.revenue != null)
197680
+ message.revenue = Number(object.revenue);
197681
+ if (object.revenueType != null)
197682
+ message.revenueType = String(object.revenueType);
197683
+ if (object.productId != null)
197684
+ message.productId = String(object.productId);
197685
+ if (object.price != null)
197686
+ message.price = Number(object.price);
197687
+ if (object.quantity != null)
197688
+ if ($util.Long)
197689
+ (message.quantity = $util.Long.fromValue(object.quantity)).unsigned = false;
197690
+ else if (typeof object.quantity === "string")
197691
+ message.quantity = parseInt(object.quantity, 10);
197692
+ else if (typeof object.quantity === "number")
197693
+ message.quantity = object.quantity;
197694
+ else if (typeof object.quantity === "object")
197695
+ message.quantity = new $util.LongBits(object.quantity.low >>> 0, object.quantity.high >>> 0).toNumber();
197696
+ if (object.eventProperties) {
197697
+ if (!Array.isArray(object.eventProperties))
197698
+ throw TypeError(".AmplitudeProxyEventReceived.eventProperties: array expected");
197699
+ message.eventProperties = Array(object.eventProperties.length);
197700
+ for (var i = 0; i < object.eventProperties.length; ++i) {
197701
+ if (typeof object.eventProperties[i] !== "object")
197702
+ throw TypeError(".AmplitudeProxyEventReceived.eventProperties: object expected");
197703
+ message.eventProperties[i] = $root.TaggedCustomField.fromObject(object.eventProperties[i], _depth + 1);
197704
+ }
197705
+ }
197706
+ if (object.userProperties) {
197707
+ if (!Array.isArray(object.userProperties))
197708
+ throw TypeError(".AmplitudeProxyEventReceived.userProperties: array expected");
197709
+ message.userProperties = Array(object.userProperties.length);
197710
+ for (var i = 0; i < object.userProperties.length; ++i) {
197711
+ if (typeof object.userProperties[i] !== "object")
197712
+ throw TypeError(".AmplitudeProxyEventReceived.userProperties: object expected");
197713
+ message.userProperties[i] = $root.AmplitudeUserPropertyOperation.fromObject(object.userProperties[i], _depth + 1);
197714
+ }
197715
+ }
197716
+ if (object.groups) {
197717
+ if (!Array.isArray(object.groups))
197718
+ throw TypeError(".AmplitudeProxyEventReceived.groups: array expected");
197719
+ message.groups = Array(object.groups.length);
197720
+ for (var i = 0; i < object.groups.length; ++i) {
197721
+ if (typeof object.groups[i] !== "object")
197722
+ throw TypeError(".AmplitudeProxyEventReceived.groups: object expected");
197723
+ message.groups[i] = $root.TaggedCustomField.fromObject(object.groups[i], _depth + 1);
197724
+ }
197725
+ }
197726
+ if (object.groupProperties) {
197727
+ if (!Array.isArray(object.groupProperties))
197728
+ throw TypeError(".AmplitudeProxyEventReceived.groupProperties: array expected");
197729
+ message.groupProperties = Array(object.groupProperties.length);
197730
+ for (var i = 0; i < object.groupProperties.length; ++i) {
197731
+ if (typeof object.groupProperties[i] !== "object")
197732
+ throw TypeError(".AmplitudeProxyEventReceived.groupProperties: object expected");
197733
+ message.groupProperties[i] = $root.TaggedCustomField.fromObject(object.groupProperties[i], _depth + 1);
197734
+ }
197735
+ }
197736
+ return message;
197737
+ };
197738
+
197739
+ /**
197740
+ * Creates a plain object from an AmplitudeProxyEventReceived message. Also converts values to other types if specified.
197741
+ * @function toObject
197742
+ * @memberof AmplitudeProxyEventReceived
197743
+ * @static
197744
+ * @param {AmplitudeProxyEventReceived} message AmplitudeProxyEventReceived
197745
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
197746
+ * @returns {Object.<string,*>} Plain object
197747
+ */
197748
+ AmplitudeProxyEventReceived.toObject = function toObject(message, options) {
197749
+ if (!options)
197750
+ options = {};
197751
+ var object = {};
197752
+ if (options.arrays || options.defaults) {
197753
+ object.eventProperties = [];
197754
+ object.userProperties = [];
197755
+ object.groups = [];
197756
+ object.groupProperties = [];
197757
+ }
197758
+ if (options.defaults) {
197759
+ object.eventType = "";
197760
+ object.deviceId = "";
197761
+ if ($util.Long) {
197762
+ var long = new $util.Long(0, 0, true);
197763
+ object.time = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long;
197764
+ } else
197765
+ object.time = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0;
197766
+ if ($util.Long) {
197767
+ var long = new $util.Long(0, 0, false);
197768
+ object.sessionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long;
197769
+ } else
197770
+ object.sessionId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0;
197771
+ if ($util.Long) {
197772
+ var long = new $util.Long(0, 0, true);
197773
+ object.eventId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long;
197774
+ } else
197775
+ object.eventId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0;
197776
+ object.insertId = "";
197777
+ if ($util.Long) {
197778
+ var long = new $util.Long(0, 0, true);
197779
+ object.clientUploadTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long;
197780
+ } else
197781
+ object.clientUploadTime = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0;
197782
+ object.library = "";
197783
+ object.platform = "";
197784
+ object.osName = "";
197785
+ object.osVersion = "";
197786
+ object.deviceManufacturer = "";
197787
+ object.deviceModel = "";
197788
+ object.carrier = "";
197789
+ object.language = "";
197790
+ object.ip = "";
197791
+ }
197792
+ if (message.eventType != null && message.hasOwnProperty("eventType"))
197793
+ object.eventType = message.eventType;
197794
+ if (message.userId != null && message.hasOwnProperty("userId")) {
197795
+ object.userId = message.userId;
197796
+ if (options.oneofs)
197797
+ object._userId = "userId";
197798
+ }
197799
+ if (message.deviceId != null && message.hasOwnProperty("deviceId"))
197800
+ object.deviceId = message.deviceId;
197801
+ if (message.time != null && message.hasOwnProperty("time"))
197802
+ if (typeof BigInt !== "undefined" && options.longs === BigInt)
197803
+ object.time = typeof message.time === "number" ? BigInt(message.time) : $util.Long.fromBits(message.time.low >>> 0, message.time.high >>> 0, true).toBigInt();
197804
+ else if (typeof message.time === "number")
197805
+ object.time = options.longs === String ? String(message.time) : message.time;
197806
+ else
197807
+ object.time = options.longs === String ? $util.Long.prototype.toString.call(message.time) : options.longs === Number ? new $util.LongBits(message.time.low >>> 0, message.time.high >>> 0).toNumber(true) : message.time;
197808
+ if (message.sessionId != null && message.hasOwnProperty("sessionId"))
197809
+ if (typeof BigInt !== "undefined" && options.longs === BigInt)
197810
+ object.sessionId = typeof message.sessionId === "number" ? BigInt(message.sessionId) : $util.Long.fromBits(message.sessionId.low >>> 0, message.sessionId.high >>> 0, false).toBigInt();
197811
+ else if (typeof message.sessionId === "number")
197812
+ object.sessionId = options.longs === String ? String(message.sessionId) : message.sessionId;
197813
+ else
197814
+ object.sessionId = options.longs === String ? $util.Long.prototype.toString.call(message.sessionId) : options.longs === Number ? new $util.LongBits(message.sessionId.low >>> 0, message.sessionId.high >>> 0).toNumber() : message.sessionId;
197815
+ if (message.eventId != null && message.hasOwnProperty("eventId"))
197816
+ if (typeof BigInt !== "undefined" && options.longs === BigInt)
197817
+ object.eventId = typeof message.eventId === "number" ? BigInt(message.eventId) : $util.Long.fromBits(message.eventId.low >>> 0, message.eventId.high >>> 0, true).toBigInt();
197818
+ else if (typeof message.eventId === "number")
197819
+ object.eventId = options.longs === String ? String(message.eventId) : message.eventId;
197820
+ else
197821
+ object.eventId = options.longs === String ? $util.Long.prototype.toString.call(message.eventId) : options.longs === Number ? new $util.LongBits(message.eventId.low >>> 0, message.eventId.high >>> 0).toNumber(true) : message.eventId;
197822
+ if (message.insertId != null && message.hasOwnProperty("insertId"))
197823
+ object.insertId = message.insertId;
197824
+ if (message.clientUploadTime != null && message.hasOwnProperty("clientUploadTime"))
197825
+ if (typeof BigInt !== "undefined" && options.longs === BigInt)
197826
+ object.clientUploadTime = typeof message.clientUploadTime === "number" ? BigInt(message.clientUploadTime) : $util.Long.fromBits(message.clientUploadTime.low >>> 0, message.clientUploadTime.high >>> 0, true).toBigInt();
197827
+ else if (typeof message.clientUploadTime === "number")
197828
+ object.clientUploadTime = options.longs === String ? String(message.clientUploadTime) : message.clientUploadTime;
197829
+ else
197830
+ object.clientUploadTime = options.longs === String ? $util.Long.prototype.toString.call(message.clientUploadTime) : options.longs === Number ? new $util.LongBits(message.clientUploadTime.low >>> 0, message.clientUploadTime.high >>> 0).toNumber(true) : message.clientUploadTime;
197831
+ if (message.library != null && message.hasOwnProperty("library"))
197832
+ object.library = message.library;
197833
+ if (message.platform != null && message.hasOwnProperty("platform"))
197834
+ object.platform = message.platform;
197835
+ if (message.osName != null && message.hasOwnProperty("osName"))
197836
+ object.osName = message.osName;
197837
+ if (message.osVersion != null && message.hasOwnProperty("osVersion"))
197838
+ object.osVersion = message.osVersion;
197839
+ if (message.deviceBrand != null && message.hasOwnProperty("deviceBrand")) {
197840
+ object.deviceBrand = message.deviceBrand;
197841
+ if (options.oneofs)
197842
+ object._deviceBrand = "deviceBrand";
197843
+ }
197844
+ if (message.deviceManufacturer != null && message.hasOwnProperty("deviceManufacturer"))
197845
+ object.deviceManufacturer = message.deviceManufacturer;
197846
+ if (message.deviceModel != null && message.hasOwnProperty("deviceModel"))
197847
+ object.deviceModel = message.deviceModel;
197848
+ if (message.carrier != null && message.hasOwnProperty("carrier"))
197849
+ object.carrier = message.carrier;
197850
+ if (message.language != null && message.hasOwnProperty("language"))
197851
+ object.language = message.language;
197852
+ if (message.versionName != null && message.hasOwnProperty("versionName")) {
197853
+ object.versionName = message.versionName;
197854
+ if (options.oneofs)
197855
+ object._versionName = "versionName";
197856
+ }
197857
+ if (message.appVersion != null && message.hasOwnProperty("appVersion")) {
197858
+ object.appVersion = message.appVersion;
197859
+ if (options.oneofs)
197860
+ object._appVersion = "appVersion";
197861
+ }
197862
+ if (message.ip != null && message.hasOwnProperty("ip"))
197863
+ object.ip = message.ip;
197864
+ if (message.idfv != null && message.hasOwnProperty("idfv")) {
197865
+ object.idfv = message.idfv;
197866
+ if (options.oneofs)
197867
+ object._idfv = "idfv";
197868
+ }
197869
+ if (message.idfa != null && message.hasOwnProperty("idfa")) {
197870
+ object.idfa = message.idfa;
197871
+ if (options.oneofs)
197872
+ object._idfa = "idfa";
197873
+ }
197874
+ if (message.adid != null && message.hasOwnProperty("adid")) {
197875
+ object.adid = message.adid;
197876
+ if (options.oneofs)
197877
+ object._adid = "adid";
197878
+ }
197879
+ if (message.country != null && message.hasOwnProperty("country")) {
197880
+ object.country = message.country;
197881
+ if (options.oneofs)
197882
+ object._country = "country";
197883
+ }
197884
+ if (message.region != null && message.hasOwnProperty("region")) {
197885
+ object.region = message.region;
197886
+ if (options.oneofs)
197887
+ object._region = "region";
197888
+ }
197889
+ if (message.city != null && message.hasOwnProperty("city")) {
197890
+ object.city = message.city;
197891
+ if (options.oneofs)
197892
+ object._city = "city";
197893
+ }
197894
+ if (message.dma != null && message.hasOwnProperty("dma")) {
197895
+ object.dma = message.dma;
197896
+ if (options.oneofs)
197897
+ object._dma = "dma";
197898
+ }
197899
+ if (message.locationLat != null && message.hasOwnProperty("locationLat")) {
197900
+ object.locationLat = options.json && !isFinite(message.locationLat) ? String(message.locationLat) : message.locationLat;
197901
+ if (options.oneofs)
197902
+ object._locationLat = "locationLat";
197903
+ }
197904
+ if (message.locationLng != null && message.hasOwnProperty("locationLng")) {
197905
+ object.locationLng = options.json && !isFinite(message.locationLng) ? String(message.locationLng) : message.locationLng;
197906
+ if (options.oneofs)
197907
+ object._locationLng = "locationLng";
197908
+ }
197909
+ if (message.partnerId != null && message.hasOwnProperty("partnerId")) {
197910
+ object.partnerId = message.partnerId;
197911
+ if (options.oneofs)
197912
+ object._partnerId = "partnerId";
197913
+ }
197914
+ if (message.revenue != null && message.hasOwnProperty("revenue")) {
197915
+ object.revenue = options.json && !isFinite(message.revenue) ? String(message.revenue) : message.revenue;
197916
+ if (options.oneofs)
197917
+ object._revenue = "revenue";
197918
+ }
197919
+ if (message.revenueType != null && message.hasOwnProperty("revenueType")) {
197920
+ object.revenueType = message.revenueType;
197921
+ if (options.oneofs)
197922
+ object._revenueType = "revenueType";
197923
+ }
197924
+ if (message.productId != null && message.hasOwnProperty("productId")) {
197925
+ object.productId = message.productId;
197926
+ if (options.oneofs)
197927
+ object._productId = "productId";
197928
+ }
197929
+ if (message.price != null && message.hasOwnProperty("price")) {
197930
+ object.price = options.json && !isFinite(message.price) ? String(message.price) : message.price;
197931
+ if (options.oneofs)
197932
+ object._price = "price";
197933
+ }
197934
+ if (message.quantity != null && message.hasOwnProperty("quantity")) {
197935
+ if (typeof BigInt !== "undefined" && options.longs === BigInt)
197936
+ object.quantity = typeof message.quantity === "number" ? BigInt(message.quantity) : $util.Long.fromBits(message.quantity.low >>> 0, message.quantity.high >>> 0, false).toBigInt();
197937
+ else if (typeof message.quantity === "number")
197938
+ object.quantity = options.longs === String ? String(message.quantity) : message.quantity;
197939
+ else
197940
+ object.quantity = options.longs === String ? $util.Long.prototype.toString.call(message.quantity) : options.longs === Number ? new $util.LongBits(message.quantity.low >>> 0, message.quantity.high >>> 0).toNumber() : message.quantity;
197941
+ if (options.oneofs)
197942
+ object._quantity = "quantity";
197943
+ }
197944
+ if (message.eventProperties && message.eventProperties.length) {
197945
+ object.eventProperties = Array(message.eventProperties.length);
197946
+ for (var j = 0; j < message.eventProperties.length; ++j)
197947
+ object.eventProperties[j] = $root.TaggedCustomField.toObject(message.eventProperties[j], options);
197948
+ }
197949
+ if (message.userProperties && message.userProperties.length) {
197950
+ object.userProperties = Array(message.userProperties.length);
197951
+ for (var j = 0; j < message.userProperties.length; ++j)
197952
+ object.userProperties[j] = $root.AmplitudeUserPropertyOperation.toObject(message.userProperties[j], options);
197953
+ }
197954
+ if (message.groups && message.groups.length) {
197955
+ object.groups = Array(message.groups.length);
197956
+ for (var j = 0; j < message.groups.length; ++j)
197957
+ object.groups[j] = $root.TaggedCustomField.toObject(message.groups[j], options);
197958
+ }
197959
+ if (message.groupProperties && message.groupProperties.length) {
197960
+ object.groupProperties = Array(message.groupProperties.length);
197961
+ for (var j = 0; j < message.groupProperties.length; ++j)
197962
+ object.groupProperties[j] = $root.TaggedCustomField.toObject(message.groupProperties[j], options);
197963
+ }
197964
+ return object;
197965
+ };
197966
+
197967
+ /**
197968
+ * Converts this AmplitudeProxyEventReceived to JSON.
197969
+ * @function toJSON
197970
+ * @memberof AmplitudeProxyEventReceived
197971
+ * @instance
197972
+ * @returns {Object.<string,*>} JSON object
197973
+ */
197974
+ AmplitudeProxyEventReceived.prototype.toJSON = function toJSON() {
197975
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
197976
+ };
197977
+
197978
+ /**
197979
+ * Gets the type url for AmplitudeProxyEventReceived
197980
+ * @function getTypeUrl
197981
+ * @memberof AmplitudeProxyEventReceived
197982
+ * @static
197983
+ * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"`
197984
+ * @returns {string} The type url
197985
+ */
197986
+ AmplitudeProxyEventReceived.getTypeUrl = function getTypeUrl(prefix) {
197987
+ if (prefix === undefined)
197988
+ prefix = "type.googleapis.com";
197989
+ return prefix + "/AmplitudeProxyEventReceived";
197990
+ };
197991
+
197992
+ return AmplitudeProxyEventReceived;
197993
+ })();
197994
+
197995
+ $root.AmplitudeUserPropertyOperation = (function() {
197996
+
197997
+ /**
197998
+ * Properties of an AmplitudeUserPropertyOperation.
197999
+ * @typedef {Object} AmplitudeUserPropertyOperation.$Properties
198000
+ * @property {string|null} [operation] Amplitude identify operation, verbatim. e.g. "$set", "$setOnce", "$add", "$unset".
198001
+ * @property {Array.<TaggedCustomField.$Properties>|null} [properties] Properties the operation applies, encoded like event_properties.
198002
+ * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
198003
+ */
198004
+
198005
+ /**
198006
+ * Properties of an AmplitudeUserPropertyOperation.
198007
+ * @name IAmplitudeUserPropertyOperation
198008
+ * @interface IAmplitudeUserPropertyOperation
198009
+ * @augments AmplitudeUserPropertyOperation.$Properties
198010
+ * @deprecated Use AmplitudeUserPropertyOperation.$Properties instead.
198011
+ */
198012
+
198013
+ /**
198014
+ * Shape of an AmplitudeUserPropertyOperation.
198015
+ * @typedef {AmplitudeUserPropertyOperation.$Properties} AmplitudeUserPropertyOperation.$Shape
198016
+ */
198017
+
198018
+ /**
198019
+ * Constructs a new AmplitudeUserPropertyOperation.
198020
+ * @name AmplitudeUserPropertyOperation
198021
+ * @classdesc Represents an AmplitudeUserPropertyOperation.
198022
+ * @constructor
198023
+ * @param {AmplitudeUserPropertyOperation.$Properties=} [properties] Properties to set
198024
+ * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
198025
+ */
198026
+ function AmplitudeUserPropertyOperation(properties) {
198027
+ this.properties = [];
198028
+ if (properties)
198029
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
198030
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
198031
+ this[keys[i]] = properties[keys[i]];
198032
+ }
198033
+
198034
+ /**
198035
+ * Amplitude identify operation, verbatim. e.g. "$set", "$setOnce", "$add", "$unset".
198036
+ * @member {string} operation
198037
+ * @memberof AmplitudeUserPropertyOperation
198038
+ * @instance
198039
+ */
198040
+ AmplitudeUserPropertyOperation.prototype.operation = "";
198041
+
198042
+ /**
198043
+ * Properties the operation applies, encoded like event_properties.
198044
+ * @member {Array.<TaggedCustomField.$Properties>} properties
198045
+ * @memberof AmplitudeUserPropertyOperation
198046
+ * @instance
198047
+ */
198048
+ AmplitudeUserPropertyOperation.prototype.properties = $util.emptyArray;
198049
+
198050
+ /**
198051
+ * Creates a new AmplitudeUserPropertyOperation instance using the specified properties.
198052
+ * @function create
198053
+ * @memberof AmplitudeUserPropertyOperation
198054
+ * @static
198055
+ * @param {AmplitudeUserPropertyOperation.$Properties=} [properties] Properties to set
198056
+ * @returns {AmplitudeUserPropertyOperation} AmplitudeUserPropertyOperation instance
198057
+ * @type {{
198058
+ * (properties: AmplitudeUserPropertyOperation.$Shape): AmplitudeUserPropertyOperation & AmplitudeUserPropertyOperation.$Shape;
198059
+ * (properties?: AmplitudeUserPropertyOperation.$Properties): AmplitudeUserPropertyOperation;
198060
+ * }}
198061
+ */
198062
+ AmplitudeUserPropertyOperation.create = function create(properties) {
198063
+ return new AmplitudeUserPropertyOperation(properties);
198064
+ };
198065
+
198066
+ /**
198067
+ * Encodes the specified AmplitudeUserPropertyOperation message. Does not implicitly {@link AmplitudeUserPropertyOperation.verify|verify} messages.
198068
+ * @function encode
198069
+ * @memberof AmplitudeUserPropertyOperation
198070
+ * @static
198071
+ * @param {AmplitudeUserPropertyOperation.$Properties} message AmplitudeUserPropertyOperation message or plain object to encode
198072
+ * @param {$protobuf.Writer} [writer] Writer to encode to
198073
+ * @returns {$protobuf.Writer} Writer
198074
+ */
198075
+ AmplitudeUserPropertyOperation.encode = function encode(message, writer) {
198076
+ if (!writer)
198077
+ writer = $Writer.create();
198078
+ if (message.operation != null && Object.hasOwnProperty.call(message, "operation"))
198079
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.operation);
198080
+ if (message.properties != null && message.properties.length)
198081
+ for (var i = 0; i < message.properties.length; ++i)
198082
+ $root.TaggedCustomField.encode(message.properties[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
198083
+ if (message.$unknowns != null && Object.hasOwnProperty.call(message, "$unknowns"))
198084
+ for (var i = 0; i < message.$unknowns.length; ++i)
198085
+ writer.raw(message.$unknowns[i]);
198086
+ return writer;
198087
+ };
198088
+
198089
+ /**
198090
+ * Encodes the specified AmplitudeUserPropertyOperation message, length delimited. Does not implicitly {@link AmplitudeUserPropertyOperation.verify|verify} messages.
198091
+ * @function encodeDelimited
198092
+ * @memberof AmplitudeUserPropertyOperation
198093
+ * @static
198094
+ * @param {AmplitudeUserPropertyOperation.$Properties} message AmplitudeUserPropertyOperation message or plain object to encode
198095
+ * @param {$protobuf.Writer} [writer] Writer to encode to
198096
+ * @returns {$protobuf.Writer} Writer
198097
+ */
198098
+ AmplitudeUserPropertyOperation.encodeDelimited = function encodeDelimited(message, writer) {
198099
+ return this.encode(message, writer).ldelim();
198100
+ };
198101
+
198102
+ /**
198103
+ * Decodes an AmplitudeUserPropertyOperation message from the specified reader or buffer.
198104
+ * @function decode
198105
+ * @memberof AmplitudeUserPropertyOperation
198106
+ * @static
198107
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
198108
+ * @param {number} [length] Message length if known beforehand
198109
+ * @returns {AmplitudeUserPropertyOperation & AmplitudeUserPropertyOperation.$Shape} AmplitudeUserPropertyOperation
198110
+ * @throws {Error} If the payload is not a reader or valid buffer
198111
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
198112
+ */
198113
+ AmplitudeUserPropertyOperation.decode = function decode(reader, length, _end, _depth, _target) {
198114
+ if (!(reader instanceof $Reader))
198115
+ reader = $Reader.create(reader);
198116
+ if (_depth === undefined)
198117
+ _depth = 0;
198118
+ if (_depth > $Reader.recursionLimit)
198119
+ throw Error("max depth exceeded");
198120
+ var end = length === undefined ? reader.len : reader.pos + length, message = _target || new $root.AmplitudeUserPropertyOperation(), value;
198121
+ while (reader.pos < end) {
198122
+ var start = reader.pos;
198123
+ var tag = reader.tag();
198124
+ if (tag === _end) {
198125
+ _end = undefined;
198126
+ break;
198127
+ }
198128
+ var wireType = tag & 7;
198129
+ switch (tag >>>= 3) {
198130
+ case 1: {
198131
+ if (wireType !== 2)
198132
+ break;
198133
+ if ((value = reader.string()).length)
198134
+ message.operation = value;
198135
+ else
198136
+ delete message.operation;
198137
+ continue;
198138
+ }
198139
+ case 2: {
198140
+ if (wireType !== 2)
198141
+ break;
198142
+ if (!(message.properties && message.properties.length))
198143
+ message.properties = [];
198144
+ message.properties.push($root.TaggedCustomField.decode(reader, reader.uint32(), undefined, _depth + 1));
198145
+ continue;
198146
+ }
198147
+ }
198148
+ reader.skipType(wireType, _depth, tag);
198149
+ $util.makeProp(message, "$unknowns", false);
198150
+ (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos));
198151
+ }
198152
+ if (_end !== undefined)
198153
+ throw Error("missing end group");
198154
+ return message;
198155
+ };
198156
+
198157
+ /**
198158
+ * Decodes an AmplitudeUserPropertyOperation message from the specified reader or buffer, length delimited.
198159
+ * @function decodeDelimited
198160
+ * @memberof AmplitudeUserPropertyOperation
198161
+ * @static
198162
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
198163
+ * @returns {AmplitudeUserPropertyOperation & AmplitudeUserPropertyOperation.$Shape} AmplitudeUserPropertyOperation
198164
+ * @throws {Error} If the payload is not a reader or valid buffer
198165
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
198166
+ */
198167
+ AmplitudeUserPropertyOperation.decodeDelimited = function decodeDelimited(reader) {
198168
+ if (!(reader instanceof $Reader))
198169
+ reader = new $Reader(reader);
198170
+ return this.decode(reader, reader.uint32());
198171
+ };
198172
+
198173
+ /**
198174
+ * Verifies an AmplitudeUserPropertyOperation message.
198175
+ * @function verify
198176
+ * @memberof AmplitudeUserPropertyOperation
198177
+ * @static
198178
+ * @param {Object.<string,*>} message Plain object to verify
198179
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
198180
+ */
198181
+ AmplitudeUserPropertyOperation.verify = function verify(message, _depth) {
198182
+ if (typeof message !== "object" || message === null)
198183
+ return "object expected";
198184
+ if (_depth === undefined)
198185
+ _depth = 0;
198186
+ if (_depth > $util.recursionLimit)
198187
+ return "max depth exceeded";
198188
+ if (message.operation != null && message.hasOwnProperty("operation"))
198189
+ if (!$util.isString(message.operation))
198190
+ return "operation: string expected";
198191
+ if (message.properties != null && message.hasOwnProperty("properties")) {
198192
+ if (!Array.isArray(message.properties))
198193
+ return "properties: array expected";
198194
+ for (var i = 0; i < message.properties.length; ++i) {
198195
+ var error = $root.TaggedCustomField.verify(message.properties[i], _depth + 1);
198196
+ if (error)
198197
+ return "properties." + error;
198198
+ }
198199
+ }
198200
+ return null;
198201
+ };
198202
+
198203
+ /**
198204
+ * Creates an AmplitudeUserPropertyOperation message from a plain object. Also converts values to their respective internal types.
198205
+ * @function fromObject
198206
+ * @memberof AmplitudeUserPropertyOperation
198207
+ * @static
198208
+ * @param {Object.<string,*>} object Plain object
198209
+ * @returns {AmplitudeUserPropertyOperation} AmplitudeUserPropertyOperation
198210
+ */
198211
+ AmplitudeUserPropertyOperation.fromObject = function fromObject(object, _depth) {
198212
+ if (object instanceof $root.AmplitudeUserPropertyOperation)
198213
+ return object;
198214
+ if (_depth === undefined)
198215
+ _depth = 0;
198216
+ if (_depth > $util.recursionLimit)
198217
+ throw Error("max depth exceeded");
198218
+ var message = new $root.AmplitudeUserPropertyOperation();
198219
+ if (object.operation != null)
198220
+ if (typeof object.operation !== "string" || object.operation.length)
198221
+ message.operation = String(object.operation);
198222
+ if (object.properties) {
198223
+ if (!Array.isArray(object.properties))
198224
+ throw TypeError(".AmplitudeUserPropertyOperation.properties: array expected");
198225
+ message.properties = Array(object.properties.length);
198226
+ for (var i = 0; i < object.properties.length; ++i) {
198227
+ if (typeof object.properties[i] !== "object")
198228
+ throw TypeError(".AmplitudeUserPropertyOperation.properties: object expected");
198229
+ message.properties[i] = $root.TaggedCustomField.fromObject(object.properties[i], _depth + 1);
198230
+ }
198231
+ }
198232
+ return message;
198233
+ };
198234
+
198235
+ /**
198236
+ * Creates a plain object from an AmplitudeUserPropertyOperation message. Also converts values to other types if specified.
198237
+ * @function toObject
198238
+ * @memberof AmplitudeUserPropertyOperation
198239
+ * @static
198240
+ * @param {AmplitudeUserPropertyOperation} message AmplitudeUserPropertyOperation
198241
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
198242
+ * @returns {Object.<string,*>} Plain object
198243
+ */
198244
+ AmplitudeUserPropertyOperation.toObject = function toObject(message, options) {
198245
+ if (!options)
198246
+ options = {};
198247
+ var object = {};
198248
+ if (options.arrays || options.defaults)
198249
+ object.properties = [];
198250
+ if (options.defaults)
198251
+ object.operation = "";
198252
+ if (message.operation != null && message.hasOwnProperty("operation"))
198253
+ object.operation = message.operation;
198254
+ if (message.properties && message.properties.length) {
198255
+ object.properties = Array(message.properties.length);
198256
+ for (var j = 0; j < message.properties.length; ++j)
198257
+ object.properties[j] = $root.TaggedCustomField.toObject(message.properties[j], options);
198258
+ }
198259
+ return object;
198260
+ };
198261
+
198262
+ /**
198263
+ * Converts this AmplitudeUserPropertyOperation to JSON.
198264
+ * @function toJSON
198265
+ * @memberof AmplitudeUserPropertyOperation
198266
+ * @instance
198267
+ * @returns {Object.<string,*>} JSON object
198268
+ */
198269
+ AmplitudeUserPropertyOperation.prototype.toJSON = function toJSON() {
198270
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
198271
+ };
198272
+
198273
+ /**
198274
+ * Gets the type url for AmplitudeUserPropertyOperation
198275
+ * @function getTypeUrl
198276
+ * @memberof AmplitudeUserPropertyOperation
198277
+ * @static
198278
+ * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"`
198279
+ * @returns {string} The type url
198280
+ */
198281
+ AmplitudeUserPropertyOperation.getTypeUrl = function getTypeUrl(prefix) {
198282
+ if (prefix === undefined)
198283
+ prefix = "type.googleapis.com";
198284
+ return prefix + "/AmplitudeUserPropertyOperation";
198285
+ };
198286
+
198287
+ return AmplitudeUserPropertyOperation;
198288
+ })();
198289
+
198290
+ $root.TaggedCustomField = (function() {
198291
+
198292
+ /**
198293
+ * Properties of a TaggedCustomField.
198294
+ * @typedef {Object} TaggedCustomField.$Properties
198295
+ * @property {string|null} [key] TaggedCustomField key
198296
+ * @property {string|null} [value] TaggedCustomField value
198297
+ * @property {Array.<field_tags.FieldTags>|null} [fieldTags] TaggedCustomField fieldTags
198298
+ * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
198299
+ */
198300
+
198301
+ /**
198302
+ * Properties of a TaggedCustomField.
198303
+ * @name ITaggedCustomField
198304
+ * @interface ITaggedCustomField
198305
+ * @augments TaggedCustomField.$Properties
198306
+ * @deprecated Use TaggedCustomField.$Properties instead.
198307
+ */
198308
+
198309
+ /**
198310
+ * Shape of a TaggedCustomField.
198311
+ * @typedef {TaggedCustomField.$Properties} TaggedCustomField.$Shape
198312
+ */
198313
+
198314
+ /**
198315
+ * Constructs a new TaggedCustomField.
198316
+ * @name TaggedCustomField
198317
+ * @classdesc Represents a TaggedCustomField.
198318
+ * @constructor
198319
+ * @param {TaggedCustomField.$Properties=} [properties] Properties to set
198320
+ * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
198321
+ */
198322
+ function TaggedCustomField(properties) {
198323
+ this.fieldTags = [];
198324
+ if (properties)
198325
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
198326
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
198327
+ this[keys[i]] = properties[keys[i]];
198328
+ }
198329
+
198330
+ /**
198331
+ * TaggedCustomField key.
198332
+ * @member {string} key
198333
+ * @memberof TaggedCustomField
198334
+ * @instance
198335
+ */
198336
+ TaggedCustomField.prototype.key = "";
198337
+
198338
+ /**
198339
+ * TaggedCustomField value.
198340
+ * @member {string} value
198341
+ * @memberof TaggedCustomField
198342
+ * @instance
198343
+ */
198344
+ TaggedCustomField.prototype.value = "";
198345
+
198346
+ /**
198347
+ * TaggedCustomField fieldTags.
198348
+ * @member {Array.<field_tags.FieldTags>} fieldTags
198349
+ * @memberof TaggedCustomField
198350
+ * @instance
198351
+ */
198352
+ TaggedCustomField.prototype.fieldTags = $util.emptyArray;
198353
+
198354
+ /**
198355
+ * Creates a new TaggedCustomField instance using the specified properties.
198356
+ * @function create
198357
+ * @memberof TaggedCustomField
198358
+ * @static
198359
+ * @param {TaggedCustomField.$Properties=} [properties] Properties to set
198360
+ * @returns {TaggedCustomField} TaggedCustomField instance
198361
+ * @type {{
198362
+ * (properties: TaggedCustomField.$Shape): TaggedCustomField & TaggedCustomField.$Shape;
198363
+ * (properties?: TaggedCustomField.$Properties): TaggedCustomField;
198364
+ * }}
198365
+ */
198366
+ TaggedCustomField.create = function create(properties) {
198367
+ return new TaggedCustomField(properties);
198368
+ };
198369
+
198370
+ /**
198371
+ * Encodes the specified TaggedCustomField message. Does not implicitly {@link TaggedCustomField.verify|verify} messages.
198372
+ * @function encode
198373
+ * @memberof TaggedCustomField
198374
+ * @static
198375
+ * @param {TaggedCustomField.$Properties} message TaggedCustomField message or plain object to encode
198376
+ * @param {$protobuf.Writer} [writer] Writer to encode to
198377
+ * @returns {$protobuf.Writer} Writer
198378
+ */
198379
+ TaggedCustomField.encode = function encode(message, writer) {
198380
+ if (!writer)
198381
+ writer = $Writer.create();
198382
+ if (message.key != null && Object.hasOwnProperty.call(message, "key"))
198383
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.key);
198384
+ if (message.value != null && Object.hasOwnProperty.call(message, "value"))
198385
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.value);
198386
+ if (message.fieldTags != null && message.fieldTags.length) {
198387
+ writer.uint32(/* id 3, wireType 2 =*/26).fork();
198388
+ for (var i = 0; i < message.fieldTags.length; ++i)
198389
+ writer.int32(message.fieldTags[i]);
198390
+ writer.ldelim();
198391
+ }
198392
+ if (message.$unknowns != null && Object.hasOwnProperty.call(message, "$unknowns"))
198393
+ for (var i = 0; i < message.$unknowns.length; ++i)
198394
+ writer.raw(message.$unknowns[i]);
198395
+ return writer;
198396
+ };
198397
+
198398
+ /**
198399
+ * Encodes the specified TaggedCustomField message, length delimited. Does not implicitly {@link TaggedCustomField.verify|verify} messages.
198400
+ * @function encodeDelimited
198401
+ * @memberof TaggedCustomField
198402
+ * @static
198403
+ * @param {TaggedCustomField.$Properties} message TaggedCustomField message or plain object to encode
198404
+ * @param {$protobuf.Writer} [writer] Writer to encode to
198405
+ * @returns {$protobuf.Writer} Writer
198406
+ */
198407
+ TaggedCustomField.encodeDelimited = function encodeDelimited(message, writer) {
198408
+ return this.encode(message, writer).ldelim();
198409
+ };
198410
+
198411
+ /**
198412
+ * Decodes a TaggedCustomField message from the specified reader or buffer.
198413
+ * @function decode
198414
+ * @memberof TaggedCustomField
198415
+ * @static
198416
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
198417
+ * @param {number} [length] Message length if known beforehand
198418
+ * @returns {TaggedCustomField & TaggedCustomField.$Shape} TaggedCustomField
198419
+ * @throws {Error} If the payload is not a reader or valid buffer
198420
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
198421
+ */
198422
+ TaggedCustomField.decode = function decode(reader, length, _end, _depth, _target) {
198423
+ if (!(reader instanceof $Reader))
198424
+ reader = $Reader.create(reader);
198425
+ if (_depth === undefined)
198426
+ _depth = 0;
198427
+ if (_depth > $Reader.recursionLimit)
198428
+ throw Error("max depth exceeded");
198429
+ var end = length === undefined ? reader.len : reader.pos + length, message = _target || new $root.TaggedCustomField(), value;
198430
+ while (reader.pos < end) {
198431
+ var start = reader.pos;
198432
+ var tag = reader.tag();
198433
+ if (tag === _end) {
198434
+ _end = undefined;
198435
+ break;
198436
+ }
198437
+ var wireType = tag & 7;
198438
+ switch (tag >>>= 3) {
198439
+ case 1: {
198440
+ if (wireType !== 2)
198441
+ break;
198442
+ if ((value = reader.string()).length)
198443
+ message.key = value;
198444
+ else
198445
+ delete message.key;
198446
+ continue;
198447
+ }
198448
+ case 2: {
198449
+ if (wireType !== 2)
198450
+ break;
198451
+ if ((value = reader.string()).length)
198452
+ message.value = value;
198453
+ else
198454
+ delete message.value;
198455
+ continue;
198456
+ }
198457
+ case 3: {
198458
+ if (wireType === 2) {
198459
+ if (!(message.fieldTags && message.fieldTags.length))
198460
+ message.fieldTags = [];
198461
+ var end2 = reader.uint32() + reader.pos;
198462
+ while (reader.pos < end2)
198463
+ message.fieldTags.push(reader.int32());
198464
+ continue;
198465
+ }
198466
+ if (wireType !== 0)
198467
+ break;
198468
+ if (!(message.fieldTags && message.fieldTags.length))
198469
+ message.fieldTags = [];
198470
+ message.fieldTags.push(reader.int32());
198471
+ continue;
198472
+ }
198473
+ }
198474
+ reader.skipType(wireType, _depth, tag);
198475
+ $util.makeProp(message, "$unknowns", false);
198476
+ (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos));
198477
+ }
198478
+ if (_end !== undefined)
198479
+ throw Error("missing end group");
198480
+ return message;
198481
+ };
198482
+
198483
+ /**
198484
+ * Decodes a TaggedCustomField message from the specified reader or buffer, length delimited.
198485
+ * @function decodeDelimited
198486
+ * @memberof TaggedCustomField
198487
+ * @static
198488
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
198489
+ * @returns {TaggedCustomField & TaggedCustomField.$Shape} TaggedCustomField
198490
+ * @throws {Error} If the payload is not a reader or valid buffer
198491
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
198492
+ */
198493
+ TaggedCustomField.decodeDelimited = function decodeDelimited(reader) {
198494
+ if (!(reader instanceof $Reader))
198495
+ reader = new $Reader(reader);
198496
+ return this.decode(reader, reader.uint32());
198497
+ };
198498
+
198499
+ /**
198500
+ * Verifies a TaggedCustomField message.
198501
+ * @function verify
198502
+ * @memberof TaggedCustomField
198503
+ * @static
198504
+ * @param {Object.<string,*>} message Plain object to verify
198505
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
198506
+ */
198507
+ TaggedCustomField.verify = function verify(message, _depth) {
198508
+ if (typeof message !== "object" || message === null)
198509
+ return "object expected";
198510
+ if (_depth === undefined)
198511
+ _depth = 0;
198512
+ if (_depth > $util.recursionLimit)
198513
+ return "max depth exceeded";
198514
+ if (message.key != null && message.hasOwnProperty("key"))
198515
+ if (!$util.isString(message.key))
198516
+ return "key: string expected";
198517
+ if (message.value != null && message.hasOwnProperty("value"))
198518
+ if (!$util.isString(message.value))
198519
+ return "value: string expected";
198520
+ if (message.fieldTags != null && message.hasOwnProperty("fieldTags")) {
198521
+ if (!Array.isArray(message.fieldTags))
198522
+ return "fieldTags: array expected";
198523
+ for (var i = 0; i < message.fieldTags.length; ++i)
198524
+ switch (message.fieldTags[i]) {
198525
+ default:
198526
+ return "fieldTags: enum value[] expected";
198527
+ case 0:
198528
+ case 1:
198529
+ case 2:
198530
+ case 3:
198531
+ case 4:
198532
+ case 5:
198533
+ case 6:
198534
+ break;
198535
+ }
198536
+ }
198537
+ return null;
198538
+ };
198539
+
198540
+ /**
198541
+ * Creates a TaggedCustomField message from a plain object. Also converts values to their respective internal types.
198542
+ * @function fromObject
198543
+ * @memberof TaggedCustomField
198544
+ * @static
198545
+ * @param {Object.<string,*>} object Plain object
198546
+ * @returns {TaggedCustomField} TaggedCustomField
198547
+ */
198548
+ TaggedCustomField.fromObject = function fromObject(object, _depth) {
198549
+ if (object instanceof $root.TaggedCustomField)
198550
+ return object;
198551
+ if (_depth === undefined)
198552
+ _depth = 0;
198553
+ if (_depth > $util.recursionLimit)
198554
+ throw Error("max depth exceeded");
198555
+ var message = new $root.TaggedCustomField();
198556
+ if (object.key != null)
198557
+ if (typeof object.key !== "string" || object.key.length)
198558
+ message.key = String(object.key);
198559
+ if (object.value != null)
198560
+ if (typeof object.value !== "string" || object.value.length)
198561
+ message.value = String(object.value);
198562
+ if (object.fieldTags) {
198563
+ if (!Array.isArray(object.fieldTags))
198564
+ throw TypeError(".TaggedCustomField.fieldTags: array expected");
198565
+ message.fieldTags = Array(object.fieldTags.length);
198566
+ for (var i = 0; i < object.fieldTags.length; ++i)
198567
+ switch (object.fieldTags[i]) {
198568
+ default:
198569
+ if (typeof object.fieldTags[i] === "number") {
198570
+ message.fieldTags[i] = object.fieldTags[i];
198571
+ break;
198572
+ }
198573
+ case "FIELD_TAGS_UNKNOWN":
198574
+ case 0:
198575
+ message.fieldTags[i] = 0;
198576
+ break;
198577
+ case "FIELD_TAGS_UNSTRUCTURED_HEALTH_INFORMATION":
198578
+ case 1:
198579
+ message.fieldTags[i] = 1;
198580
+ break;
198581
+ case "FIELD_TAGS_EXTERNAL_DIRECT_IDENTIFIER":
198582
+ case 2:
198583
+ message.fieldTags[i] = 2;
198584
+ break;
198585
+ case "FIELD_TAGS_EXTERNAL_INDIRECT_IDENTIFIER":
198586
+ case 3:
198587
+ message.fieldTags[i] = 3;
198588
+ break;
198589
+ case "FIELD_TAGS_INTERNAL_DIRECT_IDENTIFIER":
198590
+ case 4:
198591
+ message.fieldTags[i] = 4;
198592
+ break;
198593
+ case "FIELD_TAGS_INTERNAL_INDIRECT_IDENTIFIER":
198594
+ case 5:
198595
+ message.fieldTags[i] = 5;
198596
+ break;
198597
+ case "FIELD_TAGS_STRUCTURED_HEALTH_INFORMATION":
198598
+ case 6:
198599
+ message.fieldTags[i] = 6;
198600
+ break;
198601
+ }
198602
+ }
198603
+ return message;
198604
+ };
198605
+
198606
+ /**
198607
+ * Creates a plain object from a TaggedCustomField message. Also converts values to other types if specified.
198608
+ * @function toObject
198609
+ * @memberof TaggedCustomField
198610
+ * @static
198611
+ * @param {TaggedCustomField} message TaggedCustomField
198612
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
198613
+ * @returns {Object.<string,*>} Plain object
198614
+ */
198615
+ TaggedCustomField.toObject = function toObject(message, options) {
198616
+ if (!options)
198617
+ options = {};
198618
+ var object = {};
198619
+ if (options.arrays || options.defaults)
198620
+ object.fieldTags = [];
198621
+ if (options.defaults) {
198622
+ object.key = "";
198623
+ object.value = "";
198624
+ }
198625
+ if (message.key != null && message.hasOwnProperty("key"))
198626
+ object.key = message.key;
198627
+ if (message.value != null && message.hasOwnProperty("value"))
198628
+ object.value = message.value;
198629
+ if (message.fieldTags && message.fieldTags.length) {
198630
+ object.fieldTags = Array(message.fieldTags.length);
198631
+ for (var j = 0; j < message.fieldTags.length; ++j)
198632
+ object.fieldTags[j] = options.enums === String ? $root.field_tags.FieldTags[message.fieldTags[j]] === undefined ? message.fieldTags[j] : $root.field_tags.FieldTags[message.fieldTags[j]] : message.fieldTags[j];
198633
+ }
198634
+ return object;
198635
+ };
198636
+
198637
+ /**
198638
+ * Converts this TaggedCustomField to JSON.
198639
+ * @function toJSON
198640
+ * @memberof TaggedCustomField
198641
+ * @instance
198642
+ * @returns {Object.<string,*>} JSON object
198643
+ */
198644
+ TaggedCustomField.prototype.toJSON = function toJSON() {
198645
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
198646
+ };
198647
+
198648
+ /**
198649
+ * Gets the type url for TaggedCustomField
198650
+ * @function getTypeUrl
198651
+ * @memberof TaggedCustomField
198652
+ * @static
198653
+ * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"`
198654
+ * @returns {string} The type url
198655
+ */
198656
+ TaggedCustomField.getTypeUrl = function getTypeUrl(prefix) {
198657
+ if (prefix === undefined)
198658
+ prefix = "type.googleapis.com";
198659
+ return prefix + "/TaggedCustomField";
198660
+ };
198661
+
198662
+ return TaggedCustomField;
198663
+ })();
198664
+
196355
198665
  $root.IosSubscriptionCreated = (function() {
196356
198666
 
196357
198667
  /**
@@ -216497,381 +218807,6 @@ $root.CmsAccessBeneficiaryInfoUpdated = (function() {
216497
218807
  return CmsAccessBeneficiaryInfoUpdated;
216498
218808
  })();
216499
218809
 
216500
- $root.TaggedCustomField = (function() {
216501
-
216502
- /**
216503
- * Properties of a TaggedCustomField.
216504
- * @typedef {Object} TaggedCustomField.$Properties
216505
- * @property {string|null} [key] TaggedCustomField key
216506
- * @property {string|null} [value] TaggedCustomField value
216507
- * @property {Array.<field_tags.FieldTags>|null} [fieldTags] TaggedCustomField fieldTags
216508
- * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
216509
- */
216510
-
216511
- /**
216512
- * Properties of a TaggedCustomField.
216513
- * @name ITaggedCustomField
216514
- * @interface ITaggedCustomField
216515
- * @augments TaggedCustomField.$Properties
216516
- * @deprecated Use TaggedCustomField.$Properties instead.
216517
- */
216518
-
216519
- /**
216520
- * Shape of a TaggedCustomField.
216521
- * @typedef {TaggedCustomField.$Properties} TaggedCustomField.$Shape
216522
- */
216523
-
216524
- /**
216525
- * Constructs a new TaggedCustomField.
216526
- * @name TaggedCustomField
216527
- * @classdesc Represents a TaggedCustomField.
216528
- * @constructor
216529
- * @param {TaggedCustomField.$Properties=} [properties] Properties to set
216530
- * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
216531
- */
216532
- function TaggedCustomField(properties) {
216533
- this.fieldTags = [];
216534
- if (properties)
216535
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
216536
- if (properties[keys[i]] != null && keys[i] !== "__proto__")
216537
- this[keys[i]] = properties[keys[i]];
216538
- }
216539
-
216540
- /**
216541
- * TaggedCustomField key.
216542
- * @member {string} key
216543
- * @memberof TaggedCustomField
216544
- * @instance
216545
- */
216546
- TaggedCustomField.prototype.key = "";
216547
-
216548
- /**
216549
- * TaggedCustomField value.
216550
- * @member {string} value
216551
- * @memberof TaggedCustomField
216552
- * @instance
216553
- */
216554
- TaggedCustomField.prototype.value = "";
216555
-
216556
- /**
216557
- * TaggedCustomField fieldTags.
216558
- * @member {Array.<field_tags.FieldTags>} fieldTags
216559
- * @memberof TaggedCustomField
216560
- * @instance
216561
- */
216562
- TaggedCustomField.prototype.fieldTags = $util.emptyArray;
216563
-
216564
- /**
216565
- * Creates a new TaggedCustomField instance using the specified properties.
216566
- * @function create
216567
- * @memberof TaggedCustomField
216568
- * @static
216569
- * @param {TaggedCustomField.$Properties=} [properties] Properties to set
216570
- * @returns {TaggedCustomField} TaggedCustomField instance
216571
- * @type {{
216572
- * (properties: TaggedCustomField.$Shape): TaggedCustomField & TaggedCustomField.$Shape;
216573
- * (properties?: TaggedCustomField.$Properties): TaggedCustomField;
216574
- * }}
216575
- */
216576
- TaggedCustomField.create = function create(properties) {
216577
- return new TaggedCustomField(properties);
216578
- };
216579
-
216580
- /**
216581
- * Encodes the specified TaggedCustomField message. Does not implicitly {@link TaggedCustomField.verify|verify} messages.
216582
- * @function encode
216583
- * @memberof TaggedCustomField
216584
- * @static
216585
- * @param {TaggedCustomField.$Properties} message TaggedCustomField message or plain object to encode
216586
- * @param {$protobuf.Writer} [writer] Writer to encode to
216587
- * @returns {$protobuf.Writer} Writer
216588
- */
216589
- TaggedCustomField.encode = function encode(message, writer) {
216590
- if (!writer)
216591
- writer = $Writer.create();
216592
- if (message.key != null && Object.hasOwnProperty.call(message, "key"))
216593
- writer.uint32(/* id 1, wireType 2 =*/10).string(message.key);
216594
- if (message.value != null && Object.hasOwnProperty.call(message, "value"))
216595
- writer.uint32(/* id 2, wireType 2 =*/18).string(message.value);
216596
- if (message.fieldTags != null && message.fieldTags.length) {
216597
- writer.uint32(/* id 3, wireType 2 =*/26).fork();
216598
- for (var i = 0; i < message.fieldTags.length; ++i)
216599
- writer.int32(message.fieldTags[i]);
216600
- writer.ldelim();
216601
- }
216602
- if (message.$unknowns != null && Object.hasOwnProperty.call(message, "$unknowns"))
216603
- for (var i = 0; i < message.$unknowns.length; ++i)
216604
- writer.raw(message.$unknowns[i]);
216605
- return writer;
216606
- };
216607
-
216608
- /**
216609
- * Encodes the specified TaggedCustomField message, length delimited. Does not implicitly {@link TaggedCustomField.verify|verify} messages.
216610
- * @function encodeDelimited
216611
- * @memberof TaggedCustomField
216612
- * @static
216613
- * @param {TaggedCustomField.$Properties} message TaggedCustomField message or plain object to encode
216614
- * @param {$protobuf.Writer} [writer] Writer to encode to
216615
- * @returns {$protobuf.Writer} Writer
216616
- */
216617
- TaggedCustomField.encodeDelimited = function encodeDelimited(message, writer) {
216618
- return this.encode(message, writer).ldelim();
216619
- };
216620
-
216621
- /**
216622
- * Decodes a TaggedCustomField message from the specified reader or buffer.
216623
- * @function decode
216624
- * @memberof TaggedCustomField
216625
- * @static
216626
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
216627
- * @param {number} [length] Message length if known beforehand
216628
- * @returns {TaggedCustomField & TaggedCustomField.$Shape} TaggedCustomField
216629
- * @throws {Error} If the payload is not a reader or valid buffer
216630
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
216631
- */
216632
- TaggedCustomField.decode = function decode(reader, length, _end, _depth, _target) {
216633
- if (!(reader instanceof $Reader))
216634
- reader = $Reader.create(reader);
216635
- if (_depth === undefined)
216636
- _depth = 0;
216637
- if (_depth > $Reader.recursionLimit)
216638
- throw Error("max depth exceeded");
216639
- var end = length === undefined ? reader.len : reader.pos + length, message = _target || new $root.TaggedCustomField(), value;
216640
- while (reader.pos < end) {
216641
- var start = reader.pos;
216642
- var tag = reader.tag();
216643
- if (tag === _end) {
216644
- _end = undefined;
216645
- break;
216646
- }
216647
- var wireType = tag & 7;
216648
- switch (tag >>>= 3) {
216649
- case 1: {
216650
- if (wireType !== 2)
216651
- break;
216652
- if ((value = reader.string()).length)
216653
- message.key = value;
216654
- else
216655
- delete message.key;
216656
- continue;
216657
- }
216658
- case 2: {
216659
- if (wireType !== 2)
216660
- break;
216661
- if ((value = reader.string()).length)
216662
- message.value = value;
216663
- else
216664
- delete message.value;
216665
- continue;
216666
- }
216667
- case 3: {
216668
- if (wireType === 2) {
216669
- if (!(message.fieldTags && message.fieldTags.length))
216670
- message.fieldTags = [];
216671
- var end2 = reader.uint32() + reader.pos;
216672
- while (reader.pos < end2)
216673
- message.fieldTags.push(reader.int32());
216674
- continue;
216675
- }
216676
- if (wireType !== 0)
216677
- break;
216678
- if (!(message.fieldTags && message.fieldTags.length))
216679
- message.fieldTags = [];
216680
- message.fieldTags.push(reader.int32());
216681
- continue;
216682
- }
216683
- }
216684
- reader.skipType(wireType, _depth, tag);
216685
- $util.makeProp(message, "$unknowns", false);
216686
- (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos));
216687
- }
216688
- if (_end !== undefined)
216689
- throw Error("missing end group");
216690
- return message;
216691
- };
216692
-
216693
- /**
216694
- * Decodes a TaggedCustomField message from the specified reader or buffer, length delimited.
216695
- * @function decodeDelimited
216696
- * @memberof TaggedCustomField
216697
- * @static
216698
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
216699
- * @returns {TaggedCustomField & TaggedCustomField.$Shape} TaggedCustomField
216700
- * @throws {Error} If the payload is not a reader or valid buffer
216701
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
216702
- */
216703
- TaggedCustomField.decodeDelimited = function decodeDelimited(reader) {
216704
- if (!(reader instanceof $Reader))
216705
- reader = new $Reader(reader);
216706
- return this.decode(reader, reader.uint32());
216707
- };
216708
-
216709
- /**
216710
- * Verifies a TaggedCustomField message.
216711
- * @function verify
216712
- * @memberof TaggedCustomField
216713
- * @static
216714
- * @param {Object.<string,*>} message Plain object to verify
216715
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
216716
- */
216717
- TaggedCustomField.verify = function verify(message, _depth) {
216718
- if (typeof message !== "object" || message === null)
216719
- return "object expected";
216720
- if (_depth === undefined)
216721
- _depth = 0;
216722
- if (_depth > $util.recursionLimit)
216723
- return "max depth exceeded";
216724
- if (message.key != null && message.hasOwnProperty("key"))
216725
- if (!$util.isString(message.key))
216726
- return "key: string expected";
216727
- if (message.value != null && message.hasOwnProperty("value"))
216728
- if (!$util.isString(message.value))
216729
- return "value: string expected";
216730
- if (message.fieldTags != null && message.hasOwnProperty("fieldTags")) {
216731
- if (!Array.isArray(message.fieldTags))
216732
- return "fieldTags: array expected";
216733
- for (var i = 0; i < message.fieldTags.length; ++i)
216734
- switch (message.fieldTags[i]) {
216735
- default:
216736
- return "fieldTags: enum value[] expected";
216737
- case 0:
216738
- case 1:
216739
- case 2:
216740
- case 3:
216741
- case 4:
216742
- case 5:
216743
- case 6:
216744
- break;
216745
- }
216746
- }
216747
- return null;
216748
- };
216749
-
216750
- /**
216751
- * Creates a TaggedCustomField message from a plain object. Also converts values to their respective internal types.
216752
- * @function fromObject
216753
- * @memberof TaggedCustomField
216754
- * @static
216755
- * @param {Object.<string,*>} object Plain object
216756
- * @returns {TaggedCustomField} TaggedCustomField
216757
- */
216758
- TaggedCustomField.fromObject = function fromObject(object, _depth) {
216759
- if (object instanceof $root.TaggedCustomField)
216760
- return object;
216761
- if (_depth === undefined)
216762
- _depth = 0;
216763
- if (_depth > $util.recursionLimit)
216764
- throw Error("max depth exceeded");
216765
- var message = new $root.TaggedCustomField();
216766
- if (object.key != null)
216767
- if (typeof object.key !== "string" || object.key.length)
216768
- message.key = String(object.key);
216769
- if (object.value != null)
216770
- if (typeof object.value !== "string" || object.value.length)
216771
- message.value = String(object.value);
216772
- if (object.fieldTags) {
216773
- if (!Array.isArray(object.fieldTags))
216774
- throw TypeError(".TaggedCustomField.fieldTags: array expected");
216775
- message.fieldTags = Array(object.fieldTags.length);
216776
- for (var i = 0; i < object.fieldTags.length; ++i)
216777
- switch (object.fieldTags[i]) {
216778
- default:
216779
- if (typeof object.fieldTags[i] === "number") {
216780
- message.fieldTags[i] = object.fieldTags[i];
216781
- break;
216782
- }
216783
- case "FIELD_TAGS_UNKNOWN":
216784
- case 0:
216785
- message.fieldTags[i] = 0;
216786
- break;
216787
- case "FIELD_TAGS_UNSTRUCTURED_HEALTH_INFORMATION":
216788
- case 1:
216789
- message.fieldTags[i] = 1;
216790
- break;
216791
- case "FIELD_TAGS_EXTERNAL_DIRECT_IDENTIFIER":
216792
- case 2:
216793
- message.fieldTags[i] = 2;
216794
- break;
216795
- case "FIELD_TAGS_EXTERNAL_INDIRECT_IDENTIFIER":
216796
- case 3:
216797
- message.fieldTags[i] = 3;
216798
- break;
216799
- case "FIELD_TAGS_INTERNAL_DIRECT_IDENTIFIER":
216800
- case 4:
216801
- message.fieldTags[i] = 4;
216802
- break;
216803
- case "FIELD_TAGS_INTERNAL_INDIRECT_IDENTIFIER":
216804
- case 5:
216805
- message.fieldTags[i] = 5;
216806
- break;
216807
- case "FIELD_TAGS_STRUCTURED_HEALTH_INFORMATION":
216808
- case 6:
216809
- message.fieldTags[i] = 6;
216810
- break;
216811
- }
216812
- }
216813
- return message;
216814
- };
216815
-
216816
- /**
216817
- * Creates a plain object from a TaggedCustomField message. Also converts values to other types if specified.
216818
- * @function toObject
216819
- * @memberof TaggedCustomField
216820
- * @static
216821
- * @param {TaggedCustomField} message TaggedCustomField
216822
- * @param {$protobuf.IConversionOptions} [options] Conversion options
216823
- * @returns {Object.<string,*>} Plain object
216824
- */
216825
- TaggedCustomField.toObject = function toObject(message, options) {
216826
- if (!options)
216827
- options = {};
216828
- var object = {};
216829
- if (options.arrays || options.defaults)
216830
- object.fieldTags = [];
216831
- if (options.defaults) {
216832
- object.key = "";
216833
- object.value = "";
216834
- }
216835
- if (message.key != null && message.hasOwnProperty("key"))
216836
- object.key = message.key;
216837
- if (message.value != null && message.hasOwnProperty("value"))
216838
- object.value = message.value;
216839
- if (message.fieldTags && message.fieldTags.length) {
216840
- object.fieldTags = Array(message.fieldTags.length);
216841
- for (var j = 0; j < message.fieldTags.length; ++j)
216842
- object.fieldTags[j] = options.enums === String ? $root.field_tags.FieldTags[message.fieldTags[j]] === undefined ? message.fieldTags[j] : $root.field_tags.FieldTags[message.fieldTags[j]] : message.fieldTags[j];
216843
- }
216844
- return object;
216845
- };
216846
-
216847
- /**
216848
- * Converts this TaggedCustomField to JSON.
216849
- * @function toJSON
216850
- * @memberof TaggedCustomField
216851
- * @instance
216852
- * @returns {Object.<string,*>} JSON object
216853
- */
216854
- TaggedCustomField.prototype.toJSON = function toJSON() {
216855
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
216856
- };
216857
-
216858
- /**
216859
- * Gets the type url for TaggedCustomField
216860
- * @function getTypeUrl
216861
- * @memberof TaggedCustomField
216862
- * @static
216863
- * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"`
216864
- * @returns {string} The type url
216865
- */
216866
- TaggedCustomField.getTypeUrl = function getTypeUrl(prefix) {
216867
- if (prefix === undefined)
216868
- prefix = "type.googleapis.com";
216869
- return prefix + "/TaggedCustomField";
216870
- };
216871
-
216872
- return TaggedCustomField;
216873
- })();
216874
-
216875
218810
  /**
216876
218811
  * GroupType enum.
216877
218812
  * @name GroupType
@@ -266577,6 +268512,7 @@ $root.ClinicalNoteEncounter = (function() {
266577
268512
  * @property {number|Long|null} [encounterStart] ClinicalNoteEncounter encounterStart
266578
268513
  * @property {number|Long|null} [encounterEnd] ClinicalNoteEncounter encounterEnd
266579
268514
  * @property {string|null} [appointmentId] ClinicalNoteEncounter appointmentId
268515
+ * @property {Array.<ClinicalNoteCodeableConcept.$Properties>|null} [reasons] ClinicalNoteEncounter reasons
266580
268516
  * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
266581
268517
  */
266582
268518
 
@@ -266603,6 +268539,7 @@ $root.ClinicalNoteEncounter = (function() {
266603
268539
  */
266604
268540
  function ClinicalNoteEncounter(properties) {
266605
268541
  this.cptCodes = [];
268542
+ this.reasons = [];
266606
268543
  if (properties)
266607
268544
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
266608
268545
  if (properties[keys[i]] != null && keys[i] !== "__proto__")
@@ -266649,6 +268586,14 @@ $root.ClinicalNoteEncounter = (function() {
266649
268586
  */
266650
268587
  ClinicalNoteEncounter.prototype.appointmentId = "";
266651
268588
 
268589
+ /**
268590
+ * ClinicalNoteEncounter reasons.
268591
+ * @member {Array.<ClinicalNoteCodeableConcept.$Properties>} reasons
268592
+ * @memberof ClinicalNoteEncounter
268593
+ * @instance
268594
+ */
268595
+ ClinicalNoteEncounter.prototype.reasons = $util.emptyArray;
268596
+
266652
268597
  /**
266653
268598
  * Creates a new ClinicalNoteEncounter instance using the specified properties.
266654
268599
  * @function create
@@ -266688,6 +268633,9 @@ $root.ClinicalNoteEncounter = (function() {
266688
268633
  writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.encounterEnd);
266689
268634
  if (message.appointmentId != null && Object.hasOwnProperty.call(message, "appointmentId"))
266690
268635
  writer.uint32(/* id 5, wireType 2 =*/42).string(message.appointmentId);
268636
+ if (message.reasons != null && message.reasons.length)
268637
+ for (var i = 0; i < message.reasons.length; ++i)
268638
+ $root.ClinicalNoteCodeableConcept.encode(message.reasons[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
266691
268639
  if (message.$unknowns != null && Object.hasOwnProperty.call(message, "$unknowns"))
266692
268640
  for (var i = 0; i < message.$unknowns.length; ++i)
266693
268641
  writer.raw(message.$unknowns[i]);
@@ -266779,6 +268727,14 @@ $root.ClinicalNoteEncounter = (function() {
266779
268727
  delete message.appointmentId;
266780
268728
  continue;
266781
268729
  }
268730
+ case 6: {
268731
+ if (wireType !== 2)
268732
+ break;
268733
+ if (!(message.reasons && message.reasons.length))
268734
+ message.reasons = [];
268735
+ message.reasons.push($root.ClinicalNoteCodeableConcept.decode(reader, reader.uint32(), undefined, _depth + 1));
268736
+ continue;
268737
+ }
266782
268738
  }
266783
268739
  reader.skipType(wireType, _depth, tag);
266784
268740
  $util.makeProp(message, "$unknowns", false);
@@ -266839,6 +268795,15 @@ $root.ClinicalNoteEncounter = (function() {
266839
268795
  if (message.appointmentId != null && message.hasOwnProperty("appointmentId"))
266840
268796
  if (!$util.isString(message.appointmentId))
266841
268797
  return "appointmentId: string expected";
268798
+ if (message.reasons != null && message.hasOwnProperty("reasons")) {
268799
+ if (!Array.isArray(message.reasons))
268800
+ return "reasons: array expected";
268801
+ for (var i = 0; i < message.reasons.length; ++i) {
268802
+ var error = $root.ClinicalNoteCodeableConcept.verify(message.reasons[i], _depth + 1);
268803
+ if (error)
268804
+ return "reasons." + error;
268805
+ }
268806
+ }
266842
268807
  return null;
266843
268808
  };
266844
268809
 
@@ -266891,6 +268856,16 @@ $root.ClinicalNoteEncounter = (function() {
266891
268856
  if (object.appointmentId != null)
266892
268857
  if (typeof object.appointmentId !== "string" || object.appointmentId.length)
266893
268858
  message.appointmentId = String(object.appointmentId);
268859
+ if (object.reasons) {
268860
+ if (!Array.isArray(object.reasons))
268861
+ throw TypeError(".ClinicalNoteEncounter.reasons: array expected");
268862
+ message.reasons = Array(object.reasons.length);
268863
+ for (var i = 0; i < object.reasons.length; ++i) {
268864
+ if (typeof object.reasons[i] !== "object")
268865
+ throw TypeError(".ClinicalNoteEncounter.reasons: object expected");
268866
+ message.reasons[i] = $root.ClinicalNoteCodeableConcept.fromObject(object.reasons[i], _depth + 1);
268867
+ }
268868
+ }
266894
268869
  return message;
266895
268870
  };
266896
268871
 
@@ -266907,8 +268882,10 @@ $root.ClinicalNoteEncounter = (function() {
266907
268882
  if (!options)
266908
268883
  options = {};
266909
268884
  var object = {};
266910
- if (options.arrays || options.defaults)
268885
+ if (options.arrays || options.defaults) {
266911
268886
  object.cptCodes = [];
268887
+ object.reasons = [];
268888
+ }
266912
268889
  if (options.defaults) {
266913
268890
  object.encounterStatus = "";
266914
268891
  if ($util.Long) {
@@ -266946,6 +268923,11 @@ $root.ClinicalNoteEncounter = (function() {
266946
268923
  object.encounterEnd = options.longs === String ? $util.Long.prototype.toString.call(message.encounterEnd) : options.longs === Number ? new $util.LongBits(message.encounterEnd.low >>> 0, message.encounterEnd.high >>> 0).toNumber(true) : message.encounterEnd;
266947
268924
  if (message.appointmentId != null && message.hasOwnProperty("appointmentId"))
266948
268925
  object.appointmentId = message.appointmentId;
268926
+ if (message.reasons && message.reasons.length) {
268927
+ object.reasons = Array(message.reasons.length);
268928
+ for (var j = 0; j < message.reasons.length; ++j)
268929
+ object.reasons[j] = $root.ClinicalNoteCodeableConcept.toObject(message.reasons[j], options);
268930
+ }
266949
268931
  return object;
266950
268932
  };
266951
268933