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