@headspace/protos-events 1.859.0 → 1.861.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -196352,6 +196352,2316 @@ $root.AmazonPurchaseAmended = (function() {
196352
196352
  return AmazonPurchaseAmended;
196353
196353
  })();
196354
196354
 
196355
+ $root.AmplitudeProxyEventReceived = (function() {
196356
+
196357
+ /**
196358
+ * Properties of an AmplitudeProxyEventReceived.
196359
+ * @typedef {Object} AmplitudeProxyEventReceived.$Properties
196360
+ * @property {string|null} [eventType] Amplitude event name, as sent by the client. e.g. "content view", "screen_viewed", "$identify".
196361
+ * @property {string|null} [userId] Headspace user identifier as sent to Amplitude, e.g. "HSUSER_J80Y450TCLQ8XZ4T6". Unset for logged-out events.
196362
+ * @legacyUserField
196363
+ * @property {string|null} [deviceId] Amplitude device identifier. The HS install ID on Android (e.g. "HSINSTALL_579B011C2D9346D09DE4EB6D44DCB39D"),
196364
+ * the IDFV on iOS.
196365
+ * @property {number|Long|null} [time] Client event time in UTC epoch milliseconds. e.g. 1791477508256.
196366
+ * @property {number|Long|null} [sessionId] Amplitude session start time in UTC epoch milliseconds, used as the session identifier. e.g. 1791477365063.
196367
+ * @property {number|Long|null} [eventId] Client-side sequential event counter. e.g. 6518.
196368
+ * @property {string|null} [insertId] Client-generated deduplication key.
196369
+ * @property {number|Long|null} [clientUploadTime] Time the SDK uploaded the request batch, in UTC epoch milliseconds. Copied from the request body.
196370
+ * @property {string|null} [library] Amplitude SDK library and version. e.g. "amplitude-flutter/4.6.2_amplitude-swift/1.18.6".
196371
+ * @property {string|null} [platform] Client platform. e.g. "iOS", "Android".
196372
+ * @property {string|null} [osName] Operating system name. e.g. "ios", "ipados", "android".
196373
+ * @property {string|null} [osVersion] Operating system version. e.g. "27.0", "16".
196374
+ * @property {string|null} [deviceBrand] Device brand. e.g. "google", "samsung".
196375
+ * @property {string|null} [deviceManufacturer] Device manufacturer. e.g. "Apple", "Google", "samsung".
196376
+ * @property {string|null} [deviceModel] Device model. e.g. "arm64", "SM-A366E".
196377
+ * @property {string|null} [carrier] Mobile carrier name. e.g. "T-Mobile", "Unknown".
196378
+ * @property {string|null} [language] Device language. e.g. "en", "en-US", "en-MX".
196379
+ * @property {string|null} [versionName] Headspace app version. e.g. "8.36.0".
196380
+ * @property {string|null} [appVersion] Amplitude app_version.
196381
+ * @property {string|null} [ip] IP address as sent by the client. Usually "$remote", meaning Amplitude resolves it server-side.
196382
+ * @property {string|null} [idfv] Apple identifier for vendor. e.g. "B9BF801E-204C-492C-B0B6-A58F1A3BA312".
196383
+ * @property {string|null} [idfa] Apple identifier for advertisers.
196384
+ * @property {string|null} [adid] Google advertising identifier. e.g. "a856fd07-5d28-4763-9c6c-fd514ef0b4ac".
196385
+ * @property {string|null} [country] Client-supplied country.
196386
+ * @property {string|null} [region] Client-supplied region.
196387
+ * @property {string|null} [city] Client-supplied city.
196388
+ * @property {string|null} [dma] Client-supplied designated market area.
196389
+ * @property {number|null} [locationLat] Client-supplied latitude.
196390
+ * @property {number|null} [locationLng] Client-supplied longitude.
196391
+ * @property {string|null} [partnerId] Amplitude partner_id.
196392
+ * @property {number|null} [revenue] Revenue amount.
196393
+ * @property {string|null} [revenueType] Revenue type.
196394
+ * @property {string|null} [productId] Product identifier for revenue events.
196395
+ * @property {number|null} [price] Unit price for revenue events.
196396
+ * @property {number|Long|null} [quantity] Quantity for revenue events.
196397
+ * @property {Array.<TaggedCustomField.$Properties>|null} [eventProperties] Amplitude event_properties, one entry per key. String values are copied verbatim; other JSON types are
196398
+ * JSON-encoded (e.g. 8 -> "8", ["a"] -> "[\"a\"]").
196399
+ * @property {Array.<AmplitudeUserPropertyOperation.$Properties>|null} [userProperties] Amplitude user_properties, grouped by identify operation. Sent on "$identify" events.
196400
+ * @property {Array.<TaggedCustomField.$Properties>|null} [groups] Amplitude groups, encoded like event_properties.
196401
+ * @property {Array.<TaggedCustomField.$Properties>|null} [groupProperties] Amplitude group_properties, encoded like event_properties.
196402
+ * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
196403
+ */
196404
+
196405
+ /**
196406
+ * Properties of an AmplitudeProxyEventReceived.
196407
+ * @name IAmplitudeProxyEventReceived
196408
+ * @interface IAmplitudeProxyEventReceived
196409
+ * @augments AmplitudeProxyEventReceived.$Properties
196410
+ * @deprecated Use AmplitudeProxyEventReceived.$Properties instead.
196411
+ */
196412
+
196413
+ /**
196414
+ * Shape of an AmplitudeProxyEventReceived.
196415
+ * @typedef {AmplitudeProxyEventReceived.$Properties} AmplitudeProxyEventReceived.$Shape
196416
+ */
196417
+
196418
+ /**
196419
+ * Constructs a new AmplitudeProxyEventReceived.
196420
+ * @name AmplitudeProxyEventReceived
196421
+ * @classdesc Represents an AmplitudeProxyEventReceived.
196422
+ * @constructor
196423
+ * @param {AmplitudeProxyEventReceived.$Properties=} [properties] Properties to set
196424
+ * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
196425
+ */
196426
+ function AmplitudeProxyEventReceived(properties) {
196427
+ this.eventProperties = [];
196428
+ this.userProperties = [];
196429
+ this.groups = [];
196430
+ this.groupProperties = [];
196431
+ if (properties)
196432
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
196433
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
196434
+ this[keys[i]] = properties[keys[i]];
196435
+ }
196436
+
196437
+ /**
196438
+ * Amplitude event name, as sent by the client. e.g. "content view", "screen_viewed", "$identify".
196439
+ * @member {string} eventType
196440
+ * @memberof AmplitudeProxyEventReceived
196441
+ * @instance
196442
+ */
196443
+ AmplitudeProxyEventReceived.prototype.eventType = "";
196444
+
196445
+ /**
196446
+ * Headspace user identifier as sent to Amplitude, e.g. "HSUSER_J80Y450TCLQ8XZ4T6". Unset for logged-out events.
196447
+ * @legacyUserField
196448
+ * @member {string|null|undefined} userId
196449
+ * @memberof AmplitudeProxyEventReceived
196450
+ * @instance
196451
+ */
196452
+ AmplitudeProxyEventReceived.prototype.userId = null;
196453
+
196454
+ /**
196455
+ * Amplitude device identifier. The HS install ID on Android (e.g. "HSINSTALL_579B011C2D9346D09DE4EB6D44DCB39D"),
196456
+ * the IDFV on iOS.
196457
+ * @member {string} deviceId
196458
+ * @memberof AmplitudeProxyEventReceived
196459
+ * @instance
196460
+ */
196461
+ AmplitudeProxyEventReceived.prototype.deviceId = "";
196462
+
196463
+ /**
196464
+ * Client event time in UTC epoch milliseconds. e.g. 1791477508256.
196465
+ * @member {number|Long} time
196466
+ * @memberof AmplitudeProxyEventReceived
196467
+ * @instance
196468
+ */
196469
+ AmplitudeProxyEventReceived.prototype.time = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
196470
+
196471
+ /**
196472
+ * Amplitude session start time in UTC epoch milliseconds, used as the session identifier. e.g. 1791477365063.
196473
+ * @member {number|Long} sessionId
196474
+ * @memberof AmplitudeProxyEventReceived
196475
+ * @instance
196476
+ */
196477
+ AmplitudeProxyEventReceived.prototype.sessionId = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
196478
+
196479
+ /**
196480
+ * Client-side sequential event counter. e.g. 6518.
196481
+ * @member {number|Long} eventId
196482
+ * @memberof AmplitudeProxyEventReceived
196483
+ * @instance
196484
+ */
196485
+ AmplitudeProxyEventReceived.prototype.eventId = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
196486
+
196487
+ /**
196488
+ * Client-generated deduplication key.
196489
+ * @member {string} insertId
196490
+ * @memberof AmplitudeProxyEventReceived
196491
+ * @instance
196492
+ */
196493
+ AmplitudeProxyEventReceived.prototype.insertId = "";
196494
+
196495
+ /**
196496
+ * Time the SDK uploaded the request batch, in UTC epoch milliseconds. Copied from the request body.
196497
+ * @member {number|Long} clientUploadTime
196498
+ * @memberof AmplitudeProxyEventReceived
196499
+ * @instance
196500
+ */
196501
+ AmplitudeProxyEventReceived.prototype.clientUploadTime = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
196502
+
196503
+ /**
196504
+ * Amplitude SDK library and version. e.g. "amplitude-flutter/4.6.2_amplitude-swift/1.18.6".
196505
+ * @member {string} library
196506
+ * @memberof AmplitudeProxyEventReceived
196507
+ * @instance
196508
+ */
196509
+ AmplitudeProxyEventReceived.prototype.library = "";
196510
+
196511
+ /**
196512
+ * Client platform. e.g. "iOS", "Android".
196513
+ * @member {string} platform
196514
+ * @memberof AmplitudeProxyEventReceived
196515
+ * @instance
196516
+ */
196517
+ AmplitudeProxyEventReceived.prototype.platform = "";
196518
+
196519
+ /**
196520
+ * Operating system name. e.g. "ios", "ipados", "android".
196521
+ * @member {string} osName
196522
+ * @memberof AmplitudeProxyEventReceived
196523
+ * @instance
196524
+ */
196525
+ AmplitudeProxyEventReceived.prototype.osName = "";
196526
+
196527
+ /**
196528
+ * Operating system version. e.g. "27.0", "16".
196529
+ * @member {string} osVersion
196530
+ * @memberof AmplitudeProxyEventReceived
196531
+ * @instance
196532
+ */
196533
+ AmplitudeProxyEventReceived.prototype.osVersion = "";
196534
+
196535
+ /**
196536
+ * Device brand. e.g. "google", "samsung".
196537
+ * @member {string|null|undefined} deviceBrand
196538
+ * @memberof AmplitudeProxyEventReceived
196539
+ * @instance
196540
+ */
196541
+ AmplitudeProxyEventReceived.prototype.deviceBrand = null;
196542
+
196543
+ /**
196544
+ * Device manufacturer. e.g. "Apple", "Google", "samsung".
196545
+ * @member {string} deviceManufacturer
196546
+ * @memberof AmplitudeProxyEventReceived
196547
+ * @instance
196548
+ */
196549
+ AmplitudeProxyEventReceived.prototype.deviceManufacturer = "";
196550
+
196551
+ /**
196552
+ * Device model. e.g. "arm64", "SM-A366E".
196553
+ * @member {string} deviceModel
196554
+ * @memberof AmplitudeProxyEventReceived
196555
+ * @instance
196556
+ */
196557
+ AmplitudeProxyEventReceived.prototype.deviceModel = "";
196558
+
196559
+ /**
196560
+ * Mobile carrier name. e.g. "T-Mobile", "Unknown".
196561
+ * @member {string} carrier
196562
+ * @memberof AmplitudeProxyEventReceived
196563
+ * @instance
196564
+ */
196565
+ AmplitudeProxyEventReceived.prototype.carrier = "";
196566
+
196567
+ /**
196568
+ * Device language. e.g. "en", "en-US", "en-MX".
196569
+ * @member {string} language
196570
+ * @memberof AmplitudeProxyEventReceived
196571
+ * @instance
196572
+ */
196573
+ AmplitudeProxyEventReceived.prototype.language = "";
196574
+
196575
+ /**
196576
+ * Headspace app version. e.g. "8.36.0".
196577
+ * @member {string|null|undefined} versionName
196578
+ * @memberof AmplitudeProxyEventReceived
196579
+ * @instance
196580
+ */
196581
+ AmplitudeProxyEventReceived.prototype.versionName = null;
196582
+
196583
+ /**
196584
+ * Amplitude app_version.
196585
+ * @member {string|null|undefined} appVersion
196586
+ * @memberof AmplitudeProxyEventReceived
196587
+ * @instance
196588
+ */
196589
+ AmplitudeProxyEventReceived.prototype.appVersion = null;
196590
+
196591
+ /**
196592
+ * IP address as sent by the client. Usually "$remote", meaning Amplitude resolves it server-side.
196593
+ * @member {string} ip
196594
+ * @memberof AmplitudeProxyEventReceived
196595
+ * @instance
196596
+ */
196597
+ AmplitudeProxyEventReceived.prototype.ip = "";
196598
+
196599
+ /**
196600
+ * Apple identifier for vendor. e.g. "B9BF801E-204C-492C-B0B6-A58F1A3BA312".
196601
+ * @member {string|null|undefined} idfv
196602
+ * @memberof AmplitudeProxyEventReceived
196603
+ * @instance
196604
+ */
196605
+ AmplitudeProxyEventReceived.prototype.idfv = null;
196606
+
196607
+ /**
196608
+ * Apple identifier for advertisers.
196609
+ * @member {string|null|undefined} idfa
196610
+ * @memberof AmplitudeProxyEventReceived
196611
+ * @instance
196612
+ */
196613
+ AmplitudeProxyEventReceived.prototype.idfa = null;
196614
+
196615
+ /**
196616
+ * Google advertising identifier. e.g. "a856fd07-5d28-4763-9c6c-fd514ef0b4ac".
196617
+ * @member {string|null|undefined} adid
196618
+ * @memberof AmplitudeProxyEventReceived
196619
+ * @instance
196620
+ */
196621
+ AmplitudeProxyEventReceived.prototype.adid = null;
196622
+
196623
+ /**
196624
+ * Client-supplied country.
196625
+ * @member {string|null|undefined} country
196626
+ * @memberof AmplitudeProxyEventReceived
196627
+ * @instance
196628
+ */
196629
+ AmplitudeProxyEventReceived.prototype.country = null;
196630
+
196631
+ /**
196632
+ * Client-supplied region.
196633
+ * @member {string|null|undefined} region
196634
+ * @memberof AmplitudeProxyEventReceived
196635
+ * @instance
196636
+ */
196637
+ AmplitudeProxyEventReceived.prototype.region = null;
196638
+
196639
+ /**
196640
+ * Client-supplied city.
196641
+ * @member {string|null|undefined} city
196642
+ * @memberof AmplitudeProxyEventReceived
196643
+ * @instance
196644
+ */
196645
+ AmplitudeProxyEventReceived.prototype.city = null;
196646
+
196647
+ /**
196648
+ * Client-supplied designated market area.
196649
+ * @member {string|null|undefined} dma
196650
+ * @memberof AmplitudeProxyEventReceived
196651
+ * @instance
196652
+ */
196653
+ AmplitudeProxyEventReceived.prototype.dma = null;
196654
+
196655
+ /**
196656
+ * Client-supplied latitude.
196657
+ * @member {number|null|undefined} locationLat
196658
+ * @memberof AmplitudeProxyEventReceived
196659
+ * @instance
196660
+ */
196661
+ AmplitudeProxyEventReceived.prototype.locationLat = null;
196662
+
196663
+ /**
196664
+ * Client-supplied longitude.
196665
+ * @member {number|null|undefined} locationLng
196666
+ * @memberof AmplitudeProxyEventReceived
196667
+ * @instance
196668
+ */
196669
+ AmplitudeProxyEventReceived.prototype.locationLng = null;
196670
+
196671
+ /**
196672
+ * Amplitude partner_id.
196673
+ * @member {string|null|undefined} partnerId
196674
+ * @memberof AmplitudeProxyEventReceived
196675
+ * @instance
196676
+ */
196677
+ AmplitudeProxyEventReceived.prototype.partnerId = null;
196678
+
196679
+ /**
196680
+ * Revenue amount.
196681
+ * @member {number|null|undefined} revenue
196682
+ * @memberof AmplitudeProxyEventReceived
196683
+ * @instance
196684
+ */
196685
+ AmplitudeProxyEventReceived.prototype.revenue = null;
196686
+
196687
+ /**
196688
+ * Revenue type.
196689
+ * @member {string|null|undefined} revenueType
196690
+ * @memberof AmplitudeProxyEventReceived
196691
+ * @instance
196692
+ */
196693
+ AmplitudeProxyEventReceived.prototype.revenueType = null;
196694
+
196695
+ /**
196696
+ * Product identifier for revenue events.
196697
+ * @member {string|null|undefined} productId
196698
+ * @memberof AmplitudeProxyEventReceived
196699
+ * @instance
196700
+ */
196701
+ AmplitudeProxyEventReceived.prototype.productId = null;
196702
+
196703
+ /**
196704
+ * Unit price for revenue events.
196705
+ * @member {number|null|undefined} price
196706
+ * @memberof AmplitudeProxyEventReceived
196707
+ * @instance
196708
+ */
196709
+ AmplitudeProxyEventReceived.prototype.price = null;
196710
+
196711
+ /**
196712
+ * Quantity for revenue events.
196713
+ * @member {number|Long|null|undefined} quantity
196714
+ * @memberof AmplitudeProxyEventReceived
196715
+ * @instance
196716
+ */
196717
+ AmplitudeProxyEventReceived.prototype.quantity = null;
196718
+
196719
+ /**
196720
+ * Amplitude event_properties, one entry per key. String values are copied verbatim; other JSON types are
196721
+ * JSON-encoded (e.g. 8 -> "8", ["a"] -> "[\"a\"]").
196722
+ * @member {Array.<TaggedCustomField.$Properties>} eventProperties
196723
+ * @memberof AmplitudeProxyEventReceived
196724
+ * @instance
196725
+ */
196726
+ AmplitudeProxyEventReceived.prototype.eventProperties = $util.emptyArray;
196727
+
196728
+ /**
196729
+ * Amplitude user_properties, grouped by identify operation. Sent on "$identify" events.
196730
+ * @member {Array.<AmplitudeUserPropertyOperation.$Properties>} userProperties
196731
+ * @memberof AmplitudeProxyEventReceived
196732
+ * @instance
196733
+ */
196734
+ AmplitudeProxyEventReceived.prototype.userProperties = $util.emptyArray;
196735
+
196736
+ /**
196737
+ * Amplitude groups, encoded like event_properties.
196738
+ * @member {Array.<TaggedCustomField.$Properties>} groups
196739
+ * @memberof AmplitudeProxyEventReceived
196740
+ * @instance
196741
+ */
196742
+ AmplitudeProxyEventReceived.prototype.groups = $util.emptyArray;
196743
+
196744
+ /**
196745
+ * Amplitude group_properties, encoded like event_properties.
196746
+ * @member {Array.<TaggedCustomField.$Properties>} groupProperties
196747
+ * @memberof AmplitudeProxyEventReceived
196748
+ * @instance
196749
+ */
196750
+ AmplitudeProxyEventReceived.prototype.groupProperties = $util.emptyArray;
196751
+
196752
+ // OneOf field names bound to virtual getters and setters
196753
+ var $oneOfFields;
196754
+
196755
+ // Virtual OneOf for proto3 optional field
196756
+ Object.defineProperty(AmplitudeProxyEventReceived.prototype, "_userId", {
196757
+ get: $util.oneOfGetter($oneOfFields = ["userId"]),
196758
+ set: $util.oneOfSetter($oneOfFields)
196759
+ });
196760
+
196761
+ // Virtual OneOf for proto3 optional field
196762
+ Object.defineProperty(AmplitudeProxyEventReceived.prototype, "_deviceBrand", {
196763
+ get: $util.oneOfGetter($oneOfFields = ["deviceBrand"]),
196764
+ set: $util.oneOfSetter($oneOfFields)
196765
+ });
196766
+
196767
+ // Virtual OneOf for proto3 optional field
196768
+ Object.defineProperty(AmplitudeProxyEventReceived.prototype, "_versionName", {
196769
+ get: $util.oneOfGetter($oneOfFields = ["versionName"]),
196770
+ set: $util.oneOfSetter($oneOfFields)
196771
+ });
196772
+
196773
+ // Virtual OneOf for proto3 optional field
196774
+ Object.defineProperty(AmplitudeProxyEventReceived.prototype, "_appVersion", {
196775
+ get: $util.oneOfGetter($oneOfFields = ["appVersion"]),
196776
+ set: $util.oneOfSetter($oneOfFields)
196777
+ });
196778
+
196779
+ // Virtual OneOf for proto3 optional field
196780
+ Object.defineProperty(AmplitudeProxyEventReceived.prototype, "_idfv", {
196781
+ get: $util.oneOfGetter($oneOfFields = ["idfv"]),
196782
+ set: $util.oneOfSetter($oneOfFields)
196783
+ });
196784
+
196785
+ // Virtual OneOf for proto3 optional field
196786
+ Object.defineProperty(AmplitudeProxyEventReceived.prototype, "_idfa", {
196787
+ get: $util.oneOfGetter($oneOfFields = ["idfa"]),
196788
+ set: $util.oneOfSetter($oneOfFields)
196789
+ });
196790
+
196791
+ // Virtual OneOf for proto3 optional field
196792
+ Object.defineProperty(AmplitudeProxyEventReceived.prototype, "_adid", {
196793
+ get: $util.oneOfGetter($oneOfFields = ["adid"]),
196794
+ set: $util.oneOfSetter($oneOfFields)
196795
+ });
196796
+
196797
+ // Virtual OneOf for proto3 optional field
196798
+ Object.defineProperty(AmplitudeProxyEventReceived.prototype, "_country", {
196799
+ get: $util.oneOfGetter($oneOfFields = ["country"]),
196800
+ set: $util.oneOfSetter($oneOfFields)
196801
+ });
196802
+
196803
+ // Virtual OneOf for proto3 optional field
196804
+ Object.defineProperty(AmplitudeProxyEventReceived.prototype, "_region", {
196805
+ get: $util.oneOfGetter($oneOfFields = ["region"]),
196806
+ set: $util.oneOfSetter($oneOfFields)
196807
+ });
196808
+
196809
+ // Virtual OneOf for proto3 optional field
196810
+ Object.defineProperty(AmplitudeProxyEventReceived.prototype, "_city", {
196811
+ get: $util.oneOfGetter($oneOfFields = ["city"]),
196812
+ set: $util.oneOfSetter($oneOfFields)
196813
+ });
196814
+
196815
+ // Virtual OneOf for proto3 optional field
196816
+ Object.defineProperty(AmplitudeProxyEventReceived.prototype, "_dma", {
196817
+ get: $util.oneOfGetter($oneOfFields = ["dma"]),
196818
+ set: $util.oneOfSetter($oneOfFields)
196819
+ });
196820
+
196821
+ // Virtual OneOf for proto3 optional field
196822
+ Object.defineProperty(AmplitudeProxyEventReceived.prototype, "_locationLat", {
196823
+ get: $util.oneOfGetter($oneOfFields = ["locationLat"]),
196824
+ set: $util.oneOfSetter($oneOfFields)
196825
+ });
196826
+
196827
+ // Virtual OneOf for proto3 optional field
196828
+ Object.defineProperty(AmplitudeProxyEventReceived.prototype, "_locationLng", {
196829
+ get: $util.oneOfGetter($oneOfFields = ["locationLng"]),
196830
+ set: $util.oneOfSetter($oneOfFields)
196831
+ });
196832
+
196833
+ // Virtual OneOf for proto3 optional field
196834
+ Object.defineProperty(AmplitudeProxyEventReceived.prototype, "_partnerId", {
196835
+ get: $util.oneOfGetter($oneOfFields = ["partnerId"]),
196836
+ set: $util.oneOfSetter($oneOfFields)
196837
+ });
196838
+
196839
+ // Virtual OneOf for proto3 optional field
196840
+ Object.defineProperty(AmplitudeProxyEventReceived.prototype, "_revenue", {
196841
+ get: $util.oneOfGetter($oneOfFields = ["revenue"]),
196842
+ set: $util.oneOfSetter($oneOfFields)
196843
+ });
196844
+
196845
+ // Virtual OneOf for proto3 optional field
196846
+ Object.defineProperty(AmplitudeProxyEventReceived.prototype, "_revenueType", {
196847
+ get: $util.oneOfGetter($oneOfFields = ["revenueType"]),
196848
+ set: $util.oneOfSetter($oneOfFields)
196849
+ });
196850
+
196851
+ // Virtual OneOf for proto3 optional field
196852
+ Object.defineProperty(AmplitudeProxyEventReceived.prototype, "_productId", {
196853
+ get: $util.oneOfGetter($oneOfFields = ["productId"]),
196854
+ set: $util.oneOfSetter($oneOfFields)
196855
+ });
196856
+
196857
+ // Virtual OneOf for proto3 optional field
196858
+ Object.defineProperty(AmplitudeProxyEventReceived.prototype, "_price", {
196859
+ get: $util.oneOfGetter($oneOfFields = ["price"]),
196860
+ set: $util.oneOfSetter($oneOfFields)
196861
+ });
196862
+
196863
+ // Virtual OneOf for proto3 optional field
196864
+ Object.defineProperty(AmplitudeProxyEventReceived.prototype, "_quantity", {
196865
+ get: $util.oneOfGetter($oneOfFields = ["quantity"]),
196866
+ set: $util.oneOfSetter($oneOfFields)
196867
+ });
196868
+
196869
+ /**
196870
+ * Creates a new AmplitudeProxyEventReceived instance using the specified properties.
196871
+ * @function create
196872
+ * @memberof AmplitudeProxyEventReceived
196873
+ * @static
196874
+ * @param {AmplitudeProxyEventReceived.$Properties=} [properties] Properties to set
196875
+ * @returns {AmplitudeProxyEventReceived} AmplitudeProxyEventReceived instance
196876
+ * @type {{
196877
+ * (properties: AmplitudeProxyEventReceived.$Shape): AmplitudeProxyEventReceived & AmplitudeProxyEventReceived.$Shape;
196878
+ * (properties?: AmplitudeProxyEventReceived.$Properties): AmplitudeProxyEventReceived;
196879
+ * }}
196880
+ */
196881
+ AmplitudeProxyEventReceived.create = function create(properties) {
196882
+ return new AmplitudeProxyEventReceived(properties);
196883
+ };
196884
+
196885
+ /**
196886
+ * Encodes the specified AmplitudeProxyEventReceived message. Does not implicitly {@link AmplitudeProxyEventReceived.verify|verify} messages.
196887
+ * @function encode
196888
+ * @memberof AmplitudeProxyEventReceived
196889
+ * @static
196890
+ * @param {AmplitudeProxyEventReceived.$Properties} message AmplitudeProxyEventReceived message or plain object to encode
196891
+ * @param {$protobuf.Writer} [writer] Writer to encode to
196892
+ * @returns {$protobuf.Writer} Writer
196893
+ */
196894
+ AmplitudeProxyEventReceived.encode = function encode(message, writer) {
196895
+ if (!writer)
196896
+ writer = $Writer.create();
196897
+ if (message.eventType != null && Object.hasOwnProperty.call(message, "eventType"))
196898
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.eventType);
196899
+ if (message.userId != null && Object.hasOwnProperty.call(message, "userId"))
196900
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.userId);
196901
+ if (message.deviceId != null && Object.hasOwnProperty.call(message, "deviceId"))
196902
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.deviceId);
196903
+ if (message.time != null && Object.hasOwnProperty.call(message, "time"))
196904
+ writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.time);
196905
+ if (message.sessionId != null && Object.hasOwnProperty.call(message, "sessionId"))
196906
+ writer.uint32(/* id 5, wireType 0 =*/40).int64(message.sessionId);
196907
+ if (message.eventId != null && Object.hasOwnProperty.call(message, "eventId"))
196908
+ writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.eventId);
196909
+ if (message.insertId != null && Object.hasOwnProperty.call(message, "insertId"))
196910
+ writer.uint32(/* id 7, wireType 2 =*/58).string(message.insertId);
196911
+ if (message.clientUploadTime != null && Object.hasOwnProperty.call(message, "clientUploadTime"))
196912
+ writer.uint32(/* id 8, wireType 0 =*/64).uint64(message.clientUploadTime);
196913
+ if (message.library != null && Object.hasOwnProperty.call(message, "library"))
196914
+ writer.uint32(/* id 9, wireType 2 =*/74).string(message.library);
196915
+ if (message.platform != null && Object.hasOwnProperty.call(message, "platform"))
196916
+ writer.uint32(/* id 10, wireType 2 =*/82).string(message.platform);
196917
+ if (message.osName != null && Object.hasOwnProperty.call(message, "osName"))
196918
+ writer.uint32(/* id 11, wireType 2 =*/90).string(message.osName);
196919
+ if (message.osVersion != null && Object.hasOwnProperty.call(message, "osVersion"))
196920
+ writer.uint32(/* id 12, wireType 2 =*/98).string(message.osVersion);
196921
+ if (message.deviceBrand != null && Object.hasOwnProperty.call(message, "deviceBrand"))
196922
+ writer.uint32(/* id 13, wireType 2 =*/106).string(message.deviceBrand);
196923
+ if (message.deviceManufacturer != null && Object.hasOwnProperty.call(message, "deviceManufacturer"))
196924
+ writer.uint32(/* id 14, wireType 2 =*/114).string(message.deviceManufacturer);
196925
+ if (message.deviceModel != null && Object.hasOwnProperty.call(message, "deviceModel"))
196926
+ writer.uint32(/* id 15, wireType 2 =*/122).string(message.deviceModel);
196927
+ if (message.carrier != null && Object.hasOwnProperty.call(message, "carrier"))
196928
+ writer.uint32(/* id 16, wireType 2 =*/130).string(message.carrier);
196929
+ if (message.language != null && Object.hasOwnProperty.call(message, "language"))
196930
+ writer.uint32(/* id 17, wireType 2 =*/138).string(message.language);
196931
+ if (message.versionName != null && Object.hasOwnProperty.call(message, "versionName"))
196932
+ writer.uint32(/* id 18, wireType 2 =*/146).string(message.versionName);
196933
+ if (message.appVersion != null && Object.hasOwnProperty.call(message, "appVersion"))
196934
+ writer.uint32(/* id 19, wireType 2 =*/154).string(message.appVersion);
196935
+ if (message.ip != null && Object.hasOwnProperty.call(message, "ip"))
196936
+ writer.uint32(/* id 20, wireType 2 =*/162).string(message.ip);
196937
+ if (message.idfv != null && Object.hasOwnProperty.call(message, "idfv"))
196938
+ writer.uint32(/* id 21, wireType 2 =*/170).string(message.idfv);
196939
+ if (message.idfa != null && Object.hasOwnProperty.call(message, "idfa"))
196940
+ writer.uint32(/* id 22, wireType 2 =*/178).string(message.idfa);
196941
+ if (message.adid != null && Object.hasOwnProperty.call(message, "adid"))
196942
+ writer.uint32(/* id 23, wireType 2 =*/186).string(message.adid);
196943
+ if (message.country != null && Object.hasOwnProperty.call(message, "country"))
196944
+ writer.uint32(/* id 24, wireType 2 =*/194).string(message.country);
196945
+ if (message.region != null && Object.hasOwnProperty.call(message, "region"))
196946
+ writer.uint32(/* id 25, wireType 2 =*/202).string(message.region);
196947
+ if (message.city != null && Object.hasOwnProperty.call(message, "city"))
196948
+ writer.uint32(/* id 26, wireType 2 =*/210).string(message.city);
196949
+ if (message.dma != null && Object.hasOwnProperty.call(message, "dma"))
196950
+ writer.uint32(/* id 27, wireType 2 =*/218).string(message.dma);
196951
+ if (message.locationLat != null && Object.hasOwnProperty.call(message, "locationLat"))
196952
+ writer.uint32(/* id 28, wireType 1 =*/225).double(message.locationLat);
196953
+ if (message.locationLng != null && Object.hasOwnProperty.call(message, "locationLng"))
196954
+ writer.uint32(/* id 29, wireType 1 =*/233).double(message.locationLng);
196955
+ if (message.partnerId != null && Object.hasOwnProperty.call(message, "partnerId"))
196956
+ writer.uint32(/* id 30, wireType 2 =*/242).string(message.partnerId);
196957
+ if (message.revenue != null && Object.hasOwnProperty.call(message, "revenue"))
196958
+ writer.uint32(/* id 31, wireType 1 =*/249).double(message.revenue);
196959
+ if (message.revenueType != null && Object.hasOwnProperty.call(message, "revenueType"))
196960
+ writer.uint32(/* id 32, wireType 2 =*/258).string(message.revenueType);
196961
+ if (message.productId != null && Object.hasOwnProperty.call(message, "productId"))
196962
+ writer.uint32(/* id 33, wireType 2 =*/266).string(message.productId);
196963
+ if (message.price != null && Object.hasOwnProperty.call(message, "price"))
196964
+ writer.uint32(/* id 34, wireType 1 =*/273).double(message.price);
196965
+ if (message.quantity != null && Object.hasOwnProperty.call(message, "quantity"))
196966
+ writer.uint32(/* id 35, wireType 0 =*/280).int64(message.quantity);
196967
+ if (message.eventProperties != null && message.eventProperties.length)
196968
+ for (var i = 0; i < message.eventProperties.length; ++i)
196969
+ $root.TaggedCustomField.encode(message.eventProperties[i], writer.uint32(/* id 36, wireType 2 =*/290).fork()).ldelim();
196970
+ if (message.userProperties != null && message.userProperties.length)
196971
+ for (var i = 0; i < message.userProperties.length; ++i)
196972
+ $root.AmplitudeUserPropertyOperation.encode(message.userProperties[i], writer.uint32(/* id 37, wireType 2 =*/298).fork()).ldelim();
196973
+ if (message.groups != null && message.groups.length)
196974
+ for (var i = 0; i < message.groups.length; ++i)
196975
+ $root.TaggedCustomField.encode(message.groups[i], writer.uint32(/* id 38, wireType 2 =*/306).fork()).ldelim();
196976
+ if (message.groupProperties != null && message.groupProperties.length)
196977
+ for (var i = 0; i < message.groupProperties.length; ++i)
196978
+ $root.TaggedCustomField.encode(message.groupProperties[i], writer.uint32(/* id 39, wireType 2 =*/314).fork()).ldelim();
196979
+ if (message.$unknowns != null && Object.hasOwnProperty.call(message, "$unknowns"))
196980
+ for (var i = 0; i < message.$unknowns.length; ++i)
196981
+ writer.raw(message.$unknowns[i]);
196982
+ return writer;
196983
+ };
196984
+
196985
+ /**
196986
+ * Encodes the specified AmplitudeProxyEventReceived message, length delimited. Does not implicitly {@link AmplitudeProxyEventReceived.verify|verify} messages.
196987
+ * @function encodeDelimited
196988
+ * @memberof AmplitudeProxyEventReceived
196989
+ * @static
196990
+ * @param {AmplitudeProxyEventReceived.$Properties} message AmplitudeProxyEventReceived message or plain object to encode
196991
+ * @param {$protobuf.Writer} [writer] Writer to encode to
196992
+ * @returns {$protobuf.Writer} Writer
196993
+ */
196994
+ AmplitudeProxyEventReceived.encodeDelimited = function encodeDelimited(message, writer) {
196995
+ return this.encode(message, writer).ldelim();
196996
+ };
196997
+
196998
+ /**
196999
+ * Decodes an AmplitudeProxyEventReceived message from the specified reader or buffer.
197000
+ * @function decode
197001
+ * @memberof AmplitudeProxyEventReceived
197002
+ * @static
197003
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
197004
+ * @param {number} [length] Message length if known beforehand
197005
+ * @returns {AmplitudeProxyEventReceived & AmplitudeProxyEventReceived.$Shape} AmplitudeProxyEventReceived
197006
+ * @throws {Error} If the payload is not a reader or valid buffer
197007
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
197008
+ */
197009
+ AmplitudeProxyEventReceived.decode = function decode(reader, length, _end, _depth, _target) {
197010
+ if (!(reader instanceof $Reader))
197011
+ reader = $Reader.create(reader);
197012
+ if (_depth === undefined)
197013
+ _depth = 0;
197014
+ if (_depth > $Reader.recursionLimit)
197015
+ throw Error("max depth exceeded");
197016
+ var end = length === undefined ? reader.len : reader.pos + length, message = _target || new $root.AmplitudeProxyEventReceived(), value;
197017
+ while (reader.pos < end) {
197018
+ var start = reader.pos;
197019
+ var tag = reader.tag();
197020
+ if (tag === _end) {
197021
+ _end = undefined;
197022
+ break;
197023
+ }
197024
+ var wireType = tag & 7;
197025
+ switch (tag >>>= 3) {
197026
+ case 1: {
197027
+ if (wireType !== 2)
197028
+ break;
197029
+ if ((value = reader.string()).length)
197030
+ message.eventType = value;
197031
+ else
197032
+ delete message.eventType;
197033
+ continue;
197034
+ }
197035
+ case 2: {
197036
+ if (wireType !== 2)
197037
+ break;
197038
+ message.userId = reader.string();
197039
+ message._userId = "userId";
197040
+ continue;
197041
+ }
197042
+ case 3: {
197043
+ if (wireType !== 2)
197044
+ break;
197045
+ if ((value = reader.string()).length)
197046
+ message.deviceId = value;
197047
+ else
197048
+ delete message.deviceId;
197049
+ continue;
197050
+ }
197051
+ case 4: {
197052
+ if (wireType !== 0)
197053
+ break;
197054
+ if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0)
197055
+ message.time = value;
197056
+ else
197057
+ delete message.time;
197058
+ continue;
197059
+ }
197060
+ case 5: {
197061
+ if (wireType !== 0)
197062
+ break;
197063
+ if (typeof (value = reader.int64()) === "object" ? value.low || value.high : value !== 0)
197064
+ message.sessionId = value;
197065
+ else
197066
+ delete message.sessionId;
197067
+ continue;
197068
+ }
197069
+ case 6: {
197070
+ if (wireType !== 0)
197071
+ break;
197072
+ if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0)
197073
+ message.eventId = value;
197074
+ else
197075
+ delete message.eventId;
197076
+ continue;
197077
+ }
197078
+ case 7: {
197079
+ if (wireType !== 2)
197080
+ break;
197081
+ if ((value = reader.string()).length)
197082
+ message.insertId = value;
197083
+ else
197084
+ delete message.insertId;
197085
+ continue;
197086
+ }
197087
+ case 8: {
197088
+ if (wireType !== 0)
197089
+ break;
197090
+ if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0)
197091
+ message.clientUploadTime = value;
197092
+ else
197093
+ delete message.clientUploadTime;
197094
+ continue;
197095
+ }
197096
+ case 9: {
197097
+ if (wireType !== 2)
197098
+ break;
197099
+ if ((value = reader.string()).length)
197100
+ message.library = value;
197101
+ else
197102
+ delete message.library;
197103
+ continue;
197104
+ }
197105
+ case 10: {
197106
+ if (wireType !== 2)
197107
+ break;
197108
+ if ((value = reader.string()).length)
197109
+ message.platform = value;
197110
+ else
197111
+ delete message.platform;
197112
+ continue;
197113
+ }
197114
+ case 11: {
197115
+ if (wireType !== 2)
197116
+ break;
197117
+ if ((value = reader.string()).length)
197118
+ message.osName = value;
197119
+ else
197120
+ delete message.osName;
197121
+ continue;
197122
+ }
197123
+ case 12: {
197124
+ if (wireType !== 2)
197125
+ break;
197126
+ if ((value = reader.string()).length)
197127
+ message.osVersion = value;
197128
+ else
197129
+ delete message.osVersion;
197130
+ continue;
197131
+ }
197132
+ case 13: {
197133
+ if (wireType !== 2)
197134
+ break;
197135
+ message.deviceBrand = reader.string();
197136
+ message._deviceBrand = "deviceBrand";
197137
+ continue;
197138
+ }
197139
+ case 14: {
197140
+ if (wireType !== 2)
197141
+ break;
197142
+ if ((value = reader.string()).length)
197143
+ message.deviceManufacturer = value;
197144
+ else
197145
+ delete message.deviceManufacturer;
197146
+ continue;
197147
+ }
197148
+ case 15: {
197149
+ if (wireType !== 2)
197150
+ break;
197151
+ if ((value = reader.string()).length)
197152
+ message.deviceModel = value;
197153
+ else
197154
+ delete message.deviceModel;
197155
+ continue;
197156
+ }
197157
+ case 16: {
197158
+ if (wireType !== 2)
197159
+ break;
197160
+ if ((value = reader.string()).length)
197161
+ message.carrier = value;
197162
+ else
197163
+ delete message.carrier;
197164
+ continue;
197165
+ }
197166
+ case 17: {
197167
+ if (wireType !== 2)
197168
+ break;
197169
+ if ((value = reader.string()).length)
197170
+ message.language = value;
197171
+ else
197172
+ delete message.language;
197173
+ continue;
197174
+ }
197175
+ case 18: {
197176
+ if (wireType !== 2)
197177
+ break;
197178
+ message.versionName = reader.string();
197179
+ message._versionName = "versionName";
197180
+ continue;
197181
+ }
197182
+ case 19: {
197183
+ if (wireType !== 2)
197184
+ break;
197185
+ message.appVersion = reader.string();
197186
+ message._appVersion = "appVersion";
197187
+ continue;
197188
+ }
197189
+ case 20: {
197190
+ if (wireType !== 2)
197191
+ break;
197192
+ if ((value = reader.string()).length)
197193
+ message.ip = value;
197194
+ else
197195
+ delete message.ip;
197196
+ continue;
197197
+ }
197198
+ case 21: {
197199
+ if (wireType !== 2)
197200
+ break;
197201
+ message.idfv = reader.string();
197202
+ message._idfv = "idfv";
197203
+ continue;
197204
+ }
197205
+ case 22: {
197206
+ if (wireType !== 2)
197207
+ break;
197208
+ message.idfa = reader.string();
197209
+ message._idfa = "idfa";
197210
+ continue;
197211
+ }
197212
+ case 23: {
197213
+ if (wireType !== 2)
197214
+ break;
197215
+ message.adid = reader.string();
197216
+ message._adid = "adid";
197217
+ continue;
197218
+ }
197219
+ case 24: {
197220
+ if (wireType !== 2)
197221
+ break;
197222
+ message.country = reader.string();
197223
+ message._country = "country";
197224
+ continue;
197225
+ }
197226
+ case 25: {
197227
+ if (wireType !== 2)
197228
+ break;
197229
+ message.region = reader.string();
197230
+ message._region = "region";
197231
+ continue;
197232
+ }
197233
+ case 26: {
197234
+ if (wireType !== 2)
197235
+ break;
197236
+ message.city = reader.string();
197237
+ message._city = "city";
197238
+ continue;
197239
+ }
197240
+ case 27: {
197241
+ if (wireType !== 2)
197242
+ break;
197243
+ message.dma = reader.string();
197244
+ message._dma = "dma";
197245
+ continue;
197246
+ }
197247
+ case 28: {
197248
+ if (wireType !== 1)
197249
+ break;
197250
+ message.locationLat = reader.double();
197251
+ message._locationLat = "locationLat";
197252
+ continue;
197253
+ }
197254
+ case 29: {
197255
+ if (wireType !== 1)
197256
+ break;
197257
+ message.locationLng = reader.double();
197258
+ message._locationLng = "locationLng";
197259
+ continue;
197260
+ }
197261
+ case 30: {
197262
+ if (wireType !== 2)
197263
+ break;
197264
+ message.partnerId = reader.string();
197265
+ message._partnerId = "partnerId";
197266
+ continue;
197267
+ }
197268
+ case 31: {
197269
+ if (wireType !== 1)
197270
+ break;
197271
+ message.revenue = reader.double();
197272
+ message._revenue = "revenue";
197273
+ continue;
197274
+ }
197275
+ case 32: {
197276
+ if (wireType !== 2)
197277
+ break;
197278
+ message.revenueType = reader.string();
197279
+ message._revenueType = "revenueType";
197280
+ continue;
197281
+ }
197282
+ case 33: {
197283
+ if (wireType !== 2)
197284
+ break;
197285
+ message.productId = reader.string();
197286
+ message._productId = "productId";
197287
+ continue;
197288
+ }
197289
+ case 34: {
197290
+ if (wireType !== 1)
197291
+ break;
197292
+ message.price = reader.double();
197293
+ message._price = "price";
197294
+ continue;
197295
+ }
197296
+ case 35: {
197297
+ if (wireType !== 0)
197298
+ break;
197299
+ message.quantity = reader.int64();
197300
+ message._quantity = "quantity";
197301
+ continue;
197302
+ }
197303
+ case 36: {
197304
+ if (wireType !== 2)
197305
+ break;
197306
+ if (!(message.eventProperties && message.eventProperties.length))
197307
+ message.eventProperties = [];
197308
+ message.eventProperties.push($root.TaggedCustomField.decode(reader, reader.uint32(), undefined, _depth + 1));
197309
+ continue;
197310
+ }
197311
+ case 37: {
197312
+ if (wireType !== 2)
197313
+ break;
197314
+ if (!(message.userProperties && message.userProperties.length))
197315
+ message.userProperties = [];
197316
+ message.userProperties.push($root.AmplitudeUserPropertyOperation.decode(reader, reader.uint32(), undefined, _depth + 1));
197317
+ continue;
197318
+ }
197319
+ case 38: {
197320
+ if (wireType !== 2)
197321
+ break;
197322
+ if (!(message.groups && message.groups.length))
197323
+ message.groups = [];
197324
+ message.groups.push($root.TaggedCustomField.decode(reader, reader.uint32(), undefined, _depth + 1));
197325
+ continue;
197326
+ }
197327
+ case 39: {
197328
+ if (wireType !== 2)
197329
+ break;
197330
+ if (!(message.groupProperties && message.groupProperties.length))
197331
+ message.groupProperties = [];
197332
+ message.groupProperties.push($root.TaggedCustomField.decode(reader, reader.uint32(), undefined, _depth + 1));
197333
+ continue;
197334
+ }
197335
+ }
197336
+ reader.skipType(wireType, _depth, tag);
197337
+ $util.makeProp(message, "$unknowns", false);
197338
+ (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos));
197339
+ }
197340
+ if (_end !== undefined)
197341
+ throw Error("missing end group");
197342
+ return message;
197343
+ };
197344
+
197345
+ /**
197346
+ * Decodes an AmplitudeProxyEventReceived message from the specified reader or buffer, length delimited.
197347
+ * @function decodeDelimited
197348
+ * @memberof AmplitudeProxyEventReceived
197349
+ * @static
197350
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
197351
+ * @returns {AmplitudeProxyEventReceived & AmplitudeProxyEventReceived.$Shape} AmplitudeProxyEventReceived
197352
+ * @throws {Error} If the payload is not a reader or valid buffer
197353
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
197354
+ */
197355
+ AmplitudeProxyEventReceived.decodeDelimited = function decodeDelimited(reader) {
197356
+ if (!(reader instanceof $Reader))
197357
+ reader = new $Reader(reader);
197358
+ return this.decode(reader, reader.uint32());
197359
+ };
197360
+
197361
+ /**
197362
+ * Verifies an AmplitudeProxyEventReceived message.
197363
+ * @function verify
197364
+ * @memberof AmplitudeProxyEventReceived
197365
+ * @static
197366
+ * @param {Object.<string,*>} message Plain object to verify
197367
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
197368
+ */
197369
+ AmplitudeProxyEventReceived.verify = function verify(message, _depth) {
197370
+ if (typeof message !== "object" || message === null)
197371
+ return "object expected";
197372
+ if (_depth === undefined)
197373
+ _depth = 0;
197374
+ if (_depth > $util.recursionLimit)
197375
+ return "max depth exceeded";
197376
+ var properties = {};
197377
+ if (message.eventType != null && message.hasOwnProperty("eventType"))
197378
+ if (!$util.isString(message.eventType))
197379
+ return "eventType: string expected";
197380
+ if (message.userId != null && message.hasOwnProperty("userId")) {
197381
+ properties._userId = 1;
197382
+ if (!$util.isString(message.userId))
197383
+ return "userId: string expected";
197384
+ }
197385
+ if (message.deviceId != null && message.hasOwnProperty("deviceId"))
197386
+ if (!$util.isString(message.deviceId))
197387
+ return "deviceId: string expected";
197388
+ if (message.time != null && message.hasOwnProperty("time"))
197389
+ if (!$util.isInteger(message.time) && !(message.time && $util.isInteger(message.time.low) && $util.isInteger(message.time.high)))
197390
+ return "time: integer|Long expected";
197391
+ if (message.sessionId != null && message.hasOwnProperty("sessionId"))
197392
+ if (!$util.isInteger(message.sessionId) && !(message.sessionId && $util.isInteger(message.sessionId.low) && $util.isInteger(message.sessionId.high)))
197393
+ return "sessionId: integer|Long expected";
197394
+ if (message.eventId != null && message.hasOwnProperty("eventId"))
197395
+ if (!$util.isInteger(message.eventId) && !(message.eventId && $util.isInteger(message.eventId.low) && $util.isInteger(message.eventId.high)))
197396
+ return "eventId: integer|Long expected";
197397
+ if (message.insertId != null && message.hasOwnProperty("insertId"))
197398
+ if (!$util.isString(message.insertId))
197399
+ return "insertId: string expected";
197400
+ if (message.clientUploadTime != null && message.hasOwnProperty("clientUploadTime"))
197401
+ if (!$util.isInteger(message.clientUploadTime) && !(message.clientUploadTime && $util.isInteger(message.clientUploadTime.low) && $util.isInteger(message.clientUploadTime.high)))
197402
+ return "clientUploadTime: integer|Long expected";
197403
+ if (message.library != null && message.hasOwnProperty("library"))
197404
+ if (!$util.isString(message.library))
197405
+ return "library: string expected";
197406
+ if (message.platform != null && message.hasOwnProperty("platform"))
197407
+ if (!$util.isString(message.platform))
197408
+ return "platform: string expected";
197409
+ if (message.osName != null && message.hasOwnProperty("osName"))
197410
+ if (!$util.isString(message.osName))
197411
+ return "osName: string expected";
197412
+ if (message.osVersion != null && message.hasOwnProperty("osVersion"))
197413
+ if (!$util.isString(message.osVersion))
197414
+ return "osVersion: string expected";
197415
+ if (message.deviceBrand != null && message.hasOwnProperty("deviceBrand")) {
197416
+ properties._deviceBrand = 1;
197417
+ if (!$util.isString(message.deviceBrand))
197418
+ return "deviceBrand: string expected";
197419
+ }
197420
+ if (message.deviceManufacturer != null && message.hasOwnProperty("deviceManufacturer"))
197421
+ if (!$util.isString(message.deviceManufacturer))
197422
+ return "deviceManufacturer: string expected";
197423
+ if (message.deviceModel != null && message.hasOwnProperty("deviceModel"))
197424
+ if (!$util.isString(message.deviceModel))
197425
+ return "deviceModel: string expected";
197426
+ if (message.carrier != null && message.hasOwnProperty("carrier"))
197427
+ if (!$util.isString(message.carrier))
197428
+ return "carrier: string expected";
197429
+ if (message.language != null && message.hasOwnProperty("language"))
197430
+ if (!$util.isString(message.language))
197431
+ return "language: string expected";
197432
+ if (message.versionName != null && message.hasOwnProperty("versionName")) {
197433
+ properties._versionName = 1;
197434
+ if (!$util.isString(message.versionName))
197435
+ return "versionName: string expected";
197436
+ }
197437
+ if (message.appVersion != null && message.hasOwnProperty("appVersion")) {
197438
+ properties._appVersion = 1;
197439
+ if (!$util.isString(message.appVersion))
197440
+ return "appVersion: string expected";
197441
+ }
197442
+ if (message.ip != null && message.hasOwnProperty("ip"))
197443
+ if (!$util.isString(message.ip))
197444
+ return "ip: string expected";
197445
+ if (message.idfv != null && message.hasOwnProperty("idfv")) {
197446
+ properties._idfv = 1;
197447
+ if (!$util.isString(message.idfv))
197448
+ return "idfv: string expected";
197449
+ }
197450
+ if (message.idfa != null && message.hasOwnProperty("idfa")) {
197451
+ properties._idfa = 1;
197452
+ if (!$util.isString(message.idfa))
197453
+ return "idfa: string expected";
197454
+ }
197455
+ if (message.adid != null && message.hasOwnProperty("adid")) {
197456
+ properties._adid = 1;
197457
+ if (!$util.isString(message.adid))
197458
+ return "adid: string expected";
197459
+ }
197460
+ if (message.country != null && message.hasOwnProperty("country")) {
197461
+ properties._country = 1;
197462
+ if (!$util.isString(message.country))
197463
+ return "country: string expected";
197464
+ }
197465
+ if (message.region != null && message.hasOwnProperty("region")) {
197466
+ properties._region = 1;
197467
+ if (!$util.isString(message.region))
197468
+ return "region: string expected";
197469
+ }
197470
+ if (message.city != null && message.hasOwnProperty("city")) {
197471
+ properties._city = 1;
197472
+ if (!$util.isString(message.city))
197473
+ return "city: string expected";
197474
+ }
197475
+ if (message.dma != null && message.hasOwnProperty("dma")) {
197476
+ properties._dma = 1;
197477
+ if (!$util.isString(message.dma))
197478
+ return "dma: string expected";
197479
+ }
197480
+ if (message.locationLat != null && message.hasOwnProperty("locationLat")) {
197481
+ properties._locationLat = 1;
197482
+ if (typeof message.locationLat !== "number")
197483
+ return "locationLat: number expected";
197484
+ }
197485
+ if (message.locationLng != null && message.hasOwnProperty("locationLng")) {
197486
+ properties._locationLng = 1;
197487
+ if (typeof message.locationLng !== "number")
197488
+ return "locationLng: number expected";
197489
+ }
197490
+ if (message.partnerId != null && message.hasOwnProperty("partnerId")) {
197491
+ properties._partnerId = 1;
197492
+ if (!$util.isString(message.partnerId))
197493
+ return "partnerId: string expected";
197494
+ }
197495
+ if (message.revenue != null && message.hasOwnProperty("revenue")) {
197496
+ properties._revenue = 1;
197497
+ if (typeof message.revenue !== "number")
197498
+ return "revenue: number expected";
197499
+ }
197500
+ if (message.revenueType != null && message.hasOwnProperty("revenueType")) {
197501
+ properties._revenueType = 1;
197502
+ if (!$util.isString(message.revenueType))
197503
+ return "revenueType: string expected";
197504
+ }
197505
+ if (message.productId != null && message.hasOwnProperty("productId")) {
197506
+ properties._productId = 1;
197507
+ if (!$util.isString(message.productId))
197508
+ return "productId: string expected";
197509
+ }
197510
+ if (message.price != null && message.hasOwnProperty("price")) {
197511
+ properties._price = 1;
197512
+ if (typeof message.price !== "number")
197513
+ return "price: number expected";
197514
+ }
197515
+ if (message.quantity != null && message.hasOwnProperty("quantity")) {
197516
+ properties._quantity = 1;
197517
+ if (!$util.isInteger(message.quantity) && !(message.quantity && $util.isInteger(message.quantity.low) && $util.isInteger(message.quantity.high)))
197518
+ return "quantity: integer|Long expected";
197519
+ }
197520
+ if (message.eventProperties != null && message.hasOwnProperty("eventProperties")) {
197521
+ if (!Array.isArray(message.eventProperties))
197522
+ return "eventProperties: array expected";
197523
+ for (var i = 0; i < message.eventProperties.length; ++i) {
197524
+ var error = $root.TaggedCustomField.verify(message.eventProperties[i], _depth + 1);
197525
+ if (error)
197526
+ return "eventProperties." + error;
197527
+ }
197528
+ }
197529
+ if (message.userProperties != null && message.hasOwnProperty("userProperties")) {
197530
+ if (!Array.isArray(message.userProperties))
197531
+ return "userProperties: array expected";
197532
+ for (var i = 0; i < message.userProperties.length; ++i) {
197533
+ var error = $root.AmplitudeUserPropertyOperation.verify(message.userProperties[i], _depth + 1);
197534
+ if (error)
197535
+ return "userProperties." + error;
197536
+ }
197537
+ }
197538
+ if (message.groups != null && message.hasOwnProperty("groups")) {
197539
+ if (!Array.isArray(message.groups))
197540
+ return "groups: array expected";
197541
+ for (var i = 0; i < message.groups.length; ++i) {
197542
+ var error = $root.TaggedCustomField.verify(message.groups[i], _depth + 1);
197543
+ if (error)
197544
+ return "groups." + error;
197545
+ }
197546
+ }
197547
+ if (message.groupProperties != null && message.hasOwnProperty("groupProperties")) {
197548
+ if (!Array.isArray(message.groupProperties))
197549
+ return "groupProperties: array expected";
197550
+ for (var i = 0; i < message.groupProperties.length; ++i) {
197551
+ var error = $root.TaggedCustomField.verify(message.groupProperties[i], _depth + 1);
197552
+ if (error)
197553
+ return "groupProperties." + error;
197554
+ }
197555
+ }
197556
+ return null;
197557
+ };
197558
+
197559
+ /**
197560
+ * Creates an AmplitudeProxyEventReceived message from a plain object. Also converts values to their respective internal types.
197561
+ * @function fromObject
197562
+ * @memberof AmplitudeProxyEventReceived
197563
+ * @static
197564
+ * @param {Object.<string,*>} object Plain object
197565
+ * @returns {AmplitudeProxyEventReceived} AmplitudeProxyEventReceived
197566
+ */
197567
+ AmplitudeProxyEventReceived.fromObject = function fromObject(object, _depth) {
197568
+ if (object instanceof $root.AmplitudeProxyEventReceived)
197569
+ return object;
197570
+ if (_depth === undefined)
197571
+ _depth = 0;
197572
+ if (_depth > $util.recursionLimit)
197573
+ throw Error("max depth exceeded");
197574
+ var message = new $root.AmplitudeProxyEventReceived();
197575
+ if (object.eventType != null)
197576
+ if (typeof object.eventType !== "string" || object.eventType.length)
197577
+ message.eventType = String(object.eventType);
197578
+ if (object.userId != null)
197579
+ message.userId = String(object.userId);
197580
+ if (object.deviceId != null)
197581
+ if (typeof object.deviceId !== "string" || object.deviceId.length)
197582
+ message.deviceId = String(object.deviceId);
197583
+ if (object.time != null)
197584
+ if (typeof object.time === "object" ? object.time.low || object.time.high : Number(object.time) !== 0)
197585
+ if ($util.Long)
197586
+ (message.time = $util.Long.fromValue(object.time)).unsigned = true;
197587
+ else if (typeof object.time === "string")
197588
+ message.time = parseInt(object.time, 10);
197589
+ else if (typeof object.time === "number")
197590
+ message.time = object.time;
197591
+ else if (typeof object.time === "object")
197592
+ message.time = new $util.LongBits(object.time.low >>> 0, object.time.high >>> 0).toNumber(true);
197593
+ if (object.sessionId != null)
197594
+ if (typeof object.sessionId === "object" ? object.sessionId.low || object.sessionId.high : Number(object.sessionId) !== 0)
197595
+ if ($util.Long)
197596
+ (message.sessionId = $util.Long.fromValue(object.sessionId)).unsigned = false;
197597
+ else if (typeof object.sessionId === "string")
197598
+ message.sessionId = parseInt(object.sessionId, 10);
197599
+ else if (typeof object.sessionId === "number")
197600
+ message.sessionId = object.sessionId;
197601
+ else if (typeof object.sessionId === "object")
197602
+ message.sessionId = new $util.LongBits(object.sessionId.low >>> 0, object.sessionId.high >>> 0).toNumber();
197603
+ if (object.eventId != null)
197604
+ if (typeof object.eventId === "object" ? object.eventId.low || object.eventId.high : Number(object.eventId) !== 0)
197605
+ if ($util.Long)
197606
+ (message.eventId = $util.Long.fromValue(object.eventId)).unsigned = true;
197607
+ else if (typeof object.eventId === "string")
197608
+ message.eventId = parseInt(object.eventId, 10);
197609
+ else if (typeof object.eventId === "number")
197610
+ message.eventId = object.eventId;
197611
+ else if (typeof object.eventId === "object")
197612
+ message.eventId = new $util.LongBits(object.eventId.low >>> 0, object.eventId.high >>> 0).toNumber(true);
197613
+ if (object.insertId != null)
197614
+ if (typeof object.insertId !== "string" || object.insertId.length)
197615
+ message.insertId = String(object.insertId);
197616
+ if (object.clientUploadTime != null)
197617
+ if (typeof object.clientUploadTime === "object" ? object.clientUploadTime.low || object.clientUploadTime.high : Number(object.clientUploadTime) !== 0)
197618
+ if ($util.Long)
197619
+ (message.clientUploadTime = $util.Long.fromValue(object.clientUploadTime)).unsigned = true;
197620
+ else if (typeof object.clientUploadTime === "string")
197621
+ message.clientUploadTime = parseInt(object.clientUploadTime, 10);
197622
+ else if (typeof object.clientUploadTime === "number")
197623
+ message.clientUploadTime = object.clientUploadTime;
197624
+ else if (typeof object.clientUploadTime === "object")
197625
+ message.clientUploadTime = new $util.LongBits(object.clientUploadTime.low >>> 0, object.clientUploadTime.high >>> 0).toNumber(true);
197626
+ if (object.library != null)
197627
+ if (typeof object.library !== "string" || object.library.length)
197628
+ message.library = String(object.library);
197629
+ if (object.platform != null)
197630
+ if (typeof object.platform !== "string" || object.platform.length)
197631
+ message.platform = String(object.platform);
197632
+ if (object.osName != null)
197633
+ if (typeof object.osName !== "string" || object.osName.length)
197634
+ message.osName = String(object.osName);
197635
+ if (object.osVersion != null)
197636
+ if (typeof object.osVersion !== "string" || object.osVersion.length)
197637
+ message.osVersion = String(object.osVersion);
197638
+ if (object.deviceBrand != null)
197639
+ message.deviceBrand = String(object.deviceBrand);
197640
+ if (object.deviceManufacturer != null)
197641
+ if (typeof object.deviceManufacturer !== "string" || object.deviceManufacturer.length)
197642
+ message.deviceManufacturer = String(object.deviceManufacturer);
197643
+ if (object.deviceModel != null)
197644
+ if (typeof object.deviceModel !== "string" || object.deviceModel.length)
197645
+ message.deviceModel = String(object.deviceModel);
197646
+ if (object.carrier != null)
197647
+ if (typeof object.carrier !== "string" || object.carrier.length)
197648
+ message.carrier = String(object.carrier);
197649
+ if (object.language != null)
197650
+ if (typeof object.language !== "string" || object.language.length)
197651
+ message.language = String(object.language);
197652
+ if (object.versionName != null)
197653
+ message.versionName = String(object.versionName);
197654
+ if (object.appVersion != null)
197655
+ message.appVersion = String(object.appVersion);
197656
+ if (object.ip != null)
197657
+ if (typeof object.ip !== "string" || object.ip.length)
197658
+ message.ip = String(object.ip);
197659
+ if (object.idfv != null)
197660
+ message.idfv = String(object.idfv);
197661
+ if (object.idfa != null)
197662
+ message.idfa = String(object.idfa);
197663
+ if (object.adid != null)
197664
+ message.adid = String(object.adid);
197665
+ if (object.country != null)
197666
+ message.country = String(object.country);
197667
+ if (object.region != null)
197668
+ message.region = String(object.region);
197669
+ if (object.city != null)
197670
+ message.city = String(object.city);
197671
+ if (object.dma != null)
197672
+ message.dma = String(object.dma);
197673
+ if (object.locationLat != null)
197674
+ message.locationLat = Number(object.locationLat);
197675
+ if (object.locationLng != null)
197676
+ message.locationLng = Number(object.locationLng);
197677
+ if (object.partnerId != null)
197678
+ message.partnerId = String(object.partnerId);
197679
+ if (object.revenue != null)
197680
+ message.revenue = Number(object.revenue);
197681
+ if (object.revenueType != null)
197682
+ message.revenueType = String(object.revenueType);
197683
+ if (object.productId != null)
197684
+ message.productId = String(object.productId);
197685
+ if (object.price != null)
197686
+ message.price = Number(object.price);
197687
+ if (object.quantity != null)
197688
+ if ($util.Long)
197689
+ (message.quantity = $util.Long.fromValue(object.quantity)).unsigned = false;
197690
+ else if (typeof object.quantity === "string")
197691
+ message.quantity = parseInt(object.quantity, 10);
197692
+ else if (typeof object.quantity === "number")
197693
+ message.quantity = object.quantity;
197694
+ else if (typeof object.quantity === "object")
197695
+ message.quantity = new $util.LongBits(object.quantity.low >>> 0, object.quantity.high >>> 0).toNumber();
197696
+ if (object.eventProperties) {
197697
+ if (!Array.isArray(object.eventProperties))
197698
+ throw TypeError(".AmplitudeProxyEventReceived.eventProperties: array expected");
197699
+ message.eventProperties = Array(object.eventProperties.length);
197700
+ for (var i = 0; i < object.eventProperties.length; ++i) {
197701
+ if (typeof object.eventProperties[i] !== "object")
197702
+ throw TypeError(".AmplitudeProxyEventReceived.eventProperties: object expected");
197703
+ message.eventProperties[i] = $root.TaggedCustomField.fromObject(object.eventProperties[i], _depth + 1);
197704
+ }
197705
+ }
197706
+ if (object.userProperties) {
197707
+ if (!Array.isArray(object.userProperties))
197708
+ throw TypeError(".AmplitudeProxyEventReceived.userProperties: array expected");
197709
+ message.userProperties = Array(object.userProperties.length);
197710
+ for (var i = 0; i < object.userProperties.length; ++i) {
197711
+ if (typeof object.userProperties[i] !== "object")
197712
+ throw TypeError(".AmplitudeProxyEventReceived.userProperties: object expected");
197713
+ message.userProperties[i] = $root.AmplitudeUserPropertyOperation.fromObject(object.userProperties[i], _depth + 1);
197714
+ }
197715
+ }
197716
+ if (object.groups) {
197717
+ if (!Array.isArray(object.groups))
197718
+ throw TypeError(".AmplitudeProxyEventReceived.groups: array expected");
197719
+ message.groups = Array(object.groups.length);
197720
+ for (var i = 0; i < object.groups.length; ++i) {
197721
+ if (typeof object.groups[i] !== "object")
197722
+ throw TypeError(".AmplitudeProxyEventReceived.groups: object expected");
197723
+ message.groups[i] = $root.TaggedCustomField.fromObject(object.groups[i], _depth + 1);
197724
+ }
197725
+ }
197726
+ if (object.groupProperties) {
197727
+ if (!Array.isArray(object.groupProperties))
197728
+ throw TypeError(".AmplitudeProxyEventReceived.groupProperties: array expected");
197729
+ message.groupProperties = Array(object.groupProperties.length);
197730
+ for (var i = 0; i < object.groupProperties.length; ++i) {
197731
+ if (typeof object.groupProperties[i] !== "object")
197732
+ throw TypeError(".AmplitudeProxyEventReceived.groupProperties: object expected");
197733
+ message.groupProperties[i] = $root.TaggedCustomField.fromObject(object.groupProperties[i], _depth + 1);
197734
+ }
197735
+ }
197736
+ return message;
197737
+ };
197738
+
197739
+ /**
197740
+ * Creates a plain object from an AmplitudeProxyEventReceived message. Also converts values to other types if specified.
197741
+ * @function toObject
197742
+ * @memberof AmplitudeProxyEventReceived
197743
+ * @static
197744
+ * @param {AmplitudeProxyEventReceived} message AmplitudeProxyEventReceived
197745
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
197746
+ * @returns {Object.<string,*>} Plain object
197747
+ */
197748
+ AmplitudeProxyEventReceived.toObject = function toObject(message, options) {
197749
+ if (!options)
197750
+ options = {};
197751
+ var object = {};
197752
+ if (options.arrays || options.defaults) {
197753
+ object.eventProperties = [];
197754
+ object.userProperties = [];
197755
+ object.groups = [];
197756
+ object.groupProperties = [];
197757
+ }
197758
+ if (options.defaults) {
197759
+ object.eventType = "";
197760
+ object.deviceId = "";
197761
+ if ($util.Long) {
197762
+ var long = new $util.Long(0, 0, true);
197763
+ object.time = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long;
197764
+ } else
197765
+ object.time = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0;
197766
+ if ($util.Long) {
197767
+ var long = new $util.Long(0, 0, false);
197768
+ object.sessionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long;
197769
+ } else
197770
+ object.sessionId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0;
197771
+ if ($util.Long) {
197772
+ var long = new $util.Long(0, 0, true);
197773
+ object.eventId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long;
197774
+ } else
197775
+ object.eventId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0;
197776
+ object.insertId = "";
197777
+ if ($util.Long) {
197778
+ var long = new $util.Long(0, 0, true);
197779
+ object.clientUploadTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long;
197780
+ } else
197781
+ object.clientUploadTime = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0;
197782
+ object.library = "";
197783
+ object.platform = "";
197784
+ object.osName = "";
197785
+ object.osVersion = "";
197786
+ object.deviceManufacturer = "";
197787
+ object.deviceModel = "";
197788
+ object.carrier = "";
197789
+ object.language = "";
197790
+ object.ip = "";
197791
+ }
197792
+ if (message.eventType != null && message.hasOwnProperty("eventType"))
197793
+ object.eventType = message.eventType;
197794
+ if (message.userId != null && message.hasOwnProperty("userId")) {
197795
+ object.userId = message.userId;
197796
+ if (options.oneofs)
197797
+ object._userId = "userId";
197798
+ }
197799
+ if (message.deviceId != null && message.hasOwnProperty("deviceId"))
197800
+ object.deviceId = message.deviceId;
197801
+ if (message.time != null && message.hasOwnProperty("time"))
197802
+ if (typeof BigInt !== "undefined" && options.longs === BigInt)
197803
+ object.time = typeof message.time === "number" ? BigInt(message.time) : $util.Long.fromBits(message.time.low >>> 0, message.time.high >>> 0, true).toBigInt();
197804
+ else if (typeof message.time === "number")
197805
+ object.time = options.longs === String ? String(message.time) : message.time;
197806
+ else
197807
+ object.time = options.longs === String ? $util.Long.prototype.toString.call(message.time) : options.longs === Number ? new $util.LongBits(message.time.low >>> 0, message.time.high >>> 0).toNumber(true) : message.time;
197808
+ if (message.sessionId != null && message.hasOwnProperty("sessionId"))
197809
+ if (typeof BigInt !== "undefined" && options.longs === BigInt)
197810
+ object.sessionId = typeof message.sessionId === "number" ? BigInt(message.sessionId) : $util.Long.fromBits(message.sessionId.low >>> 0, message.sessionId.high >>> 0, false).toBigInt();
197811
+ else if (typeof message.sessionId === "number")
197812
+ object.sessionId = options.longs === String ? String(message.sessionId) : message.sessionId;
197813
+ else
197814
+ object.sessionId = options.longs === String ? $util.Long.prototype.toString.call(message.sessionId) : options.longs === Number ? new $util.LongBits(message.sessionId.low >>> 0, message.sessionId.high >>> 0).toNumber() : message.sessionId;
197815
+ if (message.eventId != null && message.hasOwnProperty("eventId"))
197816
+ if (typeof BigInt !== "undefined" && options.longs === BigInt)
197817
+ object.eventId = typeof message.eventId === "number" ? BigInt(message.eventId) : $util.Long.fromBits(message.eventId.low >>> 0, message.eventId.high >>> 0, true).toBigInt();
197818
+ else if (typeof message.eventId === "number")
197819
+ object.eventId = options.longs === String ? String(message.eventId) : message.eventId;
197820
+ else
197821
+ object.eventId = options.longs === String ? $util.Long.prototype.toString.call(message.eventId) : options.longs === Number ? new $util.LongBits(message.eventId.low >>> 0, message.eventId.high >>> 0).toNumber(true) : message.eventId;
197822
+ if (message.insertId != null && message.hasOwnProperty("insertId"))
197823
+ object.insertId = message.insertId;
197824
+ if (message.clientUploadTime != null && message.hasOwnProperty("clientUploadTime"))
197825
+ if (typeof BigInt !== "undefined" && options.longs === BigInt)
197826
+ object.clientUploadTime = typeof message.clientUploadTime === "number" ? BigInt(message.clientUploadTime) : $util.Long.fromBits(message.clientUploadTime.low >>> 0, message.clientUploadTime.high >>> 0, true).toBigInt();
197827
+ else if (typeof message.clientUploadTime === "number")
197828
+ object.clientUploadTime = options.longs === String ? String(message.clientUploadTime) : message.clientUploadTime;
197829
+ else
197830
+ object.clientUploadTime = options.longs === String ? $util.Long.prototype.toString.call(message.clientUploadTime) : options.longs === Number ? new $util.LongBits(message.clientUploadTime.low >>> 0, message.clientUploadTime.high >>> 0).toNumber(true) : message.clientUploadTime;
197831
+ if (message.library != null && message.hasOwnProperty("library"))
197832
+ object.library = message.library;
197833
+ if (message.platform != null && message.hasOwnProperty("platform"))
197834
+ object.platform = message.platform;
197835
+ if (message.osName != null && message.hasOwnProperty("osName"))
197836
+ object.osName = message.osName;
197837
+ if (message.osVersion != null && message.hasOwnProperty("osVersion"))
197838
+ object.osVersion = message.osVersion;
197839
+ if (message.deviceBrand != null && message.hasOwnProperty("deviceBrand")) {
197840
+ object.deviceBrand = message.deviceBrand;
197841
+ if (options.oneofs)
197842
+ object._deviceBrand = "deviceBrand";
197843
+ }
197844
+ if (message.deviceManufacturer != null && message.hasOwnProperty("deviceManufacturer"))
197845
+ object.deviceManufacturer = message.deviceManufacturer;
197846
+ if (message.deviceModel != null && message.hasOwnProperty("deviceModel"))
197847
+ object.deviceModel = message.deviceModel;
197848
+ if (message.carrier != null && message.hasOwnProperty("carrier"))
197849
+ object.carrier = message.carrier;
197850
+ if (message.language != null && message.hasOwnProperty("language"))
197851
+ object.language = message.language;
197852
+ if (message.versionName != null && message.hasOwnProperty("versionName")) {
197853
+ object.versionName = message.versionName;
197854
+ if (options.oneofs)
197855
+ object._versionName = "versionName";
197856
+ }
197857
+ if (message.appVersion != null && message.hasOwnProperty("appVersion")) {
197858
+ object.appVersion = message.appVersion;
197859
+ if (options.oneofs)
197860
+ object._appVersion = "appVersion";
197861
+ }
197862
+ if (message.ip != null && message.hasOwnProperty("ip"))
197863
+ object.ip = message.ip;
197864
+ if (message.idfv != null && message.hasOwnProperty("idfv")) {
197865
+ object.idfv = message.idfv;
197866
+ if (options.oneofs)
197867
+ object._idfv = "idfv";
197868
+ }
197869
+ if (message.idfa != null && message.hasOwnProperty("idfa")) {
197870
+ object.idfa = message.idfa;
197871
+ if (options.oneofs)
197872
+ object._idfa = "idfa";
197873
+ }
197874
+ if (message.adid != null && message.hasOwnProperty("adid")) {
197875
+ object.adid = message.adid;
197876
+ if (options.oneofs)
197877
+ object._adid = "adid";
197878
+ }
197879
+ if (message.country != null && message.hasOwnProperty("country")) {
197880
+ object.country = message.country;
197881
+ if (options.oneofs)
197882
+ object._country = "country";
197883
+ }
197884
+ if (message.region != null && message.hasOwnProperty("region")) {
197885
+ object.region = message.region;
197886
+ if (options.oneofs)
197887
+ object._region = "region";
197888
+ }
197889
+ if (message.city != null && message.hasOwnProperty("city")) {
197890
+ object.city = message.city;
197891
+ if (options.oneofs)
197892
+ object._city = "city";
197893
+ }
197894
+ if (message.dma != null && message.hasOwnProperty("dma")) {
197895
+ object.dma = message.dma;
197896
+ if (options.oneofs)
197897
+ object._dma = "dma";
197898
+ }
197899
+ if (message.locationLat != null && message.hasOwnProperty("locationLat")) {
197900
+ object.locationLat = options.json && !isFinite(message.locationLat) ? String(message.locationLat) : message.locationLat;
197901
+ if (options.oneofs)
197902
+ object._locationLat = "locationLat";
197903
+ }
197904
+ if (message.locationLng != null && message.hasOwnProperty("locationLng")) {
197905
+ object.locationLng = options.json && !isFinite(message.locationLng) ? String(message.locationLng) : message.locationLng;
197906
+ if (options.oneofs)
197907
+ object._locationLng = "locationLng";
197908
+ }
197909
+ if (message.partnerId != null && message.hasOwnProperty("partnerId")) {
197910
+ object.partnerId = message.partnerId;
197911
+ if (options.oneofs)
197912
+ object._partnerId = "partnerId";
197913
+ }
197914
+ if (message.revenue != null && message.hasOwnProperty("revenue")) {
197915
+ object.revenue = options.json && !isFinite(message.revenue) ? String(message.revenue) : message.revenue;
197916
+ if (options.oneofs)
197917
+ object._revenue = "revenue";
197918
+ }
197919
+ if (message.revenueType != null && message.hasOwnProperty("revenueType")) {
197920
+ object.revenueType = message.revenueType;
197921
+ if (options.oneofs)
197922
+ object._revenueType = "revenueType";
197923
+ }
197924
+ if (message.productId != null && message.hasOwnProperty("productId")) {
197925
+ object.productId = message.productId;
197926
+ if (options.oneofs)
197927
+ object._productId = "productId";
197928
+ }
197929
+ if (message.price != null && message.hasOwnProperty("price")) {
197930
+ object.price = options.json && !isFinite(message.price) ? String(message.price) : message.price;
197931
+ if (options.oneofs)
197932
+ object._price = "price";
197933
+ }
197934
+ if (message.quantity != null && message.hasOwnProperty("quantity")) {
197935
+ if (typeof BigInt !== "undefined" && options.longs === BigInt)
197936
+ object.quantity = typeof message.quantity === "number" ? BigInt(message.quantity) : $util.Long.fromBits(message.quantity.low >>> 0, message.quantity.high >>> 0, false).toBigInt();
197937
+ else if (typeof message.quantity === "number")
197938
+ object.quantity = options.longs === String ? String(message.quantity) : message.quantity;
197939
+ else
197940
+ object.quantity = options.longs === String ? $util.Long.prototype.toString.call(message.quantity) : options.longs === Number ? new $util.LongBits(message.quantity.low >>> 0, message.quantity.high >>> 0).toNumber() : message.quantity;
197941
+ if (options.oneofs)
197942
+ object._quantity = "quantity";
197943
+ }
197944
+ if (message.eventProperties && message.eventProperties.length) {
197945
+ object.eventProperties = Array(message.eventProperties.length);
197946
+ for (var j = 0; j < message.eventProperties.length; ++j)
197947
+ object.eventProperties[j] = $root.TaggedCustomField.toObject(message.eventProperties[j], options);
197948
+ }
197949
+ if (message.userProperties && message.userProperties.length) {
197950
+ object.userProperties = Array(message.userProperties.length);
197951
+ for (var j = 0; j < message.userProperties.length; ++j)
197952
+ object.userProperties[j] = $root.AmplitudeUserPropertyOperation.toObject(message.userProperties[j], options);
197953
+ }
197954
+ if (message.groups && message.groups.length) {
197955
+ object.groups = Array(message.groups.length);
197956
+ for (var j = 0; j < message.groups.length; ++j)
197957
+ object.groups[j] = $root.TaggedCustomField.toObject(message.groups[j], options);
197958
+ }
197959
+ if (message.groupProperties && message.groupProperties.length) {
197960
+ object.groupProperties = Array(message.groupProperties.length);
197961
+ for (var j = 0; j < message.groupProperties.length; ++j)
197962
+ object.groupProperties[j] = $root.TaggedCustomField.toObject(message.groupProperties[j], options);
197963
+ }
197964
+ return object;
197965
+ };
197966
+
197967
+ /**
197968
+ * Converts this AmplitudeProxyEventReceived to JSON.
197969
+ * @function toJSON
197970
+ * @memberof AmplitudeProxyEventReceived
197971
+ * @instance
197972
+ * @returns {Object.<string,*>} JSON object
197973
+ */
197974
+ AmplitudeProxyEventReceived.prototype.toJSON = function toJSON() {
197975
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
197976
+ };
197977
+
197978
+ /**
197979
+ * Gets the type url for AmplitudeProxyEventReceived
197980
+ * @function getTypeUrl
197981
+ * @memberof AmplitudeProxyEventReceived
197982
+ * @static
197983
+ * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"`
197984
+ * @returns {string} The type url
197985
+ */
197986
+ AmplitudeProxyEventReceived.getTypeUrl = function getTypeUrl(prefix) {
197987
+ if (prefix === undefined)
197988
+ prefix = "type.googleapis.com";
197989
+ return prefix + "/AmplitudeProxyEventReceived";
197990
+ };
197991
+
197992
+ return AmplitudeProxyEventReceived;
197993
+ })();
197994
+
197995
+ $root.AmplitudeUserPropertyOperation = (function() {
197996
+
197997
+ /**
197998
+ * Properties of an AmplitudeUserPropertyOperation.
197999
+ * @typedef {Object} AmplitudeUserPropertyOperation.$Properties
198000
+ * @property {string|null} [operation] Amplitude identify operation, verbatim. e.g. "$set", "$setOnce", "$add", "$unset".
198001
+ * @property {Array.<TaggedCustomField.$Properties>|null} [properties] Properties the operation applies, encoded like event_properties.
198002
+ * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
198003
+ */
198004
+
198005
+ /**
198006
+ * Properties of an AmplitudeUserPropertyOperation.
198007
+ * @name IAmplitudeUserPropertyOperation
198008
+ * @interface IAmplitudeUserPropertyOperation
198009
+ * @augments AmplitudeUserPropertyOperation.$Properties
198010
+ * @deprecated Use AmplitudeUserPropertyOperation.$Properties instead.
198011
+ */
198012
+
198013
+ /**
198014
+ * Shape of an AmplitudeUserPropertyOperation.
198015
+ * @typedef {AmplitudeUserPropertyOperation.$Properties} AmplitudeUserPropertyOperation.$Shape
198016
+ */
198017
+
198018
+ /**
198019
+ * Constructs a new AmplitudeUserPropertyOperation.
198020
+ * @name AmplitudeUserPropertyOperation
198021
+ * @classdesc Represents an AmplitudeUserPropertyOperation.
198022
+ * @constructor
198023
+ * @param {AmplitudeUserPropertyOperation.$Properties=} [properties] Properties to set
198024
+ * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
198025
+ */
198026
+ function AmplitudeUserPropertyOperation(properties) {
198027
+ this.properties = [];
198028
+ if (properties)
198029
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
198030
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
198031
+ this[keys[i]] = properties[keys[i]];
198032
+ }
198033
+
198034
+ /**
198035
+ * Amplitude identify operation, verbatim. e.g. "$set", "$setOnce", "$add", "$unset".
198036
+ * @member {string} operation
198037
+ * @memberof AmplitudeUserPropertyOperation
198038
+ * @instance
198039
+ */
198040
+ AmplitudeUserPropertyOperation.prototype.operation = "";
198041
+
198042
+ /**
198043
+ * Properties the operation applies, encoded like event_properties.
198044
+ * @member {Array.<TaggedCustomField.$Properties>} properties
198045
+ * @memberof AmplitudeUserPropertyOperation
198046
+ * @instance
198047
+ */
198048
+ AmplitudeUserPropertyOperation.prototype.properties = $util.emptyArray;
198049
+
198050
+ /**
198051
+ * Creates a new AmplitudeUserPropertyOperation instance using the specified properties.
198052
+ * @function create
198053
+ * @memberof AmplitudeUserPropertyOperation
198054
+ * @static
198055
+ * @param {AmplitudeUserPropertyOperation.$Properties=} [properties] Properties to set
198056
+ * @returns {AmplitudeUserPropertyOperation} AmplitudeUserPropertyOperation instance
198057
+ * @type {{
198058
+ * (properties: AmplitudeUserPropertyOperation.$Shape): AmplitudeUserPropertyOperation & AmplitudeUserPropertyOperation.$Shape;
198059
+ * (properties?: AmplitudeUserPropertyOperation.$Properties): AmplitudeUserPropertyOperation;
198060
+ * }}
198061
+ */
198062
+ AmplitudeUserPropertyOperation.create = function create(properties) {
198063
+ return new AmplitudeUserPropertyOperation(properties);
198064
+ };
198065
+
198066
+ /**
198067
+ * Encodes the specified AmplitudeUserPropertyOperation message. Does not implicitly {@link AmplitudeUserPropertyOperation.verify|verify} messages.
198068
+ * @function encode
198069
+ * @memberof AmplitudeUserPropertyOperation
198070
+ * @static
198071
+ * @param {AmplitudeUserPropertyOperation.$Properties} message AmplitudeUserPropertyOperation message or plain object to encode
198072
+ * @param {$protobuf.Writer} [writer] Writer to encode to
198073
+ * @returns {$protobuf.Writer} Writer
198074
+ */
198075
+ AmplitudeUserPropertyOperation.encode = function encode(message, writer) {
198076
+ if (!writer)
198077
+ writer = $Writer.create();
198078
+ if (message.operation != null && Object.hasOwnProperty.call(message, "operation"))
198079
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.operation);
198080
+ if (message.properties != null && message.properties.length)
198081
+ for (var i = 0; i < message.properties.length; ++i)
198082
+ $root.TaggedCustomField.encode(message.properties[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
198083
+ if (message.$unknowns != null && Object.hasOwnProperty.call(message, "$unknowns"))
198084
+ for (var i = 0; i < message.$unknowns.length; ++i)
198085
+ writer.raw(message.$unknowns[i]);
198086
+ return writer;
198087
+ };
198088
+
198089
+ /**
198090
+ * Encodes the specified AmplitudeUserPropertyOperation message, length delimited. Does not implicitly {@link AmplitudeUserPropertyOperation.verify|verify} messages.
198091
+ * @function encodeDelimited
198092
+ * @memberof AmplitudeUserPropertyOperation
198093
+ * @static
198094
+ * @param {AmplitudeUserPropertyOperation.$Properties} message AmplitudeUserPropertyOperation message or plain object to encode
198095
+ * @param {$protobuf.Writer} [writer] Writer to encode to
198096
+ * @returns {$protobuf.Writer} Writer
198097
+ */
198098
+ AmplitudeUserPropertyOperation.encodeDelimited = function encodeDelimited(message, writer) {
198099
+ return this.encode(message, writer).ldelim();
198100
+ };
198101
+
198102
+ /**
198103
+ * Decodes an AmplitudeUserPropertyOperation message from the specified reader or buffer.
198104
+ * @function decode
198105
+ * @memberof AmplitudeUserPropertyOperation
198106
+ * @static
198107
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
198108
+ * @param {number} [length] Message length if known beforehand
198109
+ * @returns {AmplitudeUserPropertyOperation & AmplitudeUserPropertyOperation.$Shape} AmplitudeUserPropertyOperation
198110
+ * @throws {Error} If the payload is not a reader or valid buffer
198111
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
198112
+ */
198113
+ AmplitudeUserPropertyOperation.decode = function decode(reader, length, _end, _depth, _target) {
198114
+ if (!(reader instanceof $Reader))
198115
+ reader = $Reader.create(reader);
198116
+ if (_depth === undefined)
198117
+ _depth = 0;
198118
+ if (_depth > $Reader.recursionLimit)
198119
+ throw Error("max depth exceeded");
198120
+ var end = length === undefined ? reader.len : reader.pos + length, message = _target || new $root.AmplitudeUserPropertyOperation(), value;
198121
+ while (reader.pos < end) {
198122
+ var start = reader.pos;
198123
+ var tag = reader.tag();
198124
+ if (tag === _end) {
198125
+ _end = undefined;
198126
+ break;
198127
+ }
198128
+ var wireType = tag & 7;
198129
+ switch (tag >>>= 3) {
198130
+ case 1: {
198131
+ if (wireType !== 2)
198132
+ break;
198133
+ if ((value = reader.string()).length)
198134
+ message.operation = value;
198135
+ else
198136
+ delete message.operation;
198137
+ continue;
198138
+ }
198139
+ case 2: {
198140
+ if (wireType !== 2)
198141
+ break;
198142
+ if (!(message.properties && message.properties.length))
198143
+ message.properties = [];
198144
+ message.properties.push($root.TaggedCustomField.decode(reader, reader.uint32(), undefined, _depth + 1));
198145
+ continue;
198146
+ }
198147
+ }
198148
+ reader.skipType(wireType, _depth, tag);
198149
+ $util.makeProp(message, "$unknowns", false);
198150
+ (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos));
198151
+ }
198152
+ if (_end !== undefined)
198153
+ throw Error("missing end group");
198154
+ return message;
198155
+ };
198156
+
198157
+ /**
198158
+ * Decodes an AmplitudeUserPropertyOperation message from the specified reader or buffer, length delimited.
198159
+ * @function decodeDelimited
198160
+ * @memberof AmplitudeUserPropertyOperation
198161
+ * @static
198162
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
198163
+ * @returns {AmplitudeUserPropertyOperation & AmplitudeUserPropertyOperation.$Shape} AmplitudeUserPropertyOperation
198164
+ * @throws {Error} If the payload is not a reader or valid buffer
198165
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
198166
+ */
198167
+ AmplitudeUserPropertyOperation.decodeDelimited = function decodeDelimited(reader) {
198168
+ if (!(reader instanceof $Reader))
198169
+ reader = new $Reader(reader);
198170
+ return this.decode(reader, reader.uint32());
198171
+ };
198172
+
198173
+ /**
198174
+ * Verifies an AmplitudeUserPropertyOperation message.
198175
+ * @function verify
198176
+ * @memberof AmplitudeUserPropertyOperation
198177
+ * @static
198178
+ * @param {Object.<string,*>} message Plain object to verify
198179
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
198180
+ */
198181
+ AmplitudeUserPropertyOperation.verify = function verify(message, _depth) {
198182
+ if (typeof message !== "object" || message === null)
198183
+ return "object expected";
198184
+ if (_depth === undefined)
198185
+ _depth = 0;
198186
+ if (_depth > $util.recursionLimit)
198187
+ return "max depth exceeded";
198188
+ if (message.operation != null && message.hasOwnProperty("operation"))
198189
+ if (!$util.isString(message.operation))
198190
+ return "operation: string expected";
198191
+ if (message.properties != null && message.hasOwnProperty("properties")) {
198192
+ if (!Array.isArray(message.properties))
198193
+ return "properties: array expected";
198194
+ for (var i = 0; i < message.properties.length; ++i) {
198195
+ var error = $root.TaggedCustomField.verify(message.properties[i], _depth + 1);
198196
+ if (error)
198197
+ return "properties." + error;
198198
+ }
198199
+ }
198200
+ return null;
198201
+ };
198202
+
198203
+ /**
198204
+ * Creates an AmplitudeUserPropertyOperation message from a plain object. Also converts values to their respective internal types.
198205
+ * @function fromObject
198206
+ * @memberof AmplitudeUserPropertyOperation
198207
+ * @static
198208
+ * @param {Object.<string,*>} object Plain object
198209
+ * @returns {AmplitudeUserPropertyOperation} AmplitudeUserPropertyOperation
198210
+ */
198211
+ AmplitudeUserPropertyOperation.fromObject = function fromObject(object, _depth) {
198212
+ if (object instanceof $root.AmplitudeUserPropertyOperation)
198213
+ return object;
198214
+ if (_depth === undefined)
198215
+ _depth = 0;
198216
+ if (_depth > $util.recursionLimit)
198217
+ throw Error("max depth exceeded");
198218
+ var message = new $root.AmplitudeUserPropertyOperation();
198219
+ if (object.operation != null)
198220
+ if (typeof object.operation !== "string" || object.operation.length)
198221
+ message.operation = String(object.operation);
198222
+ if (object.properties) {
198223
+ if (!Array.isArray(object.properties))
198224
+ throw TypeError(".AmplitudeUserPropertyOperation.properties: array expected");
198225
+ message.properties = Array(object.properties.length);
198226
+ for (var i = 0; i < object.properties.length; ++i) {
198227
+ if (typeof object.properties[i] !== "object")
198228
+ throw TypeError(".AmplitudeUserPropertyOperation.properties: object expected");
198229
+ message.properties[i] = $root.TaggedCustomField.fromObject(object.properties[i], _depth + 1);
198230
+ }
198231
+ }
198232
+ return message;
198233
+ };
198234
+
198235
+ /**
198236
+ * Creates a plain object from an AmplitudeUserPropertyOperation message. Also converts values to other types if specified.
198237
+ * @function toObject
198238
+ * @memberof AmplitudeUserPropertyOperation
198239
+ * @static
198240
+ * @param {AmplitudeUserPropertyOperation} message AmplitudeUserPropertyOperation
198241
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
198242
+ * @returns {Object.<string,*>} Plain object
198243
+ */
198244
+ AmplitudeUserPropertyOperation.toObject = function toObject(message, options) {
198245
+ if (!options)
198246
+ options = {};
198247
+ var object = {};
198248
+ if (options.arrays || options.defaults)
198249
+ object.properties = [];
198250
+ if (options.defaults)
198251
+ object.operation = "";
198252
+ if (message.operation != null && message.hasOwnProperty("operation"))
198253
+ object.operation = message.operation;
198254
+ if (message.properties && message.properties.length) {
198255
+ object.properties = Array(message.properties.length);
198256
+ for (var j = 0; j < message.properties.length; ++j)
198257
+ object.properties[j] = $root.TaggedCustomField.toObject(message.properties[j], options);
198258
+ }
198259
+ return object;
198260
+ };
198261
+
198262
+ /**
198263
+ * Converts this AmplitudeUserPropertyOperation to JSON.
198264
+ * @function toJSON
198265
+ * @memberof AmplitudeUserPropertyOperation
198266
+ * @instance
198267
+ * @returns {Object.<string,*>} JSON object
198268
+ */
198269
+ AmplitudeUserPropertyOperation.prototype.toJSON = function toJSON() {
198270
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
198271
+ };
198272
+
198273
+ /**
198274
+ * Gets the type url for AmplitudeUserPropertyOperation
198275
+ * @function getTypeUrl
198276
+ * @memberof AmplitudeUserPropertyOperation
198277
+ * @static
198278
+ * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"`
198279
+ * @returns {string} The type url
198280
+ */
198281
+ AmplitudeUserPropertyOperation.getTypeUrl = function getTypeUrl(prefix) {
198282
+ if (prefix === undefined)
198283
+ prefix = "type.googleapis.com";
198284
+ return prefix + "/AmplitudeUserPropertyOperation";
198285
+ };
198286
+
198287
+ return AmplitudeUserPropertyOperation;
198288
+ })();
198289
+
198290
+ $root.TaggedCustomField = (function() {
198291
+
198292
+ /**
198293
+ * Properties of a TaggedCustomField.
198294
+ * @typedef {Object} TaggedCustomField.$Properties
198295
+ * @property {string|null} [key] TaggedCustomField key
198296
+ * @property {string|null} [value] TaggedCustomField value
198297
+ * @property {Array.<field_tags.FieldTags>|null} [fieldTags] TaggedCustomField fieldTags
198298
+ * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
198299
+ */
198300
+
198301
+ /**
198302
+ * Properties of a TaggedCustomField.
198303
+ * @name ITaggedCustomField
198304
+ * @interface ITaggedCustomField
198305
+ * @augments TaggedCustomField.$Properties
198306
+ * @deprecated Use TaggedCustomField.$Properties instead.
198307
+ */
198308
+
198309
+ /**
198310
+ * Shape of a TaggedCustomField.
198311
+ * @typedef {TaggedCustomField.$Properties} TaggedCustomField.$Shape
198312
+ */
198313
+
198314
+ /**
198315
+ * Constructs a new TaggedCustomField.
198316
+ * @name TaggedCustomField
198317
+ * @classdesc Represents a TaggedCustomField.
198318
+ * @constructor
198319
+ * @param {TaggedCustomField.$Properties=} [properties] Properties to set
198320
+ * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
198321
+ */
198322
+ function TaggedCustomField(properties) {
198323
+ this.fieldTags = [];
198324
+ if (properties)
198325
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
198326
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
198327
+ this[keys[i]] = properties[keys[i]];
198328
+ }
198329
+
198330
+ /**
198331
+ * TaggedCustomField key.
198332
+ * @member {string} key
198333
+ * @memberof TaggedCustomField
198334
+ * @instance
198335
+ */
198336
+ TaggedCustomField.prototype.key = "";
198337
+
198338
+ /**
198339
+ * TaggedCustomField value.
198340
+ * @member {string} value
198341
+ * @memberof TaggedCustomField
198342
+ * @instance
198343
+ */
198344
+ TaggedCustomField.prototype.value = "";
198345
+
198346
+ /**
198347
+ * TaggedCustomField fieldTags.
198348
+ * @member {Array.<field_tags.FieldTags>} fieldTags
198349
+ * @memberof TaggedCustomField
198350
+ * @instance
198351
+ */
198352
+ TaggedCustomField.prototype.fieldTags = $util.emptyArray;
198353
+
198354
+ /**
198355
+ * Creates a new TaggedCustomField instance using the specified properties.
198356
+ * @function create
198357
+ * @memberof TaggedCustomField
198358
+ * @static
198359
+ * @param {TaggedCustomField.$Properties=} [properties] Properties to set
198360
+ * @returns {TaggedCustomField} TaggedCustomField instance
198361
+ * @type {{
198362
+ * (properties: TaggedCustomField.$Shape): TaggedCustomField & TaggedCustomField.$Shape;
198363
+ * (properties?: TaggedCustomField.$Properties): TaggedCustomField;
198364
+ * }}
198365
+ */
198366
+ TaggedCustomField.create = function create(properties) {
198367
+ return new TaggedCustomField(properties);
198368
+ };
198369
+
198370
+ /**
198371
+ * Encodes the specified TaggedCustomField message. Does not implicitly {@link TaggedCustomField.verify|verify} messages.
198372
+ * @function encode
198373
+ * @memberof TaggedCustomField
198374
+ * @static
198375
+ * @param {TaggedCustomField.$Properties} message TaggedCustomField message or plain object to encode
198376
+ * @param {$protobuf.Writer} [writer] Writer to encode to
198377
+ * @returns {$protobuf.Writer} Writer
198378
+ */
198379
+ TaggedCustomField.encode = function encode(message, writer) {
198380
+ if (!writer)
198381
+ writer = $Writer.create();
198382
+ if (message.key != null && Object.hasOwnProperty.call(message, "key"))
198383
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.key);
198384
+ if (message.value != null && Object.hasOwnProperty.call(message, "value"))
198385
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.value);
198386
+ if (message.fieldTags != null && message.fieldTags.length) {
198387
+ writer.uint32(/* id 3, wireType 2 =*/26).fork();
198388
+ for (var i = 0; i < message.fieldTags.length; ++i)
198389
+ writer.int32(message.fieldTags[i]);
198390
+ writer.ldelim();
198391
+ }
198392
+ if (message.$unknowns != null && Object.hasOwnProperty.call(message, "$unknowns"))
198393
+ for (var i = 0; i < message.$unknowns.length; ++i)
198394
+ writer.raw(message.$unknowns[i]);
198395
+ return writer;
198396
+ };
198397
+
198398
+ /**
198399
+ * Encodes the specified TaggedCustomField message, length delimited. Does not implicitly {@link TaggedCustomField.verify|verify} messages.
198400
+ * @function encodeDelimited
198401
+ * @memberof TaggedCustomField
198402
+ * @static
198403
+ * @param {TaggedCustomField.$Properties} message TaggedCustomField message or plain object to encode
198404
+ * @param {$protobuf.Writer} [writer] Writer to encode to
198405
+ * @returns {$protobuf.Writer} Writer
198406
+ */
198407
+ TaggedCustomField.encodeDelimited = function encodeDelimited(message, writer) {
198408
+ return this.encode(message, writer).ldelim();
198409
+ };
198410
+
198411
+ /**
198412
+ * Decodes a TaggedCustomField message from the specified reader or buffer.
198413
+ * @function decode
198414
+ * @memberof TaggedCustomField
198415
+ * @static
198416
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
198417
+ * @param {number} [length] Message length if known beforehand
198418
+ * @returns {TaggedCustomField & TaggedCustomField.$Shape} TaggedCustomField
198419
+ * @throws {Error} If the payload is not a reader or valid buffer
198420
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
198421
+ */
198422
+ TaggedCustomField.decode = function decode(reader, length, _end, _depth, _target) {
198423
+ if (!(reader instanceof $Reader))
198424
+ reader = $Reader.create(reader);
198425
+ if (_depth === undefined)
198426
+ _depth = 0;
198427
+ if (_depth > $Reader.recursionLimit)
198428
+ throw Error("max depth exceeded");
198429
+ var end = length === undefined ? reader.len : reader.pos + length, message = _target || new $root.TaggedCustomField(), value;
198430
+ while (reader.pos < end) {
198431
+ var start = reader.pos;
198432
+ var tag = reader.tag();
198433
+ if (tag === _end) {
198434
+ _end = undefined;
198435
+ break;
198436
+ }
198437
+ var wireType = tag & 7;
198438
+ switch (tag >>>= 3) {
198439
+ case 1: {
198440
+ if (wireType !== 2)
198441
+ break;
198442
+ if ((value = reader.string()).length)
198443
+ message.key = value;
198444
+ else
198445
+ delete message.key;
198446
+ continue;
198447
+ }
198448
+ case 2: {
198449
+ if (wireType !== 2)
198450
+ break;
198451
+ if ((value = reader.string()).length)
198452
+ message.value = value;
198453
+ else
198454
+ delete message.value;
198455
+ continue;
198456
+ }
198457
+ case 3: {
198458
+ if (wireType === 2) {
198459
+ if (!(message.fieldTags && message.fieldTags.length))
198460
+ message.fieldTags = [];
198461
+ var end2 = reader.uint32() + reader.pos;
198462
+ while (reader.pos < end2)
198463
+ message.fieldTags.push(reader.int32());
198464
+ continue;
198465
+ }
198466
+ if (wireType !== 0)
198467
+ break;
198468
+ if (!(message.fieldTags && message.fieldTags.length))
198469
+ message.fieldTags = [];
198470
+ message.fieldTags.push(reader.int32());
198471
+ continue;
198472
+ }
198473
+ }
198474
+ reader.skipType(wireType, _depth, tag);
198475
+ $util.makeProp(message, "$unknowns", false);
198476
+ (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos));
198477
+ }
198478
+ if (_end !== undefined)
198479
+ throw Error("missing end group");
198480
+ return message;
198481
+ };
198482
+
198483
+ /**
198484
+ * Decodes a TaggedCustomField message from the specified reader or buffer, length delimited.
198485
+ * @function decodeDelimited
198486
+ * @memberof TaggedCustomField
198487
+ * @static
198488
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
198489
+ * @returns {TaggedCustomField & TaggedCustomField.$Shape} TaggedCustomField
198490
+ * @throws {Error} If the payload is not a reader or valid buffer
198491
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
198492
+ */
198493
+ TaggedCustomField.decodeDelimited = function decodeDelimited(reader) {
198494
+ if (!(reader instanceof $Reader))
198495
+ reader = new $Reader(reader);
198496
+ return this.decode(reader, reader.uint32());
198497
+ };
198498
+
198499
+ /**
198500
+ * Verifies a TaggedCustomField message.
198501
+ * @function verify
198502
+ * @memberof TaggedCustomField
198503
+ * @static
198504
+ * @param {Object.<string,*>} message Plain object to verify
198505
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
198506
+ */
198507
+ TaggedCustomField.verify = function verify(message, _depth) {
198508
+ if (typeof message !== "object" || message === null)
198509
+ return "object expected";
198510
+ if (_depth === undefined)
198511
+ _depth = 0;
198512
+ if (_depth > $util.recursionLimit)
198513
+ return "max depth exceeded";
198514
+ if (message.key != null && message.hasOwnProperty("key"))
198515
+ if (!$util.isString(message.key))
198516
+ return "key: string expected";
198517
+ if (message.value != null && message.hasOwnProperty("value"))
198518
+ if (!$util.isString(message.value))
198519
+ return "value: string expected";
198520
+ if (message.fieldTags != null && message.hasOwnProperty("fieldTags")) {
198521
+ if (!Array.isArray(message.fieldTags))
198522
+ return "fieldTags: array expected";
198523
+ for (var i = 0; i < message.fieldTags.length; ++i)
198524
+ switch (message.fieldTags[i]) {
198525
+ default:
198526
+ return "fieldTags: enum value[] expected";
198527
+ case 0:
198528
+ case 1:
198529
+ case 2:
198530
+ case 3:
198531
+ case 4:
198532
+ case 5:
198533
+ case 6:
198534
+ break;
198535
+ }
198536
+ }
198537
+ return null;
198538
+ };
198539
+
198540
+ /**
198541
+ * Creates a TaggedCustomField message from a plain object. Also converts values to their respective internal types.
198542
+ * @function fromObject
198543
+ * @memberof TaggedCustomField
198544
+ * @static
198545
+ * @param {Object.<string,*>} object Plain object
198546
+ * @returns {TaggedCustomField} TaggedCustomField
198547
+ */
198548
+ TaggedCustomField.fromObject = function fromObject(object, _depth) {
198549
+ if (object instanceof $root.TaggedCustomField)
198550
+ return object;
198551
+ if (_depth === undefined)
198552
+ _depth = 0;
198553
+ if (_depth > $util.recursionLimit)
198554
+ throw Error("max depth exceeded");
198555
+ var message = new $root.TaggedCustomField();
198556
+ if (object.key != null)
198557
+ if (typeof object.key !== "string" || object.key.length)
198558
+ message.key = String(object.key);
198559
+ if (object.value != null)
198560
+ if (typeof object.value !== "string" || object.value.length)
198561
+ message.value = String(object.value);
198562
+ if (object.fieldTags) {
198563
+ if (!Array.isArray(object.fieldTags))
198564
+ throw TypeError(".TaggedCustomField.fieldTags: array expected");
198565
+ message.fieldTags = Array(object.fieldTags.length);
198566
+ for (var i = 0; i < object.fieldTags.length; ++i)
198567
+ switch (object.fieldTags[i]) {
198568
+ default:
198569
+ if (typeof object.fieldTags[i] === "number") {
198570
+ message.fieldTags[i] = object.fieldTags[i];
198571
+ break;
198572
+ }
198573
+ case "FIELD_TAGS_UNKNOWN":
198574
+ case 0:
198575
+ message.fieldTags[i] = 0;
198576
+ break;
198577
+ case "FIELD_TAGS_UNSTRUCTURED_HEALTH_INFORMATION":
198578
+ case 1:
198579
+ message.fieldTags[i] = 1;
198580
+ break;
198581
+ case "FIELD_TAGS_EXTERNAL_DIRECT_IDENTIFIER":
198582
+ case 2:
198583
+ message.fieldTags[i] = 2;
198584
+ break;
198585
+ case "FIELD_TAGS_EXTERNAL_INDIRECT_IDENTIFIER":
198586
+ case 3:
198587
+ message.fieldTags[i] = 3;
198588
+ break;
198589
+ case "FIELD_TAGS_INTERNAL_DIRECT_IDENTIFIER":
198590
+ case 4:
198591
+ message.fieldTags[i] = 4;
198592
+ break;
198593
+ case "FIELD_TAGS_INTERNAL_INDIRECT_IDENTIFIER":
198594
+ case 5:
198595
+ message.fieldTags[i] = 5;
198596
+ break;
198597
+ case "FIELD_TAGS_STRUCTURED_HEALTH_INFORMATION":
198598
+ case 6:
198599
+ message.fieldTags[i] = 6;
198600
+ break;
198601
+ }
198602
+ }
198603
+ return message;
198604
+ };
198605
+
198606
+ /**
198607
+ * Creates a plain object from a TaggedCustomField message. Also converts values to other types if specified.
198608
+ * @function toObject
198609
+ * @memberof TaggedCustomField
198610
+ * @static
198611
+ * @param {TaggedCustomField} message TaggedCustomField
198612
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
198613
+ * @returns {Object.<string,*>} Plain object
198614
+ */
198615
+ TaggedCustomField.toObject = function toObject(message, options) {
198616
+ if (!options)
198617
+ options = {};
198618
+ var object = {};
198619
+ if (options.arrays || options.defaults)
198620
+ object.fieldTags = [];
198621
+ if (options.defaults) {
198622
+ object.key = "";
198623
+ object.value = "";
198624
+ }
198625
+ if (message.key != null && message.hasOwnProperty("key"))
198626
+ object.key = message.key;
198627
+ if (message.value != null && message.hasOwnProperty("value"))
198628
+ object.value = message.value;
198629
+ if (message.fieldTags && message.fieldTags.length) {
198630
+ object.fieldTags = Array(message.fieldTags.length);
198631
+ for (var j = 0; j < message.fieldTags.length; ++j)
198632
+ object.fieldTags[j] = options.enums === String ? $root.field_tags.FieldTags[message.fieldTags[j]] === undefined ? message.fieldTags[j] : $root.field_tags.FieldTags[message.fieldTags[j]] : message.fieldTags[j];
198633
+ }
198634
+ return object;
198635
+ };
198636
+
198637
+ /**
198638
+ * Converts this TaggedCustomField to JSON.
198639
+ * @function toJSON
198640
+ * @memberof TaggedCustomField
198641
+ * @instance
198642
+ * @returns {Object.<string,*>} JSON object
198643
+ */
198644
+ TaggedCustomField.prototype.toJSON = function toJSON() {
198645
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
198646
+ };
198647
+
198648
+ /**
198649
+ * Gets the type url for TaggedCustomField
198650
+ * @function getTypeUrl
198651
+ * @memberof TaggedCustomField
198652
+ * @static
198653
+ * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"`
198654
+ * @returns {string} The type url
198655
+ */
198656
+ TaggedCustomField.getTypeUrl = function getTypeUrl(prefix) {
198657
+ if (prefix === undefined)
198658
+ prefix = "type.googleapis.com";
198659
+ return prefix + "/TaggedCustomField";
198660
+ };
198661
+
198662
+ return TaggedCustomField;
198663
+ })();
198664
+
196355
198665
  $root.IosSubscriptionCreated = (function() {
196356
198666
 
196357
198667
  /**
@@ -216204,480 +218514,23 @@ $root.CmsAccessBeneficiaryInfoUpdated = (function() {
216204
218514
  }
216205
218515
  case 6: {
216206
218516
  if (wireType !== 2)
216207
- break;
216208
- message.beneficiaryCmsRecord = $root.CmsAccessBeneficiaryCmsRecord.decode(reader, reader.uint32(), undefined, _depth + 1, message.beneficiaryCmsRecord);
216209
- message.payload = "beneficiaryCmsRecord";
216210
- continue;
216211
- }
216212
- case 7: {
216213
- if (wireType !== 2)
216214
- break;
216215
- message.careTeam = $root.CmsAccessCareTeam.decode(reader, reader.uint32(), undefined, _depth + 1, message.careTeam);
216216
- message.payload = "careTeam";
216217
- continue;
216218
- }
216219
- case 8: {
216220
- if (wireType !== 2)
216221
- break;
216222
- message.treatmentGoals = $root.CmsAccessTreatmentGoals.decode(reader, reader.uint32(), undefined, _depth + 1, message.treatmentGoals);
216223
- message.payload = "treatmentGoals";
216224
- continue;
216225
- }
216226
- }
216227
- reader.skipType(wireType, _depth, tag);
216228
- $util.makeProp(message, "$unknowns", false);
216229
- (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos));
216230
- }
216231
- if (_end !== undefined)
216232
- throw Error("missing end group");
216233
- return message;
216234
- };
216235
-
216236
- /**
216237
- * Decodes a CmsAccessBeneficiaryInfoUpdated message from the specified reader or buffer, length delimited.
216238
- * @function decodeDelimited
216239
- * @memberof CmsAccessBeneficiaryInfoUpdated
216240
- * @static
216241
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
216242
- * @returns {CmsAccessBeneficiaryInfoUpdated & CmsAccessBeneficiaryInfoUpdated.$Shape} CmsAccessBeneficiaryInfoUpdated
216243
- * @throws {Error} If the payload is not a reader or valid buffer
216244
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
216245
- */
216246
- CmsAccessBeneficiaryInfoUpdated.decodeDelimited = function decodeDelimited(reader) {
216247
- if (!(reader instanceof $Reader))
216248
- reader = new $Reader(reader);
216249
- return this.decode(reader, reader.uint32());
216250
- };
216251
-
216252
- /**
216253
- * Verifies a CmsAccessBeneficiaryInfoUpdated message.
216254
- * @function verify
216255
- * @memberof CmsAccessBeneficiaryInfoUpdated
216256
- * @static
216257
- * @param {Object.<string,*>} message Plain object to verify
216258
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
216259
- */
216260
- CmsAccessBeneficiaryInfoUpdated.verify = function verify(message, _depth) {
216261
- if (typeof message !== "object" || message === null)
216262
- return "object expected";
216263
- if (_depth === undefined)
216264
- _depth = 0;
216265
- if (_depth > $util.recursionLimit)
216266
- return "max depth exceeded";
216267
- var properties = {};
216268
- if (message.timestamp != null && message.hasOwnProperty("timestamp"))
216269
- if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high)))
216270
- return "timestamp: integer|Long expected";
216271
- if (message.hsUserId != null && message.hasOwnProperty("hsUserId"))
216272
- if (!$util.isString(message.hsUserId))
216273
- return "hsUserId: string expected";
216274
- if (message.trackingId != null && message.hasOwnProperty("trackingId"))
216275
- if (!$util.isString(message.trackingId))
216276
- return "trackingId: string expected";
216277
- if (message.infoType != null && message.hasOwnProperty("infoType"))
216278
- switch (message.infoType) {
216279
- default:
216280
- return "infoType: enum value expected";
216281
- case 0:
216282
- case 1:
216283
- case 2:
216284
- case 3:
216285
- case 4:
216286
- break;
216287
- }
216288
- if (message.demographicProfile != null && message.hasOwnProperty("demographicProfile")) {
216289
- properties.payload = 1;
216290
- {
216291
- var error = $root.CmsAccessDemographicProfile.verify(message.demographicProfile, _depth + 1);
216292
- if (error)
216293
- return "demographicProfile." + error;
216294
- }
216295
- }
216296
- if (message.beneficiaryCmsRecord != null && message.hasOwnProperty("beneficiaryCmsRecord")) {
216297
- if (properties.payload === 1)
216298
- return "payload: multiple values";
216299
- properties.payload = 1;
216300
- {
216301
- var error = $root.CmsAccessBeneficiaryCmsRecord.verify(message.beneficiaryCmsRecord, _depth + 1);
216302
- if (error)
216303
- return "beneficiaryCmsRecord." + error;
216304
- }
216305
- }
216306
- if (message.careTeam != null && message.hasOwnProperty("careTeam")) {
216307
- if (properties.payload === 1)
216308
- return "payload: multiple values";
216309
- properties.payload = 1;
216310
- {
216311
- var error = $root.CmsAccessCareTeam.verify(message.careTeam, _depth + 1);
216312
- if (error)
216313
- return "careTeam." + error;
216314
- }
216315
- }
216316
- if (message.treatmentGoals != null && message.hasOwnProperty("treatmentGoals")) {
216317
- if (properties.payload === 1)
216318
- return "payload: multiple values";
216319
- properties.payload = 1;
216320
- {
216321
- var error = $root.CmsAccessTreatmentGoals.verify(message.treatmentGoals, _depth + 1);
216322
- if (error)
216323
- return "treatmentGoals." + error;
216324
- }
216325
- }
216326
- return null;
216327
- };
216328
-
216329
- /**
216330
- * Creates a CmsAccessBeneficiaryInfoUpdated message from a plain object. Also converts values to their respective internal types.
216331
- * @function fromObject
216332
- * @memberof CmsAccessBeneficiaryInfoUpdated
216333
- * @static
216334
- * @param {Object.<string,*>} object Plain object
216335
- * @returns {CmsAccessBeneficiaryInfoUpdated} CmsAccessBeneficiaryInfoUpdated
216336
- */
216337
- CmsAccessBeneficiaryInfoUpdated.fromObject = function fromObject(object, _depth) {
216338
- if (object instanceof $root.CmsAccessBeneficiaryInfoUpdated)
216339
- return object;
216340
- if (_depth === undefined)
216341
- _depth = 0;
216342
- if (_depth > $util.recursionLimit)
216343
- throw Error("max depth exceeded");
216344
- var message = new $root.CmsAccessBeneficiaryInfoUpdated();
216345
- if (object.timestamp != null)
216346
- if (typeof object.timestamp === "object" ? object.timestamp.low || object.timestamp.high : Number(object.timestamp) !== 0)
216347
- if ($util.Long)
216348
- (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true;
216349
- else if (typeof object.timestamp === "string")
216350
- message.timestamp = parseInt(object.timestamp, 10);
216351
- else if (typeof object.timestamp === "number")
216352
- message.timestamp = object.timestamp;
216353
- else if (typeof object.timestamp === "object")
216354
- message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(true);
216355
- if (object.hsUserId != null)
216356
- if (typeof object.hsUserId !== "string" || object.hsUserId.length)
216357
- message.hsUserId = String(object.hsUserId);
216358
- if (object.trackingId != null)
216359
- if (typeof object.trackingId !== "string" || object.trackingId.length)
216360
- message.trackingId = String(object.trackingId);
216361
- if (object.infoType !== 0 && (typeof object.infoType !== "string" || $root.CmsAccessBeneficiaryInfoType[object.infoType] !== 0))
216362
- switch (object.infoType) {
216363
- default:
216364
- if (typeof object.infoType === "number") {
216365
- message.infoType = object.infoType;
216366
- break;
216367
- }
216368
- break;
216369
- case "CMS_ACCESS_BENEFICIARY_INFO_TYPE_UNKNOWN":
216370
- case 0:
216371
- message.infoType = 0;
216372
- break;
216373
- case "CMS_ACCESS_BENEFICIARY_INFO_TYPE_DEMOGRAPHIC_PROFILE":
216374
- case 1:
216375
- message.infoType = 1;
216376
- break;
216377
- case "CMS_ACCESS_BENEFICIARY_INFO_TYPE_BENEFICIARY_CMS_RECORD":
216378
- case 2:
216379
- message.infoType = 2;
216380
- break;
216381
- case "CMS_ACCESS_BENEFICIARY_INFO_TYPE_CARE_TEAM":
216382
- case 3:
216383
- message.infoType = 3;
216384
- break;
216385
- case "CMS_ACCESS_BENEFICIARY_INFO_TYPE_TREATMENT_GOALS":
216386
- case 4:
216387
- message.infoType = 4;
216388
- break;
216389
- }
216390
- if (object.demographicProfile != null) {
216391
- if (typeof object.demographicProfile !== "object")
216392
- throw TypeError(".CmsAccessBeneficiaryInfoUpdated.demographicProfile: object expected");
216393
- message.demographicProfile = $root.CmsAccessDemographicProfile.fromObject(object.demographicProfile, _depth + 1);
216394
- }
216395
- if (object.beneficiaryCmsRecord != null) {
216396
- if (typeof object.beneficiaryCmsRecord !== "object")
216397
- throw TypeError(".CmsAccessBeneficiaryInfoUpdated.beneficiaryCmsRecord: object expected");
216398
- message.beneficiaryCmsRecord = $root.CmsAccessBeneficiaryCmsRecord.fromObject(object.beneficiaryCmsRecord, _depth + 1);
216399
- }
216400
- if (object.careTeam != null) {
216401
- if (typeof object.careTeam !== "object")
216402
- throw TypeError(".CmsAccessBeneficiaryInfoUpdated.careTeam: object expected");
216403
- message.careTeam = $root.CmsAccessCareTeam.fromObject(object.careTeam, _depth + 1);
216404
- }
216405
- if (object.treatmentGoals != null) {
216406
- if (typeof object.treatmentGoals !== "object")
216407
- throw TypeError(".CmsAccessBeneficiaryInfoUpdated.treatmentGoals: object expected");
216408
- message.treatmentGoals = $root.CmsAccessTreatmentGoals.fromObject(object.treatmentGoals, _depth + 1);
216409
- }
216410
- return message;
216411
- };
216412
-
216413
- /**
216414
- * Creates a plain object from a CmsAccessBeneficiaryInfoUpdated message. Also converts values to other types if specified.
216415
- * @function toObject
216416
- * @memberof CmsAccessBeneficiaryInfoUpdated
216417
- * @static
216418
- * @param {CmsAccessBeneficiaryInfoUpdated} message CmsAccessBeneficiaryInfoUpdated
216419
- * @param {$protobuf.IConversionOptions} [options] Conversion options
216420
- * @returns {Object.<string,*>} Plain object
216421
- */
216422
- CmsAccessBeneficiaryInfoUpdated.toObject = function toObject(message, options) {
216423
- if (!options)
216424
- options = {};
216425
- var object = {};
216426
- if (options.defaults) {
216427
- if ($util.Long) {
216428
- var long = new $util.Long(0, 0, true);
216429
- object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long;
216430
- } else
216431
- object.timestamp = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0;
216432
- object.hsUserId = "";
216433
- object.trackingId = "";
216434
- object.infoType = options.enums === String ? "CMS_ACCESS_BENEFICIARY_INFO_TYPE_UNKNOWN" : 0;
216435
- }
216436
- if (message.timestamp != null && message.hasOwnProperty("timestamp"))
216437
- if (typeof BigInt !== "undefined" && options.longs === BigInt)
216438
- object.timestamp = typeof message.timestamp === "number" ? BigInt(message.timestamp) : $util.Long.fromBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0, true).toBigInt();
216439
- else if (typeof message.timestamp === "number")
216440
- object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp;
216441
- else
216442
- object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber(true) : message.timestamp;
216443
- if (message.hsUserId != null && message.hasOwnProperty("hsUserId"))
216444
- object.hsUserId = message.hsUserId;
216445
- if (message.trackingId != null && message.hasOwnProperty("trackingId"))
216446
- object.trackingId = message.trackingId;
216447
- if (message.infoType != null && message.hasOwnProperty("infoType"))
216448
- object.infoType = options.enums === String ? $root.CmsAccessBeneficiaryInfoType[message.infoType] === undefined ? message.infoType : $root.CmsAccessBeneficiaryInfoType[message.infoType] : message.infoType;
216449
- if (message.demographicProfile != null && message.hasOwnProperty("demographicProfile")) {
216450
- object.demographicProfile = $root.CmsAccessDemographicProfile.toObject(message.demographicProfile, options);
216451
- if (options.oneofs)
216452
- object.payload = "demographicProfile";
216453
- }
216454
- if (message.beneficiaryCmsRecord != null && message.hasOwnProperty("beneficiaryCmsRecord")) {
216455
- object.beneficiaryCmsRecord = $root.CmsAccessBeneficiaryCmsRecord.toObject(message.beneficiaryCmsRecord, options);
216456
- if (options.oneofs)
216457
- object.payload = "beneficiaryCmsRecord";
216458
- }
216459
- if (message.careTeam != null && message.hasOwnProperty("careTeam")) {
216460
- object.careTeam = $root.CmsAccessCareTeam.toObject(message.careTeam, options);
216461
- if (options.oneofs)
216462
- object.payload = "careTeam";
216463
- }
216464
- if (message.treatmentGoals != null && message.hasOwnProperty("treatmentGoals")) {
216465
- object.treatmentGoals = $root.CmsAccessTreatmentGoals.toObject(message.treatmentGoals, options);
216466
- if (options.oneofs)
216467
- object.payload = "treatmentGoals";
216468
- }
216469
- return object;
216470
- };
216471
-
216472
- /**
216473
- * Converts this CmsAccessBeneficiaryInfoUpdated to JSON.
216474
- * @function toJSON
216475
- * @memberof CmsAccessBeneficiaryInfoUpdated
216476
- * @instance
216477
- * @returns {Object.<string,*>} JSON object
216478
- */
216479
- CmsAccessBeneficiaryInfoUpdated.prototype.toJSON = function toJSON() {
216480
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
216481
- };
216482
-
216483
- /**
216484
- * Gets the type url for CmsAccessBeneficiaryInfoUpdated
216485
- * @function getTypeUrl
216486
- * @memberof CmsAccessBeneficiaryInfoUpdated
216487
- * @static
216488
- * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"`
216489
- * @returns {string} The type url
216490
- */
216491
- CmsAccessBeneficiaryInfoUpdated.getTypeUrl = function getTypeUrl(prefix) {
216492
- if (prefix === undefined)
216493
- prefix = "type.googleapis.com";
216494
- return prefix + "/CmsAccessBeneficiaryInfoUpdated";
216495
- };
216496
-
216497
- return CmsAccessBeneficiaryInfoUpdated;
216498
- })();
216499
-
216500
- $root.TaggedCustomField = (function() {
216501
-
216502
- /**
216503
- * Properties of a TaggedCustomField.
216504
- * @typedef {Object} TaggedCustomField.$Properties
216505
- * @property {string|null} [key] TaggedCustomField key
216506
- * @property {string|null} [value] TaggedCustomField value
216507
- * @property {Array.<field_tags.FieldTags>|null} [fieldTags] TaggedCustomField fieldTags
216508
- * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
216509
- */
216510
-
216511
- /**
216512
- * Properties of a TaggedCustomField.
216513
- * @name ITaggedCustomField
216514
- * @interface ITaggedCustomField
216515
- * @augments TaggedCustomField.$Properties
216516
- * @deprecated Use TaggedCustomField.$Properties instead.
216517
- */
216518
-
216519
- /**
216520
- * Shape of a TaggedCustomField.
216521
- * @typedef {TaggedCustomField.$Properties} TaggedCustomField.$Shape
216522
- */
216523
-
216524
- /**
216525
- * Constructs a new TaggedCustomField.
216526
- * @name TaggedCustomField
216527
- * @classdesc Represents a TaggedCustomField.
216528
- * @constructor
216529
- * @param {TaggedCustomField.$Properties=} [properties] Properties to set
216530
- * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
216531
- */
216532
- function TaggedCustomField(properties) {
216533
- this.fieldTags = [];
216534
- if (properties)
216535
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
216536
- if (properties[keys[i]] != null && keys[i] !== "__proto__")
216537
- this[keys[i]] = properties[keys[i]];
216538
- }
216539
-
216540
- /**
216541
- * TaggedCustomField key.
216542
- * @member {string} key
216543
- * @memberof TaggedCustomField
216544
- * @instance
216545
- */
216546
- TaggedCustomField.prototype.key = "";
216547
-
216548
- /**
216549
- * TaggedCustomField value.
216550
- * @member {string} value
216551
- * @memberof TaggedCustomField
216552
- * @instance
216553
- */
216554
- TaggedCustomField.prototype.value = "";
216555
-
216556
- /**
216557
- * TaggedCustomField fieldTags.
216558
- * @member {Array.<field_tags.FieldTags>} fieldTags
216559
- * @memberof TaggedCustomField
216560
- * @instance
216561
- */
216562
- TaggedCustomField.prototype.fieldTags = $util.emptyArray;
216563
-
216564
- /**
216565
- * Creates a new TaggedCustomField instance using the specified properties.
216566
- * @function create
216567
- * @memberof TaggedCustomField
216568
- * @static
216569
- * @param {TaggedCustomField.$Properties=} [properties] Properties to set
216570
- * @returns {TaggedCustomField} TaggedCustomField instance
216571
- * @type {{
216572
- * (properties: TaggedCustomField.$Shape): TaggedCustomField & TaggedCustomField.$Shape;
216573
- * (properties?: TaggedCustomField.$Properties): TaggedCustomField;
216574
- * }}
216575
- */
216576
- TaggedCustomField.create = function create(properties) {
216577
- return new TaggedCustomField(properties);
216578
- };
216579
-
216580
- /**
216581
- * Encodes the specified TaggedCustomField message. Does not implicitly {@link TaggedCustomField.verify|verify} messages.
216582
- * @function encode
216583
- * @memberof TaggedCustomField
216584
- * @static
216585
- * @param {TaggedCustomField.$Properties} message TaggedCustomField message or plain object to encode
216586
- * @param {$protobuf.Writer} [writer] Writer to encode to
216587
- * @returns {$protobuf.Writer} Writer
216588
- */
216589
- TaggedCustomField.encode = function encode(message, writer) {
216590
- if (!writer)
216591
- writer = $Writer.create();
216592
- if (message.key != null && Object.hasOwnProperty.call(message, "key"))
216593
- writer.uint32(/* id 1, wireType 2 =*/10).string(message.key);
216594
- if (message.value != null && Object.hasOwnProperty.call(message, "value"))
216595
- writer.uint32(/* id 2, wireType 2 =*/18).string(message.value);
216596
- if (message.fieldTags != null && message.fieldTags.length) {
216597
- writer.uint32(/* id 3, wireType 2 =*/26).fork();
216598
- for (var i = 0; i < message.fieldTags.length; ++i)
216599
- writer.int32(message.fieldTags[i]);
216600
- writer.ldelim();
216601
- }
216602
- if (message.$unknowns != null && Object.hasOwnProperty.call(message, "$unknowns"))
216603
- for (var i = 0; i < message.$unknowns.length; ++i)
216604
- writer.raw(message.$unknowns[i]);
216605
- return writer;
216606
- };
216607
-
216608
- /**
216609
- * Encodes the specified TaggedCustomField message, length delimited. Does not implicitly {@link TaggedCustomField.verify|verify} messages.
216610
- * @function encodeDelimited
216611
- * @memberof TaggedCustomField
216612
- * @static
216613
- * @param {TaggedCustomField.$Properties} message TaggedCustomField message or plain object to encode
216614
- * @param {$protobuf.Writer} [writer] Writer to encode to
216615
- * @returns {$protobuf.Writer} Writer
216616
- */
216617
- TaggedCustomField.encodeDelimited = function encodeDelimited(message, writer) {
216618
- return this.encode(message, writer).ldelim();
216619
- };
216620
-
216621
- /**
216622
- * Decodes a TaggedCustomField message from the specified reader or buffer.
216623
- * @function decode
216624
- * @memberof TaggedCustomField
216625
- * @static
216626
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
216627
- * @param {number} [length] Message length if known beforehand
216628
- * @returns {TaggedCustomField & TaggedCustomField.$Shape} TaggedCustomField
216629
- * @throws {Error} If the payload is not a reader or valid buffer
216630
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
216631
- */
216632
- TaggedCustomField.decode = function decode(reader, length, _end, _depth, _target) {
216633
- if (!(reader instanceof $Reader))
216634
- reader = $Reader.create(reader);
216635
- if (_depth === undefined)
216636
- _depth = 0;
216637
- if (_depth > $Reader.recursionLimit)
216638
- throw Error("max depth exceeded");
216639
- var end = length === undefined ? reader.len : reader.pos + length, message = _target || new $root.TaggedCustomField(), value;
216640
- while (reader.pos < end) {
216641
- var start = reader.pos;
216642
- var tag = reader.tag();
216643
- if (tag === _end) {
216644
- _end = undefined;
216645
- break;
216646
- }
216647
- var wireType = tag & 7;
216648
- switch (tag >>>= 3) {
216649
- case 1: {
216650
- if (wireType !== 2)
216651
- break;
216652
- if ((value = reader.string()).length)
216653
- message.key = value;
216654
- else
216655
- delete message.key;
218517
+ break;
218518
+ message.beneficiaryCmsRecord = $root.CmsAccessBeneficiaryCmsRecord.decode(reader, reader.uint32(), undefined, _depth + 1, message.beneficiaryCmsRecord);
218519
+ message.payload = "beneficiaryCmsRecord";
216656
218520
  continue;
216657
218521
  }
216658
- case 2: {
218522
+ case 7: {
216659
218523
  if (wireType !== 2)
216660
218524
  break;
216661
- if ((value = reader.string()).length)
216662
- message.value = value;
216663
- else
216664
- delete message.value;
218525
+ message.careTeam = $root.CmsAccessCareTeam.decode(reader, reader.uint32(), undefined, _depth + 1, message.careTeam);
218526
+ message.payload = "careTeam";
216665
218527
  continue;
216666
218528
  }
216667
- case 3: {
216668
- if (wireType === 2) {
216669
- if (!(message.fieldTags && message.fieldTags.length))
216670
- message.fieldTags = [];
216671
- var end2 = reader.uint32() + reader.pos;
216672
- while (reader.pos < end2)
216673
- message.fieldTags.push(reader.int32());
216674
- continue;
216675
- }
216676
- if (wireType !== 0)
218529
+ case 8: {
218530
+ if (wireType !== 2)
216677
218531
  break;
216678
- if (!(message.fieldTags && message.fieldTags.length))
216679
- message.fieldTags = [];
216680
- message.fieldTags.push(reader.int32());
218532
+ message.treatmentGoals = $root.CmsAccessTreatmentGoals.decode(reader, reader.uint32(), undefined, _depth + 1, message.treatmentGoals);
218533
+ message.payload = "treatmentGoals";
216681
218534
  continue;
216682
218535
  }
216683
218536
  }
@@ -216691,185 +218544,267 @@ $root.TaggedCustomField = (function() {
216691
218544
  };
216692
218545
 
216693
218546
  /**
216694
- * Decodes a TaggedCustomField message from the specified reader or buffer, length delimited.
218547
+ * Decodes a CmsAccessBeneficiaryInfoUpdated message from the specified reader or buffer, length delimited.
216695
218548
  * @function decodeDelimited
216696
- * @memberof TaggedCustomField
218549
+ * @memberof CmsAccessBeneficiaryInfoUpdated
216697
218550
  * @static
216698
218551
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
216699
- * @returns {TaggedCustomField & TaggedCustomField.$Shape} TaggedCustomField
218552
+ * @returns {CmsAccessBeneficiaryInfoUpdated & CmsAccessBeneficiaryInfoUpdated.$Shape} CmsAccessBeneficiaryInfoUpdated
216700
218553
  * @throws {Error} If the payload is not a reader or valid buffer
216701
218554
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
216702
218555
  */
216703
- TaggedCustomField.decodeDelimited = function decodeDelimited(reader) {
218556
+ CmsAccessBeneficiaryInfoUpdated.decodeDelimited = function decodeDelimited(reader) {
216704
218557
  if (!(reader instanceof $Reader))
216705
218558
  reader = new $Reader(reader);
216706
218559
  return this.decode(reader, reader.uint32());
216707
218560
  };
216708
218561
 
216709
218562
  /**
216710
- * Verifies a TaggedCustomField message.
218563
+ * Verifies a CmsAccessBeneficiaryInfoUpdated message.
216711
218564
  * @function verify
216712
- * @memberof TaggedCustomField
218565
+ * @memberof CmsAccessBeneficiaryInfoUpdated
216713
218566
  * @static
216714
218567
  * @param {Object.<string,*>} message Plain object to verify
216715
218568
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
216716
218569
  */
216717
- TaggedCustomField.verify = function verify(message, _depth) {
218570
+ CmsAccessBeneficiaryInfoUpdated.verify = function verify(message, _depth) {
216718
218571
  if (typeof message !== "object" || message === null)
216719
218572
  return "object expected";
216720
218573
  if (_depth === undefined)
216721
218574
  _depth = 0;
216722
218575
  if (_depth > $util.recursionLimit)
216723
218576
  return "max depth exceeded";
216724
- if (message.key != null && message.hasOwnProperty("key"))
216725
- if (!$util.isString(message.key))
216726
- return "key: string expected";
216727
- if (message.value != null && message.hasOwnProperty("value"))
216728
- if (!$util.isString(message.value))
216729
- return "value: string expected";
216730
- if (message.fieldTags != null && message.hasOwnProperty("fieldTags")) {
216731
- if (!Array.isArray(message.fieldTags))
216732
- return "fieldTags: array expected";
216733
- for (var i = 0; i < message.fieldTags.length; ++i)
216734
- switch (message.fieldTags[i]) {
216735
- default:
216736
- return "fieldTags: enum value[] expected";
216737
- case 0:
216738
- case 1:
216739
- case 2:
216740
- case 3:
216741
- case 4:
216742
- case 5:
216743
- case 6:
216744
- break;
216745
- }
218577
+ var properties = {};
218578
+ if (message.timestamp != null && message.hasOwnProperty("timestamp"))
218579
+ if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high)))
218580
+ return "timestamp: integer|Long expected";
218581
+ if (message.hsUserId != null && message.hasOwnProperty("hsUserId"))
218582
+ if (!$util.isString(message.hsUserId))
218583
+ return "hsUserId: string expected";
218584
+ if (message.trackingId != null && message.hasOwnProperty("trackingId"))
218585
+ if (!$util.isString(message.trackingId))
218586
+ return "trackingId: string expected";
218587
+ if (message.infoType != null && message.hasOwnProperty("infoType"))
218588
+ switch (message.infoType) {
218589
+ default:
218590
+ return "infoType: enum value expected";
218591
+ case 0:
218592
+ case 1:
218593
+ case 2:
218594
+ case 3:
218595
+ case 4:
218596
+ break;
218597
+ }
218598
+ if (message.demographicProfile != null && message.hasOwnProperty("demographicProfile")) {
218599
+ properties.payload = 1;
218600
+ {
218601
+ var error = $root.CmsAccessDemographicProfile.verify(message.demographicProfile, _depth + 1);
218602
+ if (error)
218603
+ return "demographicProfile." + error;
218604
+ }
218605
+ }
218606
+ if (message.beneficiaryCmsRecord != null && message.hasOwnProperty("beneficiaryCmsRecord")) {
218607
+ if (properties.payload === 1)
218608
+ return "payload: multiple values";
218609
+ properties.payload = 1;
218610
+ {
218611
+ var error = $root.CmsAccessBeneficiaryCmsRecord.verify(message.beneficiaryCmsRecord, _depth + 1);
218612
+ if (error)
218613
+ return "beneficiaryCmsRecord." + error;
218614
+ }
218615
+ }
218616
+ if (message.careTeam != null && message.hasOwnProperty("careTeam")) {
218617
+ if (properties.payload === 1)
218618
+ return "payload: multiple values";
218619
+ properties.payload = 1;
218620
+ {
218621
+ var error = $root.CmsAccessCareTeam.verify(message.careTeam, _depth + 1);
218622
+ if (error)
218623
+ return "careTeam." + error;
218624
+ }
218625
+ }
218626
+ if (message.treatmentGoals != null && message.hasOwnProperty("treatmentGoals")) {
218627
+ if (properties.payload === 1)
218628
+ return "payload: multiple values";
218629
+ properties.payload = 1;
218630
+ {
218631
+ var error = $root.CmsAccessTreatmentGoals.verify(message.treatmentGoals, _depth + 1);
218632
+ if (error)
218633
+ return "treatmentGoals." + error;
218634
+ }
216746
218635
  }
216747
218636
  return null;
216748
218637
  };
216749
218638
 
216750
218639
  /**
216751
- * Creates a TaggedCustomField message from a plain object. Also converts values to their respective internal types.
218640
+ * Creates a CmsAccessBeneficiaryInfoUpdated message from a plain object. Also converts values to their respective internal types.
216752
218641
  * @function fromObject
216753
- * @memberof TaggedCustomField
218642
+ * @memberof CmsAccessBeneficiaryInfoUpdated
216754
218643
  * @static
216755
218644
  * @param {Object.<string,*>} object Plain object
216756
- * @returns {TaggedCustomField} TaggedCustomField
218645
+ * @returns {CmsAccessBeneficiaryInfoUpdated} CmsAccessBeneficiaryInfoUpdated
216757
218646
  */
216758
- TaggedCustomField.fromObject = function fromObject(object, _depth) {
216759
- if (object instanceof $root.TaggedCustomField)
218647
+ CmsAccessBeneficiaryInfoUpdated.fromObject = function fromObject(object, _depth) {
218648
+ if (object instanceof $root.CmsAccessBeneficiaryInfoUpdated)
216760
218649
  return object;
216761
218650
  if (_depth === undefined)
216762
218651
  _depth = 0;
216763
218652
  if (_depth > $util.recursionLimit)
216764
218653
  throw Error("max depth exceeded");
216765
- var message = new $root.TaggedCustomField();
216766
- if (object.key != null)
216767
- if (typeof object.key !== "string" || object.key.length)
216768
- message.key = String(object.key);
216769
- if (object.value != null)
216770
- if (typeof object.value !== "string" || object.value.length)
216771
- message.value = String(object.value);
216772
- if (object.fieldTags) {
216773
- if (!Array.isArray(object.fieldTags))
216774
- throw TypeError(".TaggedCustomField.fieldTags: array expected");
216775
- message.fieldTags = Array(object.fieldTags.length);
216776
- for (var i = 0; i < object.fieldTags.length; ++i)
216777
- switch (object.fieldTags[i]) {
216778
- default:
216779
- if (typeof object.fieldTags[i] === "number") {
216780
- message.fieldTags[i] = object.fieldTags[i];
216781
- break;
216782
- }
216783
- case "FIELD_TAGS_UNKNOWN":
216784
- case 0:
216785
- message.fieldTags[i] = 0;
216786
- break;
216787
- case "FIELD_TAGS_UNSTRUCTURED_HEALTH_INFORMATION":
216788
- case 1:
216789
- message.fieldTags[i] = 1;
216790
- break;
216791
- case "FIELD_TAGS_EXTERNAL_DIRECT_IDENTIFIER":
216792
- case 2:
216793
- message.fieldTags[i] = 2;
216794
- break;
216795
- case "FIELD_TAGS_EXTERNAL_INDIRECT_IDENTIFIER":
216796
- case 3:
216797
- message.fieldTags[i] = 3;
216798
- break;
216799
- case "FIELD_TAGS_INTERNAL_DIRECT_IDENTIFIER":
216800
- case 4:
216801
- message.fieldTags[i] = 4;
216802
- break;
216803
- case "FIELD_TAGS_INTERNAL_INDIRECT_IDENTIFIER":
216804
- case 5:
216805
- message.fieldTags[i] = 5;
216806
- break;
216807
- case "FIELD_TAGS_STRUCTURED_HEALTH_INFORMATION":
216808
- case 6:
216809
- message.fieldTags[i] = 6;
218654
+ var message = new $root.CmsAccessBeneficiaryInfoUpdated();
218655
+ if (object.timestamp != null)
218656
+ if (typeof object.timestamp === "object" ? object.timestamp.low || object.timestamp.high : Number(object.timestamp) !== 0)
218657
+ if ($util.Long)
218658
+ (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true;
218659
+ else if (typeof object.timestamp === "string")
218660
+ message.timestamp = parseInt(object.timestamp, 10);
218661
+ else if (typeof object.timestamp === "number")
218662
+ message.timestamp = object.timestamp;
218663
+ else if (typeof object.timestamp === "object")
218664
+ message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(true);
218665
+ if (object.hsUserId != null)
218666
+ if (typeof object.hsUserId !== "string" || object.hsUserId.length)
218667
+ message.hsUserId = String(object.hsUserId);
218668
+ if (object.trackingId != null)
218669
+ if (typeof object.trackingId !== "string" || object.trackingId.length)
218670
+ message.trackingId = String(object.trackingId);
218671
+ if (object.infoType !== 0 && (typeof object.infoType !== "string" || $root.CmsAccessBeneficiaryInfoType[object.infoType] !== 0))
218672
+ switch (object.infoType) {
218673
+ default:
218674
+ if (typeof object.infoType === "number") {
218675
+ message.infoType = object.infoType;
216810
218676
  break;
216811
218677
  }
218678
+ break;
218679
+ case "CMS_ACCESS_BENEFICIARY_INFO_TYPE_UNKNOWN":
218680
+ case 0:
218681
+ message.infoType = 0;
218682
+ break;
218683
+ case "CMS_ACCESS_BENEFICIARY_INFO_TYPE_DEMOGRAPHIC_PROFILE":
218684
+ case 1:
218685
+ message.infoType = 1;
218686
+ break;
218687
+ case "CMS_ACCESS_BENEFICIARY_INFO_TYPE_BENEFICIARY_CMS_RECORD":
218688
+ case 2:
218689
+ message.infoType = 2;
218690
+ break;
218691
+ case "CMS_ACCESS_BENEFICIARY_INFO_TYPE_CARE_TEAM":
218692
+ case 3:
218693
+ message.infoType = 3;
218694
+ break;
218695
+ case "CMS_ACCESS_BENEFICIARY_INFO_TYPE_TREATMENT_GOALS":
218696
+ case 4:
218697
+ message.infoType = 4;
218698
+ break;
218699
+ }
218700
+ if (object.demographicProfile != null) {
218701
+ if (typeof object.demographicProfile !== "object")
218702
+ throw TypeError(".CmsAccessBeneficiaryInfoUpdated.demographicProfile: object expected");
218703
+ message.demographicProfile = $root.CmsAccessDemographicProfile.fromObject(object.demographicProfile, _depth + 1);
218704
+ }
218705
+ if (object.beneficiaryCmsRecord != null) {
218706
+ if (typeof object.beneficiaryCmsRecord !== "object")
218707
+ throw TypeError(".CmsAccessBeneficiaryInfoUpdated.beneficiaryCmsRecord: object expected");
218708
+ message.beneficiaryCmsRecord = $root.CmsAccessBeneficiaryCmsRecord.fromObject(object.beneficiaryCmsRecord, _depth + 1);
218709
+ }
218710
+ if (object.careTeam != null) {
218711
+ if (typeof object.careTeam !== "object")
218712
+ throw TypeError(".CmsAccessBeneficiaryInfoUpdated.careTeam: object expected");
218713
+ message.careTeam = $root.CmsAccessCareTeam.fromObject(object.careTeam, _depth + 1);
218714
+ }
218715
+ if (object.treatmentGoals != null) {
218716
+ if (typeof object.treatmentGoals !== "object")
218717
+ throw TypeError(".CmsAccessBeneficiaryInfoUpdated.treatmentGoals: object expected");
218718
+ message.treatmentGoals = $root.CmsAccessTreatmentGoals.fromObject(object.treatmentGoals, _depth + 1);
216812
218719
  }
216813
218720
  return message;
216814
218721
  };
216815
218722
 
216816
218723
  /**
216817
- * Creates a plain object from a TaggedCustomField message. Also converts values to other types if specified.
218724
+ * Creates a plain object from a CmsAccessBeneficiaryInfoUpdated message. Also converts values to other types if specified.
216818
218725
  * @function toObject
216819
- * @memberof TaggedCustomField
218726
+ * @memberof CmsAccessBeneficiaryInfoUpdated
216820
218727
  * @static
216821
- * @param {TaggedCustomField} message TaggedCustomField
218728
+ * @param {CmsAccessBeneficiaryInfoUpdated} message CmsAccessBeneficiaryInfoUpdated
216822
218729
  * @param {$protobuf.IConversionOptions} [options] Conversion options
216823
218730
  * @returns {Object.<string,*>} Plain object
216824
218731
  */
216825
- TaggedCustomField.toObject = function toObject(message, options) {
218732
+ CmsAccessBeneficiaryInfoUpdated.toObject = function toObject(message, options) {
216826
218733
  if (!options)
216827
218734
  options = {};
216828
218735
  var object = {};
216829
- if (options.arrays || options.defaults)
216830
- object.fieldTags = [];
216831
218736
  if (options.defaults) {
216832
- object.key = "";
216833
- object.value = "";
218737
+ if ($util.Long) {
218738
+ var long = new $util.Long(0, 0, true);
218739
+ object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long;
218740
+ } else
218741
+ object.timestamp = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0;
218742
+ object.hsUserId = "";
218743
+ object.trackingId = "";
218744
+ object.infoType = options.enums === String ? "CMS_ACCESS_BENEFICIARY_INFO_TYPE_UNKNOWN" : 0;
216834
218745
  }
216835
- if (message.key != null && message.hasOwnProperty("key"))
216836
- object.key = message.key;
216837
- if (message.value != null && message.hasOwnProperty("value"))
216838
- object.value = message.value;
216839
- if (message.fieldTags && message.fieldTags.length) {
216840
- object.fieldTags = Array(message.fieldTags.length);
216841
- for (var j = 0; j < message.fieldTags.length; ++j)
216842
- object.fieldTags[j] = options.enums === String ? $root.field_tags.FieldTags[message.fieldTags[j]] === undefined ? message.fieldTags[j] : $root.field_tags.FieldTags[message.fieldTags[j]] : message.fieldTags[j];
218746
+ if (message.timestamp != null && message.hasOwnProperty("timestamp"))
218747
+ if (typeof BigInt !== "undefined" && options.longs === BigInt)
218748
+ object.timestamp = typeof message.timestamp === "number" ? BigInt(message.timestamp) : $util.Long.fromBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0, true).toBigInt();
218749
+ else if (typeof message.timestamp === "number")
218750
+ object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp;
218751
+ else
218752
+ object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber(true) : message.timestamp;
218753
+ if (message.hsUserId != null && message.hasOwnProperty("hsUserId"))
218754
+ object.hsUserId = message.hsUserId;
218755
+ if (message.trackingId != null && message.hasOwnProperty("trackingId"))
218756
+ object.trackingId = message.trackingId;
218757
+ if (message.infoType != null && message.hasOwnProperty("infoType"))
218758
+ object.infoType = options.enums === String ? $root.CmsAccessBeneficiaryInfoType[message.infoType] === undefined ? message.infoType : $root.CmsAccessBeneficiaryInfoType[message.infoType] : message.infoType;
218759
+ if (message.demographicProfile != null && message.hasOwnProperty("demographicProfile")) {
218760
+ object.demographicProfile = $root.CmsAccessDemographicProfile.toObject(message.demographicProfile, options);
218761
+ if (options.oneofs)
218762
+ object.payload = "demographicProfile";
218763
+ }
218764
+ if (message.beneficiaryCmsRecord != null && message.hasOwnProperty("beneficiaryCmsRecord")) {
218765
+ object.beneficiaryCmsRecord = $root.CmsAccessBeneficiaryCmsRecord.toObject(message.beneficiaryCmsRecord, options);
218766
+ if (options.oneofs)
218767
+ object.payload = "beneficiaryCmsRecord";
218768
+ }
218769
+ if (message.careTeam != null && message.hasOwnProperty("careTeam")) {
218770
+ object.careTeam = $root.CmsAccessCareTeam.toObject(message.careTeam, options);
218771
+ if (options.oneofs)
218772
+ object.payload = "careTeam";
218773
+ }
218774
+ if (message.treatmentGoals != null && message.hasOwnProperty("treatmentGoals")) {
218775
+ object.treatmentGoals = $root.CmsAccessTreatmentGoals.toObject(message.treatmentGoals, options);
218776
+ if (options.oneofs)
218777
+ object.payload = "treatmentGoals";
216843
218778
  }
216844
218779
  return object;
216845
218780
  };
216846
218781
 
216847
218782
  /**
216848
- * Converts this TaggedCustomField to JSON.
218783
+ * Converts this CmsAccessBeneficiaryInfoUpdated to JSON.
216849
218784
  * @function toJSON
216850
- * @memberof TaggedCustomField
218785
+ * @memberof CmsAccessBeneficiaryInfoUpdated
216851
218786
  * @instance
216852
218787
  * @returns {Object.<string,*>} JSON object
216853
218788
  */
216854
- TaggedCustomField.prototype.toJSON = function toJSON() {
218789
+ CmsAccessBeneficiaryInfoUpdated.prototype.toJSON = function toJSON() {
216855
218790
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
216856
218791
  };
216857
218792
 
216858
218793
  /**
216859
- * Gets the type url for TaggedCustomField
218794
+ * Gets the type url for CmsAccessBeneficiaryInfoUpdated
216860
218795
  * @function getTypeUrl
216861
- * @memberof TaggedCustomField
218796
+ * @memberof CmsAccessBeneficiaryInfoUpdated
216862
218797
  * @static
216863
218798
  * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"`
216864
218799
  * @returns {string} The type url
216865
218800
  */
216866
- TaggedCustomField.getTypeUrl = function getTypeUrl(prefix) {
218801
+ CmsAccessBeneficiaryInfoUpdated.getTypeUrl = function getTypeUrl(prefix) {
216867
218802
  if (prefix === undefined)
216868
218803
  prefix = "type.googleapis.com";
216869
- return prefix + "/TaggedCustomField";
218804
+ return prefix + "/CmsAccessBeneficiaryInfoUpdated";
216870
218805
  };
216871
218806
 
216872
- return TaggedCustomField;
218807
+ return CmsAccessBeneficiaryInfoUpdated;
216873
218808
  })();
216874
218809
 
216875
218810
  /**
@@ -276565,296 +278500,6 @@ $root.ModerationActionPerformed = (function() {
276565
278500
  return ModerationActionPerformed;
276566
278501
  })();
276567
278502
 
276568
- $root.UserOnboardingTopicResponses = (function() {
276569
-
276570
- /**
276571
- * Properties of a UserOnboardingTopicResponses.
276572
- * @typedef {Object} UserOnboardingTopicResponses.$Properties
276573
- * @property {string|null} [userId] UserOnboardingTopicResponses userId
276574
- * @property {Array.<string>|null} [onboardTopics] UserOnboardingTopicResponses onboardTopics
276575
- * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
276576
- */
276577
-
276578
- /**
276579
- * Properties of a UserOnboardingTopicResponses.
276580
- * @name IUserOnboardingTopicResponses
276581
- * @interface IUserOnboardingTopicResponses
276582
- * @augments UserOnboardingTopicResponses.$Properties
276583
- * @deprecated Use UserOnboardingTopicResponses.$Properties instead.
276584
- */
276585
-
276586
- /**
276587
- * Shape of a UserOnboardingTopicResponses.
276588
- * @typedef {UserOnboardingTopicResponses.$Properties} UserOnboardingTopicResponses.$Shape
276589
- */
276590
-
276591
- /**
276592
- * Constructs a new UserOnboardingTopicResponses.
276593
- * @name UserOnboardingTopicResponses
276594
- * @classdesc Represents a UserOnboardingTopicResponses.
276595
- * @constructor
276596
- * @param {UserOnboardingTopicResponses.$Properties=} [properties] Properties to set
276597
- * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
276598
- */
276599
- function UserOnboardingTopicResponses(properties) {
276600
- this.onboardTopics = [];
276601
- if (properties)
276602
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
276603
- if (properties[keys[i]] != null && keys[i] !== "__proto__")
276604
- this[keys[i]] = properties[keys[i]];
276605
- }
276606
-
276607
- /**
276608
- * UserOnboardingTopicResponses userId.
276609
- * @member {string} userId
276610
- * @memberof UserOnboardingTopicResponses
276611
- * @instance
276612
- */
276613
- UserOnboardingTopicResponses.prototype.userId = "";
276614
-
276615
- /**
276616
- * UserOnboardingTopicResponses onboardTopics.
276617
- * @member {Array.<string>} onboardTopics
276618
- * @memberof UserOnboardingTopicResponses
276619
- * @instance
276620
- */
276621
- UserOnboardingTopicResponses.prototype.onboardTopics = $util.emptyArray;
276622
-
276623
- /**
276624
- * Creates a new UserOnboardingTopicResponses instance using the specified properties.
276625
- * @function create
276626
- * @memberof UserOnboardingTopicResponses
276627
- * @static
276628
- * @param {UserOnboardingTopicResponses.$Properties=} [properties] Properties to set
276629
- * @returns {UserOnboardingTopicResponses} UserOnboardingTopicResponses instance
276630
- * @type {{
276631
- * (properties: UserOnboardingTopicResponses.$Shape): UserOnboardingTopicResponses & UserOnboardingTopicResponses.$Shape;
276632
- * (properties?: UserOnboardingTopicResponses.$Properties): UserOnboardingTopicResponses;
276633
- * }}
276634
- */
276635
- UserOnboardingTopicResponses.create = function create(properties) {
276636
- return new UserOnboardingTopicResponses(properties);
276637
- };
276638
-
276639
- /**
276640
- * Encodes the specified UserOnboardingTopicResponses message. Does not implicitly {@link UserOnboardingTopicResponses.verify|verify} messages.
276641
- * @function encode
276642
- * @memberof UserOnboardingTopicResponses
276643
- * @static
276644
- * @param {UserOnboardingTopicResponses.$Properties} message UserOnboardingTopicResponses message or plain object to encode
276645
- * @param {$protobuf.Writer} [writer] Writer to encode to
276646
- * @returns {$protobuf.Writer} Writer
276647
- */
276648
- UserOnboardingTopicResponses.encode = function encode(message, writer) {
276649
- if (!writer)
276650
- writer = $Writer.create();
276651
- if (message.userId != null && Object.hasOwnProperty.call(message, "userId"))
276652
- writer.uint32(/* id 1, wireType 2 =*/10).string(message.userId);
276653
- if (message.onboardTopics != null && message.onboardTopics.length)
276654
- for (var i = 0; i < message.onboardTopics.length; ++i)
276655
- writer.uint32(/* id 2, wireType 2 =*/18).string(message.onboardTopics[i]);
276656
- if (message.$unknowns != null && Object.hasOwnProperty.call(message, "$unknowns"))
276657
- for (var i = 0; i < message.$unknowns.length; ++i)
276658
- writer.raw(message.$unknowns[i]);
276659
- return writer;
276660
- };
276661
-
276662
- /**
276663
- * Encodes the specified UserOnboardingTopicResponses message, length delimited. Does not implicitly {@link UserOnboardingTopicResponses.verify|verify} messages.
276664
- * @function encodeDelimited
276665
- * @memberof UserOnboardingTopicResponses
276666
- * @static
276667
- * @param {UserOnboardingTopicResponses.$Properties} message UserOnboardingTopicResponses message or plain object to encode
276668
- * @param {$protobuf.Writer} [writer] Writer to encode to
276669
- * @returns {$protobuf.Writer} Writer
276670
- */
276671
- UserOnboardingTopicResponses.encodeDelimited = function encodeDelimited(message, writer) {
276672
- return this.encode(message, writer).ldelim();
276673
- };
276674
-
276675
- /**
276676
- * Decodes a UserOnboardingTopicResponses message from the specified reader or buffer.
276677
- * @function decode
276678
- * @memberof UserOnboardingTopicResponses
276679
- * @static
276680
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
276681
- * @param {number} [length] Message length if known beforehand
276682
- * @returns {UserOnboardingTopicResponses & UserOnboardingTopicResponses.$Shape} UserOnboardingTopicResponses
276683
- * @throws {Error} If the payload is not a reader or valid buffer
276684
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
276685
- */
276686
- UserOnboardingTopicResponses.decode = function decode(reader, length, _end, _depth, _target) {
276687
- if (!(reader instanceof $Reader))
276688
- reader = $Reader.create(reader);
276689
- if (_depth === undefined)
276690
- _depth = 0;
276691
- if (_depth > $Reader.recursionLimit)
276692
- throw Error("max depth exceeded");
276693
- var end = length === undefined ? reader.len : reader.pos + length, message = _target || new $root.UserOnboardingTopicResponses(), value;
276694
- while (reader.pos < end) {
276695
- var start = reader.pos;
276696
- var tag = reader.tag();
276697
- if (tag === _end) {
276698
- _end = undefined;
276699
- break;
276700
- }
276701
- var wireType = tag & 7;
276702
- switch (tag >>>= 3) {
276703
- case 1: {
276704
- if (wireType !== 2)
276705
- break;
276706
- if ((value = reader.string()).length)
276707
- message.userId = value;
276708
- else
276709
- delete message.userId;
276710
- continue;
276711
- }
276712
- case 2: {
276713
- if (wireType !== 2)
276714
- break;
276715
- if (!(message.onboardTopics && message.onboardTopics.length))
276716
- message.onboardTopics = [];
276717
- message.onboardTopics.push(reader.string());
276718
- continue;
276719
- }
276720
- }
276721
- reader.skipType(wireType, _depth, tag);
276722
- $util.makeProp(message, "$unknowns", false);
276723
- (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos));
276724
- }
276725
- if (_end !== undefined)
276726
- throw Error("missing end group");
276727
- return message;
276728
- };
276729
-
276730
- /**
276731
- * Decodes a UserOnboardingTopicResponses message from the specified reader or buffer, length delimited.
276732
- * @function decodeDelimited
276733
- * @memberof UserOnboardingTopicResponses
276734
- * @static
276735
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
276736
- * @returns {UserOnboardingTopicResponses & UserOnboardingTopicResponses.$Shape} UserOnboardingTopicResponses
276737
- * @throws {Error} If the payload is not a reader or valid buffer
276738
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
276739
- */
276740
- UserOnboardingTopicResponses.decodeDelimited = function decodeDelimited(reader) {
276741
- if (!(reader instanceof $Reader))
276742
- reader = new $Reader(reader);
276743
- return this.decode(reader, reader.uint32());
276744
- };
276745
-
276746
- /**
276747
- * Verifies a UserOnboardingTopicResponses message.
276748
- * @function verify
276749
- * @memberof UserOnboardingTopicResponses
276750
- * @static
276751
- * @param {Object.<string,*>} message Plain object to verify
276752
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
276753
- */
276754
- UserOnboardingTopicResponses.verify = function verify(message, _depth) {
276755
- if (typeof message !== "object" || message === null)
276756
- return "object expected";
276757
- if (_depth === undefined)
276758
- _depth = 0;
276759
- if (_depth > $util.recursionLimit)
276760
- return "max depth exceeded";
276761
- if (message.userId != null && message.hasOwnProperty("userId"))
276762
- if (!$util.isString(message.userId))
276763
- return "userId: string expected";
276764
- if (message.onboardTopics != null && message.hasOwnProperty("onboardTopics")) {
276765
- if (!Array.isArray(message.onboardTopics))
276766
- return "onboardTopics: array expected";
276767
- for (var i = 0; i < message.onboardTopics.length; ++i)
276768
- if (!$util.isString(message.onboardTopics[i]))
276769
- return "onboardTopics: string[] expected";
276770
- }
276771
- return null;
276772
- };
276773
-
276774
- /**
276775
- * Creates a UserOnboardingTopicResponses message from a plain object. Also converts values to their respective internal types.
276776
- * @function fromObject
276777
- * @memberof UserOnboardingTopicResponses
276778
- * @static
276779
- * @param {Object.<string,*>} object Plain object
276780
- * @returns {UserOnboardingTopicResponses} UserOnboardingTopicResponses
276781
- */
276782
- UserOnboardingTopicResponses.fromObject = function fromObject(object, _depth) {
276783
- if (object instanceof $root.UserOnboardingTopicResponses)
276784
- return object;
276785
- if (_depth === undefined)
276786
- _depth = 0;
276787
- if (_depth > $util.recursionLimit)
276788
- throw Error("max depth exceeded");
276789
- var message = new $root.UserOnboardingTopicResponses();
276790
- if (object.userId != null)
276791
- if (typeof object.userId !== "string" || object.userId.length)
276792
- message.userId = String(object.userId);
276793
- if (object.onboardTopics) {
276794
- if (!Array.isArray(object.onboardTopics))
276795
- throw TypeError(".UserOnboardingTopicResponses.onboardTopics: array expected");
276796
- message.onboardTopics = Array(object.onboardTopics.length);
276797
- for (var i = 0; i < object.onboardTopics.length; ++i)
276798
- message.onboardTopics[i] = String(object.onboardTopics[i]);
276799
- }
276800
- return message;
276801
- };
276802
-
276803
- /**
276804
- * Creates a plain object from a UserOnboardingTopicResponses message. Also converts values to other types if specified.
276805
- * @function toObject
276806
- * @memberof UserOnboardingTopicResponses
276807
- * @static
276808
- * @param {UserOnboardingTopicResponses} message UserOnboardingTopicResponses
276809
- * @param {$protobuf.IConversionOptions} [options] Conversion options
276810
- * @returns {Object.<string,*>} Plain object
276811
- */
276812
- UserOnboardingTopicResponses.toObject = function toObject(message, options) {
276813
- if (!options)
276814
- options = {};
276815
- var object = {};
276816
- if (options.arrays || options.defaults)
276817
- object.onboardTopics = [];
276818
- if (options.defaults)
276819
- object.userId = "";
276820
- if (message.userId != null && message.hasOwnProperty("userId"))
276821
- object.userId = message.userId;
276822
- if (message.onboardTopics && message.onboardTopics.length) {
276823
- object.onboardTopics = Array(message.onboardTopics.length);
276824
- for (var j = 0; j < message.onboardTopics.length; ++j)
276825
- object.onboardTopics[j] = message.onboardTopics[j];
276826
- }
276827
- return object;
276828
- };
276829
-
276830
- /**
276831
- * Converts this UserOnboardingTopicResponses to JSON.
276832
- * @function toJSON
276833
- * @memberof UserOnboardingTopicResponses
276834
- * @instance
276835
- * @returns {Object.<string,*>} JSON object
276836
- */
276837
- UserOnboardingTopicResponses.prototype.toJSON = function toJSON() {
276838
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
276839
- };
276840
-
276841
- /**
276842
- * Gets the type url for UserOnboardingTopicResponses
276843
- * @function getTypeUrl
276844
- * @memberof UserOnboardingTopicResponses
276845
- * @static
276846
- * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"`
276847
- * @returns {string} The type url
276848
- */
276849
- UserOnboardingTopicResponses.getTypeUrl = function getTypeUrl(prefix) {
276850
- if (prefix === undefined)
276851
- prefix = "type.googleapis.com";
276852
- return prefix + "/UserOnboardingTopicResponses";
276853
- };
276854
-
276855
- return UserOnboardingTopicResponses;
276856
- })();
276857
-
276858
278503
  $root.UserOnboardingPrimaryTopicSelected = (function() {
276859
278504
 
276860
278505
  /**