@headspace/protos-events 1.844.0 → 1.846.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.
Files changed (3) hide show
  1. package/lib/index.d.ts +338 -0
  2. package/lib/index.js +1106 -0
  3. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -186337,6 +186337,651 @@ $root.CareAssessmentCompleted = (function() {
186337
186337
  return CareAssessmentCompleted;
186338
186338
  })();
186339
186339
 
186340
+ $root.CareAssessmentMissed = (function() {
186341
+
186342
+ /**
186343
+ * Properties of a CareAssessmentMissed.
186344
+ * @typedef {Object} CareAssessmentMissed.$Properties
186345
+ * @property {number|Long|null} [timestamp] CareAssessmentMissed timestamp
186346
+ * @property {CareAssessmentType|null} [careAssessmentType] CareAssessmentMissed careAssessmentType
186347
+ * @property {string|null} [hsUserId] CareAssessmentMissed hsUserId
186348
+ * @property {number|null} [gingerUserId] CareAssessmentMissed gingerUserId
186349
+ * @property {string|null} [missedAtIsoDate] CareAssessmentMissed missedAtIsoDate
186350
+ * @property {number|Long|null} [assignmentId] CareAssessmentMissed assignmentId
186351
+ * @property {string|null} [activityId] CareAssessmentMissed activityId
186352
+ * @property {CareAssessmentCadence|null} [careAssessmentCadence] CareAssessmentMissed careAssessmentCadence
186353
+ * @property {CareAssessmentContext|null} [assessmentContext] CareAssessmentMissed assessmentContext
186354
+ * @property {string|null} [dueAtIsoDate] CareAssessmentMissed dueAtIsoDate
186355
+ * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
186356
+ */
186357
+
186358
+ /**
186359
+ * Properties of a CareAssessmentMissed.
186360
+ * @name ICareAssessmentMissed
186361
+ * @interface ICareAssessmentMissed
186362
+ * @augments CareAssessmentMissed.$Properties
186363
+ * @deprecated Use CareAssessmentMissed.$Properties instead.
186364
+ */
186365
+
186366
+ /**
186367
+ * Shape of a CareAssessmentMissed.
186368
+ * @typedef {CareAssessmentMissed.$Properties} CareAssessmentMissed.$Shape
186369
+ */
186370
+
186371
+ /**
186372
+ * Constructs a new CareAssessmentMissed.
186373
+ * @name CareAssessmentMissed
186374
+ * @classdesc Represents a CareAssessmentMissed.
186375
+ * @constructor
186376
+ * @param {CareAssessmentMissed.$Properties=} [properties] Properties to set
186377
+ * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
186378
+ */
186379
+ function CareAssessmentMissed(properties) {
186380
+ if (properties)
186381
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
186382
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
186383
+ this[keys[i]] = properties[keys[i]];
186384
+ }
186385
+
186386
+ /**
186387
+ * CareAssessmentMissed timestamp.
186388
+ * @member {number|Long} timestamp
186389
+ * @memberof CareAssessmentMissed
186390
+ * @instance
186391
+ */
186392
+ CareAssessmentMissed.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
186393
+
186394
+ /**
186395
+ * CareAssessmentMissed careAssessmentType.
186396
+ * @member {CareAssessmentType} careAssessmentType
186397
+ * @memberof CareAssessmentMissed
186398
+ * @instance
186399
+ */
186400
+ CareAssessmentMissed.prototype.careAssessmentType = 0;
186401
+
186402
+ /**
186403
+ * CareAssessmentMissed hsUserId.
186404
+ * @member {string} hsUserId
186405
+ * @memberof CareAssessmentMissed
186406
+ * @instance
186407
+ */
186408
+ CareAssessmentMissed.prototype.hsUserId = "";
186409
+
186410
+ /**
186411
+ * CareAssessmentMissed gingerUserId.
186412
+ * @member {number} gingerUserId
186413
+ * @memberof CareAssessmentMissed
186414
+ * @instance
186415
+ */
186416
+ CareAssessmentMissed.prototype.gingerUserId = 0;
186417
+
186418
+ /**
186419
+ * CareAssessmentMissed missedAtIsoDate.
186420
+ * @member {string} missedAtIsoDate
186421
+ * @memberof CareAssessmentMissed
186422
+ * @instance
186423
+ */
186424
+ CareAssessmentMissed.prototype.missedAtIsoDate = "";
186425
+
186426
+ /**
186427
+ * CareAssessmentMissed assignmentId.
186428
+ * @member {number|Long} assignmentId
186429
+ * @memberof CareAssessmentMissed
186430
+ * @instance
186431
+ */
186432
+ CareAssessmentMissed.prototype.assignmentId = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
186433
+
186434
+ /**
186435
+ * CareAssessmentMissed activityId.
186436
+ * @member {string} activityId
186437
+ * @memberof CareAssessmentMissed
186438
+ * @instance
186439
+ */
186440
+ CareAssessmentMissed.prototype.activityId = "";
186441
+
186442
+ /**
186443
+ * CareAssessmentMissed careAssessmentCadence.
186444
+ * @member {CareAssessmentCadence} careAssessmentCadence
186445
+ * @memberof CareAssessmentMissed
186446
+ * @instance
186447
+ */
186448
+ CareAssessmentMissed.prototype.careAssessmentCadence = 0;
186449
+
186450
+ /**
186451
+ * CareAssessmentMissed assessmentContext.
186452
+ * @member {CareAssessmentContext|null|undefined} assessmentContext
186453
+ * @memberof CareAssessmentMissed
186454
+ * @instance
186455
+ */
186456
+ CareAssessmentMissed.prototype.assessmentContext = null;
186457
+
186458
+ /**
186459
+ * CareAssessmentMissed dueAtIsoDate.
186460
+ * @member {string} dueAtIsoDate
186461
+ * @memberof CareAssessmentMissed
186462
+ * @instance
186463
+ */
186464
+ CareAssessmentMissed.prototype.dueAtIsoDate = "";
186465
+
186466
+ // OneOf field names bound to virtual getters and setters
186467
+ var $oneOfFields;
186468
+
186469
+ // Virtual OneOf for proto3 optional field
186470
+ Object.defineProperty(CareAssessmentMissed.prototype, "_assessmentContext", {
186471
+ get: $util.oneOfGetter($oneOfFields = ["assessmentContext"]),
186472
+ set: $util.oneOfSetter($oneOfFields)
186473
+ });
186474
+
186475
+ /**
186476
+ * Creates a new CareAssessmentMissed instance using the specified properties.
186477
+ * @function create
186478
+ * @memberof CareAssessmentMissed
186479
+ * @static
186480
+ * @param {CareAssessmentMissed.$Properties=} [properties] Properties to set
186481
+ * @returns {CareAssessmentMissed} CareAssessmentMissed instance
186482
+ * @type {{
186483
+ * (properties: CareAssessmentMissed.$Shape): CareAssessmentMissed & CareAssessmentMissed.$Shape;
186484
+ * (properties?: CareAssessmentMissed.$Properties): CareAssessmentMissed;
186485
+ * }}
186486
+ */
186487
+ CareAssessmentMissed.create = function create(properties) {
186488
+ return new CareAssessmentMissed(properties);
186489
+ };
186490
+
186491
+ /**
186492
+ * Encodes the specified CareAssessmentMissed message. Does not implicitly {@link CareAssessmentMissed.verify|verify} messages.
186493
+ * @function encode
186494
+ * @memberof CareAssessmentMissed
186495
+ * @static
186496
+ * @param {CareAssessmentMissed.$Properties} message CareAssessmentMissed message or plain object to encode
186497
+ * @param {$protobuf.Writer} [writer] Writer to encode to
186498
+ * @returns {$protobuf.Writer} Writer
186499
+ */
186500
+ CareAssessmentMissed.encode = function encode(message, writer) {
186501
+ if (!writer)
186502
+ writer = $Writer.create();
186503
+ if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp"))
186504
+ writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.timestamp);
186505
+ if (message.careAssessmentType != null && Object.hasOwnProperty.call(message, "careAssessmentType"))
186506
+ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.careAssessmentType);
186507
+ if (message.hsUserId != null && Object.hasOwnProperty.call(message, "hsUserId"))
186508
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.hsUserId);
186509
+ if (message.gingerUserId != null && Object.hasOwnProperty.call(message, "gingerUserId"))
186510
+ writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.gingerUserId);
186511
+ if (message.missedAtIsoDate != null && Object.hasOwnProperty.call(message, "missedAtIsoDate"))
186512
+ writer.uint32(/* id 5, wireType 2 =*/42).string(message.missedAtIsoDate);
186513
+ if (message.assignmentId != null && Object.hasOwnProperty.call(message, "assignmentId"))
186514
+ writer.uint32(/* id 6, wireType 0 =*/48).int64(message.assignmentId);
186515
+ if (message.activityId != null && Object.hasOwnProperty.call(message, "activityId"))
186516
+ writer.uint32(/* id 7, wireType 2 =*/58).string(message.activityId);
186517
+ if (message.careAssessmentCadence != null && Object.hasOwnProperty.call(message, "careAssessmentCadence"))
186518
+ writer.uint32(/* id 8, wireType 0 =*/64).int32(message.careAssessmentCadence);
186519
+ if (message.assessmentContext != null && Object.hasOwnProperty.call(message, "assessmentContext"))
186520
+ writer.uint32(/* id 9, wireType 0 =*/72).int32(message.assessmentContext);
186521
+ if (message.dueAtIsoDate != null && Object.hasOwnProperty.call(message, "dueAtIsoDate"))
186522
+ writer.uint32(/* id 10, wireType 2 =*/82).string(message.dueAtIsoDate);
186523
+ if (message.$unknowns != null && Object.hasOwnProperty.call(message, "$unknowns"))
186524
+ for (var i = 0; i < message.$unknowns.length; ++i)
186525
+ writer.raw(message.$unknowns[i]);
186526
+ return writer;
186527
+ };
186528
+
186529
+ /**
186530
+ * Encodes the specified CareAssessmentMissed message, length delimited. Does not implicitly {@link CareAssessmentMissed.verify|verify} messages.
186531
+ * @function encodeDelimited
186532
+ * @memberof CareAssessmentMissed
186533
+ * @static
186534
+ * @param {CareAssessmentMissed.$Properties} message CareAssessmentMissed message or plain object to encode
186535
+ * @param {$protobuf.Writer} [writer] Writer to encode to
186536
+ * @returns {$protobuf.Writer} Writer
186537
+ */
186538
+ CareAssessmentMissed.encodeDelimited = function encodeDelimited(message, writer) {
186539
+ return this.encode(message, writer).ldelim();
186540
+ };
186541
+
186542
+ /**
186543
+ * Decodes a CareAssessmentMissed message from the specified reader or buffer.
186544
+ * @function decode
186545
+ * @memberof CareAssessmentMissed
186546
+ * @static
186547
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
186548
+ * @param {number} [length] Message length if known beforehand
186549
+ * @returns {CareAssessmentMissed & CareAssessmentMissed.$Shape} CareAssessmentMissed
186550
+ * @throws {Error} If the payload is not a reader or valid buffer
186551
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
186552
+ */
186553
+ CareAssessmentMissed.decode = function decode(reader, length, _end, _depth, _target) {
186554
+ if (!(reader instanceof $Reader))
186555
+ reader = $Reader.create(reader);
186556
+ if (_depth === undefined)
186557
+ _depth = 0;
186558
+ if (_depth > $Reader.recursionLimit)
186559
+ throw Error("max depth exceeded");
186560
+ var end = length === undefined ? reader.len : reader.pos + length, message = _target || new $root.CareAssessmentMissed(), value;
186561
+ while (reader.pos < end) {
186562
+ var start = reader.pos;
186563
+ var tag = reader.tag();
186564
+ if (tag === _end) {
186565
+ _end = undefined;
186566
+ break;
186567
+ }
186568
+ var wireType = tag & 7;
186569
+ switch (tag >>>= 3) {
186570
+ case 1: {
186571
+ if (wireType !== 0)
186572
+ break;
186573
+ if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0)
186574
+ message.timestamp = value;
186575
+ else
186576
+ delete message.timestamp;
186577
+ continue;
186578
+ }
186579
+ case 2: {
186580
+ if (wireType !== 0)
186581
+ break;
186582
+ if (value = reader.int32())
186583
+ message.careAssessmentType = value;
186584
+ else
186585
+ delete message.careAssessmentType;
186586
+ continue;
186587
+ }
186588
+ case 3: {
186589
+ if (wireType !== 2)
186590
+ break;
186591
+ if ((value = reader.string()).length)
186592
+ message.hsUserId = value;
186593
+ else
186594
+ delete message.hsUserId;
186595
+ continue;
186596
+ }
186597
+ case 4: {
186598
+ if (wireType !== 0)
186599
+ break;
186600
+ if (value = reader.uint32())
186601
+ message.gingerUserId = value;
186602
+ else
186603
+ delete message.gingerUserId;
186604
+ continue;
186605
+ }
186606
+ case 5: {
186607
+ if (wireType !== 2)
186608
+ break;
186609
+ if ((value = reader.string()).length)
186610
+ message.missedAtIsoDate = value;
186611
+ else
186612
+ delete message.missedAtIsoDate;
186613
+ continue;
186614
+ }
186615
+ case 6: {
186616
+ if (wireType !== 0)
186617
+ break;
186618
+ if (typeof (value = reader.int64()) === "object" ? value.low || value.high : value !== 0)
186619
+ message.assignmentId = value;
186620
+ else
186621
+ delete message.assignmentId;
186622
+ continue;
186623
+ }
186624
+ case 7: {
186625
+ if (wireType !== 2)
186626
+ break;
186627
+ if ((value = reader.string()).length)
186628
+ message.activityId = value;
186629
+ else
186630
+ delete message.activityId;
186631
+ continue;
186632
+ }
186633
+ case 8: {
186634
+ if (wireType !== 0)
186635
+ break;
186636
+ if (value = reader.int32())
186637
+ message.careAssessmentCadence = value;
186638
+ else
186639
+ delete message.careAssessmentCadence;
186640
+ continue;
186641
+ }
186642
+ case 9: {
186643
+ if (wireType !== 0)
186644
+ break;
186645
+ message.assessmentContext = reader.int32();
186646
+ message._assessmentContext = "assessmentContext";
186647
+ continue;
186648
+ }
186649
+ case 10: {
186650
+ if (wireType !== 2)
186651
+ break;
186652
+ if ((value = reader.string()).length)
186653
+ message.dueAtIsoDate = value;
186654
+ else
186655
+ delete message.dueAtIsoDate;
186656
+ continue;
186657
+ }
186658
+ }
186659
+ reader.skipType(wireType, _depth, tag);
186660
+ $util.makeProp(message, "$unknowns", false);
186661
+ (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos));
186662
+ }
186663
+ if (_end !== undefined)
186664
+ throw Error("missing end group");
186665
+ return message;
186666
+ };
186667
+
186668
+ /**
186669
+ * Decodes a CareAssessmentMissed message from the specified reader or buffer, length delimited.
186670
+ * @function decodeDelimited
186671
+ * @memberof CareAssessmentMissed
186672
+ * @static
186673
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
186674
+ * @returns {CareAssessmentMissed & CareAssessmentMissed.$Shape} CareAssessmentMissed
186675
+ * @throws {Error} If the payload is not a reader or valid buffer
186676
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
186677
+ */
186678
+ CareAssessmentMissed.decodeDelimited = function decodeDelimited(reader) {
186679
+ if (!(reader instanceof $Reader))
186680
+ reader = new $Reader(reader);
186681
+ return this.decode(reader, reader.uint32());
186682
+ };
186683
+
186684
+ /**
186685
+ * Verifies a CareAssessmentMissed message.
186686
+ * @function verify
186687
+ * @memberof CareAssessmentMissed
186688
+ * @static
186689
+ * @param {Object.<string,*>} message Plain object to verify
186690
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
186691
+ */
186692
+ CareAssessmentMissed.verify = function verify(message, _depth) {
186693
+ if (typeof message !== "object" || message === null)
186694
+ return "object expected";
186695
+ if (_depth === undefined)
186696
+ _depth = 0;
186697
+ if (_depth > $util.recursionLimit)
186698
+ return "max depth exceeded";
186699
+ var properties = {};
186700
+ if (message.timestamp != null && message.hasOwnProperty("timestamp"))
186701
+ if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high)))
186702
+ return "timestamp: integer|Long expected";
186703
+ if (message.careAssessmentType != null && message.hasOwnProperty("careAssessmentType"))
186704
+ switch (message.careAssessmentType) {
186705
+ default:
186706
+ return "careAssessmentType: enum value expected";
186707
+ case 0:
186708
+ case 1:
186709
+ case 2:
186710
+ case 3:
186711
+ case 4:
186712
+ case 5:
186713
+ break;
186714
+ }
186715
+ if (message.hsUserId != null && message.hasOwnProperty("hsUserId"))
186716
+ if (!$util.isString(message.hsUserId))
186717
+ return "hsUserId: string expected";
186718
+ if (message.gingerUserId != null && message.hasOwnProperty("gingerUserId"))
186719
+ if (!$util.isInteger(message.gingerUserId))
186720
+ return "gingerUserId: integer expected";
186721
+ if (message.missedAtIsoDate != null && message.hasOwnProperty("missedAtIsoDate"))
186722
+ if (!$util.isString(message.missedAtIsoDate))
186723
+ return "missedAtIsoDate: string expected";
186724
+ if (message.assignmentId != null && message.hasOwnProperty("assignmentId"))
186725
+ if (!$util.isInteger(message.assignmentId) && !(message.assignmentId && $util.isInteger(message.assignmentId.low) && $util.isInteger(message.assignmentId.high)))
186726
+ return "assignmentId: integer|Long expected";
186727
+ if (message.activityId != null && message.hasOwnProperty("activityId"))
186728
+ if (!$util.isString(message.activityId))
186729
+ return "activityId: string expected";
186730
+ if (message.careAssessmentCadence != null && message.hasOwnProperty("careAssessmentCadence"))
186731
+ switch (message.careAssessmentCadence) {
186732
+ default:
186733
+ return "careAssessmentCadence: enum value expected";
186734
+ case 0:
186735
+ case 1:
186736
+ case 2:
186737
+ case 3:
186738
+ case 4:
186739
+ break;
186740
+ }
186741
+ if (message.assessmentContext != null && message.hasOwnProperty("assessmentContext")) {
186742
+ properties._assessmentContext = 1;
186743
+ switch (message.assessmentContext) {
186744
+ default:
186745
+ return "assessmentContext: enum value expected";
186746
+ case 0:
186747
+ case 1:
186748
+ break;
186749
+ }
186750
+ }
186751
+ if (message.dueAtIsoDate != null && message.hasOwnProperty("dueAtIsoDate"))
186752
+ if (!$util.isString(message.dueAtIsoDate))
186753
+ return "dueAtIsoDate: string expected";
186754
+ return null;
186755
+ };
186756
+
186757
+ /**
186758
+ * Creates a CareAssessmentMissed message from a plain object. Also converts values to their respective internal types.
186759
+ * @function fromObject
186760
+ * @memberof CareAssessmentMissed
186761
+ * @static
186762
+ * @param {Object.<string,*>} object Plain object
186763
+ * @returns {CareAssessmentMissed} CareAssessmentMissed
186764
+ */
186765
+ CareAssessmentMissed.fromObject = function fromObject(object, _depth) {
186766
+ if (object instanceof $root.CareAssessmentMissed)
186767
+ return object;
186768
+ if (_depth === undefined)
186769
+ _depth = 0;
186770
+ if (_depth > $util.recursionLimit)
186771
+ throw Error("max depth exceeded");
186772
+ var message = new $root.CareAssessmentMissed();
186773
+ if (object.timestamp != null)
186774
+ if (typeof object.timestamp === "object" ? object.timestamp.low || object.timestamp.high : Number(object.timestamp) !== 0)
186775
+ if ($util.Long)
186776
+ (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true;
186777
+ else if (typeof object.timestamp === "string")
186778
+ message.timestamp = parseInt(object.timestamp, 10);
186779
+ else if (typeof object.timestamp === "number")
186780
+ message.timestamp = object.timestamp;
186781
+ else if (typeof object.timestamp === "object")
186782
+ message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(true);
186783
+ if (object.careAssessmentType !== 0 && (typeof object.careAssessmentType !== "string" || $root.CareAssessmentType[object.careAssessmentType] !== 0))
186784
+ switch (object.careAssessmentType) {
186785
+ default:
186786
+ if (typeof object.careAssessmentType === "number") {
186787
+ message.careAssessmentType = object.careAssessmentType;
186788
+ break;
186789
+ }
186790
+ break;
186791
+ case "CARE_ASSESSMENT_TYPE_UNKNOWN":
186792
+ case 0:
186793
+ message.careAssessmentType = 0;
186794
+ break;
186795
+ case "CARE_ASSESSMENT_TYPE_PHQ9":
186796
+ case 1:
186797
+ message.careAssessmentType = 1;
186798
+ break;
186799
+ case "CARE_ASSESSMENT_TYPE_GAD7":
186800
+ case 2:
186801
+ message.careAssessmentType = 2;
186802
+ break;
186803
+ case "CARE_ASSESSMENT_TYPE_PHQ4":
186804
+ case 3:
186805
+ message.careAssessmentType = 3;
186806
+ break;
186807
+ case "CARE_ASSESSMENT_TYPE_PSS":
186808
+ case 4:
186809
+ message.careAssessmentType = 4;
186810
+ break;
186811
+ case "CARE_ASSESSMENT_TYPE_PGIC":
186812
+ case 5:
186813
+ message.careAssessmentType = 5;
186814
+ break;
186815
+ }
186816
+ if (object.hsUserId != null)
186817
+ if (typeof object.hsUserId !== "string" || object.hsUserId.length)
186818
+ message.hsUserId = String(object.hsUserId);
186819
+ if (object.gingerUserId != null)
186820
+ if (Number(object.gingerUserId) !== 0)
186821
+ message.gingerUserId = object.gingerUserId >>> 0;
186822
+ if (object.missedAtIsoDate != null)
186823
+ if (typeof object.missedAtIsoDate !== "string" || object.missedAtIsoDate.length)
186824
+ message.missedAtIsoDate = String(object.missedAtIsoDate);
186825
+ if (object.assignmentId != null)
186826
+ if (typeof object.assignmentId === "object" ? object.assignmentId.low || object.assignmentId.high : Number(object.assignmentId) !== 0)
186827
+ if ($util.Long)
186828
+ (message.assignmentId = $util.Long.fromValue(object.assignmentId)).unsigned = false;
186829
+ else if (typeof object.assignmentId === "string")
186830
+ message.assignmentId = parseInt(object.assignmentId, 10);
186831
+ else if (typeof object.assignmentId === "number")
186832
+ message.assignmentId = object.assignmentId;
186833
+ else if (typeof object.assignmentId === "object")
186834
+ message.assignmentId = new $util.LongBits(object.assignmentId.low >>> 0, object.assignmentId.high >>> 0).toNumber();
186835
+ if (object.activityId != null)
186836
+ if (typeof object.activityId !== "string" || object.activityId.length)
186837
+ message.activityId = String(object.activityId);
186838
+ if (object.careAssessmentCadence !== 0 && (typeof object.careAssessmentCadence !== "string" || $root.CareAssessmentCadence[object.careAssessmentCadence] !== 0))
186839
+ switch (object.careAssessmentCadence) {
186840
+ default:
186841
+ if (typeof object.careAssessmentCadence === "number") {
186842
+ message.careAssessmentCadence = object.careAssessmentCadence;
186843
+ break;
186844
+ }
186845
+ break;
186846
+ case "CARE_ASSESSMENT_CADENCE_UNKNOWN":
186847
+ case 0:
186848
+ message.careAssessmentCadence = 0;
186849
+ break;
186850
+ case "CARE_ASSESSMENT_CADENCE_ONBOARDING":
186851
+ case 1:
186852
+ message.careAssessmentCadence = 1;
186853
+ break;
186854
+ case "CARE_ASSESSMENT_CADENCE_QUARTERLY":
186855
+ case 2:
186856
+ message.careAssessmentCadence = 2;
186857
+ break;
186858
+ case "CARE_ASSESSMENT_CADENCE_END_OF_PERIOD":
186859
+ case 3:
186860
+ message.careAssessmentCadence = 3;
186861
+ break;
186862
+ case "CARE_ASSESSMENT_CADENCE_EARLY_EXIT":
186863
+ case 4:
186864
+ message.careAssessmentCadence = 4;
186865
+ break;
186866
+ }
186867
+ switch (object.assessmentContext) {
186868
+ default:
186869
+ if (typeof object.assessmentContext === "number") {
186870
+ message.assessmentContext = object.assessmentContext;
186871
+ break;
186872
+ }
186873
+ break;
186874
+ case "CARE_ASSESSMENT_CONTEXT_UNKNOWN":
186875
+ case 0:
186876
+ message.assessmentContext = 0;
186877
+ break;
186878
+ case "CARE_ASSESSMENT_CONTEXT_CMS":
186879
+ case 1:
186880
+ message.assessmentContext = 1;
186881
+ break;
186882
+ }
186883
+ if (object.dueAtIsoDate != null)
186884
+ if (typeof object.dueAtIsoDate !== "string" || object.dueAtIsoDate.length)
186885
+ message.dueAtIsoDate = String(object.dueAtIsoDate);
186886
+ return message;
186887
+ };
186888
+
186889
+ /**
186890
+ * Creates a plain object from a CareAssessmentMissed message. Also converts values to other types if specified.
186891
+ * @function toObject
186892
+ * @memberof CareAssessmentMissed
186893
+ * @static
186894
+ * @param {CareAssessmentMissed} message CareAssessmentMissed
186895
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
186896
+ * @returns {Object.<string,*>} Plain object
186897
+ */
186898
+ CareAssessmentMissed.toObject = function toObject(message, options) {
186899
+ if (!options)
186900
+ options = {};
186901
+ var object = {};
186902
+ if (options.defaults) {
186903
+ if ($util.Long) {
186904
+ var long = new $util.Long(0, 0, true);
186905
+ object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long;
186906
+ } else
186907
+ object.timestamp = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0;
186908
+ object.careAssessmentType = options.enums === String ? "CARE_ASSESSMENT_TYPE_UNKNOWN" : 0;
186909
+ object.hsUserId = "";
186910
+ object.gingerUserId = 0;
186911
+ object.missedAtIsoDate = "";
186912
+ if ($util.Long) {
186913
+ var long = new $util.Long(0, 0, false);
186914
+ object.assignmentId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long;
186915
+ } else
186916
+ object.assignmentId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0;
186917
+ object.activityId = "";
186918
+ object.careAssessmentCadence = options.enums === String ? "CARE_ASSESSMENT_CADENCE_UNKNOWN" : 0;
186919
+ object.dueAtIsoDate = "";
186920
+ }
186921
+ if (message.timestamp != null && message.hasOwnProperty("timestamp"))
186922
+ if (typeof BigInt !== "undefined" && options.longs === BigInt)
186923
+ object.timestamp = typeof message.timestamp === "number" ? BigInt(message.timestamp) : $util.Long.fromBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0, true).toBigInt();
186924
+ else if (typeof message.timestamp === "number")
186925
+ object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp;
186926
+ else
186927
+ 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;
186928
+ if (message.careAssessmentType != null && message.hasOwnProperty("careAssessmentType"))
186929
+ object.careAssessmentType = options.enums === String ? $root.CareAssessmentType[message.careAssessmentType] === undefined ? message.careAssessmentType : $root.CareAssessmentType[message.careAssessmentType] : message.careAssessmentType;
186930
+ if (message.hsUserId != null && message.hasOwnProperty("hsUserId"))
186931
+ object.hsUserId = message.hsUserId;
186932
+ if (message.gingerUserId != null && message.hasOwnProperty("gingerUserId"))
186933
+ object.gingerUserId = message.gingerUserId;
186934
+ if (message.missedAtIsoDate != null && message.hasOwnProperty("missedAtIsoDate"))
186935
+ object.missedAtIsoDate = message.missedAtIsoDate;
186936
+ if (message.assignmentId != null && message.hasOwnProperty("assignmentId"))
186937
+ if (typeof BigInt !== "undefined" && options.longs === BigInt)
186938
+ object.assignmentId = typeof message.assignmentId === "number" ? BigInt(message.assignmentId) : $util.Long.fromBits(message.assignmentId.low >>> 0, message.assignmentId.high >>> 0, false).toBigInt();
186939
+ else if (typeof message.assignmentId === "number")
186940
+ object.assignmentId = options.longs === String ? String(message.assignmentId) : message.assignmentId;
186941
+ else
186942
+ object.assignmentId = options.longs === String ? $util.Long.prototype.toString.call(message.assignmentId) : options.longs === Number ? new $util.LongBits(message.assignmentId.low >>> 0, message.assignmentId.high >>> 0).toNumber() : message.assignmentId;
186943
+ if (message.activityId != null && message.hasOwnProperty("activityId"))
186944
+ object.activityId = message.activityId;
186945
+ if (message.careAssessmentCadence != null && message.hasOwnProperty("careAssessmentCadence"))
186946
+ object.careAssessmentCadence = options.enums === String ? $root.CareAssessmentCadence[message.careAssessmentCadence] === undefined ? message.careAssessmentCadence : $root.CareAssessmentCadence[message.careAssessmentCadence] : message.careAssessmentCadence;
186947
+ if (message.assessmentContext != null && message.hasOwnProperty("assessmentContext")) {
186948
+ object.assessmentContext = options.enums === String ? $root.CareAssessmentContext[message.assessmentContext] === undefined ? message.assessmentContext : $root.CareAssessmentContext[message.assessmentContext] : message.assessmentContext;
186949
+ if (options.oneofs)
186950
+ object._assessmentContext = "assessmentContext";
186951
+ }
186952
+ if (message.dueAtIsoDate != null && message.hasOwnProperty("dueAtIsoDate"))
186953
+ object.dueAtIsoDate = message.dueAtIsoDate;
186954
+ return object;
186955
+ };
186956
+
186957
+ /**
186958
+ * Converts this CareAssessmentMissed to JSON.
186959
+ * @function toJSON
186960
+ * @memberof CareAssessmentMissed
186961
+ * @instance
186962
+ * @returns {Object.<string,*>} JSON object
186963
+ */
186964
+ CareAssessmentMissed.prototype.toJSON = function toJSON() {
186965
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
186966
+ };
186967
+
186968
+ /**
186969
+ * Gets the type url for CareAssessmentMissed
186970
+ * @function getTypeUrl
186971
+ * @memberof CareAssessmentMissed
186972
+ * @static
186973
+ * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"`
186974
+ * @returns {string} The type url
186975
+ */
186976
+ CareAssessmentMissed.getTypeUrl = function getTypeUrl(prefix) {
186977
+ if (prefix === undefined)
186978
+ prefix = "type.googleapis.com";
186979
+ return prefix + "/CareAssessmentMissed";
186980
+ };
186981
+
186982
+ return CareAssessmentMissed;
186983
+ })();
186984
+
186340
186985
  $root.Survey = (function() {
186341
186986
 
186342
186987
  /**
@@ -270232,6 +270877,467 @@ $root.InteractiveJournalingUserBlockRemoved = (function() {
270232
270877
  return InteractiveJournalingUserBlockRemoved;
270233
270878
  })();
270234
270879
 
270880
+ /**
270881
+ * InteractiveJournalingConversationEndReason enum.
270882
+ * @name InteractiveJournalingConversationEndReason
270883
+ * @enum {number}
270884
+ * @property {number} INTERACTIVE_JOURNALING_CONVERSATION_END_REASON_UNKNOWN=0 INTERACTIVE_JOURNALING_CONVERSATION_END_REASON_UNKNOWN value
270885
+ * @property {number} INTERACTIVE_JOURNALING_CONVERSATION_END_REASON_INACTIVITY=1 INTERACTIVE_JOURNALING_CONVERSATION_END_REASON_INACTIVITY value
270886
+ * @property {number} INTERACTIVE_JOURNALING_CONVERSATION_END_REASON_EXPLICIT_CLOSE=2 INTERACTIVE_JOURNALING_CONVERSATION_END_REASON_EXPLICIT_CLOSE value
270887
+ */
270888
+ $root.InteractiveJournalingConversationEndReason = (function() {
270889
+ var valuesById = {}, values = Object.create(valuesById);
270890
+ values[valuesById[0] = "INTERACTIVE_JOURNALING_CONVERSATION_END_REASON_UNKNOWN"] = 0;
270891
+ values[valuesById[1] = "INTERACTIVE_JOURNALING_CONVERSATION_END_REASON_INACTIVITY"] = 1;
270892
+ values[valuesById[2] = "INTERACTIVE_JOURNALING_CONVERSATION_END_REASON_EXPLICIT_CLOSE"] = 2;
270893
+ return values;
270894
+ })();
270895
+
270896
+ /**
270897
+ * InteractiveJournalingConversationType enum.
270898
+ * @name InteractiveJournalingConversationType
270899
+ * @enum {number}
270900
+ * @property {number} INTERACTIVE_JOURNALING_CONVERSATION_TYPE_UNKNOWN=0 INTERACTIVE_JOURNALING_CONVERSATION_TYPE_UNKNOWN value
270901
+ * @property {number} INTERACTIVE_JOURNALING_CONVERSATION_TYPE_GENERAL=1 INTERACTIVE_JOURNALING_CONVERSATION_TYPE_GENERAL value
270902
+ * @property {number} INTERACTIVE_JOURNALING_CONVERSATION_TYPE_MEDITATION_DEBRIEF=2 INTERACTIVE_JOURNALING_CONVERSATION_TYPE_MEDITATION_DEBRIEF value
270903
+ */
270904
+ $root.InteractiveJournalingConversationType = (function() {
270905
+ var valuesById = {}, values = Object.create(valuesById);
270906
+ values[valuesById[0] = "INTERACTIVE_JOURNALING_CONVERSATION_TYPE_UNKNOWN"] = 0;
270907
+ values[valuesById[1] = "INTERACTIVE_JOURNALING_CONVERSATION_TYPE_GENERAL"] = 1;
270908
+ values[valuesById[2] = "INTERACTIVE_JOURNALING_CONVERSATION_TYPE_MEDITATION_DEBRIEF"] = 2;
270909
+ return values;
270910
+ })();
270911
+
270912
+ $root.InteractiveJournalingConversationEnded = (function() {
270913
+
270914
+ /**
270915
+ * Properties of an InteractiveJournalingConversationEnded.
270916
+ * @typedef {Object} InteractiveJournalingConversationEnded.$Properties
270917
+ * @property {string|null} [conversationId] InteractiveJournalingConversationEnded conversationId
270918
+ * @property {string|null} [hsUserId] InteractiveJournalingConversationEnded hsUserId
270919
+ * @property {number|Long|null} [endedAtTimestamp] InteractiveJournalingConversationEnded endedAtTimestamp
270920
+ * @property {InteractiveJournalingConversationEndReason|null} [reason] InteractiveJournalingConversationEnded reason
270921
+ * @property {InteractiveJournalingConversationType|null} [conversationType] InteractiveJournalingConversationEnded conversationType
270922
+ * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
270923
+ */
270924
+
270925
+ /**
270926
+ * Properties of an InteractiveJournalingConversationEnded.
270927
+ * @name IInteractiveJournalingConversationEnded
270928
+ * @interface IInteractiveJournalingConversationEnded
270929
+ * @augments InteractiveJournalingConversationEnded.$Properties
270930
+ * @deprecated Use InteractiveJournalingConversationEnded.$Properties instead.
270931
+ */
270932
+
270933
+ /**
270934
+ * Shape of an InteractiveJournalingConversationEnded.
270935
+ * @typedef {InteractiveJournalingConversationEnded.$Properties} InteractiveJournalingConversationEnded.$Shape
270936
+ */
270937
+
270938
+ /**
270939
+ * Constructs a new InteractiveJournalingConversationEnded.
270940
+ * @name InteractiveJournalingConversationEnded
270941
+ * @classdesc Represents an InteractiveJournalingConversationEnded.
270942
+ * @constructor
270943
+ * @param {InteractiveJournalingConversationEnded.$Properties=} [properties] Properties to set
270944
+ * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
270945
+ */
270946
+ function InteractiveJournalingConversationEnded(properties) {
270947
+ if (properties)
270948
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
270949
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
270950
+ this[keys[i]] = properties[keys[i]];
270951
+ }
270952
+
270953
+ /**
270954
+ * InteractiveJournalingConversationEnded conversationId.
270955
+ * @member {string} conversationId
270956
+ * @memberof InteractiveJournalingConversationEnded
270957
+ * @instance
270958
+ */
270959
+ InteractiveJournalingConversationEnded.prototype.conversationId = "";
270960
+
270961
+ /**
270962
+ * InteractiveJournalingConversationEnded hsUserId.
270963
+ * @member {string} hsUserId
270964
+ * @memberof InteractiveJournalingConversationEnded
270965
+ * @instance
270966
+ */
270967
+ InteractiveJournalingConversationEnded.prototype.hsUserId = "";
270968
+
270969
+ /**
270970
+ * InteractiveJournalingConversationEnded endedAtTimestamp.
270971
+ * @member {number|Long} endedAtTimestamp
270972
+ * @memberof InteractiveJournalingConversationEnded
270973
+ * @instance
270974
+ */
270975
+ InteractiveJournalingConversationEnded.prototype.endedAtTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
270976
+
270977
+ /**
270978
+ * InteractiveJournalingConversationEnded reason.
270979
+ * @member {InteractiveJournalingConversationEndReason} reason
270980
+ * @memberof InteractiveJournalingConversationEnded
270981
+ * @instance
270982
+ */
270983
+ InteractiveJournalingConversationEnded.prototype.reason = 0;
270984
+
270985
+ /**
270986
+ * InteractiveJournalingConversationEnded conversationType.
270987
+ * @member {InteractiveJournalingConversationType} conversationType
270988
+ * @memberof InteractiveJournalingConversationEnded
270989
+ * @instance
270990
+ */
270991
+ InteractiveJournalingConversationEnded.prototype.conversationType = 0;
270992
+
270993
+ /**
270994
+ * Creates a new InteractiveJournalingConversationEnded instance using the specified properties.
270995
+ * @function create
270996
+ * @memberof InteractiveJournalingConversationEnded
270997
+ * @static
270998
+ * @param {InteractiveJournalingConversationEnded.$Properties=} [properties] Properties to set
270999
+ * @returns {InteractiveJournalingConversationEnded} InteractiveJournalingConversationEnded instance
271000
+ * @type {{
271001
+ * (properties: InteractiveJournalingConversationEnded.$Shape): InteractiveJournalingConversationEnded & InteractiveJournalingConversationEnded.$Shape;
271002
+ * (properties?: InteractiveJournalingConversationEnded.$Properties): InteractiveJournalingConversationEnded;
271003
+ * }}
271004
+ */
271005
+ InteractiveJournalingConversationEnded.create = function create(properties) {
271006
+ return new InteractiveJournalingConversationEnded(properties);
271007
+ };
271008
+
271009
+ /**
271010
+ * Encodes the specified InteractiveJournalingConversationEnded message. Does not implicitly {@link InteractiveJournalingConversationEnded.verify|verify} messages.
271011
+ * @function encode
271012
+ * @memberof InteractiveJournalingConversationEnded
271013
+ * @static
271014
+ * @param {InteractiveJournalingConversationEnded.$Properties} message InteractiveJournalingConversationEnded message or plain object to encode
271015
+ * @param {$protobuf.Writer} [writer] Writer to encode to
271016
+ * @returns {$protobuf.Writer} Writer
271017
+ */
271018
+ InteractiveJournalingConversationEnded.encode = function encode(message, writer) {
271019
+ if (!writer)
271020
+ writer = $Writer.create();
271021
+ if (message.conversationId != null && Object.hasOwnProperty.call(message, "conversationId"))
271022
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversationId);
271023
+ if (message.hsUserId != null && Object.hasOwnProperty.call(message, "hsUserId"))
271024
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.hsUserId);
271025
+ if (message.endedAtTimestamp != null && Object.hasOwnProperty.call(message, "endedAtTimestamp"))
271026
+ writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.endedAtTimestamp);
271027
+ if (message.reason != null && Object.hasOwnProperty.call(message, "reason"))
271028
+ writer.uint32(/* id 4, wireType 0 =*/32).int32(message.reason);
271029
+ if (message.conversationType != null && Object.hasOwnProperty.call(message, "conversationType"))
271030
+ writer.uint32(/* id 5, wireType 0 =*/40).int32(message.conversationType);
271031
+ if (message.$unknowns != null && Object.hasOwnProperty.call(message, "$unknowns"))
271032
+ for (var i = 0; i < message.$unknowns.length; ++i)
271033
+ writer.raw(message.$unknowns[i]);
271034
+ return writer;
271035
+ };
271036
+
271037
+ /**
271038
+ * Encodes the specified InteractiveJournalingConversationEnded message, length delimited. Does not implicitly {@link InteractiveJournalingConversationEnded.verify|verify} messages.
271039
+ * @function encodeDelimited
271040
+ * @memberof InteractiveJournalingConversationEnded
271041
+ * @static
271042
+ * @param {InteractiveJournalingConversationEnded.$Properties} message InteractiveJournalingConversationEnded message or plain object to encode
271043
+ * @param {$protobuf.Writer} [writer] Writer to encode to
271044
+ * @returns {$protobuf.Writer} Writer
271045
+ */
271046
+ InteractiveJournalingConversationEnded.encodeDelimited = function encodeDelimited(message, writer) {
271047
+ return this.encode(message, writer).ldelim();
271048
+ };
271049
+
271050
+ /**
271051
+ * Decodes an InteractiveJournalingConversationEnded message from the specified reader or buffer.
271052
+ * @function decode
271053
+ * @memberof InteractiveJournalingConversationEnded
271054
+ * @static
271055
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
271056
+ * @param {number} [length] Message length if known beforehand
271057
+ * @returns {InteractiveJournalingConversationEnded & InteractiveJournalingConversationEnded.$Shape} InteractiveJournalingConversationEnded
271058
+ * @throws {Error} If the payload is not a reader or valid buffer
271059
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
271060
+ */
271061
+ InteractiveJournalingConversationEnded.decode = function decode(reader, length, _end, _depth, _target) {
271062
+ if (!(reader instanceof $Reader))
271063
+ reader = $Reader.create(reader);
271064
+ if (_depth === undefined)
271065
+ _depth = 0;
271066
+ if (_depth > $Reader.recursionLimit)
271067
+ throw Error("max depth exceeded");
271068
+ var end = length === undefined ? reader.len : reader.pos + length, message = _target || new $root.InteractiveJournalingConversationEnded(), value;
271069
+ while (reader.pos < end) {
271070
+ var start = reader.pos;
271071
+ var tag = reader.tag();
271072
+ if (tag === _end) {
271073
+ _end = undefined;
271074
+ break;
271075
+ }
271076
+ var wireType = tag & 7;
271077
+ switch (tag >>>= 3) {
271078
+ case 1: {
271079
+ if (wireType !== 2)
271080
+ break;
271081
+ if ((value = reader.string()).length)
271082
+ message.conversationId = value;
271083
+ else
271084
+ delete message.conversationId;
271085
+ continue;
271086
+ }
271087
+ case 2: {
271088
+ if (wireType !== 2)
271089
+ break;
271090
+ if ((value = reader.string()).length)
271091
+ message.hsUserId = value;
271092
+ else
271093
+ delete message.hsUserId;
271094
+ continue;
271095
+ }
271096
+ case 3: {
271097
+ if (wireType !== 0)
271098
+ break;
271099
+ if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0)
271100
+ message.endedAtTimestamp = value;
271101
+ else
271102
+ delete message.endedAtTimestamp;
271103
+ continue;
271104
+ }
271105
+ case 4: {
271106
+ if (wireType !== 0)
271107
+ break;
271108
+ if (value = reader.int32())
271109
+ message.reason = value;
271110
+ else
271111
+ delete message.reason;
271112
+ continue;
271113
+ }
271114
+ case 5: {
271115
+ if (wireType !== 0)
271116
+ break;
271117
+ if (value = reader.int32())
271118
+ message.conversationType = value;
271119
+ else
271120
+ delete message.conversationType;
271121
+ continue;
271122
+ }
271123
+ }
271124
+ reader.skipType(wireType, _depth, tag);
271125
+ $util.makeProp(message, "$unknowns", false);
271126
+ (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos));
271127
+ }
271128
+ if (_end !== undefined)
271129
+ throw Error("missing end group");
271130
+ return message;
271131
+ };
271132
+
271133
+ /**
271134
+ * Decodes an InteractiveJournalingConversationEnded message from the specified reader or buffer, length delimited.
271135
+ * @function decodeDelimited
271136
+ * @memberof InteractiveJournalingConversationEnded
271137
+ * @static
271138
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
271139
+ * @returns {InteractiveJournalingConversationEnded & InteractiveJournalingConversationEnded.$Shape} InteractiveJournalingConversationEnded
271140
+ * @throws {Error} If the payload is not a reader or valid buffer
271141
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
271142
+ */
271143
+ InteractiveJournalingConversationEnded.decodeDelimited = function decodeDelimited(reader) {
271144
+ if (!(reader instanceof $Reader))
271145
+ reader = new $Reader(reader);
271146
+ return this.decode(reader, reader.uint32());
271147
+ };
271148
+
271149
+ /**
271150
+ * Verifies an InteractiveJournalingConversationEnded message.
271151
+ * @function verify
271152
+ * @memberof InteractiveJournalingConversationEnded
271153
+ * @static
271154
+ * @param {Object.<string,*>} message Plain object to verify
271155
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
271156
+ */
271157
+ InteractiveJournalingConversationEnded.verify = function verify(message, _depth) {
271158
+ if (typeof message !== "object" || message === null)
271159
+ return "object expected";
271160
+ if (_depth === undefined)
271161
+ _depth = 0;
271162
+ if (_depth > $util.recursionLimit)
271163
+ return "max depth exceeded";
271164
+ if (message.conversationId != null && message.hasOwnProperty("conversationId"))
271165
+ if (!$util.isString(message.conversationId))
271166
+ return "conversationId: string expected";
271167
+ if (message.hsUserId != null && message.hasOwnProperty("hsUserId"))
271168
+ if (!$util.isString(message.hsUserId))
271169
+ return "hsUserId: string expected";
271170
+ if (message.endedAtTimestamp != null && message.hasOwnProperty("endedAtTimestamp"))
271171
+ if (!$util.isInteger(message.endedAtTimestamp) && !(message.endedAtTimestamp && $util.isInteger(message.endedAtTimestamp.low) && $util.isInteger(message.endedAtTimestamp.high)))
271172
+ return "endedAtTimestamp: integer|Long expected";
271173
+ if (message.reason != null && message.hasOwnProperty("reason"))
271174
+ switch (message.reason) {
271175
+ default:
271176
+ return "reason: enum value expected";
271177
+ case 0:
271178
+ case 1:
271179
+ case 2:
271180
+ break;
271181
+ }
271182
+ if (message.conversationType != null && message.hasOwnProperty("conversationType"))
271183
+ switch (message.conversationType) {
271184
+ default:
271185
+ return "conversationType: enum value expected";
271186
+ case 0:
271187
+ case 1:
271188
+ case 2:
271189
+ break;
271190
+ }
271191
+ return null;
271192
+ };
271193
+
271194
+ /**
271195
+ * Creates an InteractiveJournalingConversationEnded message from a plain object. Also converts values to their respective internal types.
271196
+ * @function fromObject
271197
+ * @memberof InteractiveJournalingConversationEnded
271198
+ * @static
271199
+ * @param {Object.<string,*>} object Plain object
271200
+ * @returns {InteractiveJournalingConversationEnded} InteractiveJournalingConversationEnded
271201
+ */
271202
+ InteractiveJournalingConversationEnded.fromObject = function fromObject(object, _depth) {
271203
+ if (object instanceof $root.InteractiveJournalingConversationEnded)
271204
+ return object;
271205
+ if (_depth === undefined)
271206
+ _depth = 0;
271207
+ if (_depth > $util.recursionLimit)
271208
+ throw Error("max depth exceeded");
271209
+ var message = new $root.InteractiveJournalingConversationEnded();
271210
+ if (object.conversationId != null)
271211
+ if (typeof object.conversationId !== "string" || object.conversationId.length)
271212
+ message.conversationId = String(object.conversationId);
271213
+ if (object.hsUserId != null)
271214
+ if (typeof object.hsUserId !== "string" || object.hsUserId.length)
271215
+ message.hsUserId = String(object.hsUserId);
271216
+ if (object.endedAtTimestamp != null)
271217
+ if (typeof object.endedAtTimestamp === "object" ? object.endedAtTimestamp.low || object.endedAtTimestamp.high : Number(object.endedAtTimestamp) !== 0)
271218
+ if ($util.Long)
271219
+ (message.endedAtTimestamp = $util.Long.fromValue(object.endedAtTimestamp)).unsigned = true;
271220
+ else if (typeof object.endedAtTimestamp === "string")
271221
+ message.endedAtTimestamp = parseInt(object.endedAtTimestamp, 10);
271222
+ else if (typeof object.endedAtTimestamp === "number")
271223
+ message.endedAtTimestamp = object.endedAtTimestamp;
271224
+ else if (typeof object.endedAtTimestamp === "object")
271225
+ message.endedAtTimestamp = new $util.LongBits(object.endedAtTimestamp.low >>> 0, object.endedAtTimestamp.high >>> 0).toNumber(true);
271226
+ if (object.reason !== 0 && (typeof object.reason !== "string" || $root.InteractiveJournalingConversationEndReason[object.reason] !== 0))
271227
+ switch (object.reason) {
271228
+ default:
271229
+ if (typeof object.reason === "number") {
271230
+ message.reason = object.reason;
271231
+ break;
271232
+ }
271233
+ break;
271234
+ case "INTERACTIVE_JOURNALING_CONVERSATION_END_REASON_UNKNOWN":
271235
+ case 0:
271236
+ message.reason = 0;
271237
+ break;
271238
+ case "INTERACTIVE_JOURNALING_CONVERSATION_END_REASON_INACTIVITY":
271239
+ case 1:
271240
+ message.reason = 1;
271241
+ break;
271242
+ case "INTERACTIVE_JOURNALING_CONVERSATION_END_REASON_EXPLICIT_CLOSE":
271243
+ case 2:
271244
+ message.reason = 2;
271245
+ break;
271246
+ }
271247
+ if (object.conversationType !== 0 && (typeof object.conversationType !== "string" || $root.InteractiveJournalingConversationType[object.conversationType] !== 0))
271248
+ switch (object.conversationType) {
271249
+ default:
271250
+ if (typeof object.conversationType === "number") {
271251
+ message.conversationType = object.conversationType;
271252
+ break;
271253
+ }
271254
+ break;
271255
+ case "INTERACTIVE_JOURNALING_CONVERSATION_TYPE_UNKNOWN":
271256
+ case 0:
271257
+ message.conversationType = 0;
271258
+ break;
271259
+ case "INTERACTIVE_JOURNALING_CONVERSATION_TYPE_GENERAL":
271260
+ case 1:
271261
+ message.conversationType = 1;
271262
+ break;
271263
+ case "INTERACTIVE_JOURNALING_CONVERSATION_TYPE_MEDITATION_DEBRIEF":
271264
+ case 2:
271265
+ message.conversationType = 2;
271266
+ break;
271267
+ }
271268
+ return message;
271269
+ };
271270
+
271271
+ /**
271272
+ * Creates a plain object from an InteractiveJournalingConversationEnded message. Also converts values to other types if specified.
271273
+ * @function toObject
271274
+ * @memberof InteractiveJournalingConversationEnded
271275
+ * @static
271276
+ * @param {InteractiveJournalingConversationEnded} message InteractiveJournalingConversationEnded
271277
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
271278
+ * @returns {Object.<string,*>} Plain object
271279
+ */
271280
+ InteractiveJournalingConversationEnded.toObject = function toObject(message, options) {
271281
+ if (!options)
271282
+ options = {};
271283
+ var object = {};
271284
+ if (options.defaults) {
271285
+ object.conversationId = "";
271286
+ object.hsUserId = "";
271287
+ if ($util.Long) {
271288
+ var long = new $util.Long(0, 0, true);
271289
+ object.endedAtTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long;
271290
+ } else
271291
+ object.endedAtTimestamp = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0;
271292
+ object.reason = options.enums === String ? "INTERACTIVE_JOURNALING_CONVERSATION_END_REASON_UNKNOWN" : 0;
271293
+ object.conversationType = options.enums === String ? "INTERACTIVE_JOURNALING_CONVERSATION_TYPE_UNKNOWN" : 0;
271294
+ }
271295
+ if (message.conversationId != null && message.hasOwnProperty("conversationId"))
271296
+ object.conversationId = message.conversationId;
271297
+ if (message.hsUserId != null && message.hasOwnProperty("hsUserId"))
271298
+ object.hsUserId = message.hsUserId;
271299
+ if (message.endedAtTimestamp != null && message.hasOwnProperty("endedAtTimestamp"))
271300
+ if (typeof BigInt !== "undefined" && options.longs === BigInt)
271301
+ object.endedAtTimestamp = typeof message.endedAtTimestamp === "number" ? BigInt(message.endedAtTimestamp) : $util.Long.fromBits(message.endedAtTimestamp.low >>> 0, message.endedAtTimestamp.high >>> 0, true).toBigInt();
271302
+ else if (typeof message.endedAtTimestamp === "number")
271303
+ object.endedAtTimestamp = options.longs === String ? String(message.endedAtTimestamp) : message.endedAtTimestamp;
271304
+ else
271305
+ object.endedAtTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.endedAtTimestamp) : options.longs === Number ? new $util.LongBits(message.endedAtTimestamp.low >>> 0, message.endedAtTimestamp.high >>> 0).toNumber(true) : message.endedAtTimestamp;
271306
+ if (message.reason != null && message.hasOwnProperty("reason"))
271307
+ object.reason = options.enums === String ? $root.InteractiveJournalingConversationEndReason[message.reason] === undefined ? message.reason : $root.InteractiveJournalingConversationEndReason[message.reason] : message.reason;
271308
+ if (message.conversationType != null && message.hasOwnProperty("conversationType"))
271309
+ object.conversationType = options.enums === String ? $root.InteractiveJournalingConversationType[message.conversationType] === undefined ? message.conversationType : $root.InteractiveJournalingConversationType[message.conversationType] : message.conversationType;
271310
+ return object;
271311
+ };
271312
+
271313
+ /**
271314
+ * Converts this InteractiveJournalingConversationEnded to JSON.
271315
+ * @function toJSON
271316
+ * @memberof InteractiveJournalingConversationEnded
271317
+ * @instance
271318
+ * @returns {Object.<string,*>} JSON object
271319
+ */
271320
+ InteractiveJournalingConversationEnded.prototype.toJSON = function toJSON() {
271321
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
271322
+ };
271323
+
271324
+ /**
271325
+ * Gets the type url for InteractiveJournalingConversationEnded
271326
+ * @function getTypeUrl
271327
+ * @memberof InteractiveJournalingConversationEnded
271328
+ * @static
271329
+ * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"`
271330
+ * @returns {string} The type url
271331
+ */
271332
+ InteractiveJournalingConversationEnded.getTypeUrl = function getTypeUrl(prefix) {
271333
+ if (prefix === undefined)
271334
+ prefix = "type.googleapis.com";
271335
+ return prefix + "/InteractiveJournalingConversationEnded";
271336
+ };
271337
+
271338
+ return InteractiveJournalingConversationEnded;
271339
+ })();
271340
+
270235
271341
  $root.LayoutCreated = (function() {
270236
271342
 
270237
271343
  /**