@headspace/protos-events 1.730.0 → 1.732.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 +254 -0
  2. package/lib/index.js +1024 -0
  3. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -125964,6 +125964,8 @@ $root.InteractiveJournalingMessage = (function() {
125964
125964
  * @property {string|null} [messageContent] InteractiveJournalingMessage messageContent
125965
125965
  * @property {InteractiveJournalingMessage.ICustomAttributes|null} [customDisplayAttributes] InteractiveJournalingMessage customDisplayAttributes
125966
125966
  * @property {Array.<InteractiveJournalingMessage.IReplyButton>|null} [replyButtons] InteractiveJournalingMessage replyButtons
125967
+ * @property {string|null} [title] InteractiveJournalingMessage title
125968
+ * @property {string|null} [summary] InteractiveJournalingMessage summary
125967
125969
  */
125968
125970
 
125969
125971
  /**
@@ -126046,6 +126048,22 @@ $root.InteractiveJournalingMessage = (function() {
126046
126048
  */
126047
126049
  InteractiveJournalingMessage.prototype.replyButtons = $util.emptyArray;
126048
126050
 
126051
+ /**
126052
+ * InteractiveJournalingMessage title.
126053
+ * @member {string} title
126054
+ * @memberof InteractiveJournalingMessage
126055
+ * @instance
126056
+ */
126057
+ InteractiveJournalingMessage.prototype.title = "";
126058
+
126059
+ /**
126060
+ * InteractiveJournalingMessage summary.
126061
+ * @member {string} summary
126062
+ * @memberof InteractiveJournalingMessage
126063
+ * @instance
126064
+ */
126065
+ InteractiveJournalingMessage.prototype.summary = "";
126066
+
126049
126067
  /**
126050
126068
  * Creates a new InteractiveJournalingMessage instance using the specified properties.
126051
126069
  * @function create
@@ -126087,6 +126105,10 @@ $root.InteractiveJournalingMessage = (function() {
126087
126105
  if (message.replyButtons != null && message.replyButtons.length)
126088
126106
  for (var i = 0; i < message.replyButtons.length; ++i)
126089
126107
  $root.InteractiveJournalingMessage.ReplyButton.encode(message.replyButtons[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
126108
+ if (message.title != null && message.hasOwnProperty("title"))
126109
+ writer.uint32(/* id 9, wireType 2 =*/74).string(message.title);
126110
+ if (message.summary != null && message.hasOwnProperty("summary"))
126111
+ writer.uint32(/* id 10, wireType 2 =*/82).string(message.summary);
126090
126112
  return writer;
126091
126113
  };
126092
126114
 
@@ -126147,6 +126169,12 @@ $root.InteractiveJournalingMessage = (function() {
126147
126169
  message.replyButtons = [];
126148
126170
  message.replyButtons.push($root.InteractiveJournalingMessage.ReplyButton.decode(reader, reader.uint32()));
126149
126171
  break;
126172
+ case 9:
126173
+ message.title = reader.string();
126174
+ break;
126175
+ case 10:
126176
+ message.summary = reader.string();
126177
+ break;
126150
126178
  default:
126151
126179
  reader.skipType(tag & 7);
126152
126180
  break;
@@ -126222,6 +126250,12 @@ $root.InteractiveJournalingMessage = (function() {
126222
126250
  return "replyButtons." + error;
126223
126251
  }
126224
126252
  }
126253
+ if (message.title != null && message.hasOwnProperty("title"))
126254
+ if (!$util.isString(message.title))
126255
+ return "title: string expected";
126256
+ if (message.summary != null && message.hasOwnProperty("summary"))
126257
+ if (!$util.isString(message.summary))
126258
+ return "summary: string expected";
126225
126259
  return null;
126226
126260
  };
126227
126261
 
@@ -126286,6 +126320,10 @@ $root.InteractiveJournalingMessage = (function() {
126286
126320
  message.replyButtons[i] = $root.InteractiveJournalingMessage.ReplyButton.fromObject(object.replyButtons[i]);
126287
126321
  }
126288
126322
  }
126323
+ if (object.title != null)
126324
+ message.title = String(object.title);
126325
+ if (object.summary != null)
126326
+ message.summary = String(object.summary);
126289
126327
  return message;
126290
126328
  };
126291
126329
 
