@headspace/protos-events 1.825.0 → 1.827.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 +375 -0
  2. package/lib/index.js +1035 -0
  3. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -208922,6 +208922,1041 @@ $root.CmsAccessEnrollmentInitiated = (function() {
208922
208922
  return CmsAccessEnrollmentInitiated;
208923
208923
  })();
208924
208924
 
208925
+ /**
208926
+ * CmsAccessExclusionCriteria enum.
208927
+ * @name CmsAccessExclusionCriteria
208928
+ * @enum {number}
208929
+ * @property {number} CMS_ACCESS_EXCLUSION_CRITERIA_UNKNOWN=0 CMS_ACCESS_EXCLUSION_CRITERIA_UNKNOWN value
208930
+ * @property {number} CMS_ACCESS_EXCLUSION_CRITERIA_SUICIDAL_IDEATION=1 CMS_ACCESS_EXCLUSION_CRITERIA_SUICIDAL_IDEATION value
208931
+ * @property {number} CMS_ACCESS_EXCLUSION_CRITERIA_DEMENTIA=2 CMS_ACCESS_EXCLUSION_CRITERIA_DEMENTIA value
208932
+ * @property {number} CMS_ACCESS_EXCLUSION_CRITERIA_PSYCHOTIC_DISORDER=3 CMS_ACCESS_EXCLUSION_CRITERIA_PSYCHOTIC_DISORDER value
208933
+ * @property {number} CMS_ACCESS_EXCLUSION_CRITERIA_EATING_DISORDER=4 CMS_ACCESS_EXCLUSION_CRITERIA_EATING_DISORDER value
208934
+ * @property {number} CMS_ACCESS_EXCLUSION_CRITERIA_PREGNANCY=5 CMS_ACCESS_EXCLUSION_CRITERIA_PREGNANCY value
208935
+ * @property {number} CMS_ACCESS_EXCLUSION_CRITERIA_FRAILTY=6 CMS_ACCESS_EXCLUSION_CRITERIA_FRAILTY value
208936
+ * @property {number} CMS_ACCESS_EXCLUSION_CRITERIA_MINOR=7 CMS_ACCESS_EXCLUSION_CRITERIA_MINOR value
208937
+ */
208938
+ $root.CmsAccessExclusionCriteria = (function() {
208939
+ var valuesById = {}, values = Object.create(valuesById);
208940
+ values[valuesById[0] = "CMS_ACCESS_EXCLUSION_CRITERIA_UNKNOWN"] = 0;
208941
+ values[valuesById[1] = "CMS_ACCESS_EXCLUSION_CRITERIA_SUICIDAL_IDEATION"] = 1;
208942
+ values[valuesById[2] = "CMS_ACCESS_EXCLUSION_CRITERIA_DEMENTIA"] = 2;
208943
+ values[valuesById[3] = "CMS_ACCESS_EXCLUSION_CRITERIA_PSYCHOTIC_DISORDER"] = 3;
208944
+ values[valuesById[4] = "CMS_ACCESS_EXCLUSION_CRITERIA_EATING_DISORDER"] = 4;
208945
+ values[valuesById[5] = "CMS_ACCESS_EXCLUSION_CRITERIA_PREGNANCY"] = 5;
208946
+ values[valuesById[6] = "CMS_ACCESS_EXCLUSION_CRITERIA_FRAILTY"] = 6;
208947
+ values[valuesById[7] = "CMS_ACCESS_EXCLUSION_CRITERIA_MINOR"] = 7;
208948
+ return values;
208949
+ })();
208950
+
208951
+ $root.CmsAccessEnrollmentExcluded = (function() {
208952
+
208953
+ /**
208954
+ * Properties of a CmsAccessEnrollmentExcluded.
208955
+ * @typedef {Object} CmsAccessEnrollmentExcluded.$Properties
208956
+ * @property {number|Long|null} [timestamp] CmsAccessEnrollmentExcluded timestamp
208957
+ * @property {string|null} [hsUserId] CmsAccessEnrollmentExcluded hsUserId
208958
+ * @property {string|null} [trackingId] CmsAccessEnrollmentExcluded trackingId
208959
+ * @property {Array.<CmsAccessExclusionCriteria>|null} [criteria] CmsAccessEnrollmentExcluded criteria
208960
+ * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
208961
+ */
208962
+
208963
+ /**
208964
+ * Properties of a CmsAccessEnrollmentExcluded.
208965
+ * @name ICmsAccessEnrollmentExcluded
208966
+ * @interface ICmsAccessEnrollmentExcluded
208967
+ * @augments CmsAccessEnrollmentExcluded.$Properties
208968
+ * @deprecated Use CmsAccessEnrollmentExcluded.$Properties instead.
208969
+ */
208970
+
208971
+ /**
208972
+ * Shape of a CmsAccessEnrollmentExcluded.
208973
+ * @typedef {CmsAccessEnrollmentExcluded.$Properties} CmsAccessEnrollmentExcluded.$Shape
208974
+ */
208975
+
208976
+ /**
208977
+ * Constructs a new CmsAccessEnrollmentExcluded.
208978
+ * @name CmsAccessEnrollmentExcluded
208979
+ * @classdesc Published when hs-cms-access-service excludes a beneficiary at pre-flight screening
208980
+ * (CREATED → EXCLUDED) without calling CMS. Fired after CmsAccessEnrollmentInitiated
208981
+ * for the same tracking_id (ADR-005 event ordering:
208982
+ * https://github.com/HeadspaceMeditation/hs-cms-access-service/pull/59).
208983
+ * Used by Data Engineering for per-criteria exclusion rates (PRD §3.41;
208984
+ * https://headspace.atlassian.net/browse/HPSO-1345). SNS/DE wiring:
208985
+ * https://headspace.atlassian.net/browse/HPSO-1348.
208986
+ * Fired by: hs-cms-access-service
208987
+ * Responsible team: Health Plans
208988
+ * @constructor
208989
+ * @param {CmsAccessEnrollmentExcluded.$Properties=} [properties] Properties to set
208990
+ * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
208991
+ */
208992
+ function CmsAccessEnrollmentExcluded(properties) {
208993
+ this.criteria = [];
208994
+ if (properties)
208995
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
208996
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
208997
+ this[keys[i]] = properties[keys[i]];
208998
+ }
208999
+
209000
+ /**
209001
+ * CmsAccessEnrollmentExcluded timestamp.
209002
+ * @member {number|Long} timestamp
209003
+ * @memberof CmsAccessEnrollmentExcluded
209004
+ * @instance
209005
+ */
209006
+ CmsAccessEnrollmentExcluded.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
209007
+
209008
+ /**
209009
+ * CmsAccessEnrollmentExcluded hsUserId.
209010
+ * @member {string} hsUserId
209011
+ * @memberof CmsAccessEnrollmentExcluded
209012
+ * @instance
209013
+ */
209014
+ CmsAccessEnrollmentExcluded.prototype.hsUserId = "";
209015
+
209016
+ /**
209017
+ * CmsAccessEnrollmentExcluded trackingId.
209018
+ * @member {string} trackingId
209019
+ * @memberof CmsAccessEnrollmentExcluded
209020
+ * @instance
209021
+ */
209022
+ CmsAccessEnrollmentExcluded.prototype.trackingId = "";
209023
+
209024
+ /**
209025
+ * CmsAccessEnrollmentExcluded criteria.
209026
+ * @member {Array.<CmsAccessExclusionCriteria>} criteria
209027
+ * @memberof CmsAccessEnrollmentExcluded
209028
+ * @instance
209029
+ */
209030
+ CmsAccessEnrollmentExcluded.prototype.criteria = $util.emptyArray;
209031
+
209032
+ /**
209033
+ * Creates a new CmsAccessEnrollmentExcluded instance using the specified properties.
209034
+ * @function create
209035
+ * @memberof CmsAccessEnrollmentExcluded
209036
+ * @static
209037
+ * @param {CmsAccessEnrollmentExcluded.$Properties=} [properties] Properties to set
209038
+ * @returns {CmsAccessEnrollmentExcluded} CmsAccessEnrollmentExcluded instance
209039
+ * @type {{
209040
+ * (properties: CmsAccessEnrollmentExcluded.$Shape): CmsAccessEnrollmentExcluded & CmsAccessEnrollmentExcluded.$Shape;
209041
+ * (properties?: CmsAccessEnrollmentExcluded.$Properties): CmsAccessEnrollmentExcluded;
209042
+ * }}
209043
+ */
209044
+ CmsAccessEnrollmentExcluded.create = function create(properties) {
209045
+ return new CmsAccessEnrollmentExcluded(properties);
209046
+ };
209047
+
209048
+ /**
209049
+ * Encodes the specified CmsAccessEnrollmentExcluded message. Does not implicitly {@link CmsAccessEnrollmentExcluded.verify|verify} messages.
209050
+ * @function encode
209051
+ * @memberof CmsAccessEnrollmentExcluded
209052
+ * @static
209053
+ * @param {CmsAccessEnrollmentExcluded.$Properties} message CmsAccessEnrollmentExcluded message or plain object to encode
209054
+ * @param {$protobuf.Writer} [writer] Writer to encode to
209055
+ * @returns {$protobuf.Writer} Writer
209056
+ */
209057
+ CmsAccessEnrollmentExcluded.encode = function encode(message, writer) {
209058
+ if (!writer)
209059
+ writer = $Writer.create();
209060
+ if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp"))
209061
+ writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.timestamp);
209062
+ if (message.hsUserId != null && Object.hasOwnProperty.call(message, "hsUserId"))
209063
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.hsUserId);
209064
+ if (message.trackingId != null && Object.hasOwnProperty.call(message, "trackingId"))
209065
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.trackingId);
209066
+ if (message.criteria != null && message.criteria.length) {
209067
+ writer.uint32(/* id 4, wireType 2 =*/34).fork();
209068
+ for (var i = 0; i < message.criteria.length; ++i)
209069
+ writer.int32(message.criteria[i]);
209070
+ writer.ldelim();
209071
+ }
209072
+ if (message.$unknowns != null && Object.hasOwnProperty.call(message, "$unknowns"))
209073
+ for (var i = 0; i < message.$unknowns.length; ++i)
209074
+ writer.raw(message.$unknowns[i]);
209075
+ return writer;
209076
+ };
209077
+
209078
+ /**
209079
+ * Encodes the specified CmsAccessEnrollmentExcluded message, length delimited. Does not implicitly {@link CmsAccessEnrollmentExcluded.verify|verify} messages.
209080
+ * @function encodeDelimited
209081
+ * @memberof CmsAccessEnrollmentExcluded
209082
+ * @static
209083
+ * @param {CmsAccessEnrollmentExcluded.$Properties} message CmsAccessEnrollmentExcluded message or plain object to encode
209084
+ * @param {$protobuf.Writer} [writer] Writer to encode to
209085
+ * @returns {$protobuf.Writer} Writer
209086
+ */
209087
+ CmsAccessEnrollmentExcluded.encodeDelimited = function encodeDelimited(message, writer) {
209088
+ return this.encode(message, writer).ldelim();
209089
+ };
209090
+
209091
+ /**
209092
+ * Decodes a CmsAccessEnrollmentExcluded message from the specified reader or buffer.
209093
+ * @function decode
209094
+ * @memberof CmsAccessEnrollmentExcluded
209095
+ * @static
209096
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
209097
+ * @param {number} [length] Message length if known beforehand
209098
+ * @returns {CmsAccessEnrollmentExcluded & CmsAccessEnrollmentExcluded.$Shape} CmsAccessEnrollmentExcluded
209099
+ * @throws {Error} If the payload is not a reader or valid buffer
209100
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
209101
+ */
209102
+ CmsAccessEnrollmentExcluded.decode = function decode(reader, length, _end, _depth, _target) {
209103
+ if (!(reader instanceof $Reader))
209104
+ reader = $Reader.create(reader);
209105
+ if (_depth === undefined)
209106
+ _depth = 0;
209107
+ if (_depth > $Reader.recursionLimit)
209108
+ throw Error("max depth exceeded");
209109
+ var end = length === undefined ? reader.len : reader.pos + length, message = _target || new $root.CmsAccessEnrollmentExcluded(), value;
209110
+ while (reader.pos < end) {
209111
+ var start = reader.pos;
209112
+ var tag = reader.tag();
209113
+ if (tag === _end) {
209114
+ _end = undefined;
209115
+ break;
209116
+ }
209117
+ var wireType = tag & 7;
209118
+ switch (tag >>>= 3) {
209119
+ case 1: {
209120
+ if (wireType !== 0)
209121
+ break;
209122
+ if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0)
209123
+ message.timestamp = value;
209124
+ else
209125
+ delete message.timestamp;
209126
+ continue;
209127
+ }
209128
+ case 2: {
209129
+ if (wireType !== 2)
209130
+ break;
209131
+ if ((value = reader.string()).length)
209132
+ message.hsUserId = value;
209133
+ else
209134
+ delete message.hsUserId;
209135
+ continue;
209136
+ }
209137
+ case 3: {
209138
+ if (wireType !== 2)
209139
+ break;
209140
+ if ((value = reader.string()).length)
209141
+ message.trackingId = value;
209142
+ else
209143
+ delete message.trackingId;
209144
+ continue;
209145
+ }
209146
+ case 4: {
209147
+ if (wireType === 2) {
209148
+ if (!(message.criteria && message.criteria.length))
209149
+ message.criteria = [];
209150
+ var end2 = reader.uint32() + reader.pos;
209151
+ while (reader.pos < end2)
209152
+ message.criteria.push(reader.int32());
209153
+ continue;
209154
+ }
209155
+ if (wireType !== 0)
209156
+ break;
209157
+ if (!(message.criteria && message.criteria.length))
209158
+ message.criteria = [];
209159
+ message.criteria.push(reader.int32());
209160
+ continue;
209161
+ }
209162
+ }
209163
+ reader.skipType(wireType, _depth, tag);
209164
+ $util.makeProp(message, "$unknowns", false);
209165
+ (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos));
209166
+ }
209167
+ if (_end !== undefined)
209168
+ throw Error("missing end group");
209169
+ return message;
209170
+ };
209171
+
209172
+ /**
209173
+ * Decodes a CmsAccessEnrollmentExcluded message from the specified reader or buffer, length delimited.
209174
+ * @function decodeDelimited
209175
+ * @memberof CmsAccessEnrollmentExcluded
209176
+ * @static
209177
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
209178
+ * @returns {CmsAccessEnrollmentExcluded & CmsAccessEnrollmentExcluded.$Shape} CmsAccessEnrollmentExcluded
209179
+ * @throws {Error} If the payload is not a reader or valid buffer
209180
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
209181
+ */
209182
+ CmsAccessEnrollmentExcluded.decodeDelimited = function decodeDelimited(reader) {
209183
+ if (!(reader instanceof $Reader))
209184
+ reader = new $Reader(reader);
209185
+ return this.decode(reader, reader.uint32());
209186
+ };
209187
+
209188
+ /**
209189
+ * Verifies a CmsAccessEnrollmentExcluded message.
209190
+ * @function verify
209191
+ * @memberof CmsAccessEnrollmentExcluded
209192
+ * @static
209193
+ * @param {Object.<string,*>} message Plain object to verify
209194
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
209195
+ */
209196
+ CmsAccessEnrollmentExcluded.verify = function verify(message, _depth) {
209197
+ if (typeof message !== "object" || message === null)
209198
+ return "object expected";
209199
+ if (_depth === undefined)
209200
+ _depth = 0;
209201
+ if (_depth > $util.recursionLimit)
209202
+ return "max depth exceeded";
209203
+ if (message.timestamp != null && message.hasOwnProperty("timestamp"))
209204
+ if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high)))
209205
+ return "timestamp: integer|Long expected";
209206
+ if (message.hsUserId != null && message.hasOwnProperty("hsUserId"))
209207
+ if (!$util.isString(message.hsUserId))
209208
+ return "hsUserId: string expected";
209209
+ if (message.trackingId != null && message.hasOwnProperty("trackingId"))
209210
+ if (!$util.isString(message.trackingId))
209211
+ return "trackingId: string expected";
209212
+ if (message.criteria != null && message.hasOwnProperty("criteria")) {
209213
+ if (!Array.isArray(message.criteria))
209214
+ return "criteria: array expected";
209215
+ for (var i = 0; i < message.criteria.length; ++i)
209216
+ switch (message.criteria[i]) {
209217
+ default:
209218
+ return "criteria: enum value[] expected";
209219
+ case 0:
209220
+ case 1:
209221
+ case 2:
209222
+ case 3:
209223
+ case 4:
209224
+ case 5:
209225
+ case 6:
209226
+ case 7:
209227
+ break;
209228
+ }
209229
+ }
209230
+ return null;
209231
+ };
209232
+
209233
+ /**
209234
+ * Creates a CmsAccessEnrollmentExcluded message from a plain object. Also converts values to their respective internal types.
209235
+ * @function fromObject
209236
+ * @memberof CmsAccessEnrollmentExcluded
209237
+ * @static
209238
+ * @param {Object.<string,*>} object Plain object
209239
+ * @returns {CmsAccessEnrollmentExcluded} CmsAccessEnrollmentExcluded
209240
+ */
209241
+ CmsAccessEnrollmentExcluded.fromObject = function fromObject(object, _depth) {
209242
+ if (object instanceof $root.CmsAccessEnrollmentExcluded)
209243
+ return object;
209244
+ if (_depth === undefined)
209245
+ _depth = 0;
209246
+ if (_depth > $util.recursionLimit)
209247
+ throw Error("max depth exceeded");
209248
+ var message = new $root.CmsAccessEnrollmentExcluded();
209249
+ if (object.timestamp != null)
209250
+ if (typeof object.timestamp === "object" ? object.timestamp.low || object.timestamp.high : Number(object.timestamp) !== 0)
209251
+ if ($util.Long)
209252
+ (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true;
209253
+ else if (typeof object.timestamp === "string")
209254
+ message.timestamp = parseInt(object.timestamp, 10);
209255
+ else if (typeof object.timestamp === "number")
209256
+ message.timestamp = object.timestamp;
209257
+ else if (typeof object.timestamp === "object")
209258
+ message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(true);
209259
+ if (object.hsUserId != null)
209260
+ if (typeof object.hsUserId !== "string" || object.hsUserId.length)
209261
+ message.hsUserId = String(object.hsUserId);
209262
+ if (object.trackingId != null)
209263
+ if (typeof object.trackingId !== "string" || object.trackingId.length)
209264
+ message.trackingId = String(object.trackingId);
209265
+ if (object.criteria) {
209266
+ if (!Array.isArray(object.criteria))
209267
+ throw TypeError(".CmsAccessEnrollmentExcluded.criteria: array expected");
209268
+ message.criteria = Array(object.criteria.length);
209269
+ for (var i = 0; i < object.criteria.length; ++i)
209270
+ switch (object.criteria[i]) {
209271
+ default:
209272
+ if (typeof object.criteria[i] === "number") {
209273
+ message.criteria[i] = object.criteria[i];
209274
+ break;
209275
+ }
209276
+ case "CMS_ACCESS_EXCLUSION_CRITERIA_UNKNOWN":
209277
+ case 0:
209278
+ message.criteria[i] = 0;
209279
+ break;
209280
+ case "CMS_ACCESS_EXCLUSION_CRITERIA_SUICIDAL_IDEATION":
209281
+ case 1:
209282
+ message.criteria[i] = 1;
209283
+ break;
209284
+ case "CMS_ACCESS_EXCLUSION_CRITERIA_DEMENTIA":
209285
+ case 2:
209286
+ message.criteria[i] = 2;
209287
+ break;
209288
+ case "CMS_ACCESS_EXCLUSION_CRITERIA_PSYCHOTIC_DISORDER":
209289
+ case 3:
209290
+ message.criteria[i] = 3;
209291
+ break;
209292
+ case "CMS_ACCESS_EXCLUSION_CRITERIA_EATING_DISORDER":
209293
+ case 4:
209294
+ message.criteria[i] = 4;
209295
+ break;
209296
+ case "CMS_ACCESS_EXCLUSION_CRITERIA_PREGNANCY":
209297
+ case 5:
209298
+ message.criteria[i] = 5;
209299
+ break;
209300
+ case "CMS_ACCESS_EXCLUSION_CRITERIA_FRAILTY":
209301
+ case 6:
209302
+ message.criteria[i] = 6;
209303
+ break;
209304
+ case "CMS_ACCESS_EXCLUSION_CRITERIA_MINOR":
209305
+ case 7:
209306
+ message.criteria[i] = 7;
209307
+ break;
209308
+ }
209309
+ }
209310
+ return message;
209311
+ };
209312
+
209313
+ /**
209314
+ * Creates a plain object from a CmsAccessEnrollmentExcluded message. Also converts values to other types if specified.
209315
+ * @function toObject
209316
+ * @memberof CmsAccessEnrollmentExcluded
209317
+ * @static
209318
+ * @param {CmsAccessEnrollmentExcluded} message CmsAccessEnrollmentExcluded
209319
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
209320
+ * @returns {Object.<string,*>} Plain object
209321
+ */
209322
+ CmsAccessEnrollmentExcluded.toObject = function toObject(message, options) {
209323
+ if (!options)
209324
+ options = {};
209325
+ var object = {};
209326
+ if (options.arrays || options.defaults)
209327
+ object.criteria = [];
209328
+ if (options.defaults) {
209329
+ if ($util.Long) {
209330
+ var long = new $util.Long(0, 0, true);
209331
+ object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long;
209332
+ } else
209333
+ object.timestamp = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0;
209334
+ object.hsUserId = "";
209335
+ object.trackingId = "";
209336
+ }
209337
+ if (message.timestamp != null && message.hasOwnProperty("timestamp"))
209338
+ if (typeof BigInt !== "undefined" && options.longs === BigInt)
209339
+ object.timestamp = typeof message.timestamp === "number" ? BigInt(message.timestamp) : $util.Long.fromBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0, true).toBigInt();
209340
+ else if (typeof message.timestamp === "number")
209341
+ object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp;
209342
+ else
209343
+ 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;
209344
+ if (message.hsUserId != null && message.hasOwnProperty("hsUserId"))
209345
+ object.hsUserId = message.hsUserId;
209346
+ if (message.trackingId != null && message.hasOwnProperty("trackingId"))
209347
+ object.trackingId = message.trackingId;
209348
+ if (message.criteria && message.criteria.length) {
209349
+ object.criteria = Array(message.criteria.length);
209350
+ for (var j = 0; j < message.criteria.length; ++j)
209351
+ object.criteria[j] = options.enums === String ? $root.CmsAccessExclusionCriteria[message.criteria[j]] === undefined ? message.criteria[j] : $root.CmsAccessExclusionCriteria[message.criteria[j]] : message.criteria[j];
209352
+ }
209353
+ return object;
209354
+ };
209355
+
209356
+ /**
209357
+ * Converts this CmsAccessEnrollmentExcluded to JSON.
209358
+ * @function toJSON
209359
+ * @memberof CmsAccessEnrollmentExcluded
209360
+ * @instance
209361
+ * @returns {Object.<string,*>} JSON object
209362
+ */
209363
+ CmsAccessEnrollmentExcluded.prototype.toJSON = function toJSON() {
209364
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
209365
+ };
209366
+
209367
+ /**
209368
+ * Gets the type url for CmsAccessEnrollmentExcluded
209369
+ * @function getTypeUrl
209370
+ * @memberof CmsAccessEnrollmentExcluded
209371
+ * @static
209372
+ * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"`
209373
+ * @returns {string} The type url
209374
+ */
209375
+ CmsAccessEnrollmentExcluded.getTypeUrl = function getTypeUrl(prefix) {
209376
+ if (prefix === undefined)
209377
+ prefix = "type.googleapis.com";
209378
+ return prefix + "/CmsAccessEnrollmentExcluded";
209379
+ };
209380
+
209381
+ return CmsAccessEnrollmentExcluded;
209382
+ })();
209383
+
209384
+ /**
209385
+ * CmsAccessReportType enum.
209386
+ * @name CmsAccessReportType
209387
+ * @enum {number}
209388
+ * @property {number} CMS_ACCESS_REPORT_TYPE_UNKNOWN=0 CMS_ACCESS_REPORT_TYPE_UNKNOWN value
209389
+ * @property {number} CMS_ACCESS_REPORT_TYPE_BASELINE=1 CMS_ACCESS_REPORT_TYPE_BASELINE value
209390
+ * @property {number} CMS_ACCESS_REPORT_TYPE_QUARTERLY=2 CMS_ACCESS_REPORT_TYPE_QUARTERLY value
209391
+ * @property {number} CMS_ACCESS_REPORT_TYPE_END_OF_PERIOD=3 CMS_ACCESS_REPORT_TYPE_END_OF_PERIOD value
209392
+ */
209393
+ $root.CmsAccessReportType = (function() {
209394
+ var valuesById = {}, values = Object.create(valuesById);
209395
+ values[valuesById[0] = "CMS_ACCESS_REPORT_TYPE_UNKNOWN"] = 0;
209396
+ values[valuesById[1] = "CMS_ACCESS_REPORT_TYPE_BASELINE"] = 1;
209397
+ values[valuesById[2] = "CMS_ACCESS_REPORT_TYPE_QUARTERLY"] = 2;
209398
+ values[valuesById[3] = "CMS_ACCESS_REPORT_TYPE_END_OF_PERIOD"] = 3;
209399
+ return values;
209400
+ })();
209401
+
209402
+ /**
209403
+ * CmsAccessDataReportResult enum.
209404
+ * @name CmsAccessDataReportResult
209405
+ * @enum {number}
209406
+ * @property {number} CMS_ACCESS_DATA_REPORT_RESULT_UNKNOWN=0 CMS_ACCESS_DATA_REPORT_RESULT_UNKNOWN value
209407
+ * @property {number} CMS_ACCESS_DATA_REPORT_RESULT_SUCCESS=1 CMS_ACCESS_DATA_REPORT_RESULT_SUCCESS value
209408
+ * @property {number} CMS_ACCESS_DATA_REPORT_RESULT_DUPLICATE=2 CMS_ACCESS_DATA_REPORT_RESULT_DUPLICATE value
209409
+ * @property {number} CMS_ACCESS_DATA_REPORT_RESULT_BENEFICIARY_NOT_ALIGNED=3 CMS_ACCESS_DATA_REPORT_RESULT_BENEFICIARY_NOT_ALIGNED value
209410
+ * @property {number} CMS_ACCESS_DATA_REPORT_RESULT_REPORTING_PERIOD_CLOSED=4 CMS_ACCESS_DATA_REPORT_RESULT_REPORTING_PERIOD_CLOSED value
209411
+ * @property {number} CMS_ACCESS_DATA_REPORT_RESULT_INCOMPLETE_DATA=5 CMS_ACCESS_DATA_REPORT_RESULT_INCOMPLETE_DATA value
209412
+ * @property {number} CMS_ACCESS_DATA_REPORT_RESULT_INCORRECT_TRACK=6 CMS_ACCESS_DATA_REPORT_RESULT_INCORRECT_TRACK value
209413
+ */
209414
+ $root.CmsAccessDataReportResult = (function() {
209415
+ var valuesById = {}, values = Object.create(valuesById);
209416
+ values[valuesById[0] = "CMS_ACCESS_DATA_REPORT_RESULT_UNKNOWN"] = 0;
209417
+ values[valuesById[1] = "CMS_ACCESS_DATA_REPORT_RESULT_SUCCESS"] = 1;
209418
+ values[valuesById[2] = "CMS_ACCESS_DATA_REPORT_RESULT_DUPLICATE"] = 2;
209419
+ values[valuesById[3] = "CMS_ACCESS_DATA_REPORT_RESULT_BENEFICIARY_NOT_ALIGNED"] = 3;
209420
+ values[valuesById[4] = "CMS_ACCESS_DATA_REPORT_RESULT_REPORTING_PERIOD_CLOSED"] = 4;
209421
+ values[valuesById[5] = "CMS_ACCESS_DATA_REPORT_RESULT_INCOMPLETE_DATA"] = 5;
209422
+ values[valuesById[6] = "CMS_ACCESS_DATA_REPORT_RESULT_INCORRECT_TRACK"] = 6;
209423
+ return values;
209424
+ })();
209425
+
209426
+ $root.CmsAccessDataReportCompleted = (function() {
209427
+
209428
+ /**
209429
+ * Properties of a CmsAccessDataReportCompleted.
209430
+ * @typedef {Object} CmsAccessDataReportCompleted.$Properties
209431
+ * @property {number|Long|null} [timestamp] CmsAccessDataReportCompleted timestamp
209432
+ * @property {string|null} [hsUserId] CmsAccessDataReportCompleted hsUserId
209433
+ * @property {string|null} [trackingId] CmsAccessDataReportCompleted trackingId
209434
+ * @property {string|null} [cmsSubmissionId] CmsAccessDataReportCompleted cmsSubmissionId
209435
+ * @property {CmsAccessReportType|null} [reportType] CmsAccessDataReportCompleted reportType
209436
+ * @property {CmsAccessDataReportResult|null} [result] CmsAccessDataReportCompleted result
209437
+ * @property {number|Long|null} [submittedAt] CmsAccessDataReportCompleted submittedAt
209438
+ * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
209439
+ */
209440
+
209441
+ /**
209442
+ * Properties of a CmsAccessDataReportCompleted.
209443
+ * @name ICmsAccessDataReportCompleted
209444
+ * @interface ICmsAccessDataReportCompleted
209445
+ * @augments CmsAccessDataReportCompleted.$Properties
209446
+ * @deprecated Use CmsAccessDataReportCompleted.$Properties instead.
209447
+ */
209448
+
209449
+ /**
209450
+ * Shape of a CmsAccessDataReportCompleted.
209451
+ * @typedef {CmsAccessDataReportCompleted.$Properties} CmsAccessDataReportCompleted.$Shape
209452
+ */
209453
+
209454
+ /**
209455
+ * Constructs a new CmsAccessDataReportCompleted.
209456
+ * @name CmsAccessDataReportCompleted
209457
+ * @classdesc Published when a CMS ACCESS $report-data (Outcome-Aligned Payment) submission
209458
+ * reaches a terminal state. Submits a beneficiary's BH clinical-instrument scores
209459
+ * to CMS as a FHIR Bundle across the care period (baseline, quarterly, end-of-period).
209460
+ * Used by Data Engineering for outcomes-reporting compliance KPIs
209461
+ * (ADR-004 §2, hs-cms-access-service docs/decisions/0004-event-coverage-for-analytics.md).
209462
+ * Fired by: hs-cms-access-service
209463
+ * Responsible team: Health Plans
209464
+ * @constructor
209465
+ * @param {CmsAccessDataReportCompleted.$Properties=} [properties] Properties to set
209466
+ * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
209467
+ */
209468
+ function CmsAccessDataReportCompleted(properties) {
209469
+ if (properties)
209470
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
209471
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
209472
+ this[keys[i]] = properties[keys[i]];
209473
+ }
209474
+
209475
+ /**
209476
+ * CmsAccessDataReportCompleted timestamp.
209477
+ * @member {number|Long} timestamp
209478
+ * @memberof CmsAccessDataReportCompleted
209479
+ * @instance
209480
+ */
209481
+ CmsAccessDataReportCompleted.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
209482
+
209483
+ /**
209484
+ * CmsAccessDataReportCompleted hsUserId.
209485
+ * @member {string} hsUserId
209486
+ * @memberof CmsAccessDataReportCompleted
209487
+ * @instance
209488
+ */
209489
+ CmsAccessDataReportCompleted.prototype.hsUserId = "";
209490
+
209491
+ /**
209492
+ * CmsAccessDataReportCompleted trackingId.
209493
+ * @member {string} trackingId
209494
+ * @memberof CmsAccessDataReportCompleted
209495
+ * @instance
209496
+ */
209497
+ CmsAccessDataReportCompleted.prototype.trackingId = "";
209498
+
209499
+ /**
209500
+ * CmsAccessDataReportCompleted cmsSubmissionId.
209501
+ * @member {string} cmsSubmissionId
209502
+ * @memberof CmsAccessDataReportCompleted
209503
+ * @instance
209504
+ */
209505
+ CmsAccessDataReportCompleted.prototype.cmsSubmissionId = "";
209506
+
209507
+ /**
209508
+ * CmsAccessDataReportCompleted reportType.
209509
+ * @member {CmsAccessReportType} reportType
209510
+ * @memberof CmsAccessDataReportCompleted
209511
+ * @instance
209512
+ */
209513
+ CmsAccessDataReportCompleted.prototype.reportType = 0;
209514
+
209515
+ /**
209516
+ * CmsAccessDataReportCompleted result.
209517
+ * @member {CmsAccessDataReportResult} result
209518
+ * @memberof CmsAccessDataReportCompleted
209519
+ * @instance
209520
+ */
209521
+ CmsAccessDataReportCompleted.prototype.result = 0;
209522
+
209523
+ /**
209524
+ * CmsAccessDataReportCompleted submittedAt.
209525
+ * @member {number|Long} submittedAt
209526
+ * @memberof CmsAccessDataReportCompleted
209527
+ * @instance
209528
+ */
209529
+ CmsAccessDataReportCompleted.prototype.submittedAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
209530
+
209531
+ /**
209532
+ * Creates a new CmsAccessDataReportCompleted instance using the specified properties.
209533
+ * @function create
209534
+ * @memberof CmsAccessDataReportCompleted
209535
+ * @static
209536
+ * @param {CmsAccessDataReportCompleted.$Properties=} [properties] Properties to set
209537
+ * @returns {CmsAccessDataReportCompleted} CmsAccessDataReportCompleted instance
209538
+ * @type {{
209539
+ * (properties: CmsAccessDataReportCompleted.$Shape): CmsAccessDataReportCompleted & CmsAccessDataReportCompleted.$Shape;
209540
+ * (properties?: CmsAccessDataReportCompleted.$Properties): CmsAccessDataReportCompleted;
209541
+ * }}
209542
+ */
209543
+ CmsAccessDataReportCompleted.create = function create(properties) {
209544
+ return new CmsAccessDataReportCompleted(properties);
209545
+ };
209546
+
209547
+ /**
209548
+ * Encodes the specified CmsAccessDataReportCompleted message. Does not implicitly {@link CmsAccessDataReportCompleted.verify|verify} messages.
209549
+ * @function encode
209550
+ * @memberof CmsAccessDataReportCompleted
209551
+ * @static
209552
+ * @param {CmsAccessDataReportCompleted.$Properties} message CmsAccessDataReportCompleted message or plain object to encode
209553
+ * @param {$protobuf.Writer} [writer] Writer to encode to
209554
+ * @returns {$protobuf.Writer} Writer
209555
+ */
209556
+ CmsAccessDataReportCompleted.encode = function encode(message, writer) {
209557
+ if (!writer)
209558
+ writer = $Writer.create();
209559
+ if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp"))
209560
+ writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.timestamp);
209561
+ if (message.hsUserId != null && Object.hasOwnProperty.call(message, "hsUserId"))
209562
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.hsUserId);
209563
+ if (message.trackingId != null && Object.hasOwnProperty.call(message, "trackingId"))
209564
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.trackingId);
209565
+ if (message.cmsSubmissionId != null && Object.hasOwnProperty.call(message, "cmsSubmissionId"))
209566
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.cmsSubmissionId);
209567
+ if (message.reportType != null && Object.hasOwnProperty.call(message, "reportType"))
209568
+ writer.uint32(/* id 5, wireType 0 =*/40).int32(message.reportType);
209569
+ if (message.result != null && Object.hasOwnProperty.call(message, "result"))
209570
+ writer.uint32(/* id 6, wireType 0 =*/48).int32(message.result);
209571
+ if (message.submittedAt != null && Object.hasOwnProperty.call(message, "submittedAt"))
209572
+ writer.uint32(/* id 7, wireType 0 =*/56).uint64(message.submittedAt);
209573
+ if (message.$unknowns != null && Object.hasOwnProperty.call(message, "$unknowns"))
209574
+ for (var i = 0; i < message.$unknowns.length; ++i)
209575
+ writer.raw(message.$unknowns[i]);
209576
+ return writer;
209577
+ };
209578
+
209579
+ /**
209580
+ * Encodes the specified CmsAccessDataReportCompleted message, length delimited. Does not implicitly {@link CmsAccessDataReportCompleted.verify|verify} messages.
209581
+ * @function encodeDelimited
209582
+ * @memberof CmsAccessDataReportCompleted
209583
+ * @static
209584
+ * @param {CmsAccessDataReportCompleted.$Properties} message CmsAccessDataReportCompleted message or plain object to encode
209585
+ * @param {$protobuf.Writer} [writer] Writer to encode to
209586
+ * @returns {$protobuf.Writer} Writer
209587
+ */
209588
+ CmsAccessDataReportCompleted.encodeDelimited = function encodeDelimited(message, writer) {
209589
+ return this.encode(message, writer).ldelim();
209590
+ };
209591
+
209592
+ /**
209593
+ * Decodes a CmsAccessDataReportCompleted message from the specified reader or buffer.
209594
+ * @function decode
209595
+ * @memberof CmsAccessDataReportCompleted
209596
+ * @static
209597
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
209598
+ * @param {number} [length] Message length if known beforehand
209599
+ * @returns {CmsAccessDataReportCompleted & CmsAccessDataReportCompleted.$Shape} CmsAccessDataReportCompleted
209600
+ * @throws {Error} If the payload is not a reader or valid buffer
209601
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
209602
+ */
209603
+ CmsAccessDataReportCompleted.decode = function decode(reader, length, _end, _depth, _target) {
209604
+ if (!(reader instanceof $Reader))
209605
+ reader = $Reader.create(reader);
209606
+ if (_depth === undefined)
209607
+ _depth = 0;
209608
+ if (_depth > $Reader.recursionLimit)
209609
+ throw Error("max depth exceeded");
209610
+ var end = length === undefined ? reader.len : reader.pos + length, message = _target || new $root.CmsAccessDataReportCompleted(), value;
209611
+ while (reader.pos < end) {
209612
+ var start = reader.pos;
209613
+ var tag = reader.tag();
209614
+ if (tag === _end) {
209615
+ _end = undefined;
209616
+ break;
209617
+ }
209618
+ var wireType = tag & 7;
209619
+ switch (tag >>>= 3) {
209620
+ case 1: {
209621
+ if (wireType !== 0)
209622
+ break;
209623
+ if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0)
209624
+ message.timestamp = value;
209625
+ else
209626
+ delete message.timestamp;
209627
+ continue;
209628
+ }
209629
+ case 2: {
209630
+ if (wireType !== 2)
209631
+ break;
209632
+ if ((value = reader.string()).length)
209633
+ message.hsUserId = value;
209634
+ else
209635
+ delete message.hsUserId;
209636
+ continue;
209637
+ }
209638
+ case 3: {
209639
+ if (wireType !== 2)
209640
+ break;
209641
+ if ((value = reader.string()).length)
209642
+ message.trackingId = value;
209643
+ else
209644
+ delete message.trackingId;
209645
+ continue;
209646
+ }
209647
+ case 4: {
209648
+ if (wireType !== 2)
209649
+ break;
209650
+ if ((value = reader.string()).length)
209651
+ message.cmsSubmissionId = value;
209652
+ else
209653
+ delete message.cmsSubmissionId;
209654
+ continue;
209655
+ }
209656
+ case 5: {
209657
+ if (wireType !== 0)
209658
+ break;
209659
+ if (value = reader.int32())
209660
+ message.reportType = value;
209661
+ else
209662
+ delete message.reportType;
209663
+ continue;
209664
+ }
209665
+ case 6: {
209666
+ if (wireType !== 0)
209667
+ break;
209668
+ if (value = reader.int32())
209669
+ message.result = value;
209670
+ else
209671
+ delete message.result;
209672
+ continue;
209673
+ }
209674
+ case 7: {
209675
+ if (wireType !== 0)
209676
+ break;
209677
+ if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0)
209678
+ message.submittedAt = value;
209679
+ else
209680
+ delete message.submittedAt;
209681
+ continue;
209682
+ }
209683
+ }
209684
+ reader.skipType(wireType, _depth, tag);
209685
+ $util.makeProp(message, "$unknowns", false);
209686
+ (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos));
209687
+ }
209688
+ if (_end !== undefined)
209689
+ throw Error("missing end group");
209690
+ return message;
209691
+ };
209692
+
209693
+ /**
209694
+ * Decodes a CmsAccessDataReportCompleted message from the specified reader or buffer, length delimited.
209695
+ * @function decodeDelimited
209696
+ * @memberof CmsAccessDataReportCompleted
209697
+ * @static
209698
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
209699
+ * @returns {CmsAccessDataReportCompleted & CmsAccessDataReportCompleted.$Shape} CmsAccessDataReportCompleted
209700
+ * @throws {Error} If the payload is not a reader or valid buffer
209701
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
209702
+ */
209703
+ CmsAccessDataReportCompleted.decodeDelimited = function decodeDelimited(reader) {
209704
+ if (!(reader instanceof $Reader))
209705
+ reader = new $Reader(reader);
209706
+ return this.decode(reader, reader.uint32());
209707
+ };
209708
+
209709
+ /**
209710
+ * Verifies a CmsAccessDataReportCompleted message.
209711
+ * @function verify
209712
+ * @memberof CmsAccessDataReportCompleted
209713
+ * @static
209714
+ * @param {Object.<string,*>} message Plain object to verify
209715
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
209716
+ */
209717
+ CmsAccessDataReportCompleted.verify = function verify(message, _depth) {
209718
+ if (typeof message !== "object" || message === null)
209719
+ return "object expected";
209720
+ if (_depth === undefined)
209721
+ _depth = 0;
209722
+ if (_depth > $util.recursionLimit)
209723
+ return "max depth exceeded";
209724
+ if (message.timestamp != null && message.hasOwnProperty("timestamp"))
209725
+ if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high)))
209726
+ return "timestamp: integer|Long expected";
209727
+ if (message.hsUserId != null && message.hasOwnProperty("hsUserId"))
209728
+ if (!$util.isString(message.hsUserId))
209729
+ return "hsUserId: string expected";
209730
+ if (message.trackingId != null && message.hasOwnProperty("trackingId"))
209731
+ if (!$util.isString(message.trackingId))
209732
+ return "trackingId: string expected";
209733
+ if (message.cmsSubmissionId != null && message.hasOwnProperty("cmsSubmissionId"))
209734
+ if (!$util.isString(message.cmsSubmissionId))
209735
+ return "cmsSubmissionId: string expected";
209736
+ if (message.reportType != null && message.hasOwnProperty("reportType"))
209737
+ switch (message.reportType) {
209738
+ default:
209739
+ return "reportType: enum value expected";
209740
+ case 0:
209741
+ case 1:
209742
+ case 2:
209743
+ case 3:
209744
+ break;
209745
+ }
209746
+ if (message.result != null && message.hasOwnProperty("result"))
209747
+ switch (message.result) {
209748
+ default:
209749
+ return "result: enum value expected";
209750
+ case 0:
209751
+ case 1:
209752
+ case 2:
209753
+ case 3:
209754
+ case 4:
209755
+ case 5:
209756
+ case 6:
209757
+ break;
209758
+ }
209759
+ if (message.submittedAt != null && message.hasOwnProperty("submittedAt"))
209760
+ if (!$util.isInteger(message.submittedAt) && !(message.submittedAt && $util.isInteger(message.submittedAt.low) && $util.isInteger(message.submittedAt.high)))
209761
+ return "submittedAt: integer|Long expected";
209762
+ return null;
209763
+ };
209764
+
209765
+ /**
209766
+ * Creates a CmsAccessDataReportCompleted message from a plain object. Also converts values to their respective internal types.
209767
+ * @function fromObject
209768
+ * @memberof CmsAccessDataReportCompleted
209769
+ * @static
209770
+ * @param {Object.<string,*>} object Plain object
209771
+ * @returns {CmsAccessDataReportCompleted} CmsAccessDataReportCompleted
209772
+ */
209773
+ CmsAccessDataReportCompleted.fromObject = function fromObject(object, _depth) {
209774
+ if (object instanceof $root.CmsAccessDataReportCompleted)
209775
+ return object;
209776
+ if (_depth === undefined)
209777
+ _depth = 0;
209778
+ if (_depth > $util.recursionLimit)
209779
+ throw Error("max depth exceeded");
209780
+ var message = new $root.CmsAccessDataReportCompleted();
209781
+ if (object.timestamp != null)
209782
+ if (typeof object.timestamp === "object" ? object.timestamp.low || object.timestamp.high : Number(object.timestamp) !== 0)
209783
+ if ($util.Long)
209784
+ (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true;
209785
+ else if (typeof object.timestamp === "string")
209786
+ message.timestamp = parseInt(object.timestamp, 10);
209787
+ else if (typeof object.timestamp === "number")
209788
+ message.timestamp = object.timestamp;
209789
+ else if (typeof object.timestamp === "object")
209790
+ message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(true);
209791
+ if (object.hsUserId != null)
209792
+ if (typeof object.hsUserId !== "string" || object.hsUserId.length)
209793
+ message.hsUserId = String(object.hsUserId);
209794
+ if (object.trackingId != null)
209795
+ if (typeof object.trackingId !== "string" || object.trackingId.length)
209796
+ message.trackingId = String(object.trackingId);
209797
+ if (object.cmsSubmissionId != null)
209798
+ if (typeof object.cmsSubmissionId !== "string" || object.cmsSubmissionId.length)
209799
+ message.cmsSubmissionId = String(object.cmsSubmissionId);
209800
+ if (object.reportType !== 0 && (typeof object.reportType !== "string" || $root.CmsAccessReportType[object.reportType] !== 0))
209801
+ switch (object.reportType) {
209802
+ default:
209803
+ if (typeof object.reportType === "number") {
209804
+ message.reportType = object.reportType;
209805
+ break;
209806
+ }
209807
+ break;
209808
+ case "CMS_ACCESS_REPORT_TYPE_UNKNOWN":
209809
+ case 0:
209810
+ message.reportType = 0;
209811
+ break;
209812
+ case "CMS_ACCESS_REPORT_TYPE_BASELINE":
209813
+ case 1:
209814
+ message.reportType = 1;
209815
+ break;
209816
+ case "CMS_ACCESS_REPORT_TYPE_QUARTERLY":
209817
+ case 2:
209818
+ message.reportType = 2;
209819
+ break;
209820
+ case "CMS_ACCESS_REPORT_TYPE_END_OF_PERIOD":
209821
+ case 3:
209822
+ message.reportType = 3;
209823
+ break;
209824
+ }
209825
+ if (object.result !== 0 && (typeof object.result !== "string" || $root.CmsAccessDataReportResult[object.result] !== 0))
209826
+ switch (object.result) {
209827
+ default:
209828
+ if (typeof object.result === "number") {
209829
+ message.result = object.result;
209830
+ break;
209831
+ }
209832
+ break;
209833
+ case "CMS_ACCESS_DATA_REPORT_RESULT_UNKNOWN":
209834
+ case 0:
209835
+ message.result = 0;
209836
+ break;
209837
+ case "CMS_ACCESS_DATA_REPORT_RESULT_SUCCESS":
209838
+ case 1:
209839
+ message.result = 1;
209840
+ break;
209841
+ case "CMS_ACCESS_DATA_REPORT_RESULT_DUPLICATE":
209842
+ case 2:
209843
+ message.result = 2;
209844
+ break;
209845
+ case "CMS_ACCESS_DATA_REPORT_RESULT_BENEFICIARY_NOT_ALIGNED":
209846
+ case 3:
209847
+ message.result = 3;
209848
+ break;
209849
+ case "CMS_ACCESS_DATA_REPORT_RESULT_REPORTING_PERIOD_CLOSED":
209850
+ case 4:
209851
+ message.result = 4;
209852
+ break;
209853
+ case "CMS_ACCESS_DATA_REPORT_RESULT_INCOMPLETE_DATA":
209854
+ case 5:
209855
+ message.result = 5;
209856
+ break;
209857
+ case "CMS_ACCESS_DATA_REPORT_RESULT_INCORRECT_TRACK":
209858
+ case 6:
209859
+ message.result = 6;
209860
+ break;
209861
+ }
209862
+ if (object.submittedAt != null)
209863
+ if (typeof object.submittedAt === "object" ? object.submittedAt.low || object.submittedAt.high : Number(object.submittedAt) !== 0)
209864
+ if ($util.Long)
209865
+ (message.submittedAt = $util.Long.fromValue(object.submittedAt)).unsigned = true;
209866
+ else if (typeof object.submittedAt === "string")
209867
+ message.submittedAt = parseInt(object.submittedAt, 10);
209868
+ else if (typeof object.submittedAt === "number")
209869
+ message.submittedAt = object.submittedAt;
209870
+ else if (typeof object.submittedAt === "object")
209871
+ message.submittedAt = new $util.LongBits(object.submittedAt.low >>> 0, object.submittedAt.high >>> 0).toNumber(true);
209872
+ return message;
209873
+ };
209874
+
209875
+ /**
209876
+ * Creates a plain object from a CmsAccessDataReportCompleted message. Also converts values to other types if specified.
209877
+ * @function toObject
209878
+ * @memberof CmsAccessDataReportCompleted
209879
+ * @static
209880
+ * @param {CmsAccessDataReportCompleted} message CmsAccessDataReportCompleted
209881
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
209882
+ * @returns {Object.<string,*>} Plain object
209883
+ */
209884
+ CmsAccessDataReportCompleted.toObject = function toObject(message, options) {
209885
+ if (!options)
209886
+ options = {};
209887
+ var object = {};
209888
+ if (options.defaults) {
209889
+ if ($util.Long) {
209890
+ var long = new $util.Long(0, 0, true);
209891
+ object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long;
209892
+ } else
209893
+ object.timestamp = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0;
209894
+ object.hsUserId = "";
209895
+ object.trackingId = "";
209896
+ object.cmsSubmissionId = "";
209897
+ object.reportType = options.enums === String ? "CMS_ACCESS_REPORT_TYPE_UNKNOWN" : 0;
209898
+ object.result = options.enums === String ? "CMS_ACCESS_DATA_REPORT_RESULT_UNKNOWN" : 0;
209899
+ if ($util.Long) {
209900
+ var long = new $util.Long(0, 0, true);
209901
+ object.submittedAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long;
209902
+ } else
209903
+ object.submittedAt = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0;
209904
+ }
209905
+ if (message.timestamp != null && message.hasOwnProperty("timestamp"))
209906
+ if (typeof BigInt !== "undefined" && options.longs === BigInt)
209907
+ object.timestamp = typeof message.timestamp === "number" ? BigInt(message.timestamp) : $util.Long.fromBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0, true).toBigInt();
209908
+ else if (typeof message.timestamp === "number")
209909
+ object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp;
209910
+ else
209911
+ 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;
209912
+ if (message.hsUserId != null && message.hasOwnProperty("hsUserId"))
209913
+ object.hsUserId = message.hsUserId;
209914
+ if (message.trackingId != null && message.hasOwnProperty("trackingId"))
209915
+ object.trackingId = message.trackingId;
209916
+ if (message.cmsSubmissionId != null && message.hasOwnProperty("cmsSubmissionId"))
209917
+ object.cmsSubmissionId = message.cmsSubmissionId;
209918
+ if (message.reportType != null && message.hasOwnProperty("reportType"))
209919
+ object.reportType = options.enums === String ? $root.CmsAccessReportType[message.reportType] === undefined ? message.reportType : $root.CmsAccessReportType[message.reportType] : message.reportType;
209920
+ if (message.result != null && message.hasOwnProperty("result"))
209921
+ object.result = options.enums === String ? $root.CmsAccessDataReportResult[message.result] === undefined ? message.result : $root.CmsAccessDataReportResult[message.result] : message.result;
209922
+ if (message.submittedAt != null && message.hasOwnProperty("submittedAt"))
209923
+ if (typeof BigInt !== "undefined" && options.longs === BigInt)
209924
+ object.submittedAt = typeof message.submittedAt === "number" ? BigInt(message.submittedAt) : $util.Long.fromBits(message.submittedAt.low >>> 0, message.submittedAt.high >>> 0, true).toBigInt();
209925
+ else if (typeof message.submittedAt === "number")
209926
+ object.submittedAt = options.longs === String ? String(message.submittedAt) : message.submittedAt;
209927
+ else
209928
+ object.submittedAt = options.longs === String ? $util.Long.prototype.toString.call(message.submittedAt) : options.longs === Number ? new $util.LongBits(message.submittedAt.low >>> 0, message.submittedAt.high >>> 0).toNumber(true) : message.submittedAt;
209929
+ return object;
209930
+ };
209931
+
209932
+ /**
209933
+ * Converts this CmsAccessDataReportCompleted to JSON.
209934
+ * @function toJSON
209935
+ * @memberof CmsAccessDataReportCompleted
209936
+ * @instance
209937
+ * @returns {Object.<string,*>} JSON object
209938
+ */
209939
+ CmsAccessDataReportCompleted.prototype.toJSON = function toJSON() {
209940
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
209941
+ };
209942
+
209943
+ /**
209944
+ * Gets the type url for CmsAccessDataReportCompleted
209945
+ * @function getTypeUrl
209946
+ * @memberof CmsAccessDataReportCompleted
209947
+ * @static
209948
+ * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"`
209949
+ * @returns {string} The type url
209950
+ */
209951
+ CmsAccessDataReportCompleted.getTypeUrl = function getTypeUrl(prefix) {
209952
+ if (prefix === undefined)
209953
+ prefix = "type.googleapis.com";
209954
+ return prefix + "/CmsAccessDataReportCompleted";
209955
+ };
209956
+
209957
+ return CmsAccessDataReportCompleted;
209958
+ })();
209959
+
208925
209960
  $root.TaggedCustomField = (function() {
208926
209961
 
208927
209962
  /**