@@ -126316,6 +126354,8 @@ $root.InteractiveJournalingMessage = (function() {
126316
126354
  object.conversationKind = options.enums === String ? "INTERACTIVE_JOURNALING_CONVERSATION_KIND_UNKNOWN" : 0;
126317
126355
  object.messageContent = "";
126318
126356
  object.customDisplayAttributes = null;
126357
+ object.title = "";
126358
+ object.summary = "";
126319
126359
  }
126320
126360
  if (message.messageId != null && message.hasOwnProperty("messageId"))
126321
126361
  object.messageId = message.messageId;
@@ -126339,6 +126379,10 @@ $root.InteractiveJournalingMessage = (function() {
126339
126379
  for (var j = 0; j < message.replyButtons.length; ++j)
126340
126380
  object.replyButtons[j] = $root.InteractiveJournalingMessage.ReplyButton.toObject(message.replyButtons[j], options);
126341
126381
  }
126382
+ if (message.title != null && message.hasOwnProperty("title"))
126383
+ object.title = message.title;
126384
+ if (message.summary != null && message.hasOwnProperty("summary"))
126385
+ object.summary = message.summary;
126342
126386
  return object;
126343
126387
  };
126344
126388
 
@@ -126363,6 +126407,7 @@ $root.InteractiveJournalingMessage = (function() {
126363
126407
  * @property {number|null} [suggestedContentId] CustomAttributes suggestedContentId
126364
126408
  * @property {boolean|null} [isLifelineWidget] CustomAttributes isLifelineWidget
126365
126409
  * @property {boolean|null} [isEndOfConversation] CustomAttributes isEndOfConversation
126410
+ * @property {string|null} [predefinedPromptName] CustomAttributes predefinedPromptName
126366
126411
  */
126367
126412
 
126368
126413
  /**
@@ -126412,6 +126457,14 @@ $root.InteractiveJournalingMessage = (function() {
126412
126457
  */
126413
126458
  CustomAttributes.prototype.isEndOfConversation = false;
126414
126459
 
126460
+ /**
126461
+ * CustomAttributes predefinedPromptName.
126462
+ * @member {string} predefinedPromptName
126463
+ * @memberof InteractiveJournalingMessage.CustomAttributes
126464
+ * @instance
126465
+ */
126466
+ CustomAttributes.prototype.predefinedPromptName = "";
126467
+
126415
126468
  /**
126416
126469
  * Creates a new CustomAttributes instance using the specified properties.
126417
126470
  * @function create
@@ -126444,6 +126497,8 @@ $root.InteractiveJournalingMessage = (function() {
126444
126497
  writer.uint32(/* id 3, wireType 0 =*/24).bool(message.isLifelineWidget);
126445
126498
  if (message.isEndOfConversation != null && message.hasOwnProperty("isEndOfConversation"))
126446
126499
  writer.uint32(/* id 4, wireType 0 =*/32).bool(message.isEndOfConversation);
126500
+ if (message.predefinedPromptName != null && message.hasOwnProperty("predefinedPromptName"))
126501
+ writer.uint32(/* id 5, wireType 2 =*/42).string(message.predefinedPromptName);
126447
126502
  return writer;
126448
126503
  };
126449
126504
 
@@ -126490,6 +126545,9 @@ $root.InteractiveJournalingMessage = (function() {
126490
126545
  case 4:
126491
126546
  message.isEndOfConversation = reader.bool();
126492
126547
  break;
126548
+ case 5:
126549
+ message.predefinedPromptName = reader.string();
126550
+ break;
126493
126551
  default:
126494
126552
  reader.skipType(tag & 7);
126495
126553
  break;
@@ -126537,6 +126595,9 @@ $root.InteractiveJournalingMessage = (function() {
126537
126595
  if (message.isEndOfConversation != null && message.hasOwnProperty("isEndOfConversation"))
126538
126596
  if (typeof message.isEndOfConversation !== "boolean")
126539
126597
  return "isEndOfConversation: boolean expected";
126598
+ if (message.predefinedPromptName != null && message.hasOwnProperty("predefinedPromptName"))
126599
+ if (!$util.isString(message.predefinedPromptName))
126600
+ return "predefinedPromptName: string expected";
126540
126601
  return null;
126541
126602
  };
126542
126603
 
@@ -126560,6 +126621,8 @@ $root.InteractiveJournalingMessage = (function() {
126560
126621
  message.isLifelineWidget = Boolean(object.isLifelineWidget);
126561
126622
  if (object.isEndOfConversation != null)
126562
126623
  message.isEndOfConversation = Boolean(object.isEndOfConversation);
126624
+ if (object.predefinedPromptName != null)
126625
+ message.predefinedPromptName = String(object.predefinedPromptName);
126563
126626
  return message;
126564
126627
  };
126565
126628
 
@@ -126581,6 +126644,7 @@ $root.InteractiveJournalingMessage = (function() {
126581
126644
  object.suggestedContentId = 0;
126582
126645
  object.isLifelineWidget = false;
126583
126646
  object.isEndOfConversation = false;
126647
+ object.predefinedPromptName = "";
126584
126648
  }
126585
126649
  if (message.disableTextInput != null && message.hasOwnProperty("disableTextInput"))
126586
126650
  object.disableTextInput = message.disableTextInput;
@@ -126590,6 +126654,8 @@ $root.InteractiveJournalingMessage = (function() {
126590
126654
  object.isLifelineWidget = message.isLifelineWidget;
126591
126655
  if (message.isEndOfConversation != null && message.hasOwnProperty("isEndOfConversation"))
126592
126656
  object.isEndOfConversation = message.isEndOfConversation;
126657
+ if (message.predefinedPromptName != null && message.hasOwnProperty("predefinedPromptName"))
126658
+ object.predefinedPromptName = message.predefinedPromptName;
126593
126659
  return object;
126594
126660
  };
126595
126661
 
@@ -171004,6 +171070,52 @@ $root.clinical = (function() {
171004
171070
  return values;
171005
171071
  })();
171006
171072
 
171073
+ /**
171074
+ * ClinicalPartnerAppointmentLocationType enum.
171075
+ * @name clinical.ClinicalPartnerAppointmentLocationType
171076
+ * @enum {string}
171077
+ * @property {number} CLINICAL_PARTNER_APPOINTMENT_LOCATION_TYPE_UNKNOWN=0 CLINICAL_PARTNER_APPOINTMENT_LOCATION_TYPE_UNKNOWN value
171078
+ * @property {number} CLINICAL_PARTNER_APPOINTMENT_LOCATION_TYPE_TELEMEDICINE=1 CLINICAL_PARTNER_APPOINTMENT_LOCATION_TYPE_TELEMEDICINE value
171079
+ * @property {number} CLINICAL_PARTNER_APPOINTMENT_LOCATION_TYPE_IN_PERSON=2 CLINICAL_PARTNER_APPOINTMENT_LOCATION_TYPE_IN_PERSON value
171080
+ */
171081
+ clinical.ClinicalPartnerAppointmentLocationType = (function() {
171082
+ var valuesById = {}, values = Object.create(valuesById);
171083
+ values[valuesById[0] = "CLINICAL_PARTNER_APPOINTMENT_LOCATION_TYPE_UNKNOWN"] = 0;
171084
+ values[valuesById[1] = "CLINICAL_PARTNER_APPOINTMENT_LOCATION_TYPE_TELEMEDICINE"] = 1;
171085
+ values[valuesById[2] = "CLINICAL_PARTNER_APPOINTMENT_LOCATION_TYPE_IN_PERSON"] = 2;
171086
+ return values;
171087
+ })();
171088
+
171089
+ /**
171090
+ * ClinicalPartnerSource enum.
171091
+ * @name clinical.ClinicalPartnerSource
171092
+ * @enum {string}
171093
+ * @property {number} CLINICAL_PARTNER_SOURCE_UNKNOWN=0 CLINICAL_PARTNER_SOURCE_UNKNOWN value
171094
+ * @property {number} CLINICAL_PARTNER_SOURCE_SONDERMIND=1 CLINICAL_PARTNER_SOURCE_SONDERMIND value
171095
+ */
171096
+ clinical.ClinicalPartnerSource = (function() {
171097
+ var valuesById = {}, values = Object.create(valuesById);
171098
+ values[valuesById[0] = "CLINICAL_PARTNER_SOURCE_UNKNOWN"] = 0;
171099
+ values[valuesById[1] = "CLINICAL_PARTNER_SOURCE_SONDERMIND"] = 1;
171100
+ return values;
171101
+ })();
171102
+
171103
+ /**
171104
+ * UnifiedClinicalAvailabilityOfferCreatorType enum.
171105
+ * @name clinical.UnifiedClinicalAvailabilityOfferCreatorType
171106
+ * @enum {string}
171107
+ * @property {number} UNIFIED_CLINICAL_AVAILABILITY_OFFER_CREATOR_TYPE_UNKNOWN=0 UNIFIED_CLINICAL_AVAILABILITY_OFFER_CREATOR_TYPE_UNKNOWN value
171108
+ * @property {number} UNIFIED_CLINICAL_AVAILABILITY_OFFER_CREATOR_TYPE_MEMBER=1 UNIFIED_CLINICAL_AVAILABILITY_OFFER_CREATOR_TYPE_MEMBER value
171109
+ * @property {number} UNIFIED_CLINICAL_AVAILABILITY_OFFER_CREATOR_TYPE_MEMBER_SUPPORT=2 UNIFIED_CLINICAL_AVAILABILITY_OFFER_CREATOR_TYPE_MEMBER_SUPPORT value
171110
+ */
171111
+ clinical.UnifiedClinicalAvailabilityOfferCreatorType = (function() {
171112
+ var valuesById = {}, values = Object.create(valuesById);
171113
+ values[valuesById[0] = "UNIFIED_CLINICAL_AVAILABILITY_OFFER_CREATOR_TYPE_UNKNOWN"] = 0;
171114
+ values[valuesById[1] = "UNIFIED_CLINICAL_AVAILABILITY_OFFER_CREATOR_TYPE_MEMBER"] = 1;
171115
+ values[valuesById[2] = "UNIFIED_CLINICAL_AVAILABILITY_OFFER_CREATOR_TYPE_MEMBER_SUPPORT"] = 2;
171116
+ return values;
171117
+ })();
171118
+
171007
171119
  clinical.GuardianRelationship = (function() {
171008
171120
 
171009
171121
  /**
@@ -171308,6 +171420,918 @@ $root.clinical = (function() {
171308
171420
  return GuardianRelationship;
171309
171421
  })();
171310
171422
 
171423
+ clinical.UnifiedAvailabilityOffered = (function() {
171424
+
171425
+ /**
171426
+ * Properties of an UnifiedAvailabilityOffered.
171427
+ * @memberof clinical
171428
+ * @interface IUnifiedAvailabilityOffered
171429
+ * @property {number|Long|null} [id] UnifiedAvailabilityOffered id
171430
+ * @property {number|Long|null} [searchId] UnifiedAvailabilityOffered searchId
171431
+ * @property {number|Long|null} [clinicianId] UnifiedAvailabilityOffered clinicianId
171432
+ * @property {string|null} [partnerClinicianId] UnifiedAvailabilityOffered partnerClinicianId
171433
+ * @property {number|Long|null} [memberGingerUserId] UnifiedAvailabilityOffered memberGingerUserId
171434
+ * @property {number|Long|null} [creatorId] UnifiedAvailabilityOffered creatorId
171435
+ * @property {clinical.UnifiedClinicalAvailabilityOfferCreatorType|null} [creatorType] UnifiedAvailabilityOffered creatorType
171436
+ * @property {number|Long|null} [appointmentId] UnifiedAvailabilityOffered appointmentId
171437
+ * @property {string|null} [partnerAppointmentId] UnifiedAvailabilityOffered partnerAppointmentId
171438
+ * @property {clinical.ClinicalPartnerSource|null} [partnerSource] UnifiedAvailabilityOffered partnerSource
171439
+ * @property {number|Long|null} [timeAccepted] UnifiedAvailabilityOffered timeAccepted
171440
+ * @property {clinical.ClinicalAppointmentType|null} [appointmentType] UnifiedAvailabilityOffered appointmentType
171441
+ * @property {boolean|null} [isEarliest] UnifiedAvailabilityOffered isEarliest
171442
+ * @property {boolean|null} [isOffered] UnifiedAvailabilityOffered isOffered
171443
+ * @property {number|Long|null} [timeOffered] UnifiedAvailabilityOffered timeOffered
171444
+ * @property {number|Long|null} [appointmentTimestamp] UnifiedAvailabilityOffered appointmentTimestamp
171445
+ * @property {string|null} [webSessionId] UnifiedAvailabilityOffered webSessionId
171446
+ * @property {clinical.ClinicalAvailabilitySource|null} [source] UnifiedAvailabilityOffered source
171447
+ * @property {Array.<string>|null} [states] UnifiedAvailabilityOffered states
171448
+ * @property {number|Long|null} [lastUpdatedTime] UnifiedAvailabilityOffered lastUpdatedTime
171449
+ * @property {boolean|null} [isNetworkClinician] UnifiedAvailabilityOffered isNetworkClinician
171450
+ * @property {clinical.ClinicalPartnerAppointmentLocationType|null} [locationType] UnifiedAvailabilityOffered locationType
171451
+ */
171452
+
171453
+ /**
171454
+ * Constructs a new UnifiedAvailabilityOffered.
171455
+ * @memberof clinical
171456
+ * @classdesc Represents an UnifiedAvailabilityOffered.
171457
+ * @implements IUnifiedAvailabilityOffered
171458
+ * @constructor
171459
+ * @param {clinical.IUnifiedAvailabilityOffered=} [properties] Properties to set
171460
+ */
171461
+ function UnifiedAvailabilityOffered(properties) {
171462
+ this.states = [];
171463
+ if (properties)
171464
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
171465
+ if (properties[keys[i]] != null)
171466
+ this[keys[i]] = properties[keys[i]];
171467
+ }
171468
+
171469
+ /**
171470
+ * UnifiedAvailabilityOffered id.
171471
+ * @member {number|Long} id
171472
+ * @memberof clinical.UnifiedAvailabilityOffered
171473
+ * @instance
171474
+ */
171475
+ UnifiedAvailabilityOffered.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
171476
+
171477
+ /**
171478
+ * UnifiedAvailabilityOffered searchId.
171479
+ * @member {number|Long} searchId
171480
+ * @memberof clinical.UnifiedAvailabilityOffered
171481
+ * @instance
171482
+ */
171483
+ UnifiedAvailabilityOffered.prototype.searchId = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
171484
+
171485
+ /**
171486
+ * UnifiedAvailabilityOffered clinicianId.
171487
+ * @member {number|Long} clinicianId
171488
+ * @memberof clinical.UnifiedAvailabilityOffered
171489
+ * @instance
171490
+ */
171491
+ UnifiedAvailabilityOffered.prototype.clinicianId = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
171492
+
171493
+ /**
171494
+ * UnifiedAvailabilityOffered partnerClinicianId.
171495
+ * @member {string} partnerClinicianId
171496
+ * @memberof clinical.UnifiedAvailabilityOffered
171497
+ * @instance
171498
+ */
171499
+ UnifiedAvailabilityOffered.prototype.partnerClinicianId = "";
171500
+
171501
+ /**
171502
+ * UnifiedAvailabilityOffered memberGingerUserId.
171503
+ * @member {number|Long} memberGingerUserId
171504
+ * @memberof clinical.UnifiedAvailabilityOffered
171505
+ * @instance
171506
+ */
171507
+ UnifiedAvailabilityOffered.prototype.memberGingerUserId = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
171508
+
171509
+ /**
171510
+ * UnifiedAvailabilityOffered creatorId.
171511
+ * @member {number|Long} creatorId
171512
+ * @memberof clinical.UnifiedAvailabilityOffered
171513
+ * @instance
171514
+ */
171515
+ UnifiedAvailabilityOffered.prototype.creatorId = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
171516
+
171517
+ /**
171518
+ * UnifiedAvailabilityOffered creatorType.
171519
+ * @member {clinical.UnifiedClinicalAvailabilityOfferCreatorType} creatorType
171520
+ * @memberof clinical.UnifiedAvailabilityOffered
171521
+ * @instance
171522
+ */
171523
+ UnifiedAvailabilityOffered.prototype.creatorType = 0;
171524
+
171525
+ /**
171526
+ * UnifiedAvailabilityOffered appointmentId.
171527
+ * @member {number|Long} appointmentId
171528
+ * @memberof clinical.UnifiedAvailabilityOffered
171529
+ * @instance
171530
+ */
171531
+ UnifiedAvailabilityOffered.prototype.appointmentId = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
171532
+
171533
+ /**
171534
+ * UnifiedAvailabilityOffered partnerAppointmentId.
171535
+ * @member {string} partnerAppointmentId
171536
+ * @memberof clinical.UnifiedAvailabilityOffered
171537
+ * @instance
171538
+ */
171539
+ UnifiedAvailabilityOffered.prototype.partnerAppointmentId = "";
171540
+
171541
+ /**
171542
+ * UnifiedAvailabilityOffered partnerSource.
171543
+ * @member {clinical.ClinicalPartnerSource} partnerSource
171544
+ * @memberof clinical.UnifiedAvailabilityOffered
171545
+ * @instance
171546
+ */
171547
+ UnifiedAvailabilityOffered.prototype.partnerSource = 0;
171548
+
171549
+ /**
171550
+ * UnifiedAvailabilityOffered timeAccepted.
171551
+ * @member {number|Long} timeAccepted
171552
+ * @memberof clinical.UnifiedAvailabilityOffered
171553
+ * @instance
171554
+ */
171555
+ UnifiedAvailabilityOffered.prototype.timeAccepted = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
171556
+
171557
+ /**
171558
+ * UnifiedAvailabilityOffered appointmentType.
171559
+ * @member {clinical.ClinicalAppointmentType} appointmentType
171560
+ * @memberof clinical.UnifiedAvailabilityOffered
171561
+ * @instance
171562
+ */
171563
+ UnifiedAvailabilityOffered.prototype.appointmentType = 0;
171564
+
171565
+ /**
171566
+ * UnifiedAvailabilityOffered isEarliest.
171567
+ * @member {boolean} isEarliest
171568
+ * @memberof clinical.UnifiedAvailabilityOffered
171569
+ * @instance
171570
+ */
171571
+ UnifiedAvailabilityOffered.prototype.isEarliest = false;
171572
+
171573
+ /**
171574
+ * UnifiedAvailabilityOffered isOffered.
171575
+ * @member {boolean} isOffered
171576
+ * @memberof clinical.UnifiedAvailabilityOffered
171577
+ * @instance
171578
+ */
171579
+ UnifiedAvailabilityOffered.prototype.isOffered = false;
171580
+
171581
+ /**
171582
+ * UnifiedAvailabilityOffered timeOffered.
171583
+ * @member {number|Long} timeOffered
171584
+ * @memberof clinical.UnifiedAvailabilityOffered
171585
+ * @instance
171586
+ */
171587
+ UnifiedAvailabilityOffered.prototype.timeOffered = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
171588
+
171589
+ /**
171590
+ * UnifiedAvailabilityOffered appointmentTimestamp.
171591
+ * @member {number|Long} appointmentTimestamp
171592
+ * @memberof clinical.UnifiedAvailabilityOffered
171593
+ * @instance
171594
+ */
171595
+ UnifiedAvailabilityOffered.prototype.appointmentTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
171596
+
171597
+ /**
171598
+ * UnifiedAvailabilityOffered webSessionId.
171599
+ * @member {string} webSessionId
171600
+ * @memberof clinical.UnifiedAvailabilityOffered
171601
+ * @instance
171602
+ */
171603
+ UnifiedAvailabilityOffered.prototype.webSessionId = "";
171604
+
171605
+ /**
171606
+ * UnifiedAvailabilityOffered source.
171607
+ * @member {clinical.ClinicalAvailabilitySource} source
171608
+ * @memberof clinical.UnifiedAvailabilityOffered
171609
+ * @instance
171610
+ */
171611
+ UnifiedAvailabilityOffered.prototype.source = 0;
171612
+
171613
+ /**
171614
+ * UnifiedAvailabilityOffered states.
171615
+ * @member {Array.<string>} states
171616
+ * @memberof clinical.UnifiedAvailabilityOffered
171617
+ * @instance
171618
+ */
171619
+ UnifiedAvailabilityOffered.prototype.states = $util.emptyArray;
171620
+
171621
+ /**
171622
+ * UnifiedAvailabilityOffered lastUpdatedTime.
171623
+ * @member {number|Long} lastUpdatedTime
171624
+ * @memberof clinical.UnifiedAvailabilityOffered
171625
+ * @instance
171626
+ */
171627
+ UnifiedAvailabilityOffered.prototype.lastUpdatedTime = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
171628
+
171629
+ /**
171630
+ * UnifiedAvailabilityOffered isNetworkClinician.
171631
+ * @member {boolean} isNetworkClinician
171632
+ * @memberof clinical.UnifiedAvailabilityOffered
171633
+ * @instance
171634
+ */
171635
+ UnifiedAvailabilityOffered.prototype.isNetworkClinician = false;
171636
+
171637
+ /**
171638
+ * UnifiedAvailabilityOffered locationType.
171639
+ * @member {clinical.ClinicalPartnerAppointmentLocationType} locationType
171640
+ * @memberof clinical.UnifiedAvailabilityOffered
171641
+ * @instance
171642
+ */
171643
+ UnifiedAvailabilityOffered.prototype.locationType = 0;
171644
+
171645
+ /**
171646
+ * Creates a new UnifiedAvailabilityOffered instance using the specified properties.
171647
+ * @function create
171648
+ * @memberof clinical.UnifiedAvailabilityOffered
171649
+ * @static
171650
+ * @param {clinical.IUnifiedAvailabilityOffered=} [properties] Properties to set
171651
+ * @returns {clinical.UnifiedAvailabilityOffered} UnifiedAvailabilityOffered instance
171652
+ */
171653
+ UnifiedAvailabilityOffered.create = function create(properties) {
171654
+ return new UnifiedAvailabilityOffered(properties);
171655
+ };
171656
+
171657
+ /**
171658
+ * Encodes the specified UnifiedAvailabilityOffered message. Does not implicitly {@link clinical.UnifiedAvailabilityOffered.verify|verify} messages.
171659
+ * @function encode
171660
+ * @memberof clinical.UnifiedAvailabilityOffered
171661
+ * @static
171662
+ * @param {clinical.IUnifiedAvailabilityOffered} message UnifiedAvailabilityOffered message or plain object to encode
171663
+ * @param {$protobuf.Writer} [writer] Writer to encode to
171664
+ * @returns {$protobuf.Writer} Writer
171665
+ */
171666
+ UnifiedAvailabilityOffered.encode = function encode(message, writer) {
171667
+ if (!writer)
171668
+ writer = $Writer.create();
171669
+ if (message.id != null && message.hasOwnProperty("id"))
171670
+ writer.uint32(/* id 1, wireType 0 =*/8).int64(message.id);
171671
+ if (message.searchId != null && message.hasOwnProperty("searchId"))
171672
+ writer.uint32(/* id 2, wireType 0 =*/16).int64(message.searchId);
171673
+ if (message.clinicianId != null && message.hasOwnProperty("clinicianId"))
171674
+ writer.uint32(/* id 3, wireType 0 =*/24).int64(message.clinicianId);
171675
+ if (message.partnerClinicianId != null && message.hasOwnProperty("partnerClinicianId"))
171676
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.partnerClinicianId);
171677
+ if (message.memberGingerUserId != null && message.hasOwnProperty("memberGingerUserId"))
171678
+ writer.uint32(/* id 5, wireType 0 =*/40).int64(message.memberGingerUserId);
171679
+ if (message.creatorId != null && message.hasOwnProperty("creatorId"))
171680
+ writer.uint32(/* id 6, wireType 0 =*/48).int64(message.creatorId);
171681
+ if (message.creatorType != null && message.hasOwnProperty("creatorType"))
171682
+ writer.uint32(/* id 7, wireType 0 =*/56).int32(message.creatorType);
171683
+ if (message.appointmentId != null && message.hasOwnProperty("appointmentId"))
171684
+ writer.uint32(/* id 8, wireType 0 =*/64).int64(message.appointmentId);
171685
+ if (message.partnerAppointmentId != null && message.hasOwnProperty("partnerAppointmentId"))
171686
+ writer.uint32(/* id 9, wireType 2 =*/74).string(message.partnerAppointmentId);
171687
+ if (message.partnerSource != null && message.hasOwnProperty("partnerSource"))
171688
+ writer.uint32(/* id 10, wireType 0 =*/80).int32(message.partnerSource);
171689
+ if (message.timeAccepted != null && message.hasOwnProperty("timeAccepted"))
171690
+ writer.uint32(/* id 11, wireType 0 =*/88).uint64(message.timeAccepted);
171691
+ if (message.appointmentType != null && message.hasOwnProperty("appointmentType"))
171692
+ writer.uint32(/* id 12, wireType 0 =*/96).int32(message.appointmentType);
171693
+ if (message.isEarliest != null && message.hasOwnProperty("isEarliest"))
171694
+ writer.uint32(/* id 13, wireType 0 =*/104).bool(message.isEarliest);
171695
+ if (message.isOffered != null && message.hasOwnProperty("isOffered"))
171696
+ writer.uint32(/* id 14, wireType 0 =*/112).bool(message.isOffered);
171697
+ if (message.timeOffered != null && message.hasOwnProperty("timeOffered"))
171698
+ writer.uint32(/* id 15, wireType 0 =*/120).uint64(message.timeOffered);
171699
+ if (message.appointmentTimestamp != null && message.hasOwnProperty("appointmentTimestamp"))
171700
+ writer.uint32(/* id 16, wireType 0 =*/128).uint64(message.appointmentTimestamp);
171701
+ if (message.webSessionId != null && message.hasOwnProperty("webSessionId"))
171702
+ writer.uint32(/* id 17, wireType 2 =*/138).string(message.webSessionId);
171703
+ if (message.source != null && message.hasOwnProperty("source"))
171704
+ writer.uint32(/* id 18, wireType 0 =*/144).int32(message.source);
171705
+ if (message.states != null && message.states.length)
171706
+ for (var i = 0; i < message.states.length; ++i)
171707
+ writer.uint32(/* id 19, wireType 2 =*/154).string(message.states[i]);
171708
+ if (message.lastUpdatedTime != null && message.hasOwnProperty("lastUpdatedTime"))
171709
+ writer.uint32(/* id 20, wireType 0 =*/160).uint64(message.lastUpdatedTime);
171710
+ if (message.isNetworkClinician != null && message.hasOwnProperty("isNetworkClinician"))
171711
+ writer.uint32(/* id 21, wireType 0 =*/168).bool(message.isNetworkClinician);
171712
+ if (message.locationType != null && message.hasOwnProperty("locationType"))
171713
+ writer.uint32(/* id 22, wireType 0 =*/176).int32(message.locationType);
171714
+ return writer;
171715
+ };
171716
+
171717
+ /**
171718
+ * Encodes the specified UnifiedAvailabilityOffered message, length delimited. Does not implicitly {@link clinical.UnifiedAvailabilityOffered.verify|verify} messages.
171719
+ * @function encodeDelimited
171720
+ * @memberof clinical.UnifiedAvailabilityOffered
171721
+ * @static
171722
+ * @param {clinical.IUnifiedAvailabilityOffered} message UnifiedAvailabilityOffered message or plain object to encode
171723
+ * @param {$protobuf.Writer} [writer] Writer to encode to
171724
+ * @returns {$protobuf.Writer} Writer
171725
+ */
171726
+ UnifiedAvailabilityOffered.encodeDelimited = function encodeDelimited(message, writer) {
171727
+ return this.encode(message, writer).ldelim();
171728
+ };
171729
+
171730
+ /**
171731
+ * Decodes an UnifiedAvailabilityOffered message from the specified reader or buffer.
171732
+ * @function decode
171733
+ * @memberof clinical.UnifiedAvailabilityOffered
171734
+ * @static
171735
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
171736
+ * @param {number} [length] Message length if known beforehand
171737
+ * @returns {clinical.UnifiedAvailabilityOffered} UnifiedAvailabilityOffered
171738
+ * @throws {Error} If the payload is not a reader or valid buffer
171739
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
171740
+ */
171741
+ UnifiedAvailabilityOffered.decode = function decode(reader, length) {
171742
+ if (!(reader instanceof $Reader))
171743
+ reader = $Reader.create(reader);
171744
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.clinical.UnifiedAvailabilityOffered();
171745
+ while (reader.pos < end) {
171746
+ var tag = reader.uint32();
171747
+ switch (tag >>> 3) {
171748
+ case 1:
171749
+ message.id = reader.int64();
171750
+ break;
171751
+ case 2:
171752
+ message.searchId = reader.int64();
171753
+ break;
171754
+ case 3:
171755
+ message.clinicianId = reader.int64();
171756
+ break;
171757
+ case 4:
171758
+ message.partnerClinicianId = reader.string();
171759
+ break;
171760
+ case 5:
171761
+ message.memberGingerUserId = reader.int64();
171762
+ break;
171763
+ case 6:
171764
+ message.creatorId = reader.int64();
171765
+ break;
171766
+ case 7:
171767
+ message.creatorType = reader.int32();
171768
+ break;
171769
+ case 8:
171770
+ message.appointmentId = reader.int64();
171771
+ break;
171772
+ case 9:
171773
+ message.partnerAppointmentId = reader.string();
171774
+ break;
171775
+ case 10:
171776
+ message.partnerSource = reader.int32();
171777
+ break;
171778
+ case 11:
171779
+ message.timeAccepted = reader.uint64();
171780
+ break;
171781
+ case 12:
171782
+ message.appointmentType = reader.int32();
171783
+ break;
171784
+ case 13:
171785
+ message.isEarliest = reader.bool();
171786
+ break;
171787
+ case 14:
171788
+ message.isOffered = reader.bool();
171789
+ break;
171790
+ case 15:
171791
+ message.timeOffered = reader.uint64();
171792
+ break;
171793
+ case 16:
171794
+ message.appointmentTimestamp = reader.uint64();
171795
+ break;
171796
+ case 17:
171797
+ message.webSessionId = reader.string();
171798
+ break;
171799
+ case 18:
171800
+ message.source = reader.int32();
171801
+ break;
171802
+ case 19:
171803
+ if (!(message.states && message.states.length))
171804
+ message.states = [];
171805
+ message.states.push(reader.string());
171806
+ break;
171807
+ case 20:
171808
+ message.lastUpdatedTime = reader.uint64();
171809
+ break;
171810
+ case 21:
171811
+ message.isNetworkClinician = reader.bool();
171812
+ break;
171813
+ case 22:
171814
+ message.locationType = reader.int32();
171815
+ break;
171816
+ default:
171817
+ reader.skipType(tag & 7);
171818
+ break;
171819
+ }
171820
+ }
171821
+ return message;
171822
+ };
171823
+
171824
+ /**
171825
+ * Decodes an UnifiedAvailabilityOffered message from the specified reader or buffer, length delimited.
171826
+ * @function decodeDelimited
171827
+ * @memberof clinical.UnifiedAvailabilityOffered
171828
+ * @static
171829
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
171830
+ * @returns {clinical.UnifiedAvailabilityOffered} UnifiedAvailabilityOffered
171831
+ * @throws {Error} If the payload is not a reader or valid buffer
171832
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
171833
+ */
171834
+ UnifiedAvailabilityOffered.decodeDelimited = function decodeDelimited(reader) {
171835
+ if (!(reader instanceof $Reader))
171836
+ reader = new $Reader(reader);
171837
+ return this.decode(reader, reader.uint32());
171838
+ };
171839
+
171840
+ /**
171841
+ * Verifies an UnifiedAvailabilityOffered message.
171842
+ * @function verify
171843
+ * @memberof clinical.UnifiedAvailabilityOffered
171844
+ * @static
171845
+ * @param {Object.<string,*>} message Plain object to verify
171846
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
171847
+ */
171848
+ UnifiedAvailabilityOffered.verify = function verify(message) {
171849
+ if (typeof message !== "object" || message === null)
171850
+ return "object expected";
171851
+ if (message.id != null && message.hasOwnProperty("id"))
171852
+ if (!$util.isInteger(message.id) && !(message.id && $util.isInteger(message.id.low) && $util.isInteger(message.id.high)))
171853
+ return "id: integer|Long expected";
171854
+ if (message.searchId != null && message.hasOwnProperty("searchId"))
171855
+ if (!$util.isInteger(message.searchId) && !(message.searchId && $util.isInteger(message.searchId.low) && $util.isInteger(message.searchId.high)))
171856
+ return "searchId: integer|Long expected";
171857
+ if (message.clinicianId != null && message.hasOwnProperty("clinicianId"))
171858
+ if (!$util.isInteger(message.clinicianId) && !(message.clinicianId && $util.isInteger(message.clinicianId.low) && $util.isInteger(message.clinicianId.high)))
171859
+ return "clinicianId: integer|Long expected";
171860
+ if (message.partnerClinicianId != null && message.hasOwnProperty("partnerClinicianId"))
171861
+ if (!$util.isString(message.partnerClinicianId))
171862
+ return "partnerClinicianId: string expected";
171863
+ if (message.memberGingerUserId != null && message.hasOwnProperty("memberGingerUserId"))
171864
+ if (!$util.isInteger(message.memberGingerUserId) && !(message.memberGingerUserId && $util.isInteger(message.memberGingerUserId.low) && $util.isInteger(message.memberGingerUserId.high)))
171865
+ return "memberGingerUserId: integer|Long expected";
171866
+ if (message.creatorId != null && message.hasOwnProperty("creatorId"))
171867
+ if (!$util.isInteger(message.creatorId) && !(message.creatorId && $util.isInteger(message.creatorId.low) && $util.isInteger(message.creatorId.high)))
171868
+ return "creatorId: integer|Long expected";
171869
+ if (message.creatorType != null && message.hasOwnProperty("creatorType"))
171870
+ switch (message.creatorType) {
171871
+ default:
171872
+ return "creatorType: enum value expected";
171873
+ case 0:
171874
+ case 1:
171875
+ case 2:
171876
+ break;
171877
+ }
171878
+ if (message.appointmentId != null && message.hasOwnProperty("appointmentId"))
171879
+ if (!$util.isInteger(message.appointmentId) && !(message.appointmentId && $util.isInteger(message.appointmentId.low) && $util.isInteger(message.appointmentId.high)))
171880
+ return "appointmentId: integer|Long expected";
171881
+ if (message.partnerAppointmentId != null && message.hasOwnProperty("partnerAppointmentId"))
171882
+ if (!$util.isString(message.partnerAppointmentId))
171883
+ return "partnerAppointmentId: string expected";
171884
+ if (message.partnerSource != null && message.hasOwnProperty("partnerSource"))
171885
+ switch (message.partnerSource) {
171886
+ default:
171887
+ return "partnerSource: enum value expected";
171888
+ case 0:
171889
+ case 1:
171890
+ break;
171891
+ }
171892
+ if (message.timeAccepted != null && message.hasOwnProperty("timeAccepted"))
171893
+ if (!$util.isInteger(message.timeAccepted) && !(message.timeAccepted && $util.isInteger(message.timeAccepted.low) && $util.isInteger(message.timeAccepted.high)))
171894
+ return "timeAccepted: integer|Long expected";
171895
+ if (message.appointmentType != null && message.hasOwnProperty("appointmentType"))
171896
+ switch (message.appointmentType) {
171897
+ default:
171898
+ return "appointmentType: enum value expected";
171899
+ case 0:
171900
+ case 1:
171901
+ case 2:
171902
+ case 3:
171903
+ case 4:
171904
+ break;
171905
+ }
171906
+ if (message.isEarliest != null && message.hasOwnProperty("isEarliest"))
171907
+ if (typeof message.isEarliest !== "boolean")
171908
+ return "isEarliest: boolean expected";
171909
+ if (message.isOffered != null && message.hasOwnProperty("isOffered"))
171910
+ if (typeof message.isOffered !== "boolean")
171911
+ return "isOffered: boolean expected";
171912
+ if (message.timeOffered != null && message.hasOwnProperty("timeOffered"))
171913
+ if (!$util.isInteger(message.timeOffered) && !(message.timeOffered && $util.isInteger(message.timeOffered.low) && $util.isInteger(message.timeOffered.high)))
171914
+ return "timeOffered: integer|Long expected";
171915
+ if (message.appointmentTimestamp != null && message.hasOwnProperty("appointmentTimestamp"))
171916
+ if (!$util.isInteger(message.appointmentTimestamp) && !(message.appointmentTimestamp && $util.isInteger(message.appointmentTimestamp.low) && $util.isInteger(message.appointmentTimestamp.high)))
171917
+ return "appointmentTimestamp: integer|Long expected";
171918
+ if (message.webSessionId != null && message.hasOwnProperty("webSessionId"))
171919
+ if (!$util.isString(message.webSessionId))
171920
+ return "webSessionId: string expected";
171921
+ if (message.source != null && message.hasOwnProperty("source"))
171922
+ switch (message.source) {
171923
+ default:
171924
+ return "source: enum value expected";
171925
+ case 0:
171926
+ case 1:
171927
+ case 2:
171928
+ case 3:
171929
+ case 4:
171930
+ break;
171931
+ }
171932
+ if (message.states != null && message.hasOwnProperty("states")) {
171933
+ if (!Array.isArray(message.states))
171934
+ return "states: array expected";
171935
+ for (var i = 0; i < message.states.length; ++i)
171936
+ if (!$util.isString(message.states[i]))
171937
+ return "states: string[] expected";
171938
+ }
171939
+ if (message.lastUpdatedTime != null && message.hasOwnProperty("lastUpdatedTime"))
171940
+ if (!$util.isInteger(message.lastUpdatedTime) && !(message.lastUpdatedTime && $util.isInteger(message.lastUpdatedTime.low) && $util.isInteger(message.lastUpdatedTime.high)))
171941
+ return "lastUpdatedTime: integer|Long expected";
171942
+ if (message.isNetworkClinician != null && message.hasOwnProperty("isNetworkClinician"))
171943
+ if (typeof message.isNetworkClinician !== "boolean")
171944
+ return "isNetworkClinician: boolean expected";
171945
+ if (message.locationType != null && message.hasOwnProperty("locationType"))
171946
+ switch (message.locationType) {
171947
+ default:
171948
+ return "locationType: enum value expected";
171949
+ case 0:
171950
+ case 1:
171951
+ case 2:
171952
+ break;
171953
+ }
171954
+ return null;
171955
+ };
171956
+
171957
+ /**
171958
+ * Creates an UnifiedAvailabilityOffered message from a plain object. Also converts values to their respective internal types.
171959
+ * @function fromObject
171960
+ * @memberof clinical.UnifiedAvailabilityOffered
171961
+ * @static
171962
+ * @param {Object.<string,*>} object Plain object
171963
+ * @returns {clinical.UnifiedAvailabilityOffered} UnifiedAvailabilityOffered
171964
+ */
171965
+ UnifiedAvailabilityOffered.fromObject = function fromObject(object) {
171966
+ if (object instanceof $root.clinical.UnifiedAvailabilityOffered)
171967
+ return object;
171968
+ var message = new $root.clinical.UnifiedAvailabilityOffered();
171969
+ if (object.id != null)
171970
+ if ($util.Long)
171971
+ (message.id = $util.Long.fromValue(object.id)).unsigned = false;
171972
+ else if (typeof object.id === "string")
171973
+ message.id = parseInt(object.id, 10);
171974
+ else if (typeof object.id === "number")
171975
+ message.id = object.id;
171976
+ else if (typeof object.id === "object")
171977
+ message.id = new $util.LongBits(object.id.low >>> 0, object.id.high >>> 0).toNumber();
171978
+ if (object.searchId != null)
171979
+ if ($util.Long)
171980
+ (message.searchId = $util.Long.fromValue(object.searchId)).unsigned = false;
171981
+ else if (typeof object.searchId === "string")
171982
+ message.searchId = parseInt(object.searchId, 10);
171983
+ else if (typeof object.searchId === "number")
171984
+ message.searchId = object.searchId;
171985
+ else if (typeof object.searchId === "object")
171986
+ message.searchId = new $util.LongBits(object.searchId.low >>> 0, object.searchId.high >>> 0).toNumber();
171987
+ if (object.clinicianId != null)
171988
+ if ($util.Long)
171989
+ (message.clinicianId = $util.Long.fromValue(object.clinicianId)).unsigned = false;
171990
+ else if (typeof object.clinicianId === "string")
171991
+ message.clinicianId = parseInt(object.clinicianId, 10);
171992
+ else if (typeof object.clinicianId === "number")
171993
+ message.clinicianId = object.clinicianId;
171994
+ else if (typeof object.clinicianId === "object")
171995
+ message.clinicianId = new $util.LongBits(object.clinicianId.low >>> 0, object.clinicianId.high >>> 0).toNumber();
171996
+ if (object.partnerClinicianId != null)
171997
+ message.partnerClinicianId = String(object.partnerClinicianId);
171998
+ if (object.memberGingerUserId != null)
171999
+ if ($util.Long)
172000
+ (message.memberGingerUserId = $util.Long.fromValue(object.memberGingerUserId)).unsigned = false;
172001
+ else if (typeof object.memberGingerUserId === "string")
172002
+ message.memberGingerUserId = parseInt(object.memberGingerUserId, 10);
172003
+ else if (typeof object.memberGingerUserId === "number")
172004
+ message.memberGingerUserId = object.memberGingerUserId;
172005
+ else if (typeof object.memberGingerUserId === "object")
172006
+ message.memberGingerUserId = new $util.LongBits(object.memberGingerUserId.low >>> 0, object.memberGingerUserId.high >>> 0).toNumber();
172007
+ if (object.creatorId != null)
172008
+ if ($util.Long)
172009
+ (message.creatorId = $util.Long.fromValue(object.creatorId)).unsigned = false;
172010
+ else if (typeof object.creatorId === "string")
172011
+ message.creatorId = parseInt(object.creatorId, 10);
172012
+ else if (typeof object.creatorId === "number")
172013
+ message.creatorId = object.creatorId;
172014
+ else if (typeof object.creatorId === "object")
172015
+ message.creatorId = new $util.LongBits(object.creatorId.low >>> 0, object.creatorId.high >>> 0).toNumber();
172016
+ switch (object.creatorType) {
172017
+ case "UNIFIED_CLINICAL_AVAILABILITY_OFFER_CREATOR_TYPE_UNKNOWN":
172018
+ case 0:
172019
+ message.creatorType = 0;
172020
+ break;
172021
+ case "UNIFIED_CLINICAL_AVAILABILITY_OFFER_CREATOR_TYPE_MEMBER":
172022
+ case 1:
172023
+ message.creatorType = 1;
172024
+ break;
172025
+ case "UNIFIED_CLINICAL_AVAILABILITY_OFFER_CREATOR_TYPE_MEMBER_SUPPORT":
172026
+ case 2:
172027
+ message.creatorType = 2;
172028
+ break;
172029
+ }
172030
+ if (object.appointmentId != null)
172031
+ if ($util.Long)
172032
+ (message.appointmentId = $util.Long.fromValue(object.appointmentId)).unsigned = false;
172033
+ else if (typeof object.appointmentId === "string")
172034
+ message.appointmentId = parseInt(object.appointmentId, 10);
172035
+ else if (typeof object.appointmentId === "number")
172036
+ message.appointmentId = object.appointmentId;
172037
+ else if (typeof object.appointmentId === "object")
172038
+ message.appointmentId = new $util.LongBits(object.appointmentId.low >>> 0, object.appointmentId.high >>> 0).toNumber();
172039
+ if (object.partnerAppointmentId != null)
172040
+ message.partnerAppointmentId = String(object.partnerAppointmentId);
172041
+ switch (object.partnerSource) {
172042
+ case "CLINICAL_PARTNER_SOURCE_UNKNOWN":
172043
+ case 0:
172044
+ message.partnerSource = 0;
172045
+ break;
172046
+ case "CLINICAL_PARTNER_SOURCE_SONDERMIND":
172047
+ case 1:
172048
+ message.partnerSource = 1;
172049
+ break;
172050
+ }
172051
+ if (object.timeAccepted != null)
172052
+ if ($util.Long)
172053
+ (message.timeAccepted = $util.Long.fromValue(object.timeAccepted)).unsigned = true;
172054
+ else if (typeof object.timeAccepted === "string")
172055
+ message.timeAccepted = parseInt(object.timeAccepted, 10);
172056
+ else if (typeof object.timeAccepted === "number")
172057
+ message.timeAccepted = object.timeAccepted;
172058
+ else if (typeof object.timeAccepted === "object")
172059
+ message.timeAccepted = new $util.LongBits(object.timeAccepted.low >>> 0, object.timeAccepted.high >>> 0).toNumber(true);
172060
+ switch (object.appointmentType) {
172061
+ case "CLINICAL_APPOINTMENT_TYPE_UNKNOWN":
172062
+ case 0:
172063
+ message.appointmentType = 0;
172064
+ break;
172065
+ case "CLINICAL_APPOINTMENT_TYPE_THERAPY_INTAKE":
172066
+ case 1:
172067
+ message.appointmentType = 1;
172068
+ break;
172069
+ case "CLINICAL_APPOINTMENT_TYPE_THERAPY_PROGRESS":
172070
+ case 2:
172071
+ message.appointmentType = 2;
172072
+ break;
172073
+ case "CLINICAL_APPOINTMENT_TYPE_PSYCHIATRY_INTAKE":
172074
+ case 3:
172075
+ message.appointmentType = 3;
172076
+ break;
172077
+ case "CLINICAL_APPOINTMENT_TYPE_PSYCHIATRY_PROGRESS":
172078
+ case 4:
172079
+ message.appointmentType = 4;
172080
+ break;
172081
+ }
172082
+ if (object.isEarliest != null)
172083
+ message.isEarliest = Boolean(object.isEarliest);
172084
+ if (object.isOffered != null)
172085
+ message.isOffered = Boolean(object.isOffered);
172086
+ if (object.timeOffered != null)
172087
+ if ($util.Long)
172088
+ (message.timeOffered = $util.Long.fromValue(object.timeOffered)).unsigned = true;
172089
+ else if (typeof object.timeOffered === "string")
172090
+ message.timeOffered = parseInt(object.timeOffered, 10);
172091
+ else if (typeof object.timeOffered === "number")
172092
+ message.timeOffered = object.timeOffered;
172093
+ else if (typeof object.timeOffered === "object")
172094
+ message.timeOffered = new $util.LongBits(object.timeOffered.low >>> 0, object.timeOffered.high >>> 0).toNumber(true);
172095
+ if (object.appointmentTimestamp != null)
172096
+ if ($util.Long)
172097
+ (message.appointmentTimestamp = $util.Long.fromValue(object.appointmentTimestamp)).unsigned = true;
172098
+ else if (typeof object.appointmentTimestamp === "string")
172099
+ message.appointmentTimestamp = parseInt(object.appointmentTimestamp, 10);
172100
+ else if (typeof object.appointmentTimestamp === "number")
172101
+ message.appointmentTimestamp = object.appointmentTimestamp;
172102
+ else if (typeof object.appointmentTimestamp === "object")
172103
+ message.appointmentTimestamp = new $util.LongBits(object.appointmentTimestamp.low >>> 0, object.appointmentTimestamp.high >>> 0).toNumber(true);
172104
+ if (object.webSessionId != null)
172105
+ message.webSessionId = String(object.webSessionId);
172106
+ switch (object.source) {
172107
+ case "CLINICAL_AVAILABILITY_SOURCE_UNKNOWN":
172108
+ case 0:
172109
+ message.source = 0;
172110
+ break;
172111
+ case "CLINICAL_AVAILABILITY_SOURCE_ADMIN":
172112
+ case 1:
172113
+ message.source = 1;
172114
+ break;
172115
+ case "CLINICAL_AVAILABILITY_SOURCE_CLINHUB":
172116
+ case 2:
172117
+ message.source = 2;
172118
+ break;
172119
+ case "CLINICAL_AVAILABILITY_SOURCE_GOOGLE_CALENDAR":
172120
+ case 3:
172121
+ message.source = 3;
172122
+ break;
172123
+ case "CLINICAL_AVAILABILITY_SOURCE_CAS":
172124
+ case 4:
172125
+ message.source = 4;
172126
+ break;
172127
+ }
172128
+ if (object.states) {
172129
+ if (!Array.isArray(object.states))
172130
+ throw TypeError(".clinical.UnifiedAvailabilityOffered.states: array expected");
172131
+ message.states = [];
172132
+ for (var i = 0; i < object.states.length; ++i)
172133
+ message.states[i] = String(object.states[i]);
172134
+ }
172135
+ if (object.lastUpdatedTime != null)
172136
+ if ($util.Long)
172137
+ (message.lastUpdatedTime = $util.Long.fromValue(object.lastUpdatedTime)).unsigned = true;
172138
+ else if (typeof object.lastUpdatedTime === "string")
172139
+ message.lastUpdatedTime = parseInt(object.lastUpdatedTime, 10);
172140
+ else if (typeof object.lastUpdatedTime === "number")
172141
+ message.lastUpdatedTime = object.lastUpdatedTime;
172142
+ else if (typeof object.lastUpdatedTime === "object")
172143
+ message.lastUpdatedTime = new $util.LongBits(object.lastUpdatedTime.low >>> 0, object.lastUpdatedTime.high >>> 0).toNumber(true);
172144
+ if (object.isNetworkClinician != null)
172145
+ message.isNetworkClinician = Boolean(object.isNetworkClinician);
172146
+ switch (object.locationType) {
172147
+ case "CLINICAL_PARTNER_APPOINTMENT_LOCATION_TYPE_UNKNOWN":
172148
+ case 0:
172149
+ message.locationType = 0;
172150
+ break;
172151
+ case "CLINICAL_PARTNER_APPOINTMENT_LOCATION_TYPE_TELEMEDICINE":
172152
+ case 1:
172153
+ message.locationType = 1;
172154
+ break;
172155
+ case "CLINICAL_PARTNER_APPOINTMENT_LOCATION_TYPE_IN_PERSON":
172156
+ case 2:
172157
+ message.locationType = 2;
172158
+ break;
172159
+ }
172160
+ return message;
172161
+ };
172162
+
172163
+ /**
172164
+ * Creates a plain object from an UnifiedAvailabilityOffered message. Also converts values to other types if specified.
172165
+ * @function toObject
172166
+ * @memberof clinical.UnifiedAvailabilityOffered
172167
+ * @static
172168
+ * @param {clinical.UnifiedAvailabilityOffered} message UnifiedAvailabilityOffered
172169
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
172170
+ * @returns {Object.<string,*>} Plain object
172171
+ */
172172
+ UnifiedAvailabilityOffered.toObject = function toObject(message, options) {
172173
+ if (!options)
172174
+ options = {};
172175
+ var object = {};
172176
+ if (options.arrays || options.defaults)
172177
+ object.states = [];
172178
+ if (options.defaults) {
172179
+ if ($util.Long) {
172180
+ var long = new $util.Long(0, 0, false);
172181
+ object.id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
172182
+ } else
172183
+ object.id = options.longs === String ? "0" : 0;
172184
+ if ($util.Long) {
172185
+ var long = new $util.Long(0, 0, false);
172186
+ object.searchId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
172187
+ } else
172188
+ object.searchId = options.longs === String ? "0" : 0;
172189
+ if ($util.Long) {
172190
+ var long = new $util.Long(0, 0, false);
172191
+ object.clinicianId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
172192
+ } else
172193
+ object.clinicianId = options.longs === String ? "0" : 0;
172194
+ object.partnerClinicianId = "";
172195
+ if ($util.Long) {
172196
+ var long = new $util.Long(0, 0, false);
172197
+ object.memberGingerUserId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
172198
+ } else
172199
+ object.memberGingerUserId = options.longs === String ? "0" : 0;
172200
+ if ($util.Long) {
172201
+ var long = new $util.Long(0, 0, false);
172202
+ object.creatorId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
172203
+ } else
172204
+ object.creatorId = options.longs === String ? "0" : 0;
172205
+ object.creatorType = options.enums === String ? "UNIFIED_CLINICAL_AVAILABILITY_OFFER_CREATOR_TYPE_UNKNOWN" : 0;
172206
+ if ($util.Long) {
172207
+ var long = new $util.Long(0, 0, false);
172208
+ object.appointmentId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
172209
+ } else
172210
+ object.appointmentId = options.longs === String ? "0" : 0;
172211
+ object.partnerAppointmentId = "";
172212
+ object.partnerSource = options.enums === String ? "CLINICAL_PARTNER_SOURCE_UNKNOWN" : 0;
172213
+ if ($util.Long) {
172214
+ var long = new $util.Long(0, 0, true);
172215
+ object.timeAccepted = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
172216
+ } else
172217
+ object.timeAccepted = options.longs === String ? "0" : 0;
172218
+ object.appointmentType = options.enums === String ? "CLINICAL_APPOINTMENT_TYPE_UNKNOWN" : 0;
172219
+ object.isEarliest = false;
172220
+ object.isOffered = false;
172221
+ if ($util.Long) {
172222
+ var long = new $util.Long(0, 0, true);
172223
+ object.timeOffered = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
172224
+ } else
172225
+ object.timeOffered = options.longs === String ? "0" : 0;
172226
+ if ($util.Long) {
172227
+ var long = new $util.Long(0, 0, true);
172228
+ object.appointmentTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
172229
+ } else
172230
+ object.appointmentTimestamp = options.longs === String ? "0" : 0;
172231
+ object.webSessionId = "";
172232
+ object.source = options.enums === String ? "CLINICAL_AVAILABILITY_SOURCE_UNKNOWN" : 0;
172233
+ if ($util.Long) {
172234
+ var long = new $util.Long(0, 0, true);
172235
+ object.lastUpdatedTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
172236
+ } else
172237
+ object.lastUpdatedTime = options.longs === String ? "0" : 0;
172238
+ object.isNetworkClinician = false;
172239
+ object.locationType = options.enums === String ? "CLINICAL_PARTNER_APPOINTMENT_LOCATION_TYPE_UNKNOWN" : 0;
172240
+ }
172241
+ if (message.id != null && message.hasOwnProperty("id"))
172242
+ if (typeof message.id === "number")
172243
+ object.id = options.longs === String ? String(message.id) : message.id;
172244
+ else
172245
+ object.id = options.longs === String ? $util.Long.prototype.toString.call(message.id) : options.longs === Number ? new $util.LongBits(message.id.low >>> 0, message.id.high >>> 0).toNumber() : message.id;
172246
+ if (message.searchId != null && message.hasOwnProperty("searchId"))
172247
+ if (typeof message.searchId === "number")
172248
+ object.searchId = options.longs === String ? String(message.searchId) : message.searchId;
172249
+ else
172250
+ object.searchId = options.longs === String ? $util.Long.prototype.toString.call(message.searchId) : options.longs === Number ? new $util.LongBits(message.searchId.low >>> 0, message.searchId.high >>> 0).toNumber() : message.searchId;
172251
+ if (message.clinicianId != null && message.hasOwnProperty("clinicianId"))
172252
+ if (typeof message.clinicianId === "number")
172253
+ object.clinicianId = options.longs === String ? String(message.clinicianId) : message.clinicianId;
172254
+ else
172255
+ object.clinicianId = options.longs === String ? $util.Long.prototype.toString.call(message.clinicianId) : options.longs === Number ? new $util.LongBits(message.clinicianId.low >>> 0, message.clinicianId.high >>> 0).toNumber() : message.clinicianId;
172256
+ if (message.partnerClinicianId != null && message.hasOwnProperty("partnerClinicianId"))
172257
+ object.partnerClinicianId = message.partnerClinicianId;
172258
+ if (message.memberGingerUserId != null && message.hasOwnProperty("memberGingerUserId"))
172259
+ if (typeof message.memberGingerUserId === "number")
172260
+ object.memberGingerUserId = options.longs === String ? String(message.memberGingerUserId) : message.memberGingerUserId;
172261
+ else
172262
+ object.memberGingerUserId = options.longs === String ? $util.Long.prototype.toString.call(message.memberGingerUserId) : options.longs === Number ? new $util.LongBits(message.memberGingerUserId.low >>> 0, message.memberGingerUserId.high >>> 0).toNumber() : message.memberGingerUserId;
172263
+ if (message.creatorId != null && message.hasOwnProperty("creatorId"))
172264
+ if (typeof message.creatorId === "number")
172265
+ object.creatorId = options.longs === String ? String(message.creatorId) : message.creatorId;
172266
+ else
172267
+ object.creatorId = options.longs === String ? $util.Long.prototype.toString.call(message.creatorId) : options.longs === Number ? new $util.LongBits(message.creatorId.low >>> 0, message.creatorId.high >>> 0).toNumber() : message.creatorId;
172268
+ if (message.creatorType != null && message.hasOwnProperty("creatorType"))
172269
+ object.creatorType = options.enums === String ? $root.clinical.UnifiedClinicalAvailabilityOfferCreatorType[message.creatorType] : message.creatorType;
172270
+ if (message.appointmentId != null && message.hasOwnProperty("appointmentId"))
172271
+ if (typeof message.appointmentId === "number")
172272
+ object.appointmentId = options.longs === String ? String(message.appointmentId) : message.appointmentId;
172273
+ else
172274
+ object.appointmentId = options.longs === String ? $util.Long.prototype.toString.call(message.appointmentId) : options.longs === Number ? new $util.LongBits(message.appointmentId.low >>> 0, message.appointmentId.high >>> 0).toNumber() : message.appointmentId;
172275
+ if (message.partnerAppointmentId != null && message.hasOwnProperty("partnerAppointmentId"))
172276
+ object.partnerAppointmentId = message.partnerAppointmentId;
172277
+ if (message.partnerSource != null && message.hasOwnProperty("partnerSource"))
172278
+ object.partnerSource = options.enums === String ? $root.clinical.ClinicalPartnerSource[message.partnerSource] : message.partnerSource;
172279
+ if (message.timeAccepted != null && message.hasOwnProperty("timeAccepted"))
172280
+ if (typeof message.timeAccepted === "number")
172281
+ object.timeAccepted = options.longs === String ? String(message.timeAccepted) : message.timeAccepted;
172282
+ else
172283
+ object.timeAccepted = options.longs === String ? $util.Long.prototype.toString.call(message.timeAccepted) : options.longs === Number ? new $util.LongBits(message.timeAccepted.low >>> 0, message.timeAccepted.high >>> 0).toNumber(true) : message.timeAccepted;
172284
+ if (message.appointmentType != null && message.hasOwnProperty("appointmentType"))
172285
+ object.appointmentType = options.enums === String ? $root.clinical.ClinicalAppointmentType[message.appointmentType] : message.appointmentType;
172286
+ if (message.isEarliest != null && message.hasOwnProperty("isEarliest"))
172287
+ object.isEarliest = message.isEarliest;
172288
+ if (message.isOffered != null && message.hasOwnProperty("isOffered"))
172289
+ object.isOffered = message.isOffered;
172290
+ if (message.timeOffered != null && message.hasOwnProperty("timeOffered"))
172291
+ if (typeof message.timeOffered === "number")
172292
+ object.timeOffered = options.longs === String ? String(message.timeOffered) : message.timeOffered;
172293
+ else
172294
+ object.timeOffered = options.longs === String ? $util.Long.prototype.toString.call(message.timeOffered) : options.longs === Number ? new $util.LongBits(message.timeOffered.low >>> 0, message.timeOffered.high >>> 0).toNumber(true) : message.timeOffered;
172295
+ if (message.appointmentTimestamp != null && message.hasOwnProperty("appointmentTimestamp"))
172296
+ if (typeof message.appointmentTimestamp === "number")
172297
+ object.appointmentTimestamp = options.longs === String ? String(message.appointmentTimestamp) : message.appointmentTimestamp;
172298
+ else
172299
+ object.appointmentTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.appointmentTimestamp) : options.longs === Number ? new $util.LongBits(message.appointmentTimestamp.low >>> 0, message.appointmentTimestamp.high >>> 0).toNumber(true) : message.appointmentTimestamp;
172300
+ if (message.webSessionId != null && message.hasOwnProperty("webSessionId"))
172301
+ object.webSessionId = message.webSessionId;
172302
+ if (message.source != null && message.hasOwnProperty("source"))
172303
+ object.source = options.enums === String ? $root.clinical.ClinicalAvailabilitySource[message.source] : message.source;
172304
+ if (message.states && message.states.length) {
172305
+ object.states = [];
172306
+ for (var j = 0; j < message.states.length; ++j)
172307
+ object.states[j] = message.states[j];
172308
+ }
172309
+ if (message.lastUpdatedTime != null && message.hasOwnProperty("lastUpdatedTime"))
172310
+ if (typeof message.lastUpdatedTime === "number")
172311
+ object.lastUpdatedTime = options.longs === String ? String(message.lastUpdatedTime) : message.lastUpdatedTime;
172312
+ else
172313
+ object.lastUpdatedTime = options.longs === String ? $util.Long.prototype.toString.call(message.lastUpdatedTime) : options.longs === Number ? new $util.LongBits(message.lastUpdatedTime.low >>> 0, message.lastUpdatedTime.high >>> 0).toNumber(true) : message.lastUpdatedTime;
172314
+ if (message.isNetworkClinician != null && message.hasOwnProperty("isNetworkClinician"))
172315
+ object.isNetworkClinician = message.isNetworkClinician;
172316
+ if (message.locationType != null && message.hasOwnProperty("locationType"))
172317
+ object.locationType = options.enums === String ? $root.clinical.ClinicalPartnerAppointmentLocationType[message.locationType] : message.locationType;
172318
+ return object;
172319
+ };
172320
+
172321
+ /**
172322
+ * Converts this UnifiedAvailabilityOffered to JSON.
172323
+ * @function toJSON
172324
+ * @memberof clinical.UnifiedAvailabilityOffered
172325
+ * @instance
172326
+ * @returns {Object.<string,*>} JSON object
172327
+ */
172328
+ UnifiedAvailabilityOffered.prototype.toJSON = function toJSON() {
172329
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
172330
+ };
172331
+
172332
+ return UnifiedAvailabilityOffered;
172333
+ })();
172334
+
171311
172335
  return clinical;
171312
172336
  })();
171313
172337