@headspace/protos-events 1.837.0 → 1.839.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.ts +693 -0
- package/lib/index.js +2316 -0
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -205997,6 +205997,2293 @@ $root.BrazeProxyAppleHapticNotificationSent = (function() {
|
|
|
205997
205997
|
return BrazeProxyAppleHapticNotificationSent;
|
|
205998
205998
|
})();
|
|
205999
205999
|
|
|
206000
|
+
/**
|
|
206001
|
+
* CareAssessmentType enum.
|
|
206002
|
+
* @name CareAssessmentType
|
|
206003
|
+
* @enum {number}
|
|
206004
|
+
* @property {number} CARE_ASSESSMENT_TYPE_UNKNOWN=0 CARE_ASSESSMENT_TYPE_UNKNOWN value
|
|
206005
|
+
* @property {number} CARE_ASSESSMENT_TYPE_PHQ9=1 CARE_ASSESSMENT_TYPE_PHQ9 value
|
|
206006
|
+
* @property {number} CARE_ASSESSMENT_TYPE_GAD7=2 CARE_ASSESSMENT_TYPE_GAD7 value
|
|
206007
|
+
* @property {number} CARE_ASSESSMENT_TYPE_PHQ4=3 CARE_ASSESSMENT_TYPE_PHQ4 value
|
|
206008
|
+
* @property {number} CARE_ASSESSMENT_TYPE_PSS=4 CARE_ASSESSMENT_TYPE_PSS value
|
|
206009
|
+
* @property {number} CARE_ASSESSMENT_TYPE_PGIC=5 CARE_ASSESSMENT_TYPE_PGIC value
|
|
206010
|
+
*/
|
|
206011
|
+
$root.CareAssessmentType = (function() {
|
|
206012
|
+
var valuesById = {}, values = Object.create(valuesById);
|
|
206013
|
+
values[valuesById[0] = "CARE_ASSESSMENT_TYPE_UNKNOWN"] = 0;
|
|
206014
|
+
values[valuesById[1] = "CARE_ASSESSMENT_TYPE_PHQ9"] = 1;
|
|
206015
|
+
values[valuesById[2] = "CARE_ASSESSMENT_TYPE_GAD7"] = 2;
|
|
206016
|
+
values[valuesById[3] = "CARE_ASSESSMENT_TYPE_PHQ4"] = 3;
|
|
206017
|
+
values[valuesById[4] = "CARE_ASSESSMENT_TYPE_PSS"] = 4;
|
|
206018
|
+
values[valuesById[5] = "CARE_ASSESSMENT_TYPE_PGIC"] = 5;
|
|
206019
|
+
return values;
|
|
206020
|
+
})();
|
|
206021
|
+
|
|
206022
|
+
/**
|
|
206023
|
+
* CareAssessmentCadence enum.
|
|
206024
|
+
* @name CareAssessmentCadence
|
|
206025
|
+
* @enum {number}
|
|
206026
|
+
* @property {number} CARE_ASSESSMENT_CADENCE_UNKNOWN=0 CARE_ASSESSMENT_CADENCE_UNKNOWN value
|
|
206027
|
+
* @property {number} CARE_ASSESSMENT_CADENCE_ONBOARDING=1 CARE_ASSESSMENT_CADENCE_ONBOARDING value
|
|
206028
|
+
* @property {number} CARE_ASSESSMENT_CADENCE_QUARTERLY=2 CARE_ASSESSMENT_CADENCE_QUARTERLY value
|
|
206029
|
+
* @property {number} CARE_ASSESSMENT_CADENCE_END_OF_PERIOD=3 CARE_ASSESSMENT_CADENCE_END_OF_PERIOD value
|
|
206030
|
+
* @property {number} CARE_ASSESSMENT_CADENCE_EARLY_EXIT=4 CARE_ASSESSMENT_CADENCE_EARLY_EXIT value
|
|
206031
|
+
*/
|
|
206032
|
+
$root.CareAssessmentCadence = (function() {
|
|
206033
|
+
var valuesById = {}, values = Object.create(valuesById);
|
|
206034
|
+
values[valuesById[0] = "CARE_ASSESSMENT_CADENCE_UNKNOWN"] = 0;
|
|
206035
|
+
values[valuesById[1] = "CARE_ASSESSMENT_CADENCE_ONBOARDING"] = 1;
|
|
206036
|
+
values[valuesById[2] = "CARE_ASSESSMENT_CADENCE_QUARTERLY"] = 2;
|
|
206037
|
+
values[valuesById[3] = "CARE_ASSESSMENT_CADENCE_END_OF_PERIOD"] = 3;
|
|
206038
|
+
values[valuesById[4] = "CARE_ASSESSMENT_CADENCE_EARLY_EXIT"] = 4;
|
|
206039
|
+
return values;
|
|
206040
|
+
})();
|
|
206041
|
+
|
|
206042
|
+
/**
|
|
206043
|
+
* CareAssessmentContext enum.
|
|
206044
|
+
* @name CareAssessmentContext
|
|
206045
|
+
* @enum {number}
|
|
206046
|
+
* @property {number} CARE_ASSESSMENT_CONTEXT_UNKNOWN=0 CARE_ASSESSMENT_CONTEXT_UNKNOWN value
|
|
206047
|
+
* @property {number} CARE_ASSESSMENT_CONTEXT_CMS=1 CARE_ASSESSMENT_CONTEXT_CMS value
|
|
206048
|
+
*/
|
|
206049
|
+
$root.CareAssessmentContext = (function() {
|
|
206050
|
+
var valuesById = {}, values = Object.create(valuesById);
|
|
206051
|
+
values[valuesById[0] = "CARE_ASSESSMENT_CONTEXT_UNKNOWN"] = 0;
|
|
206052
|
+
values[valuesById[1] = "CARE_ASSESSMENT_CONTEXT_CMS"] = 1;
|
|
206053
|
+
return values;
|
|
206054
|
+
})();
|
|
206055
|
+
|
|
206056
|
+
$root.AssessmentQuestionResponse = (function() {
|
|
206057
|
+
|
|
206058
|
+
/**
|
|
206059
|
+
* Properties of an AssessmentQuestionResponse.
|
|
206060
|
+
* @typedef {Object} AssessmentQuestionResponse.$Properties
|
|
206061
|
+
* @property {number|null} [questionNumber] AssessmentQuestionResponse questionNumber
|
|
206062
|
+
* @property {string|null} [questionSlug] AssessmentQuestionResponse questionSlug
|
|
206063
|
+
* @property {number|null} [responseValue] AssessmentQuestionResponse responseValue
|
|
206064
|
+
* @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
|
|
206065
|
+
*/
|
|
206066
|
+
|
|
206067
|
+
/**
|
|
206068
|
+
* Properties of an AssessmentQuestionResponse.
|
|
206069
|
+
* @name IAssessmentQuestionResponse
|
|
206070
|
+
* @interface IAssessmentQuestionResponse
|
|
206071
|
+
* @augments AssessmentQuestionResponse.$Properties
|
|
206072
|
+
* @deprecated Use AssessmentQuestionResponse.$Properties instead.
|
|
206073
|
+
*/
|
|
206074
|
+
|
|
206075
|
+
/**
|
|
206076
|
+
* Shape of an AssessmentQuestionResponse.
|
|
206077
|
+
* @typedef {AssessmentQuestionResponse.$Properties} AssessmentQuestionResponse.$Shape
|
|
206078
|
+
*/
|
|
206079
|
+
|
|
206080
|
+
/**
|
|
206081
|
+
* Constructs a new AssessmentQuestionResponse.
|
|
206082
|
+
* @name AssessmentQuestionResponse
|
|
206083
|
+
* @classdesc Represents an AssessmentQuestionResponse.
|
|
206084
|
+
* @constructor
|
|
206085
|
+
* @param {AssessmentQuestionResponse.$Properties=} [properties] Properties to set
|
|
206086
|
+
* @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
|
|
206087
|
+
*/
|
|
206088
|
+
function AssessmentQuestionResponse(properties) {
|
|
206089
|
+
if (properties)
|
|
206090
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
206091
|
+
if (properties[keys[i]] != null && keys[i] !== "__proto__")
|
|
206092
|
+
this[keys[i]] = properties[keys[i]];
|
|
206093
|
+
}
|
|
206094
|
+
|
|
206095
|
+
/**
|
|
206096
|
+
* AssessmentQuestionResponse questionNumber.
|
|
206097
|
+
* @member {number} questionNumber
|
|
206098
|
+
* @memberof AssessmentQuestionResponse
|
|
206099
|
+
* @instance
|
|
206100
|
+
*/
|
|
206101
|
+
AssessmentQuestionResponse.prototype.questionNumber = 0;
|
|
206102
|
+
|
|
206103
|
+
/**
|
|
206104
|
+
* AssessmentQuestionResponse questionSlug.
|
|
206105
|
+
* @member {string} questionSlug
|
|
206106
|
+
* @memberof AssessmentQuestionResponse
|
|
206107
|
+
* @instance
|
|
206108
|
+
*/
|
|
206109
|
+
AssessmentQuestionResponse.prototype.questionSlug = "";
|
|
206110
|
+
|
|
206111
|
+
/**
|
|
206112
|
+
* AssessmentQuestionResponse responseValue.
|
|
206113
|
+
* @member {number} responseValue
|
|
206114
|
+
* @memberof AssessmentQuestionResponse
|
|
206115
|
+
* @instance
|
|
206116
|
+
*/
|
|
206117
|
+
AssessmentQuestionResponse.prototype.responseValue = 0;
|
|
206118
|
+
|
|
206119
|
+
/**
|
|
206120
|
+
* Creates a new AssessmentQuestionResponse instance using the specified properties.
|
|
206121
|
+
* @function create
|
|
206122
|
+
* @memberof AssessmentQuestionResponse
|
|
206123
|
+
* @static
|
|
206124
|
+
* @param {AssessmentQuestionResponse.$Properties=} [properties] Properties to set
|
|
206125
|
+
* @returns {AssessmentQuestionResponse} AssessmentQuestionResponse instance
|
|
206126
|
+
* @type {{
|
|
206127
|
+
* (properties: AssessmentQuestionResponse.$Shape): AssessmentQuestionResponse & AssessmentQuestionResponse.$Shape;
|
|
206128
|
+
* (properties?: AssessmentQuestionResponse.$Properties): AssessmentQuestionResponse;
|
|
206129
|
+
* }}
|
|
206130
|
+
*/
|
|
206131
|
+
AssessmentQuestionResponse.create = function create(properties) {
|
|
206132
|
+
return new AssessmentQuestionResponse(properties);
|
|
206133
|
+
};
|
|
206134
|
+
|
|
206135
|
+
/**
|
|
206136
|
+
* Encodes the specified AssessmentQuestionResponse message. Does not implicitly {@link AssessmentQuestionResponse.verify|verify} messages.
|
|
206137
|
+
* @function encode
|
|
206138
|
+
* @memberof AssessmentQuestionResponse
|
|
206139
|
+
* @static
|
|
206140
|
+
* @param {AssessmentQuestionResponse.$Properties} message AssessmentQuestionResponse message or plain object to encode
|
|
206141
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
206142
|
+
* @returns {$protobuf.Writer} Writer
|
|
206143
|
+
*/
|
|
206144
|
+
AssessmentQuestionResponse.encode = function encode(message, writer) {
|
|
206145
|
+
if (!writer)
|
|
206146
|
+
writer = $Writer.create();
|
|
206147
|
+
if (message.questionNumber != null && Object.hasOwnProperty.call(message, "questionNumber"))
|
|
206148
|
+
writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.questionNumber);
|
|
206149
|
+
if (message.questionSlug != null && Object.hasOwnProperty.call(message, "questionSlug"))
|
|
206150
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.questionSlug);
|
|
206151
|
+
if (message.responseValue != null && Object.hasOwnProperty.call(message, "responseValue"))
|
|
206152
|
+
writer.uint32(/* id 3, wireType 0 =*/24).int32(message.responseValue);
|
|
206153
|
+
if (message.$unknowns != null && Object.hasOwnProperty.call(message, "$unknowns"))
|
|
206154
|
+
for (var i = 0; i < message.$unknowns.length; ++i)
|
|
206155
|
+
writer.raw(message.$unknowns[i]);
|
|
206156
|
+
return writer;
|
|
206157
|
+
};
|
|
206158
|
+
|
|
206159
|
+
/**
|
|
206160
|
+
* Encodes the specified AssessmentQuestionResponse message, length delimited. Does not implicitly {@link AssessmentQuestionResponse.verify|verify} messages.
|
|
206161
|
+
* @function encodeDelimited
|
|
206162
|
+
* @memberof AssessmentQuestionResponse
|
|
206163
|
+
* @static
|
|
206164
|
+
* @param {AssessmentQuestionResponse.$Properties} message AssessmentQuestionResponse message or plain object to encode
|
|
206165
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
206166
|
+
* @returns {$protobuf.Writer} Writer
|
|
206167
|
+
*/
|
|
206168
|
+
AssessmentQuestionResponse.encodeDelimited = function encodeDelimited(message, writer) {
|
|
206169
|
+
return this.encode(message, writer).ldelim();
|
|
206170
|
+
};
|
|
206171
|
+
|
|
206172
|
+
/**
|
|
206173
|
+
* Decodes an AssessmentQuestionResponse message from the specified reader or buffer.
|
|
206174
|
+
* @function decode
|
|
206175
|
+
* @memberof AssessmentQuestionResponse
|
|
206176
|
+
* @static
|
|
206177
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
206178
|
+
* @param {number} [length] Message length if known beforehand
|
|
206179
|
+
* @returns {AssessmentQuestionResponse & AssessmentQuestionResponse.$Shape} AssessmentQuestionResponse
|
|
206180
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
206181
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
206182
|
+
*/
|
|
206183
|
+
AssessmentQuestionResponse.decode = function decode(reader, length, _end, _depth, _target) {
|
|
206184
|
+
if (!(reader instanceof $Reader))
|
|
206185
|
+
reader = $Reader.create(reader);
|
|
206186
|
+
if (_depth === undefined)
|
|
206187
|
+
_depth = 0;
|
|
206188
|
+
if (_depth > $Reader.recursionLimit)
|
|
206189
|
+
throw Error("max depth exceeded");
|
|
206190
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = _target || new $root.AssessmentQuestionResponse(), value;
|
|
206191
|
+
while (reader.pos < end) {
|
|
206192
|
+
var start = reader.pos;
|
|
206193
|
+
var tag = reader.tag();
|
|
206194
|
+
if (tag === _end) {
|
|
206195
|
+
_end = undefined;
|
|
206196
|
+
break;
|
|
206197
|
+
}
|
|
206198
|
+
var wireType = tag & 7;
|
|
206199
|
+
switch (tag >>>= 3) {
|
|
206200
|
+
case 1: {
|
|
206201
|
+
if (wireType !== 0)
|
|
206202
|
+
break;
|
|
206203
|
+
if (value = reader.uint32())
|
|
206204
|
+
message.questionNumber = value;
|
|
206205
|
+
else
|
|
206206
|
+
delete message.questionNumber;
|
|
206207
|
+
continue;
|
|
206208
|
+
}
|
|
206209
|
+
case 2: {
|
|
206210
|
+
if (wireType !== 2)
|
|
206211
|
+
break;
|
|
206212
|
+
if ((value = reader.string()).length)
|
|
206213
|
+
message.questionSlug = value;
|
|
206214
|
+
else
|
|
206215
|
+
delete message.questionSlug;
|
|
206216
|
+
continue;
|
|
206217
|
+
}
|
|
206218
|
+
case 3: {
|
|
206219
|
+
if (wireType !== 0)
|
|
206220
|
+
break;
|
|
206221
|
+
if (value = reader.int32())
|
|
206222
|
+
message.responseValue = value;
|
|
206223
|
+
else
|
|
206224
|
+
delete message.responseValue;
|
|
206225
|
+
continue;
|
|
206226
|
+
}
|
|
206227
|
+
}
|
|
206228
|
+
reader.skipType(wireType, _depth, tag);
|
|
206229
|
+
$util.makeProp(message, "$unknowns", false);
|
|
206230
|
+
(message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos));
|
|
206231
|
+
}
|
|
206232
|
+
if (_end !== undefined)
|
|
206233
|
+
throw Error("missing end group");
|
|
206234
|
+
return message;
|
|
206235
|
+
};
|
|
206236
|
+
|
|
206237
|
+
/**
|
|
206238
|
+
* Decodes an AssessmentQuestionResponse message from the specified reader or buffer, length delimited.
|
|
206239
|
+
* @function decodeDelimited
|
|
206240
|
+
* @memberof AssessmentQuestionResponse
|
|
206241
|
+
* @static
|
|
206242
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
206243
|
+
* @returns {AssessmentQuestionResponse & AssessmentQuestionResponse.$Shape} AssessmentQuestionResponse
|
|
206244
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
206245
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
206246
|
+
*/
|
|
206247
|
+
AssessmentQuestionResponse.decodeDelimited = function decodeDelimited(reader) {
|
|
206248
|
+
if (!(reader instanceof $Reader))
|
|
206249
|
+
reader = new $Reader(reader);
|
|
206250
|
+
return this.decode(reader, reader.uint32());
|
|
206251
|
+
};
|
|
206252
|
+
|
|
206253
|
+
/**
|
|
206254
|
+
* Verifies an AssessmentQuestionResponse message.
|
|
206255
|
+
* @function verify
|
|
206256
|
+
* @memberof AssessmentQuestionResponse
|
|
206257
|
+
* @static
|
|
206258
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
206259
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
206260
|
+
*/
|
|
206261
|
+
AssessmentQuestionResponse.verify = function verify(message, _depth) {
|
|
206262
|
+
if (typeof message !== "object" || message === null)
|
|
206263
|
+
return "object expected";
|
|
206264
|
+
if (_depth === undefined)
|
|
206265
|
+
_depth = 0;
|
|
206266
|
+
if (_depth > $util.recursionLimit)
|
|
206267
|
+
return "max depth exceeded";
|
|
206268
|
+
if (message.questionNumber != null && message.hasOwnProperty("questionNumber"))
|
|
206269
|
+
if (!$util.isInteger(message.questionNumber))
|
|
206270
|
+
return "questionNumber: integer expected";
|
|
206271
|
+
if (message.questionSlug != null && message.hasOwnProperty("questionSlug"))
|
|
206272
|
+
if (!$util.isString(message.questionSlug))
|
|
206273
|
+
return "questionSlug: string expected";
|
|
206274
|
+
if (message.responseValue != null && message.hasOwnProperty("responseValue"))
|
|
206275
|
+
if (!$util.isInteger(message.responseValue))
|
|
206276
|
+
return "responseValue: integer expected";
|
|
206277
|
+
return null;
|
|
206278
|
+
};
|
|
206279
|
+
|
|
206280
|
+
/**
|
|
206281
|
+
* Creates an AssessmentQuestionResponse message from a plain object. Also converts values to their respective internal types.
|
|
206282
|
+
* @function fromObject
|
|
206283
|
+
* @memberof AssessmentQuestionResponse
|
|
206284
|
+
* @static
|
|
206285
|
+
* @param {Object.<string,*>} object Plain object
|
|
206286
|
+
* @returns {AssessmentQuestionResponse} AssessmentQuestionResponse
|
|
206287
|
+
*/
|
|
206288
|
+
AssessmentQuestionResponse.fromObject = function fromObject(object, _depth) {
|
|
206289
|
+
if (object instanceof $root.AssessmentQuestionResponse)
|
|
206290
|
+
return object;
|
|
206291
|
+
if (_depth === undefined)
|
|
206292
|
+
_depth = 0;
|
|
206293
|
+
if (_depth > $util.recursionLimit)
|
|
206294
|
+
throw Error("max depth exceeded");
|
|
206295
|
+
var message = new $root.AssessmentQuestionResponse();
|
|
206296
|
+
if (object.questionNumber != null)
|
|
206297
|
+
if (Number(object.questionNumber) !== 0)
|
|
206298
|
+
message.questionNumber = object.questionNumber >>> 0;
|
|
206299
|
+
if (object.questionSlug != null)
|
|
206300
|
+
if (typeof object.questionSlug !== "string" || object.questionSlug.length)
|
|
206301
|
+
message.questionSlug = String(object.questionSlug);
|
|
206302
|
+
if (object.responseValue != null)
|
|
206303
|
+
if (Number(object.responseValue) !== 0)
|
|
206304
|
+
message.responseValue = object.responseValue | 0;
|
|
206305
|
+
return message;
|
|
206306
|
+
};
|
|
206307
|
+
|
|
206308
|
+
/**
|
|
206309
|
+
* Creates a plain object from an AssessmentQuestionResponse message. Also converts values to other types if specified.
|
|
206310
|
+
* @function toObject
|
|
206311
|
+
* @memberof AssessmentQuestionResponse
|
|
206312
|
+
* @static
|
|
206313
|
+
* @param {AssessmentQuestionResponse} message AssessmentQuestionResponse
|
|
206314
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
206315
|
+
* @returns {Object.<string,*>} Plain object
|
|
206316
|
+
*/
|
|
206317
|
+
AssessmentQuestionResponse.toObject = function toObject(message, options) {
|
|
206318
|
+
if (!options)
|
|
206319
|
+
options = {};
|
|
206320
|
+
var object = {};
|
|
206321
|
+
if (options.defaults) {
|
|
206322
|
+
object.questionNumber = 0;
|
|
206323
|
+
object.questionSlug = "";
|
|
206324
|
+
object.responseValue = 0;
|
|
206325
|
+
}
|
|
206326
|
+
if (message.questionNumber != null && message.hasOwnProperty("questionNumber"))
|
|
206327
|
+
object.questionNumber = message.questionNumber;
|
|
206328
|
+
if (message.questionSlug != null && message.hasOwnProperty("questionSlug"))
|
|
206329
|
+
object.questionSlug = message.questionSlug;
|
|
206330
|
+
if (message.responseValue != null && message.hasOwnProperty("responseValue"))
|
|
206331
|
+
object.responseValue = message.responseValue;
|
|
206332
|
+
return object;
|
|
206333
|
+
};
|
|
206334
|
+
|
|
206335
|
+
/**
|
|
206336
|
+
* Converts this AssessmentQuestionResponse to JSON.
|
|
206337
|
+
* @function toJSON
|
|
206338
|
+
* @memberof AssessmentQuestionResponse
|
|
206339
|
+
* @instance
|
|
206340
|
+
* @returns {Object.<string,*>} JSON object
|
|
206341
|
+
*/
|
|
206342
|
+
AssessmentQuestionResponse.prototype.toJSON = function toJSON() {
|
|
206343
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
206344
|
+
};
|
|
206345
|
+
|
|
206346
|
+
/**
|
|
206347
|
+
* Gets the type url for AssessmentQuestionResponse
|
|
206348
|
+
* @function getTypeUrl
|
|
206349
|
+
* @memberof AssessmentQuestionResponse
|
|
206350
|
+
* @static
|
|
206351
|
+
* @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"`
|
|
206352
|
+
* @returns {string} The type url
|
|
206353
|
+
*/
|
|
206354
|
+
AssessmentQuestionResponse.getTypeUrl = function getTypeUrl(prefix) {
|
|
206355
|
+
if (prefix === undefined)
|
|
206356
|
+
prefix = "type.googleapis.com";
|
|
206357
|
+
return prefix + "/AssessmentQuestionResponse";
|
|
206358
|
+
};
|
|
206359
|
+
|
|
206360
|
+
return AssessmentQuestionResponse;
|
|
206361
|
+
})();
|
|
206362
|
+
|
|
206363
|
+
$root.CareAssessmentAssigned = (function() {
|
|
206364
|
+
|
|
206365
|
+
/**
|
|
206366
|
+
* Properties of a CareAssessmentAssigned.
|
|
206367
|
+
* @typedef {Object} CareAssessmentAssigned.$Properties
|
|
206368
|
+
* @property {number|Long|null} [timestamp] CareAssessmentAssigned timestamp
|
|
206369
|
+
* @property {CareAssessmentType|null} [careAssessmentType] CareAssessmentAssigned careAssessmentType
|
|
206370
|
+
* @property {string|null} [hsUserId] CareAssessmentAssigned hsUserId
|
|
206371
|
+
* @property {number|null} [gingerUserId] CareAssessmentAssigned gingerUserId
|
|
206372
|
+
* @property {string|null} [assignedAtIsoDate] CareAssessmentAssigned assignedAtIsoDate
|
|
206373
|
+
* @property {number|Long|null} [assignmentId] CareAssessmentAssigned assignmentId
|
|
206374
|
+
* @property {string|null} [activityId] CareAssessmentAssigned activityId
|
|
206375
|
+
* @property {CareAssessmentCadence|null} [careAssessmentCadence] CareAssessmentAssigned careAssessmentCadence
|
|
206376
|
+
* @property {CareAssessmentContext|null} [assessmentContext] CareAssessmentAssigned assessmentContext
|
|
206377
|
+
* @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
|
|
206378
|
+
*/
|
|
206379
|
+
|
|
206380
|
+
/**
|
|
206381
|
+
* Properties of a CareAssessmentAssigned.
|
|
206382
|
+
* @name ICareAssessmentAssigned
|
|
206383
|
+
* @interface ICareAssessmentAssigned
|
|
206384
|
+
* @augments CareAssessmentAssigned.$Properties
|
|
206385
|
+
* @deprecated Use CareAssessmentAssigned.$Properties instead.
|
|
206386
|
+
*/
|
|
206387
|
+
|
|
206388
|
+
/**
|
|
206389
|
+
* Shape of a CareAssessmentAssigned.
|
|
206390
|
+
* @typedef {CareAssessmentAssigned.$Properties} CareAssessmentAssigned.$Shape
|
|
206391
|
+
*/
|
|
206392
|
+
|
|
206393
|
+
/**
|
|
206394
|
+
* Constructs a new CareAssessmentAssigned.
|
|
206395
|
+
* @name CareAssessmentAssigned
|
|
206396
|
+
* @classdesc Represents a CareAssessmentAssigned.
|
|
206397
|
+
* @constructor
|
|
206398
|
+
* @param {CareAssessmentAssigned.$Properties=} [properties] Properties to set
|
|
206399
|
+
* @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
|
|
206400
|
+
*/
|
|
206401
|
+
function CareAssessmentAssigned(properties) {
|
|
206402
|
+
if (properties)
|
|
206403
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
206404
|
+
if (properties[keys[i]] != null && keys[i] !== "__proto__")
|
|
206405
|
+
this[keys[i]] = properties[keys[i]];
|
|
206406
|
+
}
|
|
206407
|
+
|
|
206408
|
+
/**
|
|
206409
|
+
* CareAssessmentAssigned timestamp.
|
|
206410
|
+
* @member {number|Long} timestamp
|
|
206411
|
+
* @memberof CareAssessmentAssigned
|
|
206412
|
+
* @instance
|
|
206413
|
+
*/
|
|
206414
|
+
CareAssessmentAssigned.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
206415
|
+
|
|
206416
|
+
/**
|
|
206417
|
+
* CareAssessmentAssigned careAssessmentType.
|
|
206418
|
+
* @member {CareAssessmentType} careAssessmentType
|
|
206419
|
+
* @memberof CareAssessmentAssigned
|
|
206420
|
+
* @instance
|
|
206421
|
+
*/
|
|
206422
|
+
CareAssessmentAssigned.prototype.careAssessmentType = 0;
|
|
206423
|
+
|
|
206424
|
+
/**
|
|
206425
|
+
* CareAssessmentAssigned hsUserId.
|
|
206426
|
+
* @member {string} hsUserId
|
|
206427
|
+
* @memberof CareAssessmentAssigned
|
|
206428
|
+
* @instance
|
|
206429
|
+
*/
|
|
206430
|
+
CareAssessmentAssigned.prototype.hsUserId = "";
|
|
206431
|
+
|
|
206432
|
+
/**
|
|
206433
|
+
* CareAssessmentAssigned gingerUserId.
|
|
206434
|
+
* @member {number} gingerUserId
|
|
206435
|
+
* @memberof CareAssessmentAssigned
|
|
206436
|
+
* @instance
|
|
206437
|
+
*/
|
|
206438
|
+
CareAssessmentAssigned.prototype.gingerUserId = 0;
|
|
206439
|
+
|
|
206440
|
+
/**
|
|
206441
|
+
* CareAssessmentAssigned assignedAtIsoDate.
|
|
206442
|
+
* @member {string} assignedAtIsoDate
|
|
206443
|
+
* @memberof CareAssessmentAssigned
|
|
206444
|
+
* @instance
|
|
206445
|
+
*/
|
|
206446
|
+
CareAssessmentAssigned.prototype.assignedAtIsoDate = "";
|
|
206447
|
+
|
|
206448
|
+
/**
|
|
206449
|
+
* CareAssessmentAssigned assignmentId.
|
|
206450
|
+
* @member {number|Long} assignmentId
|
|
206451
|
+
* @memberof CareAssessmentAssigned
|
|
206452
|
+
* @instance
|
|
206453
|
+
*/
|
|
206454
|
+
CareAssessmentAssigned.prototype.assignmentId = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
|
|
206455
|
+
|
|
206456
|
+
/**
|
|
206457
|
+
* CareAssessmentAssigned activityId.
|
|
206458
|
+
* @member {string} activityId
|
|
206459
|
+
* @memberof CareAssessmentAssigned
|
|
206460
|
+
* @instance
|
|
206461
|
+
*/
|
|
206462
|
+
CareAssessmentAssigned.prototype.activityId = "";
|
|
206463
|
+
|
|
206464
|
+
/**
|
|
206465
|
+
* CareAssessmentAssigned careAssessmentCadence.
|
|
206466
|
+
* @member {CareAssessmentCadence} careAssessmentCadence
|
|
206467
|
+
* @memberof CareAssessmentAssigned
|
|
206468
|
+
* @instance
|
|
206469
|
+
*/
|
|
206470
|
+
CareAssessmentAssigned.prototype.careAssessmentCadence = 0;
|
|
206471
|
+
|
|
206472
|
+
/**
|
|
206473
|
+
* CareAssessmentAssigned assessmentContext.
|
|
206474
|
+
* @member {CareAssessmentContext|null|undefined} assessmentContext
|
|
206475
|
+
* @memberof CareAssessmentAssigned
|
|
206476
|
+
* @instance
|
|
206477
|
+
*/
|
|
206478
|
+
CareAssessmentAssigned.prototype.assessmentContext = null;
|
|
206479
|
+
|
|
206480
|
+
// OneOf field names bound to virtual getters and setters
|
|
206481
|
+
var $oneOfFields;
|
|
206482
|
+
|
|
206483
|
+
// Virtual OneOf for proto3 optional field
|
|
206484
|
+
Object.defineProperty(CareAssessmentAssigned.prototype, "_assessmentContext", {
|
|
206485
|
+
get: $util.oneOfGetter($oneOfFields = ["assessmentContext"]),
|
|
206486
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
206487
|
+
});
|
|
206488
|
+
|
|
206489
|
+
/**
|
|
206490
|
+
* Creates a new CareAssessmentAssigned instance using the specified properties.
|
|
206491
|
+
* @function create
|
|
206492
|
+
* @memberof CareAssessmentAssigned
|
|
206493
|
+
* @static
|
|
206494
|
+
* @param {CareAssessmentAssigned.$Properties=} [properties] Properties to set
|
|
206495
|
+
* @returns {CareAssessmentAssigned} CareAssessmentAssigned instance
|
|
206496
|
+
* @type {{
|
|
206497
|
+
* (properties: CareAssessmentAssigned.$Shape): CareAssessmentAssigned & CareAssessmentAssigned.$Shape;
|
|
206498
|
+
* (properties?: CareAssessmentAssigned.$Properties): CareAssessmentAssigned;
|
|
206499
|
+
* }}
|
|
206500
|
+
*/
|
|
206501
|
+
CareAssessmentAssigned.create = function create(properties) {
|
|
206502
|
+
return new CareAssessmentAssigned(properties);
|
|
206503
|
+
};
|
|
206504
|
+
|
|
206505
|
+
/**
|
|
206506
|
+
* Encodes the specified CareAssessmentAssigned message. Does not implicitly {@link CareAssessmentAssigned.verify|verify} messages.
|
|
206507
|
+
* @function encode
|
|
206508
|
+
* @memberof CareAssessmentAssigned
|
|
206509
|
+
* @static
|
|
206510
|
+
* @param {CareAssessmentAssigned.$Properties} message CareAssessmentAssigned message or plain object to encode
|
|
206511
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
206512
|
+
* @returns {$protobuf.Writer} Writer
|
|
206513
|
+
*/
|
|
206514
|
+
CareAssessmentAssigned.encode = function encode(message, writer) {
|
|
206515
|
+
if (!writer)
|
|
206516
|
+
writer = $Writer.create();
|
|
206517
|
+
if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp"))
|
|
206518
|
+
writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.timestamp);
|
|
206519
|
+
if (message.careAssessmentType != null && Object.hasOwnProperty.call(message, "careAssessmentType"))
|
|
206520
|
+
writer.uint32(/* id 2, wireType 0 =*/16).int32(message.careAssessmentType);
|
|
206521
|
+
if (message.hsUserId != null && Object.hasOwnProperty.call(message, "hsUserId"))
|
|
206522
|
+
writer.uint32(/* id 3, wireType 2 =*/26).string(message.hsUserId);
|
|
206523
|
+
if (message.gingerUserId != null && Object.hasOwnProperty.call(message, "gingerUserId"))
|
|
206524
|
+
writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.gingerUserId);
|
|
206525
|
+
if (message.assignedAtIsoDate != null && Object.hasOwnProperty.call(message, "assignedAtIsoDate"))
|
|
206526
|
+
writer.uint32(/* id 5, wireType 2 =*/42).string(message.assignedAtIsoDate);
|
|
206527
|
+
if (message.assignmentId != null && Object.hasOwnProperty.call(message, "assignmentId"))
|
|
206528
|
+
writer.uint32(/* id 6, wireType 0 =*/48).int64(message.assignmentId);
|
|
206529
|
+
if (message.activityId != null && Object.hasOwnProperty.call(message, "activityId"))
|
|
206530
|
+
writer.uint32(/* id 7, wireType 2 =*/58).string(message.activityId);
|
|
206531
|
+
if (message.careAssessmentCadence != null && Object.hasOwnProperty.call(message, "careAssessmentCadence"))
|
|
206532
|
+
writer.uint32(/* id 8, wireType 0 =*/64).int32(message.careAssessmentCadence);
|
|
206533
|
+
if (message.assessmentContext != null && Object.hasOwnProperty.call(message, "assessmentContext"))
|
|
206534
|
+
writer.uint32(/* id 9, wireType 0 =*/72).int32(message.assessmentContext);
|
|
206535
|
+
if (message.$unknowns != null && Object.hasOwnProperty.call(message, "$unknowns"))
|
|
206536
|
+
for (var i = 0; i < message.$unknowns.length; ++i)
|
|
206537
|
+
writer.raw(message.$unknowns[i]);
|
|
206538
|
+
return writer;
|
|
206539
|
+
};
|
|
206540
|
+
|
|
206541
|
+
/**
|
|
206542
|
+
* Encodes the specified CareAssessmentAssigned message, length delimited. Does not implicitly {@link CareAssessmentAssigned.verify|verify} messages.
|
|
206543
|
+
* @function encodeDelimited
|
|
206544
|
+
* @memberof CareAssessmentAssigned
|
|
206545
|
+
* @static
|
|
206546
|
+
* @param {CareAssessmentAssigned.$Properties} message CareAssessmentAssigned message or plain object to encode
|
|
206547
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
206548
|
+
* @returns {$protobuf.Writer} Writer
|
|
206549
|
+
*/
|
|
206550
|
+
CareAssessmentAssigned.encodeDelimited = function encodeDelimited(message, writer) {
|
|
206551
|
+
return this.encode(message, writer).ldelim();
|
|
206552
|
+
};
|
|
206553
|
+
|
|
206554
|
+
/**
|
|
206555
|
+
* Decodes a CareAssessmentAssigned message from the specified reader or buffer.
|
|
206556
|
+
* @function decode
|
|
206557
|
+
* @memberof CareAssessmentAssigned
|
|
206558
|
+
* @static
|
|
206559
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
206560
|
+
* @param {number} [length] Message length if known beforehand
|
|
206561
|
+
* @returns {CareAssessmentAssigned & CareAssessmentAssigned.$Shape} CareAssessmentAssigned
|
|
206562
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
206563
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
206564
|
+
*/
|
|
206565
|
+
CareAssessmentAssigned.decode = function decode(reader, length, _end, _depth, _target) {
|
|
206566
|
+
if (!(reader instanceof $Reader))
|
|
206567
|
+
reader = $Reader.create(reader);
|
|
206568
|
+
if (_depth === undefined)
|
|
206569
|
+
_depth = 0;
|
|
206570
|
+
if (_depth > $Reader.recursionLimit)
|
|
206571
|
+
throw Error("max depth exceeded");
|
|
206572
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = _target || new $root.CareAssessmentAssigned(), value;
|
|
206573
|
+
while (reader.pos < end) {
|
|
206574
|
+
var start = reader.pos;
|
|
206575
|
+
var tag = reader.tag();
|
|
206576
|
+
if (tag === _end) {
|
|
206577
|
+
_end = undefined;
|
|
206578
|
+
break;
|
|
206579
|
+
}
|
|
206580
|
+
var wireType = tag & 7;
|
|
206581
|
+
switch (tag >>>= 3) {
|
|
206582
|
+
case 1: {
|
|
206583
|
+
if (wireType !== 0)
|
|
206584
|
+
break;
|
|
206585
|
+
if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0)
|
|
206586
|
+
message.timestamp = value;
|
|
206587
|
+
else
|
|
206588
|
+
delete message.timestamp;
|
|
206589
|
+
continue;
|
|
206590
|
+
}
|
|
206591
|
+
case 2: {
|
|
206592
|
+
if (wireType !== 0)
|
|
206593
|
+
break;
|
|
206594
|
+
if (value = reader.int32())
|
|
206595
|
+
message.careAssessmentType = value;
|
|
206596
|
+
else
|
|
206597
|
+
delete message.careAssessmentType;
|
|
206598
|
+
continue;
|
|
206599
|
+
}
|
|
206600
|
+
case 3: {
|
|
206601
|
+
if (wireType !== 2)
|
|
206602
|
+
break;
|
|
206603
|
+
if ((value = reader.string()).length)
|
|
206604
|
+
message.hsUserId = value;
|
|
206605
|
+
else
|
|
206606
|
+
delete message.hsUserId;
|
|
206607
|
+
continue;
|
|
206608
|
+
}
|
|
206609
|
+
case 4: {
|
|
206610
|
+
if (wireType !== 0)
|
|
206611
|
+
break;
|
|
206612
|
+
if (value = reader.uint32())
|
|
206613
|
+
message.gingerUserId = value;
|
|
206614
|
+
else
|
|
206615
|
+
delete message.gingerUserId;
|
|
206616
|
+
continue;
|
|
206617
|
+
}
|
|
206618
|
+
case 5: {
|
|
206619
|
+
if (wireType !== 2)
|
|
206620
|
+
break;
|
|
206621
|
+
if ((value = reader.string()).length)
|
|
206622
|
+
message.assignedAtIsoDate = value;
|
|
206623
|
+
else
|
|
206624
|
+
delete message.assignedAtIsoDate;
|
|
206625
|
+
continue;
|
|
206626
|
+
}
|
|
206627
|
+
case 6: {
|
|
206628
|
+
if (wireType !== 0)
|
|
206629
|
+
break;
|
|
206630
|
+
if (typeof (value = reader.int64()) === "object" ? value.low || value.high : value !== 0)
|
|
206631
|
+
message.assignmentId = value;
|
|
206632
|
+
else
|
|
206633
|
+
delete message.assignmentId;
|
|
206634
|
+
continue;
|
|
206635
|
+
}
|
|
206636
|
+
case 7: {
|
|
206637
|
+
if (wireType !== 2)
|
|
206638
|
+
break;
|
|
206639
|
+
if ((value = reader.string()).length)
|
|
206640
|
+
message.activityId = value;
|
|
206641
|
+
else
|
|
206642
|
+
delete message.activityId;
|
|
206643
|
+
continue;
|
|
206644
|
+
}
|
|
206645
|
+
case 8: {
|
|
206646
|
+
if (wireType !== 0)
|
|
206647
|
+
break;
|
|
206648
|
+
if (value = reader.int32())
|
|
206649
|
+
message.careAssessmentCadence = value;
|
|
206650
|
+
else
|
|
206651
|
+
delete message.careAssessmentCadence;
|
|
206652
|
+
continue;
|
|
206653
|
+
}
|
|
206654
|
+
case 9: {
|
|
206655
|
+
if (wireType !== 0)
|
|
206656
|
+
break;
|
|
206657
|
+
message.assessmentContext = reader.int32();
|
|
206658
|
+
message._assessmentContext = "assessmentContext";
|
|
206659
|
+
continue;
|
|
206660
|
+
}
|
|
206661
|
+
}
|
|
206662
|
+
reader.skipType(wireType, _depth, tag);
|
|
206663
|
+
$util.makeProp(message, "$unknowns", false);
|
|
206664
|
+
(message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos));
|
|
206665
|
+
}
|
|
206666
|
+
if (_end !== undefined)
|
|
206667
|
+
throw Error("missing end group");
|
|
206668
|
+
return message;
|
|
206669
|
+
};
|
|
206670
|
+
|
|
206671
|
+
/**
|
|
206672
|
+
* Decodes a CareAssessmentAssigned message from the specified reader or buffer, length delimited.
|
|
206673
|
+
* @function decodeDelimited
|
|
206674
|
+
* @memberof CareAssessmentAssigned
|
|
206675
|
+
* @static
|
|
206676
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
206677
|
+
* @returns {CareAssessmentAssigned & CareAssessmentAssigned.$Shape} CareAssessmentAssigned
|
|
206678
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
206679
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
206680
|
+
*/
|
|
206681
|
+
CareAssessmentAssigned.decodeDelimited = function decodeDelimited(reader) {
|
|
206682
|
+
if (!(reader instanceof $Reader))
|
|
206683
|
+
reader = new $Reader(reader);
|
|
206684
|
+
return this.decode(reader, reader.uint32());
|
|
206685
|
+
};
|
|
206686
|
+
|
|
206687
|
+
/**
|
|
206688
|
+
* Verifies a CareAssessmentAssigned message.
|
|
206689
|
+
* @function verify
|
|
206690
|
+
* @memberof CareAssessmentAssigned
|
|
206691
|
+
* @static
|
|
206692
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
206693
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
206694
|
+
*/
|
|
206695
|
+
CareAssessmentAssigned.verify = function verify(message, _depth) {
|
|
206696
|
+
if (typeof message !== "object" || message === null)
|
|
206697
|
+
return "object expected";
|
|
206698
|
+
if (_depth === undefined)
|
|
206699
|
+
_depth = 0;
|
|
206700
|
+
if (_depth > $util.recursionLimit)
|
|
206701
|
+
return "max depth exceeded";
|
|
206702
|
+
var properties = {};
|
|
206703
|
+
if (message.timestamp != null && message.hasOwnProperty("timestamp"))
|
|
206704
|
+
if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high)))
|
|
206705
|
+
return "timestamp: integer|Long expected";
|
|
206706
|
+
if (message.careAssessmentType != null && message.hasOwnProperty("careAssessmentType"))
|
|
206707
|
+
switch (message.careAssessmentType) {
|
|
206708
|
+
default:
|
|
206709
|
+
return "careAssessmentType: enum value expected";
|
|
206710
|
+
case 0:
|
|
206711
|
+
case 1:
|
|
206712
|
+
case 2:
|
|
206713
|
+
case 3:
|
|
206714
|
+
case 4:
|
|
206715
|
+
case 5:
|
|
206716
|
+
break;
|
|
206717
|
+
}
|
|
206718
|
+
if (message.hsUserId != null && message.hasOwnProperty("hsUserId"))
|
|
206719
|
+
if (!$util.isString(message.hsUserId))
|
|
206720
|
+
return "hsUserId: string expected";
|
|
206721
|
+
if (message.gingerUserId != null && message.hasOwnProperty("gingerUserId"))
|
|
206722
|
+
if (!$util.isInteger(message.gingerUserId))
|
|
206723
|
+
return "gingerUserId: integer expected";
|
|
206724
|
+
if (message.assignedAtIsoDate != null && message.hasOwnProperty("assignedAtIsoDate"))
|
|
206725
|
+
if (!$util.isString(message.assignedAtIsoDate))
|
|
206726
|
+
return "assignedAtIsoDate: string expected";
|
|
206727
|
+
if (message.assignmentId != null && message.hasOwnProperty("assignmentId"))
|
|
206728
|
+
if (!$util.isInteger(message.assignmentId) && !(message.assignmentId && $util.isInteger(message.assignmentId.low) && $util.isInteger(message.assignmentId.high)))
|
|
206729
|
+
return "assignmentId: integer|Long expected";
|
|
206730
|
+
if (message.activityId != null && message.hasOwnProperty("activityId"))
|
|
206731
|
+
if (!$util.isString(message.activityId))
|
|
206732
|
+
return "activityId: string expected";
|
|
206733
|
+
if (message.careAssessmentCadence != null && message.hasOwnProperty("careAssessmentCadence"))
|
|
206734
|
+
switch (message.careAssessmentCadence) {
|
|
206735
|
+
default:
|
|
206736
|
+
return "careAssessmentCadence: enum value expected";
|
|
206737
|
+
case 0:
|
|
206738
|
+
case 1:
|
|
206739
|
+
case 2:
|
|
206740
|
+
case 3:
|
|
206741
|
+
case 4:
|
|
206742
|
+
break;
|
|
206743
|
+
}
|
|
206744
|
+
if (message.assessmentContext != null && message.hasOwnProperty("assessmentContext")) {
|
|
206745
|
+
properties._assessmentContext = 1;
|
|
206746
|
+
switch (message.assessmentContext) {
|
|
206747
|
+
default:
|
|
206748
|
+
return "assessmentContext: enum value expected";
|
|
206749
|
+
case 0:
|
|
206750
|
+
case 1:
|
|
206751
|
+
break;
|
|
206752
|
+
}
|
|
206753
|
+
}
|
|
206754
|
+
return null;
|
|
206755
|
+
};
|
|
206756
|
+
|
|
206757
|
+
/**
|
|
206758
|
+
* Creates a CareAssessmentAssigned message from a plain object. Also converts values to their respective internal types.
|
|
206759
|
+
* @function fromObject
|
|
206760
|
+
* @memberof CareAssessmentAssigned
|
|
206761
|
+
* @static
|
|
206762
|
+
* @param {Object.<string,*>} object Plain object
|
|
206763
|
+
* @returns {CareAssessmentAssigned} CareAssessmentAssigned
|
|
206764
|
+
*/
|
|
206765
|
+
CareAssessmentAssigned.fromObject = function fromObject(object, _depth) {
|
|
206766
|
+
if (object instanceof $root.CareAssessmentAssigned)
|
|
206767
|
+
return object;
|
|
206768
|
+
if (_depth === undefined)
|
|
206769
|
+
_depth = 0;
|
|
206770
|
+
if (_depth > $util.recursionLimit)
|
|
206771
|
+
throw Error("max depth exceeded");
|
|
206772
|
+
var message = new $root.CareAssessmentAssigned();
|
|
206773
|
+
if (object.timestamp != null)
|
|
206774
|
+
if (typeof object.timestamp === "object" ? object.timestamp.low || object.timestamp.high : Number(object.timestamp) !== 0)
|
|
206775
|
+
if ($util.Long)
|
|
206776
|
+
(message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true;
|
|
206777
|
+
else if (typeof object.timestamp === "string")
|
|
206778
|
+
message.timestamp = parseInt(object.timestamp, 10);
|
|
206779
|
+
else if (typeof object.timestamp === "number")
|
|
206780
|
+
message.timestamp = object.timestamp;
|
|
206781
|
+
else if (typeof object.timestamp === "object")
|
|
206782
|
+
message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(true);
|
|
206783
|
+
if (object.careAssessmentType !== 0 && (typeof object.careAssessmentType !== "string" || $root.CareAssessmentType[object.careAssessmentType] !== 0))
|
|
206784
|
+
switch (object.careAssessmentType) {
|
|
206785
|
+
default:
|
|
206786
|
+
if (typeof object.careAssessmentType === "number") {
|
|
206787
|
+
message.careAssessmentType = object.careAssessmentType;
|
|
206788
|
+
break;
|
|
206789
|
+
}
|
|
206790
|
+
break;
|
|
206791
|
+
case "CARE_ASSESSMENT_TYPE_UNKNOWN":
|
|
206792
|
+
case 0:
|
|
206793
|
+
message.careAssessmentType = 0;
|
|
206794
|
+
break;
|
|
206795
|
+
case "CARE_ASSESSMENT_TYPE_PHQ9":
|
|
206796
|
+
case 1:
|
|
206797
|
+
message.careAssessmentType = 1;
|
|
206798
|
+
break;
|
|
206799
|
+
case "CARE_ASSESSMENT_TYPE_GAD7":
|
|
206800
|
+
case 2:
|
|
206801
|
+
message.careAssessmentType = 2;
|
|
206802
|
+
break;
|
|
206803
|
+
case "CARE_ASSESSMENT_TYPE_PHQ4":
|
|
206804
|
+
case 3:
|
|
206805
|
+
message.careAssessmentType = 3;
|
|
206806
|
+
break;
|
|
206807
|
+
case "CARE_ASSESSMENT_TYPE_PSS":
|
|
206808
|
+
case 4:
|
|
206809
|
+
message.careAssessmentType = 4;
|
|
206810
|
+
break;
|
|
206811
|
+
case "CARE_ASSESSMENT_TYPE_PGIC":
|
|
206812
|
+
case 5:
|
|
206813
|
+
message.careAssessmentType = 5;
|
|
206814
|
+
break;
|
|
206815
|
+
}
|
|
206816
|
+
if (object.hsUserId != null)
|
|
206817
|
+
if (typeof object.hsUserId !== "string" || object.hsUserId.length)
|
|
206818
|
+
message.hsUserId = String(object.hsUserId);
|
|
206819
|
+
if (object.gingerUserId != null)
|
|
206820
|
+
if (Number(object.gingerUserId) !== 0)
|
|
206821
|
+
message.gingerUserId = object.gingerUserId >>> 0;
|
|
206822
|
+
if (object.assignedAtIsoDate != null)
|
|
206823
|
+
if (typeof object.assignedAtIsoDate !== "string" || object.assignedAtIsoDate.length)
|
|
206824
|
+
message.assignedAtIsoDate = String(object.assignedAtIsoDate);
|
|
206825
|
+
if (object.assignmentId != null)
|
|
206826
|
+
if (typeof object.assignmentId === "object" ? object.assignmentId.low || object.assignmentId.high : Number(object.assignmentId) !== 0)
|
|
206827
|
+
if ($util.Long)
|
|
206828
|
+
(message.assignmentId = $util.Long.fromValue(object.assignmentId)).unsigned = false;
|
|
206829
|
+
else if (typeof object.assignmentId === "string")
|
|
206830
|
+
message.assignmentId = parseInt(object.assignmentId, 10);
|
|
206831
|
+
else if (typeof object.assignmentId === "number")
|
|
206832
|
+
message.assignmentId = object.assignmentId;
|
|
206833
|
+
else if (typeof object.assignmentId === "object")
|
|
206834
|
+
message.assignmentId = new $util.LongBits(object.assignmentId.low >>> 0, object.assignmentId.high >>> 0).toNumber();
|
|
206835
|
+
if (object.activityId != null)
|
|
206836
|
+
if (typeof object.activityId !== "string" || object.activityId.length)
|
|
206837
|
+
message.activityId = String(object.activityId);
|
|
206838
|
+
if (object.careAssessmentCadence !== 0 && (typeof object.careAssessmentCadence !== "string" || $root.CareAssessmentCadence[object.careAssessmentCadence] !== 0))
|
|
206839
|
+
switch (object.careAssessmentCadence) {
|
|
206840
|
+
default:
|
|
206841
|
+
if (typeof object.careAssessmentCadence === "number") {
|
|
206842
|
+
message.careAssessmentCadence = object.careAssessmentCadence;
|
|
206843
|
+
break;
|
|
206844
|
+
}
|
|
206845
|
+
break;
|
|
206846
|
+
case "CARE_ASSESSMENT_CADENCE_UNKNOWN":
|
|
206847
|
+
case 0:
|
|
206848
|
+
message.careAssessmentCadence = 0;
|
|
206849
|
+
break;
|
|
206850
|
+
case "CARE_ASSESSMENT_CADENCE_ONBOARDING":
|
|
206851
|
+
case 1:
|
|
206852
|
+
message.careAssessmentCadence = 1;
|
|
206853
|
+
break;
|
|
206854
|
+
case "CARE_ASSESSMENT_CADENCE_QUARTERLY":
|
|
206855
|
+
case 2:
|
|
206856
|
+
message.careAssessmentCadence = 2;
|
|
206857
|
+
break;
|
|
206858
|
+
case "CARE_ASSESSMENT_CADENCE_END_OF_PERIOD":
|
|
206859
|
+
case 3:
|
|
206860
|
+
message.careAssessmentCadence = 3;
|
|
206861
|
+
break;
|
|
206862
|
+
case "CARE_ASSESSMENT_CADENCE_EARLY_EXIT":
|
|
206863
|
+
case 4:
|
|
206864
|
+
message.careAssessmentCadence = 4;
|
|
206865
|
+
break;
|
|
206866
|
+
}
|
|
206867
|
+
switch (object.assessmentContext) {
|
|
206868
|
+
default:
|
|
206869
|
+
if (typeof object.assessmentContext === "number") {
|
|
206870
|
+
message.assessmentContext = object.assessmentContext;
|
|
206871
|
+
break;
|
|
206872
|
+
}
|
|
206873
|
+
break;
|
|
206874
|
+
case "CARE_ASSESSMENT_CONTEXT_UNKNOWN":
|
|
206875
|
+
case 0:
|
|
206876
|
+
message.assessmentContext = 0;
|
|
206877
|
+
break;
|
|
206878
|
+
case "CARE_ASSESSMENT_CONTEXT_CMS":
|
|
206879
|
+
case 1:
|
|
206880
|
+
message.assessmentContext = 1;
|
|
206881
|
+
break;
|
|
206882
|
+
}
|
|
206883
|
+
return message;
|
|
206884
|
+
};
|
|
206885
|
+
|
|
206886
|
+
/**
|
|
206887
|
+
* Creates a plain object from a CareAssessmentAssigned message. Also converts values to other types if specified.
|
|
206888
|
+
* @function toObject
|
|
206889
|
+
* @memberof CareAssessmentAssigned
|
|
206890
|
+
* @static
|
|
206891
|
+
* @param {CareAssessmentAssigned} message CareAssessmentAssigned
|
|
206892
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
206893
|
+
* @returns {Object.<string,*>} Plain object
|
|
206894
|
+
*/
|
|
206895
|
+
CareAssessmentAssigned.toObject = function toObject(message, options) {
|
|
206896
|
+
if (!options)
|
|
206897
|
+
options = {};
|
|
206898
|
+
var object = {};
|
|
206899
|
+
if (options.defaults) {
|
|
206900
|
+
if ($util.Long) {
|
|
206901
|
+
var long = new $util.Long(0, 0, true);
|
|
206902
|
+
object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long;
|
|
206903
|
+
} else
|
|
206904
|
+
object.timestamp = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0;
|
|
206905
|
+
object.careAssessmentType = options.enums === String ? "CARE_ASSESSMENT_TYPE_UNKNOWN" : 0;
|
|
206906
|
+
object.hsUserId = "";
|
|
206907
|
+
object.gingerUserId = 0;
|
|
206908
|
+
object.assignedAtIsoDate = "";
|
|
206909
|
+
if ($util.Long) {
|
|
206910
|
+
var long = new $util.Long(0, 0, false);
|
|
206911
|
+
object.assignmentId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long;
|
|
206912
|
+
} else
|
|
206913
|
+
object.assignmentId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0;
|
|
206914
|
+
object.activityId = "";
|
|
206915
|
+
object.careAssessmentCadence = options.enums === String ? "CARE_ASSESSMENT_CADENCE_UNKNOWN" : 0;
|
|
206916
|
+
}
|
|
206917
|
+
if (message.timestamp != null && message.hasOwnProperty("timestamp"))
|
|
206918
|
+
if (typeof BigInt !== "undefined" && options.longs === BigInt)
|
|
206919
|
+
object.timestamp = typeof message.timestamp === "number" ? BigInt(message.timestamp) : $util.Long.fromBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0, true).toBigInt();
|
|
206920
|
+
else if (typeof message.timestamp === "number")
|
|
206921
|
+
object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp;
|
|
206922
|
+
else
|
|
206923
|
+
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;
|
|
206924
|
+
if (message.careAssessmentType != null && message.hasOwnProperty("careAssessmentType"))
|
|
206925
|
+
object.careAssessmentType = options.enums === String ? $root.CareAssessmentType[message.careAssessmentType] === undefined ? message.careAssessmentType : $root.CareAssessmentType[message.careAssessmentType] : message.careAssessmentType;
|
|
206926
|
+
if (message.hsUserId != null && message.hasOwnProperty("hsUserId"))
|
|
206927
|
+
object.hsUserId = message.hsUserId;
|
|
206928
|
+
if (message.gingerUserId != null && message.hasOwnProperty("gingerUserId"))
|
|
206929
|
+
object.gingerUserId = message.gingerUserId;
|
|
206930
|
+
if (message.assignedAtIsoDate != null && message.hasOwnProperty("assignedAtIsoDate"))
|
|
206931
|
+
object.assignedAtIsoDate = message.assignedAtIsoDate;
|
|
206932
|
+
if (message.assignmentId != null && message.hasOwnProperty("assignmentId"))
|
|
206933
|
+
if (typeof BigInt !== "undefined" && options.longs === BigInt)
|
|
206934
|
+
object.assignmentId = typeof message.assignmentId === "number" ? BigInt(message.assignmentId) : $util.Long.fromBits(message.assignmentId.low >>> 0, message.assignmentId.high >>> 0, false).toBigInt();
|
|
206935
|
+
else if (typeof message.assignmentId === "number")
|
|
206936
|
+
object.assignmentId = options.longs === String ? String(message.assignmentId) : message.assignmentId;
|
|
206937
|
+
else
|
|
206938
|
+
object.assignmentId = options.longs === String ? $util.Long.prototype.toString.call(message.assignmentId) : options.longs === Number ? new $util.LongBits(message.assignmentId.low >>> 0, message.assignmentId.high >>> 0).toNumber() : message.assignmentId;
|
|
206939
|
+
if (message.activityId != null && message.hasOwnProperty("activityId"))
|
|
206940
|
+
object.activityId = message.activityId;
|
|
206941
|
+
if (message.careAssessmentCadence != null && message.hasOwnProperty("careAssessmentCadence"))
|
|
206942
|
+
object.careAssessmentCadence = options.enums === String ? $root.CareAssessmentCadence[message.careAssessmentCadence] === undefined ? message.careAssessmentCadence : $root.CareAssessmentCadence[message.careAssessmentCadence] : message.careAssessmentCadence;
|
|
206943
|
+
if (message.assessmentContext != null && message.hasOwnProperty("assessmentContext")) {
|
|
206944
|
+
object.assessmentContext = options.enums === String ? $root.CareAssessmentContext[message.assessmentContext] === undefined ? message.assessmentContext : $root.CareAssessmentContext[message.assessmentContext] : message.assessmentContext;
|
|
206945
|
+
if (options.oneofs)
|
|
206946
|
+
object._assessmentContext = "assessmentContext";
|
|
206947
|
+
}
|
|
206948
|
+
return object;
|
|
206949
|
+
};
|
|
206950
|
+
|
|
206951
|
+
/**
|
|
206952
|
+
* Converts this CareAssessmentAssigned to JSON.
|
|
206953
|
+
* @function toJSON
|
|
206954
|
+
* @memberof CareAssessmentAssigned
|
|
206955
|
+
* @instance
|
|
206956
|
+
* @returns {Object.<string,*>} JSON object
|
|
206957
|
+
*/
|
|
206958
|
+
CareAssessmentAssigned.prototype.toJSON = function toJSON() {
|
|
206959
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
206960
|
+
};
|
|
206961
|
+
|
|
206962
|
+
/**
|
|
206963
|
+
* Gets the type url for CareAssessmentAssigned
|
|
206964
|
+
* @function getTypeUrl
|
|
206965
|
+
* @memberof CareAssessmentAssigned
|
|
206966
|
+
* @static
|
|
206967
|
+
* @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"`
|
|
206968
|
+
* @returns {string} The type url
|
|
206969
|
+
*/
|
|
206970
|
+
CareAssessmentAssigned.getTypeUrl = function getTypeUrl(prefix) {
|
|
206971
|
+
if (prefix === undefined)
|
|
206972
|
+
prefix = "type.googleapis.com";
|
|
206973
|
+
return prefix + "/CareAssessmentAssigned";
|
|
206974
|
+
};
|
|
206975
|
+
|
|
206976
|
+
return CareAssessmentAssigned;
|
|
206977
|
+
})();
|
|
206978
|
+
|
|
206979
|
+
$root.CareAssessmentStarted = (function() {
|
|
206980
|
+
|
|
206981
|
+
/**
|
|
206982
|
+
* Properties of a CareAssessmentStarted.
|
|
206983
|
+
* @typedef {Object} CareAssessmentStarted.$Properties
|
|
206984
|
+
* @property {number|Long|null} [timestamp] CareAssessmentStarted timestamp
|
|
206985
|
+
* @property {CareAssessmentType|null} [careAssessmentType] CareAssessmentStarted careAssessmentType
|
|
206986
|
+
* @property {string|null} [hsUserId] CareAssessmentStarted hsUserId
|
|
206987
|
+
* @property {number|null} [gingerUserId] CareAssessmentStarted gingerUserId
|
|
206988
|
+
* @property {string|null} [startedAtIsoDate] CareAssessmentStarted startedAtIsoDate
|
|
206989
|
+
* @property {number|Long|null} [assignmentId] CareAssessmentStarted assignmentId
|
|
206990
|
+
* @property {string|null} [activityId] CareAssessmentStarted activityId
|
|
206991
|
+
* @property {CareAssessmentCadence|null} [careAssessmentCadence] CareAssessmentStarted careAssessmentCadence
|
|
206992
|
+
* @property {CareAssessmentContext|null} [assessmentContext] CareAssessmentStarted assessmentContext
|
|
206993
|
+
* @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
|
|
206994
|
+
*/
|
|
206995
|
+
|
|
206996
|
+
/**
|
|
206997
|
+
* Properties of a CareAssessmentStarted.
|
|
206998
|
+
* @name ICareAssessmentStarted
|
|
206999
|
+
* @interface ICareAssessmentStarted
|
|
207000
|
+
* @augments CareAssessmentStarted.$Properties
|
|
207001
|
+
* @deprecated Use CareAssessmentStarted.$Properties instead.
|
|
207002
|
+
*/
|
|
207003
|
+
|
|
207004
|
+
/**
|
|
207005
|
+
* Shape of a CareAssessmentStarted.
|
|
207006
|
+
* @typedef {CareAssessmentStarted.$Properties} CareAssessmentStarted.$Shape
|
|
207007
|
+
*/
|
|
207008
|
+
|
|
207009
|
+
/**
|
|
207010
|
+
* Constructs a new CareAssessmentStarted.
|
|
207011
|
+
* @name CareAssessmentStarted
|
|
207012
|
+
* @classdesc Represents a CareAssessmentStarted.
|
|
207013
|
+
* @constructor
|
|
207014
|
+
* @param {CareAssessmentStarted.$Properties=} [properties] Properties to set
|
|
207015
|
+
* @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
|
|
207016
|
+
*/
|
|
207017
|
+
function CareAssessmentStarted(properties) {
|
|
207018
|
+
if (properties)
|
|
207019
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
207020
|
+
if (properties[keys[i]] != null && keys[i] !== "__proto__")
|
|
207021
|
+
this[keys[i]] = properties[keys[i]];
|
|
207022
|
+
}
|
|
207023
|
+
|
|
207024
|
+
/**
|
|
207025
|
+
* CareAssessmentStarted timestamp.
|
|
207026
|
+
* @member {number|Long} timestamp
|
|
207027
|
+
* @memberof CareAssessmentStarted
|
|
207028
|
+
* @instance
|
|
207029
|
+
*/
|
|
207030
|
+
CareAssessmentStarted.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
207031
|
+
|
|
207032
|
+
/**
|
|
207033
|
+
* CareAssessmentStarted careAssessmentType.
|
|
207034
|
+
* @member {CareAssessmentType} careAssessmentType
|
|
207035
|
+
* @memberof CareAssessmentStarted
|
|
207036
|
+
* @instance
|
|
207037
|
+
*/
|
|
207038
|
+
CareAssessmentStarted.prototype.careAssessmentType = 0;
|
|
207039
|
+
|
|
207040
|
+
/**
|
|
207041
|
+
* CareAssessmentStarted hsUserId.
|
|
207042
|
+
* @member {string} hsUserId
|
|
207043
|
+
* @memberof CareAssessmentStarted
|
|
207044
|
+
* @instance
|
|
207045
|
+
*/
|
|
207046
|
+
CareAssessmentStarted.prototype.hsUserId = "";
|
|
207047
|
+
|
|
207048
|
+
/**
|
|
207049
|
+
* CareAssessmentStarted gingerUserId.
|
|
207050
|
+
* @member {number} gingerUserId
|
|
207051
|
+
* @memberof CareAssessmentStarted
|
|
207052
|
+
* @instance
|
|
207053
|
+
*/
|
|
207054
|
+
CareAssessmentStarted.prototype.gingerUserId = 0;
|
|
207055
|
+
|
|
207056
|
+
/**
|
|
207057
|
+
* CareAssessmentStarted startedAtIsoDate.
|
|
207058
|
+
* @member {string} startedAtIsoDate
|
|
207059
|
+
* @memberof CareAssessmentStarted
|
|
207060
|
+
* @instance
|
|
207061
|
+
*/
|
|
207062
|
+
CareAssessmentStarted.prototype.startedAtIsoDate = "";
|
|
207063
|
+
|
|
207064
|
+
/**
|
|
207065
|
+
* CareAssessmentStarted assignmentId.
|
|
207066
|
+
* @member {number|Long} assignmentId
|
|
207067
|
+
* @memberof CareAssessmentStarted
|
|
207068
|
+
* @instance
|
|
207069
|
+
*/
|
|
207070
|
+
CareAssessmentStarted.prototype.assignmentId = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
|
|
207071
|
+
|
|
207072
|
+
/**
|
|
207073
|
+
* CareAssessmentStarted activityId.
|
|
207074
|
+
* @member {string} activityId
|
|
207075
|
+
* @memberof CareAssessmentStarted
|
|
207076
|
+
* @instance
|
|
207077
|
+
*/
|
|
207078
|
+
CareAssessmentStarted.prototype.activityId = "";
|
|
207079
|
+
|
|
207080
|
+
/**
|
|
207081
|
+
* CareAssessmentStarted careAssessmentCadence.
|
|
207082
|
+
* @member {CareAssessmentCadence} careAssessmentCadence
|
|
207083
|
+
* @memberof CareAssessmentStarted
|
|
207084
|
+
* @instance
|
|
207085
|
+
*/
|
|
207086
|
+
CareAssessmentStarted.prototype.careAssessmentCadence = 0;
|
|
207087
|
+
|
|
207088
|
+
/**
|
|
207089
|
+
* CareAssessmentStarted assessmentContext.
|
|
207090
|
+
* @member {CareAssessmentContext|null|undefined} assessmentContext
|
|
207091
|
+
* @memberof CareAssessmentStarted
|
|
207092
|
+
* @instance
|
|
207093
|
+
*/
|
|
207094
|
+
CareAssessmentStarted.prototype.assessmentContext = null;
|
|
207095
|
+
|
|
207096
|
+
// OneOf field names bound to virtual getters and setters
|
|
207097
|
+
var $oneOfFields;
|
|
207098
|
+
|
|
207099
|
+
// Virtual OneOf for proto3 optional field
|
|
207100
|
+
Object.defineProperty(CareAssessmentStarted.prototype, "_assessmentContext", {
|
|
207101
|
+
get: $util.oneOfGetter($oneOfFields = ["assessmentContext"]),
|
|
207102
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
207103
|
+
});
|
|
207104
|
+
|
|
207105
|
+
/**
|
|
207106
|
+
* Creates a new CareAssessmentStarted instance using the specified properties.
|
|
207107
|
+
* @function create
|
|
207108
|
+
* @memberof CareAssessmentStarted
|
|
207109
|
+
* @static
|
|
207110
|
+
* @param {CareAssessmentStarted.$Properties=} [properties] Properties to set
|
|
207111
|
+
* @returns {CareAssessmentStarted} CareAssessmentStarted instance
|
|
207112
|
+
* @type {{
|
|
207113
|
+
* (properties: CareAssessmentStarted.$Shape): CareAssessmentStarted & CareAssessmentStarted.$Shape;
|
|
207114
|
+
* (properties?: CareAssessmentStarted.$Properties): CareAssessmentStarted;
|
|
207115
|
+
* }}
|
|
207116
|
+
*/
|
|
207117
|
+
CareAssessmentStarted.create = function create(properties) {
|
|
207118
|
+
return new CareAssessmentStarted(properties);
|
|
207119
|
+
};
|
|
207120
|
+
|
|
207121
|
+
/**
|
|
207122
|
+
* Encodes the specified CareAssessmentStarted message. Does not implicitly {@link CareAssessmentStarted.verify|verify} messages.
|
|
207123
|
+
* @function encode
|
|
207124
|
+
* @memberof CareAssessmentStarted
|
|
207125
|
+
* @static
|
|
207126
|
+
* @param {CareAssessmentStarted.$Properties} message CareAssessmentStarted message or plain object to encode
|
|
207127
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
207128
|
+
* @returns {$protobuf.Writer} Writer
|
|
207129
|
+
*/
|
|
207130
|
+
CareAssessmentStarted.encode = function encode(message, writer) {
|
|
207131
|
+
if (!writer)
|
|
207132
|
+
writer = $Writer.create();
|
|
207133
|
+
if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp"))
|
|
207134
|
+
writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.timestamp);
|
|
207135
|
+
if (message.careAssessmentType != null && Object.hasOwnProperty.call(message, "careAssessmentType"))
|
|
207136
|
+
writer.uint32(/* id 2, wireType 0 =*/16).int32(message.careAssessmentType);
|
|
207137
|
+
if (message.hsUserId != null && Object.hasOwnProperty.call(message, "hsUserId"))
|
|
207138
|
+
writer.uint32(/* id 3, wireType 2 =*/26).string(message.hsUserId);
|
|
207139
|
+
if (message.gingerUserId != null && Object.hasOwnProperty.call(message, "gingerUserId"))
|
|
207140
|
+
writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.gingerUserId);
|
|
207141
|
+
if (message.startedAtIsoDate != null && Object.hasOwnProperty.call(message, "startedAtIsoDate"))
|
|
207142
|
+
writer.uint32(/* id 5, wireType 2 =*/42).string(message.startedAtIsoDate);
|
|
207143
|
+
if (message.assignmentId != null && Object.hasOwnProperty.call(message, "assignmentId"))
|
|
207144
|
+
writer.uint32(/* id 6, wireType 0 =*/48).int64(message.assignmentId);
|
|
207145
|
+
if (message.activityId != null && Object.hasOwnProperty.call(message, "activityId"))
|
|
207146
|
+
writer.uint32(/* id 7, wireType 2 =*/58).string(message.activityId);
|
|
207147
|
+
if (message.careAssessmentCadence != null && Object.hasOwnProperty.call(message, "careAssessmentCadence"))
|
|
207148
|
+
writer.uint32(/* id 8, wireType 0 =*/64).int32(message.careAssessmentCadence);
|
|
207149
|
+
if (message.assessmentContext != null && Object.hasOwnProperty.call(message, "assessmentContext"))
|
|
207150
|
+
writer.uint32(/* id 9, wireType 0 =*/72).int32(message.assessmentContext);
|
|
207151
|
+
if (message.$unknowns != null && Object.hasOwnProperty.call(message, "$unknowns"))
|
|
207152
|
+
for (var i = 0; i < message.$unknowns.length; ++i)
|
|
207153
|
+
writer.raw(message.$unknowns[i]);
|
|
207154
|
+
return writer;
|
|
207155
|
+
};
|
|
207156
|
+
|
|
207157
|
+
/**
|
|
207158
|
+
* Encodes the specified CareAssessmentStarted message, length delimited. Does not implicitly {@link CareAssessmentStarted.verify|verify} messages.
|
|
207159
|
+
* @function encodeDelimited
|
|
207160
|
+
* @memberof CareAssessmentStarted
|
|
207161
|
+
* @static
|
|
207162
|
+
* @param {CareAssessmentStarted.$Properties} message CareAssessmentStarted message or plain object to encode
|
|
207163
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
207164
|
+
* @returns {$protobuf.Writer} Writer
|
|
207165
|
+
*/
|
|
207166
|
+
CareAssessmentStarted.encodeDelimited = function encodeDelimited(message, writer) {
|
|
207167
|
+
return this.encode(message, writer).ldelim();
|
|
207168
|
+
};
|
|
207169
|
+
|
|
207170
|
+
/**
|
|
207171
|
+
* Decodes a CareAssessmentStarted message from the specified reader or buffer.
|
|
207172
|
+
* @function decode
|
|
207173
|
+
* @memberof CareAssessmentStarted
|
|
207174
|
+
* @static
|
|
207175
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
207176
|
+
* @param {number} [length] Message length if known beforehand
|
|
207177
|
+
* @returns {CareAssessmentStarted & CareAssessmentStarted.$Shape} CareAssessmentStarted
|
|
207178
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
207179
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
207180
|
+
*/
|
|
207181
|
+
CareAssessmentStarted.decode = function decode(reader, length, _end, _depth, _target) {
|
|
207182
|
+
if (!(reader instanceof $Reader))
|
|
207183
|
+
reader = $Reader.create(reader);
|
|
207184
|
+
if (_depth === undefined)
|
|
207185
|
+
_depth = 0;
|
|
207186
|
+
if (_depth > $Reader.recursionLimit)
|
|
207187
|
+
throw Error("max depth exceeded");
|
|
207188
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = _target || new $root.CareAssessmentStarted(), value;
|
|
207189
|
+
while (reader.pos < end) {
|
|
207190
|
+
var start = reader.pos;
|
|
207191
|
+
var tag = reader.tag();
|
|
207192
|
+
if (tag === _end) {
|
|
207193
|
+
_end = undefined;
|
|
207194
|
+
break;
|
|
207195
|
+
}
|
|
207196
|
+
var wireType = tag & 7;
|
|
207197
|
+
switch (tag >>>= 3) {
|
|
207198
|
+
case 1: {
|
|
207199
|
+
if (wireType !== 0)
|
|
207200
|
+
break;
|
|
207201
|
+
if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0)
|
|
207202
|
+
message.timestamp = value;
|
|
207203
|
+
else
|
|
207204
|
+
delete message.timestamp;
|
|
207205
|
+
continue;
|
|
207206
|
+
}
|
|
207207
|
+
case 2: {
|
|
207208
|
+
if (wireType !== 0)
|
|
207209
|
+
break;
|
|
207210
|
+
if (value = reader.int32())
|
|
207211
|
+
message.careAssessmentType = value;
|
|
207212
|
+
else
|
|
207213
|
+
delete message.careAssessmentType;
|
|
207214
|
+
continue;
|
|
207215
|
+
}
|
|
207216
|
+
case 3: {
|
|
207217
|
+
if (wireType !== 2)
|
|
207218
|
+
break;
|
|
207219
|
+
if ((value = reader.string()).length)
|
|
207220
|
+
message.hsUserId = value;
|
|
207221
|
+
else
|
|
207222
|
+
delete message.hsUserId;
|
|
207223
|
+
continue;
|
|
207224
|
+
}
|
|
207225
|
+
case 4: {
|
|
207226
|
+
if (wireType !== 0)
|
|
207227
|
+
break;
|
|
207228
|
+
if (value = reader.uint32())
|
|
207229
|
+
message.gingerUserId = value;
|
|
207230
|
+
else
|
|
207231
|
+
delete message.gingerUserId;
|
|
207232
|
+
continue;
|
|
207233
|
+
}
|
|
207234
|
+
case 5: {
|
|
207235
|
+
if (wireType !== 2)
|
|
207236
|
+
break;
|
|
207237
|
+
if ((value = reader.string()).length)
|
|
207238
|
+
message.startedAtIsoDate = value;
|
|
207239
|
+
else
|
|
207240
|
+
delete message.startedAtIsoDate;
|
|
207241
|
+
continue;
|
|
207242
|
+
}
|
|
207243
|
+
case 6: {
|
|
207244
|
+
if (wireType !== 0)
|
|
207245
|
+
break;
|
|
207246
|
+
if (typeof (value = reader.int64()) === "object" ? value.low || value.high : value !== 0)
|
|
207247
|
+
message.assignmentId = value;
|
|
207248
|
+
else
|
|
207249
|
+
delete message.assignmentId;
|
|
207250
|
+
continue;
|
|
207251
|
+
}
|
|
207252
|
+
case 7: {
|
|
207253
|
+
if (wireType !== 2)
|
|
207254
|
+
break;
|
|
207255
|
+
if ((value = reader.string()).length)
|
|
207256
|
+
message.activityId = value;
|
|
207257
|
+
else
|
|
207258
|
+
delete message.activityId;
|
|
207259
|
+
continue;
|
|
207260
|
+
}
|
|
207261
|
+
case 8: {
|
|
207262
|
+
if (wireType !== 0)
|
|
207263
|
+
break;
|
|
207264
|
+
if (value = reader.int32())
|
|
207265
|
+
message.careAssessmentCadence = value;
|
|
207266
|
+
else
|
|
207267
|
+
delete message.careAssessmentCadence;
|
|
207268
|
+
continue;
|
|
207269
|
+
}
|
|
207270
|
+
case 9: {
|
|
207271
|
+
if (wireType !== 0)
|
|
207272
|
+
break;
|
|
207273
|
+
message.assessmentContext = reader.int32();
|
|
207274
|
+
message._assessmentContext = "assessmentContext";
|
|
207275
|
+
continue;
|
|
207276
|
+
}
|
|
207277
|
+
}
|
|
207278
|
+
reader.skipType(wireType, _depth, tag);
|
|
207279
|
+
$util.makeProp(message, "$unknowns", false);
|
|
207280
|
+
(message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos));
|
|
207281
|
+
}
|
|
207282
|
+
if (_end !== undefined)
|
|
207283
|
+
throw Error("missing end group");
|
|
207284
|
+
return message;
|
|
207285
|
+
};
|
|
207286
|
+
|
|
207287
|
+
/**
|
|
207288
|
+
* Decodes a CareAssessmentStarted message from the specified reader or buffer, length delimited.
|
|
207289
|
+
* @function decodeDelimited
|
|
207290
|
+
* @memberof CareAssessmentStarted
|
|
207291
|
+
* @static
|
|
207292
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
207293
|
+
* @returns {CareAssessmentStarted & CareAssessmentStarted.$Shape} CareAssessmentStarted
|
|
207294
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
207295
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
207296
|
+
*/
|
|
207297
|
+
CareAssessmentStarted.decodeDelimited = function decodeDelimited(reader) {
|
|
207298
|
+
if (!(reader instanceof $Reader))
|
|
207299
|
+
reader = new $Reader(reader);
|
|
207300
|
+
return this.decode(reader, reader.uint32());
|
|
207301
|
+
};
|
|
207302
|
+
|
|
207303
|
+
/**
|
|
207304
|
+
* Verifies a CareAssessmentStarted message.
|
|
207305
|
+
* @function verify
|
|
207306
|
+
* @memberof CareAssessmentStarted
|
|
207307
|
+
* @static
|
|
207308
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
207309
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
207310
|
+
*/
|
|
207311
|
+
CareAssessmentStarted.verify = function verify(message, _depth) {
|
|
207312
|
+
if (typeof message !== "object" || message === null)
|
|
207313
|
+
return "object expected";
|
|
207314
|
+
if (_depth === undefined)
|
|
207315
|
+
_depth = 0;
|
|
207316
|
+
if (_depth > $util.recursionLimit)
|
|
207317
|
+
return "max depth exceeded";
|
|
207318
|
+
var properties = {};
|
|
207319
|
+
if (message.timestamp != null && message.hasOwnProperty("timestamp"))
|
|
207320
|
+
if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high)))
|
|
207321
|
+
return "timestamp: integer|Long expected";
|
|
207322
|
+
if (message.careAssessmentType != null && message.hasOwnProperty("careAssessmentType"))
|
|
207323
|
+
switch (message.careAssessmentType) {
|
|
207324
|
+
default:
|
|
207325
|
+
return "careAssessmentType: enum value expected";
|
|
207326
|
+
case 0:
|
|
207327
|
+
case 1:
|
|
207328
|
+
case 2:
|
|
207329
|
+
case 3:
|
|
207330
|
+
case 4:
|
|
207331
|
+
case 5:
|
|
207332
|
+
break;
|
|
207333
|
+
}
|
|
207334
|
+
if (message.hsUserId != null && message.hasOwnProperty("hsUserId"))
|
|
207335
|
+
if (!$util.isString(message.hsUserId))
|
|
207336
|
+
return "hsUserId: string expected";
|
|
207337
|
+
if (message.gingerUserId != null && message.hasOwnProperty("gingerUserId"))
|
|
207338
|
+
if (!$util.isInteger(message.gingerUserId))
|
|
207339
|
+
return "gingerUserId: integer expected";
|
|
207340
|
+
if (message.startedAtIsoDate != null && message.hasOwnProperty("startedAtIsoDate"))
|
|
207341
|
+
if (!$util.isString(message.startedAtIsoDate))
|
|
207342
|
+
return "startedAtIsoDate: string expected";
|
|
207343
|
+
if (message.assignmentId != null && message.hasOwnProperty("assignmentId"))
|
|
207344
|
+
if (!$util.isInteger(message.assignmentId) && !(message.assignmentId && $util.isInteger(message.assignmentId.low) && $util.isInteger(message.assignmentId.high)))
|
|
207345
|
+
return "assignmentId: integer|Long expected";
|
|
207346
|
+
if (message.activityId != null && message.hasOwnProperty("activityId"))
|
|
207347
|
+
if (!$util.isString(message.activityId))
|
|
207348
|
+
return "activityId: string expected";
|
|
207349
|
+
if (message.careAssessmentCadence != null && message.hasOwnProperty("careAssessmentCadence"))
|
|
207350
|
+
switch (message.careAssessmentCadence) {
|
|
207351
|
+
default:
|
|
207352
|
+
return "careAssessmentCadence: enum value expected";
|
|
207353
|
+
case 0:
|
|
207354
|
+
case 1:
|
|
207355
|
+
case 2:
|
|
207356
|
+
case 3:
|
|
207357
|
+
case 4:
|
|
207358
|
+
break;
|
|
207359
|
+
}
|
|
207360
|
+
if (message.assessmentContext != null && message.hasOwnProperty("assessmentContext")) {
|
|
207361
|
+
properties._assessmentContext = 1;
|
|
207362
|
+
switch (message.assessmentContext) {
|
|
207363
|
+
default:
|
|
207364
|
+
return "assessmentContext: enum value expected";
|
|
207365
|
+
case 0:
|
|
207366
|
+
case 1:
|
|
207367
|
+
break;
|
|
207368
|
+
}
|
|
207369
|
+
}
|
|
207370
|
+
return null;
|
|
207371
|
+
};
|
|
207372
|
+
|
|
207373
|
+
/**
|
|
207374
|
+
* Creates a CareAssessmentStarted message from a plain object. Also converts values to their respective internal types.
|
|
207375
|
+
* @function fromObject
|
|
207376
|
+
* @memberof CareAssessmentStarted
|
|
207377
|
+
* @static
|
|
207378
|
+
* @param {Object.<string,*>} object Plain object
|
|
207379
|
+
* @returns {CareAssessmentStarted} CareAssessmentStarted
|
|
207380
|
+
*/
|
|
207381
|
+
CareAssessmentStarted.fromObject = function fromObject(object, _depth) {
|
|
207382
|
+
if (object instanceof $root.CareAssessmentStarted)
|
|
207383
|
+
return object;
|
|
207384
|
+
if (_depth === undefined)
|
|
207385
|
+
_depth = 0;
|
|
207386
|
+
if (_depth > $util.recursionLimit)
|
|
207387
|
+
throw Error("max depth exceeded");
|
|
207388
|
+
var message = new $root.CareAssessmentStarted();
|
|
207389
|
+
if (object.timestamp != null)
|
|
207390
|
+
if (typeof object.timestamp === "object" ? object.timestamp.low || object.timestamp.high : Number(object.timestamp) !== 0)
|
|
207391
|
+
if ($util.Long)
|
|
207392
|
+
(message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true;
|
|
207393
|
+
else if (typeof object.timestamp === "string")
|
|
207394
|
+
message.timestamp = parseInt(object.timestamp, 10);
|
|
207395
|
+
else if (typeof object.timestamp === "number")
|
|
207396
|
+
message.timestamp = object.timestamp;
|
|
207397
|
+
else if (typeof object.timestamp === "object")
|
|
207398
|
+
message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(true);
|
|
207399
|
+
if (object.careAssessmentType !== 0 && (typeof object.careAssessmentType !== "string" || $root.CareAssessmentType[object.careAssessmentType] !== 0))
|
|
207400
|
+
switch (object.careAssessmentType) {
|
|
207401
|
+
default:
|
|
207402
|
+
if (typeof object.careAssessmentType === "number") {
|
|
207403
|
+
message.careAssessmentType = object.careAssessmentType;
|
|
207404
|
+
break;
|
|
207405
|
+
}
|
|
207406
|
+
break;
|
|
207407
|
+
case "CARE_ASSESSMENT_TYPE_UNKNOWN":
|
|
207408
|
+
case 0:
|
|
207409
|
+
message.careAssessmentType = 0;
|
|
207410
|
+
break;
|
|
207411
|
+
case "CARE_ASSESSMENT_TYPE_PHQ9":
|
|
207412
|
+
case 1:
|
|
207413
|
+
message.careAssessmentType = 1;
|
|
207414
|
+
break;
|
|
207415
|
+
case "CARE_ASSESSMENT_TYPE_GAD7":
|
|
207416
|
+
case 2:
|
|
207417
|
+
message.careAssessmentType = 2;
|
|
207418
|
+
break;
|
|
207419
|
+
case "CARE_ASSESSMENT_TYPE_PHQ4":
|
|
207420
|
+
case 3:
|
|
207421
|
+
message.careAssessmentType = 3;
|
|
207422
|
+
break;
|
|
207423
|
+
case "CARE_ASSESSMENT_TYPE_PSS":
|
|
207424
|
+
case 4:
|
|
207425
|
+
message.careAssessmentType = 4;
|
|
207426
|
+
break;
|
|
207427
|
+
case "CARE_ASSESSMENT_TYPE_PGIC":
|
|
207428
|
+
case 5:
|
|
207429
|
+
message.careAssessmentType = 5;
|
|
207430
|
+
break;
|
|
207431
|
+
}
|
|
207432
|
+
if (object.hsUserId != null)
|
|
207433
|
+
if (typeof object.hsUserId !== "string" || object.hsUserId.length)
|
|
207434
|
+
message.hsUserId = String(object.hsUserId);
|
|
207435
|
+
if (object.gingerUserId != null)
|
|
207436
|
+
if (Number(object.gingerUserId) !== 0)
|
|
207437
|
+
message.gingerUserId = object.gingerUserId >>> 0;
|
|
207438
|
+
if (object.startedAtIsoDate != null)
|
|
207439
|
+
if (typeof object.startedAtIsoDate !== "string" || object.startedAtIsoDate.length)
|
|
207440
|
+
message.startedAtIsoDate = String(object.startedAtIsoDate);
|
|
207441
|
+
if (object.assignmentId != null)
|
|
207442
|
+
if (typeof object.assignmentId === "object" ? object.assignmentId.low || object.assignmentId.high : Number(object.assignmentId) !== 0)
|
|
207443
|
+
if ($util.Long)
|
|
207444
|
+
(message.assignmentId = $util.Long.fromValue(object.assignmentId)).unsigned = false;
|
|
207445
|
+
else if (typeof object.assignmentId === "string")
|
|
207446
|
+
message.assignmentId = parseInt(object.assignmentId, 10);
|
|
207447
|
+
else if (typeof object.assignmentId === "number")
|
|
207448
|
+
message.assignmentId = object.assignmentId;
|
|
207449
|
+
else if (typeof object.assignmentId === "object")
|
|
207450
|
+
message.assignmentId = new $util.LongBits(object.assignmentId.low >>> 0, object.assignmentId.high >>> 0).toNumber();
|
|
207451
|
+
if (object.activityId != null)
|
|
207452
|
+
if (typeof object.activityId !== "string" || object.activityId.length)
|
|
207453
|
+
message.activityId = String(object.activityId);
|
|
207454
|
+
if (object.careAssessmentCadence !== 0 && (typeof object.careAssessmentCadence !== "string" || $root.CareAssessmentCadence[object.careAssessmentCadence] !== 0))
|
|
207455
|
+
switch (object.careAssessmentCadence) {
|
|
207456
|
+
default:
|
|
207457
|
+
if (typeof object.careAssessmentCadence === "number") {
|
|
207458
|
+
message.careAssessmentCadence = object.careAssessmentCadence;
|
|
207459
|
+
break;
|
|
207460
|
+
}
|
|
207461
|
+
break;
|
|
207462
|
+
case "CARE_ASSESSMENT_CADENCE_UNKNOWN":
|
|
207463
|
+
case 0:
|
|
207464
|
+
message.careAssessmentCadence = 0;
|
|
207465
|
+
break;
|
|
207466
|
+
case "CARE_ASSESSMENT_CADENCE_ONBOARDING":
|
|
207467
|
+
case 1:
|
|
207468
|
+
message.careAssessmentCadence = 1;
|
|
207469
|
+
break;
|
|
207470
|
+
case "CARE_ASSESSMENT_CADENCE_QUARTERLY":
|
|
207471
|
+
case 2:
|
|
207472
|
+
message.careAssessmentCadence = 2;
|
|
207473
|
+
break;
|
|
207474
|
+
case "CARE_ASSESSMENT_CADENCE_END_OF_PERIOD":
|
|
207475
|
+
case 3:
|
|
207476
|
+
message.careAssessmentCadence = 3;
|
|
207477
|
+
break;
|
|
207478
|
+
case "CARE_ASSESSMENT_CADENCE_EARLY_EXIT":
|
|
207479
|
+
case 4:
|
|
207480
|
+
message.careAssessmentCadence = 4;
|
|
207481
|
+
break;
|
|
207482
|
+
}
|
|
207483
|
+
switch (object.assessmentContext) {
|
|
207484
|
+
default:
|
|
207485
|
+
if (typeof object.assessmentContext === "number") {
|
|
207486
|
+
message.assessmentContext = object.assessmentContext;
|
|
207487
|
+
break;
|
|
207488
|
+
}
|
|
207489
|
+
break;
|
|
207490
|
+
case "CARE_ASSESSMENT_CONTEXT_UNKNOWN":
|
|
207491
|
+
case 0:
|
|
207492
|
+
message.assessmentContext = 0;
|
|
207493
|
+
break;
|
|
207494
|
+
case "CARE_ASSESSMENT_CONTEXT_CMS":
|
|
207495
|
+
case 1:
|
|
207496
|
+
message.assessmentContext = 1;
|
|
207497
|
+
break;
|
|
207498
|
+
}
|
|
207499
|
+
return message;
|
|
207500
|
+
};
|
|
207501
|
+
|
|
207502
|
+
/**
|
|
207503
|
+
* Creates a plain object from a CareAssessmentStarted message. Also converts values to other types if specified.
|
|
207504
|
+
* @function toObject
|
|
207505
|
+
* @memberof CareAssessmentStarted
|
|
207506
|
+
* @static
|
|
207507
|
+
* @param {CareAssessmentStarted} message CareAssessmentStarted
|
|
207508
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
207509
|
+
* @returns {Object.<string,*>} Plain object
|
|
207510
|
+
*/
|
|
207511
|
+
CareAssessmentStarted.toObject = function toObject(message, options) {
|
|
207512
|
+
if (!options)
|
|
207513
|
+
options = {};
|
|
207514
|
+
var object = {};
|
|
207515
|
+
if (options.defaults) {
|
|
207516
|
+
if ($util.Long) {
|
|
207517
|
+
var long = new $util.Long(0, 0, true);
|
|
207518
|
+
object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long;
|
|
207519
|
+
} else
|
|
207520
|
+
object.timestamp = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0;
|
|
207521
|
+
object.careAssessmentType = options.enums === String ? "CARE_ASSESSMENT_TYPE_UNKNOWN" : 0;
|
|
207522
|
+
object.hsUserId = "";
|
|
207523
|
+
object.gingerUserId = 0;
|
|
207524
|
+
object.startedAtIsoDate = "";
|
|
207525
|
+
if ($util.Long) {
|
|
207526
|
+
var long = new $util.Long(0, 0, false);
|
|
207527
|
+
object.assignmentId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long;
|
|
207528
|
+
} else
|
|
207529
|
+
object.assignmentId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0;
|
|
207530
|
+
object.activityId = "";
|
|
207531
|
+
object.careAssessmentCadence = options.enums === String ? "CARE_ASSESSMENT_CADENCE_UNKNOWN" : 0;
|
|
207532
|
+
}
|
|
207533
|
+
if (message.timestamp != null && message.hasOwnProperty("timestamp"))
|
|
207534
|
+
if (typeof BigInt !== "undefined" && options.longs === BigInt)
|
|
207535
|
+
object.timestamp = typeof message.timestamp === "number" ? BigInt(message.timestamp) : $util.Long.fromBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0, true).toBigInt();
|
|
207536
|
+
else if (typeof message.timestamp === "number")
|
|
207537
|
+
object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp;
|
|
207538
|
+
else
|
|
207539
|
+
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;
|
|
207540
|
+
if (message.careAssessmentType != null && message.hasOwnProperty("careAssessmentType"))
|
|
207541
|
+
object.careAssessmentType = options.enums === String ? $root.CareAssessmentType[message.careAssessmentType] === undefined ? message.careAssessmentType : $root.CareAssessmentType[message.careAssessmentType] : message.careAssessmentType;
|
|
207542
|
+
if (message.hsUserId != null && message.hasOwnProperty("hsUserId"))
|
|
207543
|
+
object.hsUserId = message.hsUserId;
|
|
207544
|
+
if (message.gingerUserId != null && message.hasOwnProperty("gingerUserId"))
|
|
207545
|
+
object.gingerUserId = message.gingerUserId;
|
|
207546
|
+
if (message.startedAtIsoDate != null && message.hasOwnProperty("startedAtIsoDate"))
|
|
207547
|
+
object.startedAtIsoDate = message.startedAtIsoDate;
|
|
207548
|
+
if (message.assignmentId != null && message.hasOwnProperty("assignmentId"))
|
|
207549
|
+
if (typeof BigInt !== "undefined" && options.longs === BigInt)
|
|
207550
|
+
object.assignmentId = typeof message.assignmentId === "number" ? BigInt(message.assignmentId) : $util.Long.fromBits(message.assignmentId.low >>> 0, message.assignmentId.high >>> 0, false).toBigInt();
|
|
207551
|
+
else if (typeof message.assignmentId === "number")
|
|
207552
|
+
object.assignmentId = options.longs === String ? String(message.assignmentId) : message.assignmentId;
|
|
207553
|
+
else
|
|
207554
|
+
object.assignmentId = options.longs === String ? $util.Long.prototype.toString.call(message.assignmentId) : options.longs === Number ? new $util.LongBits(message.assignmentId.low >>> 0, message.assignmentId.high >>> 0).toNumber() : message.assignmentId;
|
|
207555
|
+
if (message.activityId != null && message.hasOwnProperty("activityId"))
|
|
207556
|
+
object.activityId = message.activityId;
|
|
207557
|
+
if (message.careAssessmentCadence != null && message.hasOwnProperty("careAssessmentCadence"))
|
|
207558
|
+
object.careAssessmentCadence = options.enums === String ? $root.CareAssessmentCadence[message.careAssessmentCadence] === undefined ? message.careAssessmentCadence : $root.CareAssessmentCadence[message.careAssessmentCadence] : message.careAssessmentCadence;
|
|
207559
|
+
if (message.assessmentContext != null && message.hasOwnProperty("assessmentContext")) {
|
|
207560
|
+
object.assessmentContext = options.enums === String ? $root.CareAssessmentContext[message.assessmentContext] === undefined ? message.assessmentContext : $root.CareAssessmentContext[message.assessmentContext] : message.assessmentContext;
|
|
207561
|
+
if (options.oneofs)
|
|
207562
|
+
object._assessmentContext = "assessmentContext";
|
|
207563
|
+
}
|
|
207564
|
+
return object;
|
|
207565
|
+
};
|
|
207566
|
+
|
|
207567
|
+
/**
|
|
207568
|
+
* Converts this CareAssessmentStarted to JSON.
|
|
207569
|
+
* @function toJSON
|
|
207570
|
+
* @memberof CareAssessmentStarted
|
|
207571
|
+
* @instance
|
|
207572
|
+
* @returns {Object.<string,*>} JSON object
|
|
207573
|
+
*/
|
|
207574
|
+
CareAssessmentStarted.prototype.toJSON = function toJSON() {
|
|
207575
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
207576
|
+
};
|
|
207577
|
+
|
|
207578
|
+
/**
|
|
207579
|
+
* Gets the type url for CareAssessmentStarted
|
|
207580
|
+
* @function getTypeUrl
|
|
207581
|
+
* @memberof CareAssessmentStarted
|
|
207582
|
+
* @static
|
|
207583
|
+
* @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"`
|
|
207584
|
+
* @returns {string} The type url
|
|
207585
|
+
*/
|
|
207586
|
+
CareAssessmentStarted.getTypeUrl = function getTypeUrl(prefix) {
|
|
207587
|
+
if (prefix === undefined)
|
|
207588
|
+
prefix = "type.googleapis.com";
|
|
207589
|
+
return prefix + "/CareAssessmentStarted";
|
|
207590
|
+
};
|
|
207591
|
+
|
|
207592
|
+
return CareAssessmentStarted;
|
|
207593
|
+
})();
|
|
207594
|
+
|
|
207595
|
+
$root.CareAssessmentCompleted = (function() {
|
|
207596
|
+
|
|
207597
|
+
/**
|
|
207598
|
+
* Properties of a CareAssessmentCompleted.
|
|
207599
|
+
* @typedef {Object} CareAssessmentCompleted.$Properties
|
|
207600
|
+
* @property {number|Long|null} [timestamp] CareAssessmentCompleted timestamp
|
|
207601
|
+
* @property {CareAssessmentType|null} [careAssessmentType] CareAssessmentCompleted careAssessmentType
|
|
207602
|
+
* @property {string|null} [hsUserId] CareAssessmentCompleted hsUserId
|
|
207603
|
+
* @property {number|null} [gingerUserId] CareAssessmentCompleted gingerUserId
|
|
207604
|
+
* @property {string|null} [completedAtIsoDate] CareAssessmentCompleted completedAtIsoDate
|
|
207605
|
+
* @property {number|Long|null} [assignmentId] CareAssessmentCompleted assignmentId
|
|
207606
|
+
* @property {string|null} [activityId] CareAssessmentCompleted activityId
|
|
207607
|
+
* @property {CareAssessmentCadence|null} [careAssessmentCadence] CareAssessmentCompleted careAssessmentCadence
|
|
207608
|
+
* @property {CareAssessmentContext|null} [assessmentContext] CareAssessmentCompleted assessmentContext
|
|
207609
|
+
* @property {Array.<AssessmentQuestionResponse.$Properties>|null} [responses] CareAssessmentCompleted responses
|
|
207610
|
+
* @property {number|null} [totalScore] CareAssessmentCompleted totalScore
|
|
207611
|
+
* @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
|
|
207612
|
+
*/
|
|
207613
|
+
|
|
207614
|
+
/**
|
|
207615
|
+
* Properties of a CareAssessmentCompleted.
|
|
207616
|
+
* @name ICareAssessmentCompleted
|
|
207617
|
+
* @interface ICareAssessmentCompleted
|
|
207618
|
+
* @augments CareAssessmentCompleted.$Properties
|
|
207619
|
+
* @deprecated Use CareAssessmentCompleted.$Properties instead.
|
|
207620
|
+
*/
|
|
207621
|
+
|
|
207622
|
+
/**
|
|
207623
|
+
* Shape of a CareAssessmentCompleted.
|
|
207624
|
+
* @typedef {CareAssessmentCompleted.$Properties} CareAssessmentCompleted.$Shape
|
|
207625
|
+
*/
|
|
207626
|
+
|
|
207627
|
+
/**
|
|
207628
|
+
* Constructs a new CareAssessmentCompleted.
|
|
207629
|
+
* @name CareAssessmentCompleted
|
|
207630
|
+
* @classdesc Represents a CareAssessmentCompleted.
|
|
207631
|
+
* @constructor
|
|
207632
|
+
* @param {CareAssessmentCompleted.$Properties=} [properties] Properties to set
|
|
207633
|
+
* @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
|
|
207634
|
+
*/
|
|
207635
|
+
function CareAssessmentCompleted(properties) {
|
|
207636
|
+
this.responses = [];
|
|
207637
|
+
if (properties)
|
|
207638
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
207639
|
+
if (properties[keys[i]] != null && keys[i] !== "__proto__")
|
|
207640
|
+
this[keys[i]] = properties[keys[i]];
|
|
207641
|
+
}
|
|
207642
|
+
|
|
207643
|
+
/**
|
|
207644
|
+
* CareAssessmentCompleted timestamp.
|
|
207645
|
+
* @member {number|Long} timestamp
|
|
207646
|
+
* @memberof CareAssessmentCompleted
|
|
207647
|
+
* @instance
|
|
207648
|
+
*/
|
|
207649
|
+
CareAssessmentCompleted.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
207650
|
+
|
|
207651
|
+
/**
|
|
207652
|
+
* CareAssessmentCompleted careAssessmentType.
|
|
207653
|
+
* @member {CareAssessmentType} careAssessmentType
|
|
207654
|
+
* @memberof CareAssessmentCompleted
|
|
207655
|
+
* @instance
|
|
207656
|
+
*/
|
|
207657
|
+
CareAssessmentCompleted.prototype.careAssessmentType = 0;
|
|
207658
|
+
|
|
207659
|
+
/**
|
|
207660
|
+
* CareAssessmentCompleted hsUserId.
|
|
207661
|
+
* @member {string} hsUserId
|
|
207662
|
+
* @memberof CareAssessmentCompleted
|
|
207663
|
+
* @instance
|
|
207664
|
+
*/
|
|
207665
|
+
CareAssessmentCompleted.prototype.hsUserId = "";
|
|
207666
|
+
|
|
207667
|
+
/**
|
|
207668
|
+
* CareAssessmentCompleted gingerUserId.
|
|
207669
|
+
* @member {number} gingerUserId
|
|
207670
|
+
* @memberof CareAssessmentCompleted
|
|
207671
|
+
* @instance
|
|
207672
|
+
*/
|
|
207673
|
+
CareAssessmentCompleted.prototype.gingerUserId = 0;
|
|
207674
|
+
|
|
207675
|
+
/**
|
|
207676
|
+
* CareAssessmentCompleted completedAtIsoDate.
|
|
207677
|
+
* @member {string} completedAtIsoDate
|
|
207678
|
+
* @memberof CareAssessmentCompleted
|
|
207679
|
+
* @instance
|
|
207680
|
+
*/
|
|
207681
|
+
CareAssessmentCompleted.prototype.completedAtIsoDate = "";
|
|
207682
|
+
|
|
207683
|
+
/**
|
|
207684
|
+
* CareAssessmentCompleted assignmentId.
|
|
207685
|
+
* @member {number|Long} assignmentId
|
|
207686
|
+
* @memberof CareAssessmentCompleted
|
|
207687
|
+
* @instance
|
|
207688
|
+
*/
|
|
207689
|
+
CareAssessmentCompleted.prototype.assignmentId = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
|
|
207690
|
+
|
|
207691
|
+
/**
|
|
207692
|
+
* CareAssessmentCompleted activityId.
|
|
207693
|
+
* @member {string} activityId
|
|
207694
|
+
* @memberof CareAssessmentCompleted
|
|
207695
|
+
* @instance
|
|
207696
|
+
*/
|
|
207697
|
+
CareAssessmentCompleted.prototype.activityId = "";
|
|
207698
|
+
|
|
207699
|
+
/**
|
|
207700
|
+
* CareAssessmentCompleted careAssessmentCadence.
|
|
207701
|
+
* @member {CareAssessmentCadence} careAssessmentCadence
|
|
207702
|
+
* @memberof CareAssessmentCompleted
|
|
207703
|
+
* @instance
|
|
207704
|
+
*/
|
|
207705
|
+
CareAssessmentCompleted.prototype.careAssessmentCadence = 0;
|
|
207706
|
+
|
|
207707
|
+
/**
|
|
207708
|
+
* CareAssessmentCompleted assessmentContext.
|
|
207709
|
+
* @member {CareAssessmentContext|null|undefined} assessmentContext
|
|
207710
|
+
* @memberof CareAssessmentCompleted
|
|
207711
|
+
* @instance
|
|
207712
|
+
*/
|
|
207713
|
+
CareAssessmentCompleted.prototype.assessmentContext = null;
|
|
207714
|
+
|
|
207715
|
+
/**
|
|
207716
|
+
* CareAssessmentCompleted responses.
|
|
207717
|
+
* @member {Array.<AssessmentQuestionResponse.$Properties>} responses
|
|
207718
|
+
* @memberof CareAssessmentCompleted
|
|
207719
|
+
* @instance
|
|
207720
|
+
*/
|
|
207721
|
+
CareAssessmentCompleted.prototype.responses = $util.emptyArray;
|
|
207722
|
+
|
|
207723
|
+
/**
|
|
207724
|
+
* CareAssessmentCompleted totalScore.
|
|
207725
|
+
* @member {number} totalScore
|
|
207726
|
+
* @memberof CareAssessmentCompleted
|
|
207727
|
+
* @instance
|
|
207728
|
+
*/
|
|
207729
|
+
CareAssessmentCompleted.prototype.totalScore = 0;
|
|
207730
|
+
|
|
207731
|
+
// OneOf field names bound to virtual getters and setters
|
|
207732
|
+
var $oneOfFields;
|
|
207733
|
+
|
|
207734
|
+
// Virtual OneOf for proto3 optional field
|
|
207735
|
+
Object.defineProperty(CareAssessmentCompleted.prototype, "_assessmentContext", {
|
|
207736
|
+
get: $util.oneOfGetter($oneOfFields = ["assessmentContext"]),
|
|
207737
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
207738
|
+
});
|
|
207739
|
+
|
|
207740
|
+
/**
|
|
207741
|
+
* Creates a new CareAssessmentCompleted instance using the specified properties.
|
|
207742
|
+
* @function create
|
|
207743
|
+
* @memberof CareAssessmentCompleted
|
|
207744
|
+
* @static
|
|
207745
|
+
* @param {CareAssessmentCompleted.$Properties=} [properties] Properties to set
|
|
207746
|
+
* @returns {CareAssessmentCompleted} CareAssessmentCompleted instance
|
|
207747
|
+
* @type {{
|
|
207748
|
+
* (properties: CareAssessmentCompleted.$Shape): CareAssessmentCompleted & CareAssessmentCompleted.$Shape;
|
|
207749
|
+
* (properties?: CareAssessmentCompleted.$Properties): CareAssessmentCompleted;
|
|
207750
|
+
* }}
|
|
207751
|
+
*/
|
|
207752
|
+
CareAssessmentCompleted.create = function create(properties) {
|
|
207753
|
+
return new CareAssessmentCompleted(properties);
|
|
207754
|
+
};
|
|
207755
|
+
|
|
207756
|
+
/**
|
|
207757
|
+
* Encodes the specified CareAssessmentCompleted message. Does not implicitly {@link CareAssessmentCompleted.verify|verify} messages.
|
|
207758
|
+
* @function encode
|
|
207759
|
+
* @memberof CareAssessmentCompleted
|
|
207760
|
+
* @static
|
|
207761
|
+
* @param {CareAssessmentCompleted.$Properties} message CareAssessmentCompleted message or plain object to encode
|
|
207762
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
207763
|
+
* @returns {$protobuf.Writer} Writer
|
|
207764
|
+
*/
|
|
207765
|
+
CareAssessmentCompleted.encode = function encode(message, writer) {
|
|
207766
|
+
if (!writer)
|
|
207767
|
+
writer = $Writer.create();
|
|
207768
|
+
if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp"))
|
|
207769
|
+
writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.timestamp);
|
|
207770
|
+
if (message.careAssessmentType != null && Object.hasOwnProperty.call(message, "careAssessmentType"))
|
|
207771
|
+
writer.uint32(/* id 2, wireType 0 =*/16).int32(message.careAssessmentType);
|
|
207772
|
+
if (message.hsUserId != null && Object.hasOwnProperty.call(message, "hsUserId"))
|
|
207773
|
+
writer.uint32(/* id 3, wireType 2 =*/26).string(message.hsUserId);
|
|
207774
|
+
if (message.gingerUserId != null && Object.hasOwnProperty.call(message, "gingerUserId"))
|
|
207775
|
+
writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.gingerUserId);
|
|
207776
|
+
if (message.completedAtIsoDate != null && Object.hasOwnProperty.call(message, "completedAtIsoDate"))
|
|
207777
|
+
writer.uint32(/* id 5, wireType 2 =*/42).string(message.completedAtIsoDate);
|
|
207778
|
+
if (message.assignmentId != null && Object.hasOwnProperty.call(message, "assignmentId"))
|
|
207779
|
+
writer.uint32(/* id 6, wireType 0 =*/48).int64(message.assignmentId);
|
|
207780
|
+
if (message.activityId != null && Object.hasOwnProperty.call(message, "activityId"))
|
|
207781
|
+
writer.uint32(/* id 7, wireType 2 =*/58).string(message.activityId);
|
|
207782
|
+
if (message.careAssessmentCadence != null && Object.hasOwnProperty.call(message, "careAssessmentCadence"))
|
|
207783
|
+
writer.uint32(/* id 8, wireType 0 =*/64).int32(message.careAssessmentCadence);
|
|
207784
|
+
if (message.assessmentContext != null && Object.hasOwnProperty.call(message, "assessmentContext"))
|
|
207785
|
+
writer.uint32(/* id 9, wireType 0 =*/72).int32(message.assessmentContext);
|
|
207786
|
+
if (message.responses != null && message.responses.length)
|
|
207787
|
+
for (var i = 0; i < message.responses.length; ++i)
|
|
207788
|
+
$root.AssessmentQuestionResponse.encode(message.responses[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
|
|
207789
|
+
if (message.totalScore != null && Object.hasOwnProperty.call(message, "totalScore"))
|
|
207790
|
+
writer.uint32(/* id 11, wireType 0 =*/88).uint32(message.totalScore);
|
|
207791
|
+
if (message.$unknowns != null && Object.hasOwnProperty.call(message, "$unknowns"))
|
|
207792
|
+
for (var i = 0; i < message.$unknowns.length; ++i)
|
|
207793
|
+
writer.raw(message.$unknowns[i]);
|
|
207794
|
+
return writer;
|
|
207795
|
+
};
|
|
207796
|
+
|
|
207797
|
+
/**
|
|
207798
|
+
* Encodes the specified CareAssessmentCompleted message, length delimited. Does not implicitly {@link CareAssessmentCompleted.verify|verify} messages.
|
|
207799
|
+
* @function encodeDelimited
|
|
207800
|
+
* @memberof CareAssessmentCompleted
|
|
207801
|
+
* @static
|
|
207802
|
+
* @param {CareAssessmentCompleted.$Properties} message CareAssessmentCompleted message or plain object to encode
|
|
207803
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
207804
|
+
* @returns {$protobuf.Writer} Writer
|
|
207805
|
+
*/
|
|
207806
|
+
CareAssessmentCompleted.encodeDelimited = function encodeDelimited(message, writer) {
|
|
207807
|
+
return this.encode(message, writer).ldelim();
|
|
207808
|
+
};
|
|
207809
|
+
|
|
207810
|
+
/**
|
|
207811
|
+
* Decodes a CareAssessmentCompleted message from the specified reader or buffer.
|
|
207812
|
+
* @function decode
|
|
207813
|
+
* @memberof CareAssessmentCompleted
|
|
207814
|
+
* @static
|
|
207815
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
207816
|
+
* @param {number} [length] Message length if known beforehand
|
|
207817
|
+
* @returns {CareAssessmentCompleted & CareAssessmentCompleted.$Shape} CareAssessmentCompleted
|
|
207818
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
207819
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
207820
|
+
*/
|
|
207821
|
+
CareAssessmentCompleted.decode = function decode(reader, length, _end, _depth, _target) {
|
|
207822
|
+
if (!(reader instanceof $Reader))
|
|
207823
|
+
reader = $Reader.create(reader);
|
|
207824
|
+
if (_depth === undefined)
|
|
207825
|
+
_depth = 0;
|
|
207826
|
+
if (_depth > $Reader.recursionLimit)
|
|
207827
|
+
throw Error("max depth exceeded");
|
|
207828
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = _target || new $root.CareAssessmentCompleted(), value;
|
|
207829
|
+
while (reader.pos < end) {
|
|
207830
|
+
var start = reader.pos;
|
|
207831
|
+
var tag = reader.tag();
|
|
207832
|
+
if (tag === _end) {
|
|
207833
|
+
_end = undefined;
|
|
207834
|
+
break;
|
|
207835
|
+
}
|
|
207836
|
+
var wireType = tag & 7;
|
|
207837
|
+
switch (tag >>>= 3) {
|
|
207838
|
+
case 1: {
|
|
207839
|
+
if (wireType !== 0)
|
|
207840
|
+
break;
|
|
207841
|
+
if (typeof (value = reader.uint64()) === "object" ? value.low || value.high : value !== 0)
|
|
207842
|
+
message.timestamp = value;
|
|
207843
|
+
else
|
|
207844
|
+
delete message.timestamp;
|
|
207845
|
+
continue;
|
|
207846
|
+
}
|
|
207847
|
+
case 2: {
|
|
207848
|
+
if (wireType !== 0)
|
|
207849
|
+
break;
|
|
207850
|
+
if (value = reader.int32())
|
|
207851
|
+
message.careAssessmentType = value;
|
|
207852
|
+
else
|
|
207853
|
+
delete message.careAssessmentType;
|
|
207854
|
+
continue;
|
|
207855
|
+
}
|
|
207856
|
+
case 3: {
|
|
207857
|
+
if (wireType !== 2)
|
|
207858
|
+
break;
|
|
207859
|
+
if ((value = reader.string()).length)
|
|
207860
|
+
message.hsUserId = value;
|
|
207861
|
+
else
|
|
207862
|
+
delete message.hsUserId;
|
|
207863
|
+
continue;
|
|
207864
|
+
}
|
|
207865
|
+
case 4: {
|
|
207866
|
+
if (wireType !== 0)
|
|
207867
|
+
break;
|
|
207868
|
+
if (value = reader.uint32())
|
|
207869
|
+
message.gingerUserId = value;
|
|
207870
|
+
else
|
|
207871
|
+
delete message.gingerUserId;
|
|
207872
|
+
continue;
|
|
207873
|
+
}
|
|
207874
|
+
case 5: {
|
|
207875
|
+
if (wireType !== 2)
|
|
207876
|
+
break;
|
|
207877
|
+
if ((value = reader.string()).length)
|
|
207878
|
+
message.completedAtIsoDate = value;
|
|
207879
|
+
else
|
|
207880
|
+
delete message.completedAtIsoDate;
|
|
207881
|
+
continue;
|
|
207882
|
+
}
|
|
207883
|
+
case 6: {
|
|
207884
|
+
if (wireType !== 0)
|
|
207885
|
+
break;
|
|
207886
|
+
if (typeof (value = reader.int64()) === "object" ? value.low || value.high : value !== 0)
|
|
207887
|
+
message.assignmentId = value;
|
|
207888
|
+
else
|
|
207889
|
+
delete message.assignmentId;
|
|
207890
|
+
continue;
|
|
207891
|
+
}
|
|
207892
|
+
case 7: {
|
|
207893
|
+
if (wireType !== 2)
|
|
207894
|
+
break;
|
|
207895
|
+
if ((value = reader.string()).length)
|
|
207896
|
+
message.activityId = value;
|
|
207897
|
+
else
|
|
207898
|
+
delete message.activityId;
|
|
207899
|
+
continue;
|
|
207900
|
+
}
|
|
207901
|
+
case 8: {
|
|
207902
|
+
if (wireType !== 0)
|
|
207903
|
+
break;
|
|
207904
|
+
if (value = reader.int32())
|
|
207905
|
+
message.careAssessmentCadence = value;
|
|
207906
|
+
else
|
|
207907
|
+
delete message.careAssessmentCadence;
|
|
207908
|
+
continue;
|
|
207909
|
+
}
|
|
207910
|
+
case 9: {
|
|
207911
|
+
if (wireType !== 0)
|
|
207912
|
+
break;
|
|
207913
|
+
message.assessmentContext = reader.int32();
|
|
207914
|
+
message._assessmentContext = "assessmentContext";
|
|
207915
|
+
continue;
|
|
207916
|
+
}
|
|
207917
|
+
case 10: {
|
|
207918
|
+
if (wireType !== 2)
|
|
207919
|
+
break;
|
|
207920
|
+
if (!(message.responses && message.responses.length))
|
|
207921
|
+
message.responses = [];
|
|
207922
|
+
message.responses.push($root.AssessmentQuestionResponse.decode(reader, reader.uint32(), undefined, _depth + 1));
|
|
207923
|
+
continue;
|
|
207924
|
+
}
|
|
207925
|
+
case 11: {
|
|
207926
|
+
if (wireType !== 0)
|
|
207927
|
+
break;
|
|
207928
|
+
if (value = reader.uint32())
|
|
207929
|
+
message.totalScore = value;
|
|
207930
|
+
else
|
|
207931
|
+
delete message.totalScore;
|
|
207932
|
+
continue;
|
|
207933
|
+
}
|
|
207934
|
+
}
|
|
207935
|
+
reader.skipType(wireType, _depth, tag);
|
|
207936
|
+
$util.makeProp(message, "$unknowns", false);
|
|
207937
|
+
(message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos));
|
|
207938
|
+
}
|
|
207939
|
+
if (_end !== undefined)
|
|
207940
|
+
throw Error("missing end group");
|
|
207941
|
+
return message;
|
|
207942
|
+
};
|
|
207943
|
+
|
|
207944
|
+
/**
|
|
207945
|
+
* Decodes a CareAssessmentCompleted message from the specified reader or buffer, length delimited.
|
|
207946
|
+
* @function decodeDelimited
|
|
207947
|
+
* @memberof CareAssessmentCompleted
|
|
207948
|
+
* @static
|
|
207949
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
207950
|
+
* @returns {CareAssessmentCompleted & CareAssessmentCompleted.$Shape} CareAssessmentCompleted
|
|
207951
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
207952
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
207953
|
+
*/
|
|
207954
|
+
CareAssessmentCompleted.decodeDelimited = function decodeDelimited(reader) {
|
|
207955
|
+
if (!(reader instanceof $Reader))
|
|
207956
|
+
reader = new $Reader(reader);
|
|
207957
|
+
return this.decode(reader, reader.uint32());
|
|
207958
|
+
};
|
|
207959
|
+
|
|
207960
|
+
/**
|
|
207961
|
+
* Verifies a CareAssessmentCompleted message.
|
|
207962
|
+
* @function verify
|
|
207963
|
+
* @memberof CareAssessmentCompleted
|
|
207964
|
+
* @static
|
|
207965
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
207966
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
207967
|
+
*/
|
|
207968
|
+
CareAssessmentCompleted.verify = function verify(message, _depth) {
|
|
207969
|
+
if (typeof message !== "object" || message === null)
|
|
207970
|
+
return "object expected";
|
|
207971
|
+
if (_depth === undefined)
|
|
207972
|
+
_depth = 0;
|
|
207973
|
+
if (_depth > $util.recursionLimit)
|
|
207974
|
+
return "max depth exceeded";
|
|
207975
|
+
var properties = {};
|
|
207976
|
+
if (message.timestamp != null && message.hasOwnProperty("timestamp"))
|
|
207977
|
+
if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high)))
|
|
207978
|
+
return "timestamp: integer|Long expected";
|
|
207979
|
+
if (message.careAssessmentType != null && message.hasOwnProperty("careAssessmentType"))
|
|
207980
|
+
switch (message.careAssessmentType) {
|
|
207981
|
+
default:
|
|
207982
|
+
return "careAssessmentType: enum value expected";
|
|
207983
|
+
case 0:
|
|
207984
|
+
case 1:
|
|
207985
|
+
case 2:
|
|
207986
|
+
case 3:
|
|
207987
|
+
case 4:
|
|
207988
|
+
case 5:
|
|
207989
|
+
break;
|
|
207990
|
+
}
|
|
207991
|
+
if (message.hsUserId != null && message.hasOwnProperty("hsUserId"))
|
|
207992
|
+
if (!$util.isString(message.hsUserId))
|
|
207993
|
+
return "hsUserId: string expected";
|
|
207994
|
+
if (message.gingerUserId != null && message.hasOwnProperty("gingerUserId"))
|
|
207995
|
+
if (!$util.isInteger(message.gingerUserId))
|
|
207996
|
+
return "gingerUserId: integer expected";
|
|
207997
|
+
if (message.completedAtIsoDate != null && message.hasOwnProperty("completedAtIsoDate"))
|
|
207998
|
+
if (!$util.isString(message.completedAtIsoDate))
|
|
207999
|
+
return "completedAtIsoDate: string expected";
|
|
208000
|
+
if (message.assignmentId != null && message.hasOwnProperty("assignmentId"))
|
|
208001
|
+
if (!$util.isInteger(message.assignmentId) && !(message.assignmentId && $util.isInteger(message.assignmentId.low) && $util.isInteger(message.assignmentId.high)))
|
|
208002
|
+
return "assignmentId: integer|Long expected";
|
|
208003
|
+
if (message.activityId != null && message.hasOwnProperty("activityId"))
|
|
208004
|
+
if (!$util.isString(message.activityId))
|
|
208005
|
+
return "activityId: string expected";
|
|
208006
|
+
if (message.careAssessmentCadence != null && message.hasOwnProperty("careAssessmentCadence"))
|
|
208007
|
+
switch (message.careAssessmentCadence) {
|
|
208008
|
+
default:
|
|
208009
|
+
return "careAssessmentCadence: enum value expected";
|
|
208010
|
+
case 0:
|
|
208011
|
+
case 1:
|
|
208012
|
+
case 2:
|
|
208013
|
+
case 3:
|
|
208014
|
+
case 4:
|
|
208015
|
+
break;
|
|
208016
|
+
}
|
|
208017
|
+
if (message.assessmentContext != null && message.hasOwnProperty("assessmentContext")) {
|
|
208018
|
+
properties._assessmentContext = 1;
|
|
208019
|
+
switch (message.assessmentContext) {
|
|
208020
|
+
default:
|
|
208021
|
+
return "assessmentContext: enum value expected";
|
|
208022
|
+
case 0:
|
|
208023
|
+
case 1:
|
|
208024
|
+
break;
|
|
208025
|
+
}
|
|
208026
|
+
}
|
|
208027
|
+
if (message.responses != null && message.hasOwnProperty("responses")) {
|
|
208028
|
+
if (!Array.isArray(message.responses))
|
|
208029
|
+
return "responses: array expected";
|
|
208030
|
+
for (var i = 0; i < message.responses.length; ++i) {
|
|
208031
|
+
var error = $root.AssessmentQuestionResponse.verify(message.responses[i], _depth + 1);
|
|
208032
|
+
if (error)
|
|
208033
|
+
return "responses." + error;
|
|
208034
|
+
}
|
|
208035
|
+
}
|
|
208036
|
+
if (message.totalScore != null && message.hasOwnProperty("totalScore"))
|
|
208037
|
+
if (!$util.isInteger(message.totalScore))
|
|
208038
|
+
return "totalScore: integer expected";
|
|
208039
|
+
return null;
|
|
208040
|
+
};
|
|
208041
|
+
|
|
208042
|
+
/**
|
|
208043
|
+
* Creates a CareAssessmentCompleted message from a plain object. Also converts values to their respective internal types.
|
|
208044
|
+
* @function fromObject
|
|
208045
|
+
* @memberof CareAssessmentCompleted
|
|
208046
|
+
* @static
|
|
208047
|
+
* @param {Object.<string,*>} object Plain object
|
|
208048
|
+
* @returns {CareAssessmentCompleted} CareAssessmentCompleted
|
|
208049
|
+
*/
|
|
208050
|
+
CareAssessmentCompleted.fromObject = function fromObject(object, _depth) {
|
|
208051
|
+
if (object instanceof $root.CareAssessmentCompleted)
|
|
208052
|
+
return object;
|
|
208053
|
+
if (_depth === undefined)
|
|
208054
|
+
_depth = 0;
|
|
208055
|
+
if (_depth > $util.recursionLimit)
|
|
208056
|
+
throw Error("max depth exceeded");
|
|
208057
|
+
var message = new $root.CareAssessmentCompleted();
|
|
208058
|
+
if (object.timestamp != null)
|
|
208059
|
+
if (typeof object.timestamp === "object" ? object.timestamp.low || object.timestamp.high : Number(object.timestamp) !== 0)
|
|
208060
|
+
if ($util.Long)
|
|
208061
|
+
(message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true;
|
|
208062
|
+
else if (typeof object.timestamp === "string")
|
|
208063
|
+
message.timestamp = parseInt(object.timestamp, 10);
|
|
208064
|
+
else if (typeof object.timestamp === "number")
|
|
208065
|
+
message.timestamp = object.timestamp;
|
|
208066
|
+
else if (typeof object.timestamp === "object")
|
|
208067
|
+
message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(true);
|
|
208068
|
+
if (object.careAssessmentType !== 0 && (typeof object.careAssessmentType !== "string" || $root.CareAssessmentType[object.careAssessmentType] !== 0))
|
|
208069
|
+
switch (object.careAssessmentType) {
|
|
208070
|
+
default:
|
|
208071
|
+
if (typeof object.careAssessmentType === "number") {
|
|
208072
|
+
message.careAssessmentType = object.careAssessmentType;
|
|
208073
|
+
break;
|
|
208074
|
+
}
|
|
208075
|
+
break;
|
|
208076
|
+
case "CARE_ASSESSMENT_TYPE_UNKNOWN":
|
|
208077
|
+
case 0:
|
|
208078
|
+
message.careAssessmentType = 0;
|
|
208079
|
+
break;
|
|
208080
|
+
case "CARE_ASSESSMENT_TYPE_PHQ9":
|
|
208081
|
+
case 1:
|
|
208082
|
+
message.careAssessmentType = 1;
|
|
208083
|
+
break;
|
|
208084
|
+
case "CARE_ASSESSMENT_TYPE_GAD7":
|
|
208085
|
+
case 2:
|
|
208086
|
+
message.careAssessmentType = 2;
|
|
208087
|
+
break;
|
|
208088
|
+
case "CARE_ASSESSMENT_TYPE_PHQ4":
|
|
208089
|
+
case 3:
|
|
208090
|
+
message.careAssessmentType = 3;
|
|
208091
|
+
break;
|
|
208092
|
+
case "CARE_ASSESSMENT_TYPE_PSS":
|
|
208093
|
+
case 4:
|
|
208094
|
+
message.careAssessmentType = 4;
|
|
208095
|
+
break;
|
|
208096
|
+
case "CARE_ASSESSMENT_TYPE_PGIC":
|
|
208097
|
+
case 5:
|
|
208098
|
+
message.careAssessmentType = 5;
|
|
208099
|
+
break;
|
|
208100
|
+
}
|
|
208101
|
+
if (object.hsUserId != null)
|
|
208102
|
+
if (typeof object.hsUserId !== "string" || object.hsUserId.length)
|
|
208103
|
+
message.hsUserId = String(object.hsUserId);
|
|
208104
|
+
if (object.gingerUserId != null)
|
|
208105
|
+
if (Number(object.gingerUserId) !== 0)
|
|
208106
|
+
message.gingerUserId = object.gingerUserId >>> 0;
|
|
208107
|
+
if (object.completedAtIsoDate != null)
|
|
208108
|
+
if (typeof object.completedAtIsoDate !== "string" || object.completedAtIsoDate.length)
|
|
208109
|
+
message.completedAtIsoDate = String(object.completedAtIsoDate);
|
|
208110
|
+
if (object.assignmentId != null)
|
|
208111
|
+
if (typeof object.assignmentId === "object" ? object.assignmentId.low || object.assignmentId.high : Number(object.assignmentId) !== 0)
|
|
208112
|
+
if ($util.Long)
|
|
208113
|
+
(message.assignmentId = $util.Long.fromValue(object.assignmentId)).unsigned = false;
|
|
208114
|
+
else if (typeof object.assignmentId === "string")
|
|
208115
|
+
message.assignmentId = parseInt(object.assignmentId, 10);
|
|
208116
|
+
else if (typeof object.assignmentId === "number")
|
|
208117
|
+
message.assignmentId = object.assignmentId;
|
|
208118
|
+
else if (typeof object.assignmentId === "object")
|
|
208119
|
+
message.assignmentId = new $util.LongBits(object.assignmentId.low >>> 0, object.assignmentId.high >>> 0).toNumber();
|
|
208120
|
+
if (object.activityId != null)
|
|
208121
|
+
if (typeof object.activityId !== "string" || object.activityId.length)
|
|
208122
|
+
message.activityId = String(object.activityId);
|
|
208123
|
+
if (object.careAssessmentCadence !== 0 && (typeof object.careAssessmentCadence !== "string" || $root.CareAssessmentCadence[object.careAssessmentCadence] !== 0))
|
|
208124
|
+
switch (object.careAssessmentCadence) {
|
|
208125
|
+
default:
|
|
208126
|
+
if (typeof object.careAssessmentCadence === "number") {
|
|
208127
|
+
message.careAssessmentCadence = object.careAssessmentCadence;
|
|
208128
|
+
break;
|
|
208129
|
+
}
|
|
208130
|
+
break;
|
|
208131
|
+
case "CARE_ASSESSMENT_CADENCE_UNKNOWN":
|
|
208132
|
+
case 0:
|
|
208133
|
+
message.careAssessmentCadence = 0;
|
|
208134
|
+
break;
|
|
208135
|
+
case "CARE_ASSESSMENT_CADENCE_ONBOARDING":
|
|
208136
|
+
case 1:
|
|
208137
|
+
message.careAssessmentCadence = 1;
|
|
208138
|
+
break;
|
|
208139
|
+
case "CARE_ASSESSMENT_CADENCE_QUARTERLY":
|
|
208140
|
+
case 2:
|
|
208141
|
+
message.careAssessmentCadence = 2;
|
|
208142
|
+
break;
|
|
208143
|
+
case "CARE_ASSESSMENT_CADENCE_END_OF_PERIOD":
|
|
208144
|
+
case 3:
|
|
208145
|
+
message.careAssessmentCadence = 3;
|
|
208146
|
+
break;
|
|
208147
|
+
case "CARE_ASSESSMENT_CADENCE_EARLY_EXIT":
|
|
208148
|
+
case 4:
|
|
208149
|
+
message.careAssessmentCadence = 4;
|
|
208150
|
+
break;
|
|
208151
|
+
}
|
|
208152
|
+
switch (object.assessmentContext) {
|
|
208153
|
+
default:
|
|
208154
|
+
if (typeof object.assessmentContext === "number") {
|
|
208155
|
+
message.assessmentContext = object.assessmentContext;
|
|
208156
|
+
break;
|
|
208157
|
+
}
|
|
208158
|
+
break;
|
|
208159
|
+
case "CARE_ASSESSMENT_CONTEXT_UNKNOWN":
|
|
208160
|
+
case 0:
|
|
208161
|
+
message.assessmentContext = 0;
|
|
208162
|
+
break;
|
|
208163
|
+
case "CARE_ASSESSMENT_CONTEXT_CMS":
|
|
208164
|
+
case 1:
|
|
208165
|
+
message.assessmentContext = 1;
|
|
208166
|
+
break;
|
|
208167
|
+
}
|
|
208168
|
+
if (object.responses) {
|
|
208169
|
+
if (!Array.isArray(object.responses))
|
|
208170
|
+
throw TypeError(".CareAssessmentCompleted.responses: array expected");
|
|
208171
|
+
message.responses = Array(object.responses.length);
|
|
208172
|
+
for (var i = 0; i < object.responses.length; ++i) {
|
|
208173
|
+
if (typeof object.responses[i] !== "object")
|
|
208174
|
+
throw TypeError(".CareAssessmentCompleted.responses: object expected");
|
|
208175
|
+
message.responses[i] = $root.AssessmentQuestionResponse.fromObject(object.responses[i], _depth + 1);
|
|
208176
|
+
}
|
|
208177
|
+
}
|
|
208178
|
+
if (object.totalScore != null)
|
|
208179
|
+
if (Number(object.totalScore) !== 0)
|
|
208180
|
+
message.totalScore = object.totalScore >>> 0;
|
|
208181
|
+
return message;
|
|
208182
|
+
};
|
|
208183
|
+
|
|
208184
|
+
/**
|
|
208185
|
+
* Creates a plain object from a CareAssessmentCompleted message. Also converts values to other types if specified.
|
|
208186
|
+
* @function toObject
|
|
208187
|
+
* @memberof CareAssessmentCompleted
|
|
208188
|
+
* @static
|
|
208189
|
+
* @param {CareAssessmentCompleted} message CareAssessmentCompleted
|
|
208190
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
208191
|
+
* @returns {Object.<string,*>} Plain object
|
|
208192
|
+
*/
|
|
208193
|
+
CareAssessmentCompleted.toObject = function toObject(message, options) {
|
|
208194
|
+
if (!options)
|
|
208195
|
+
options = {};
|
|
208196
|
+
var object = {};
|
|
208197
|
+
if (options.arrays || options.defaults)
|
|
208198
|
+
object.responses = [];
|
|
208199
|
+
if (options.defaults) {
|
|
208200
|
+
if ($util.Long) {
|
|
208201
|
+
var long = new $util.Long(0, 0, true);
|
|
208202
|
+
object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long;
|
|
208203
|
+
} else
|
|
208204
|
+
object.timestamp = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0;
|
|
208205
|
+
object.careAssessmentType = options.enums === String ? "CARE_ASSESSMENT_TYPE_UNKNOWN" : 0;
|
|
208206
|
+
object.hsUserId = "";
|
|
208207
|
+
object.gingerUserId = 0;
|
|
208208
|
+
object.completedAtIsoDate = "";
|
|
208209
|
+
if ($util.Long) {
|
|
208210
|
+
var long = new $util.Long(0, 0, false);
|
|
208211
|
+
object.assignmentId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long;
|
|
208212
|
+
} else
|
|
208213
|
+
object.assignmentId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0;
|
|
208214
|
+
object.activityId = "";
|
|
208215
|
+
object.careAssessmentCadence = options.enums === String ? "CARE_ASSESSMENT_CADENCE_UNKNOWN" : 0;
|
|
208216
|
+
object.totalScore = 0;
|
|
208217
|
+
}
|
|
208218
|
+
if (message.timestamp != null && message.hasOwnProperty("timestamp"))
|
|
208219
|
+
if (typeof BigInt !== "undefined" && options.longs === BigInt)
|
|
208220
|
+
object.timestamp = typeof message.timestamp === "number" ? BigInt(message.timestamp) : $util.Long.fromBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0, true).toBigInt();
|
|
208221
|
+
else if (typeof message.timestamp === "number")
|
|
208222
|
+
object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp;
|
|
208223
|
+
else
|
|
208224
|
+
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;
|
|
208225
|
+
if (message.careAssessmentType != null && message.hasOwnProperty("careAssessmentType"))
|
|
208226
|
+
object.careAssessmentType = options.enums === String ? $root.CareAssessmentType[message.careAssessmentType] === undefined ? message.careAssessmentType : $root.CareAssessmentType[message.careAssessmentType] : message.careAssessmentType;
|
|
208227
|
+
if (message.hsUserId != null && message.hasOwnProperty("hsUserId"))
|
|
208228
|
+
object.hsUserId = message.hsUserId;
|
|
208229
|
+
if (message.gingerUserId != null && message.hasOwnProperty("gingerUserId"))
|
|
208230
|
+
object.gingerUserId = message.gingerUserId;
|
|
208231
|
+
if (message.completedAtIsoDate != null && message.hasOwnProperty("completedAtIsoDate"))
|
|
208232
|
+
object.completedAtIsoDate = message.completedAtIsoDate;
|
|
208233
|
+
if (message.assignmentId != null && message.hasOwnProperty("assignmentId"))
|
|
208234
|
+
if (typeof BigInt !== "undefined" && options.longs === BigInt)
|
|
208235
|
+
object.assignmentId = typeof message.assignmentId === "number" ? BigInt(message.assignmentId) : $util.Long.fromBits(message.assignmentId.low >>> 0, message.assignmentId.high >>> 0, false).toBigInt();
|
|
208236
|
+
else if (typeof message.assignmentId === "number")
|
|
208237
|
+
object.assignmentId = options.longs === String ? String(message.assignmentId) : message.assignmentId;
|
|
208238
|
+
else
|
|
208239
|
+
object.assignmentId = options.longs === String ? $util.Long.prototype.toString.call(message.assignmentId) : options.longs === Number ? new $util.LongBits(message.assignmentId.low >>> 0, message.assignmentId.high >>> 0).toNumber() : message.assignmentId;
|
|
208240
|
+
if (message.activityId != null && message.hasOwnProperty("activityId"))
|
|
208241
|
+
object.activityId = message.activityId;
|
|
208242
|
+
if (message.careAssessmentCadence != null && message.hasOwnProperty("careAssessmentCadence"))
|
|
208243
|
+
object.careAssessmentCadence = options.enums === String ? $root.CareAssessmentCadence[message.careAssessmentCadence] === undefined ? message.careAssessmentCadence : $root.CareAssessmentCadence[message.careAssessmentCadence] : message.careAssessmentCadence;
|
|
208244
|
+
if (message.assessmentContext != null && message.hasOwnProperty("assessmentContext")) {
|
|
208245
|
+
object.assessmentContext = options.enums === String ? $root.CareAssessmentContext[message.assessmentContext] === undefined ? message.assessmentContext : $root.CareAssessmentContext[message.assessmentContext] : message.assessmentContext;
|
|
208246
|
+
if (options.oneofs)
|
|
208247
|
+
object._assessmentContext = "assessmentContext";
|
|
208248
|
+
}
|
|
208249
|
+
if (message.responses && message.responses.length) {
|
|
208250
|
+
object.responses = Array(message.responses.length);
|
|
208251
|
+
for (var j = 0; j < message.responses.length; ++j)
|
|
208252
|
+
object.responses[j] = $root.AssessmentQuestionResponse.toObject(message.responses[j], options);
|
|
208253
|
+
}
|
|
208254
|
+
if (message.totalScore != null && message.hasOwnProperty("totalScore"))
|
|
208255
|
+
object.totalScore = message.totalScore;
|
|
208256
|
+
return object;
|
|
208257
|
+
};
|
|
208258
|
+
|
|
208259
|
+
/**
|
|
208260
|
+
* Converts this CareAssessmentCompleted to JSON.
|
|
208261
|
+
* @function toJSON
|
|
208262
|
+
* @memberof CareAssessmentCompleted
|
|
208263
|
+
* @instance
|
|
208264
|
+
* @returns {Object.<string,*>} JSON object
|
|
208265
|
+
*/
|
|
208266
|
+
CareAssessmentCompleted.prototype.toJSON = function toJSON() {
|
|
208267
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
208268
|
+
};
|
|
208269
|
+
|
|
208270
|
+
/**
|
|
208271
|
+
* Gets the type url for CareAssessmentCompleted
|
|
208272
|
+
* @function getTypeUrl
|
|
208273
|
+
* @memberof CareAssessmentCompleted
|
|
208274
|
+
* @static
|
|
208275
|
+
* @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"`
|
|
208276
|
+
* @returns {string} The type url
|
|
208277
|
+
*/
|
|
208278
|
+
CareAssessmentCompleted.getTypeUrl = function getTypeUrl(prefix) {
|
|
208279
|
+
if (prefix === undefined)
|
|
208280
|
+
prefix = "type.googleapis.com";
|
|
208281
|
+
return prefix + "/CareAssessmentCompleted";
|
|
208282
|
+
};
|
|
208283
|
+
|
|
208284
|
+
return CareAssessmentCompleted;
|
|
208285
|
+
})();
|
|
208286
|
+
|
|
206000
208287
|
$root.ClinicalIntakeAssigned = (function() {
|
|
206001
208288
|
|
|
206002
208289
|
/**
|
|
@@ -240502,6 +242789,7 @@ $root.ExperienceOverrideTagsUpdated = (function() {
|
|
|
240502
242789
|
* @typedef {Object} ExperienceOverrideTagsUpdated.$Properties
|
|
240503
242790
|
* @property {string|null} [experienceId] ExperienceOverrideTagsUpdated experienceId
|
|
240504
242791
|
* @property {string|null} [overrideTagsStringified] ExperienceOverrideTagsUpdated overrideTagsStringified
|
|
242792
|
+
* @property {string|null} [contentSlug] ExperienceOverrideTagsUpdated contentSlug
|
|
240505
242793
|
* @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
|
|
240506
242794
|
*/
|
|
240507
242795
|
|
|
@@ -240552,6 +242840,14 @@ $root.ExperienceOverrideTagsUpdated = (function() {
|
|
|
240552
242840
|
*/
|
|
240553
242841
|
ExperienceOverrideTagsUpdated.prototype.overrideTagsStringified = "";
|
|
240554
242842
|
|
|
242843
|
+
/**
|
|
242844
|
+
* ExperienceOverrideTagsUpdated contentSlug.
|
|
242845
|
+
* @member {string} contentSlug
|
|
242846
|
+
* @memberof ExperienceOverrideTagsUpdated
|
|
242847
|
+
* @instance
|
|
242848
|
+
*/
|
|
242849
|
+
ExperienceOverrideTagsUpdated.prototype.contentSlug = "";
|
|
242850
|
+
|
|
240555
242851
|
/**
|
|
240556
242852
|
* Creates a new ExperienceOverrideTagsUpdated instance using the specified properties.
|
|
240557
242853
|
* @function create
|
|
@@ -240584,6 +242880,8 @@ $root.ExperienceOverrideTagsUpdated = (function() {
|
|
|
240584
242880
|
writer.uint32(/* id 1, wireType 2 =*/10).string(message.experienceId);
|
|
240585
242881
|
if (message.overrideTagsStringified != null && Object.hasOwnProperty.call(message, "overrideTagsStringified"))
|
|
240586
242882
|
writer.uint32(/* id 2, wireType 2 =*/18).string(message.overrideTagsStringified);
|
|
242883
|
+
if (message.contentSlug != null && Object.hasOwnProperty.call(message, "contentSlug"))
|
|
242884
|
+
writer.uint32(/* id 3, wireType 2 =*/26).string(message.contentSlug);
|
|
240587
242885
|
if (message.$unknowns != null && Object.hasOwnProperty.call(message, "$unknowns"))
|
|
240588
242886
|
for (var i = 0; i < message.$unknowns.length; ++i)
|
|
240589
242887
|
writer.raw(message.$unknowns[i]);
|
|
@@ -240649,6 +242947,15 @@ $root.ExperienceOverrideTagsUpdated = (function() {
|
|
|
240649
242947
|
delete message.overrideTagsStringified;
|
|
240650
242948
|
continue;
|
|
240651
242949
|
}
|
|
242950
|
+
case 3: {
|
|
242951
|
+
if (wireType !== 2)
|
|
242952
|
+
break;
|
|
242953
|
+
if ((value = reader.string()).length)
|
|
242954
|
+
message.contentSlug = value;
|
|
242955
|
+
else
|
|
242956
|
+
delete message.contentSlug;
|
|
242957
|
+
continue;
|
|
242958
|
+
}
|
|
240652
242959
|
}
|
|
240653
242960
|
reader.skipType(wireType, _depth, tag);
|
|
240654
242961
|
$util.makeProp(message, "$unknowns", false);
|
|
@@ -240696,6 +243003,9 @@ $root.ExperienceOverrideTagsUpdated = (function() {
|
|
|
240696
243003
|
if (message.overrideTagsStringified != null && message.hasOwnProperty("overrideTagsStringified"))
|
|
240697
243004
|
if (!$util.isString(message.overrideTagsStringified))
|
|
240698
243005
|
return "overrideTagsStringified: string expected";
|
|
243006
|
+
if (message.contentSlug != null && message.hasOwnProperty("contentSlug"))
|
|
243007
|
+
if (!$util.isString(message.contentSlug))
|
|
243008
|
+
return "contentSlug: string expected";
|
|
240699
243009
|
return null;
|
|
240700
243010
|
};
|
|
240701
243011
|
|
|
@@ -240721,6 +243031,9 @@ $root.ExperienceOverrideTagsUpdated = (function() {
|
|
|
240721
243031
|
if (object.overrideTagsStringified != null)
|
|
240722
243032
|
if (typeof object.overrideTagsStringified !== "string" || object.overrideTagsStringified.length)
|
|
240723
243033
|
message.overrideTagsStringified = String(object.overrideTagsStringified);
|
|
243034
|
+
if (object.contentSlug != null)
|
|
243035
|
+
if (typeof object.contentSlug !== "string" || object.contentSlug.length)
|
|
243036
|
+
message.contentSlug = String(object.contentSlug);
|
|
240724
243037
|
return message;
|
|
240725
243038
|
};
|
|
240726
243039
|
|
|
@@ -240740,11 +243053,14 @@ $root.ExperienceOverrideTagsUpdated = (function() {
|
|
|
240740
243053
|
if (options.defaults) {
|
|
240741
243054
|
object.experienceId = "";
|
|
240742
243055
|
object.overrideTagsStringified = "";
|
|
243056
|
+
object.contentSlug = "";
|
|
240743
243057
|
}
|
|
240744
243058
|
if (message.experienceId != null && message.hasOwnProperty("experienceId"))
|
|
240745
243059
|
object.experienceId = message.experienceId;
|
|
240746
243060
|
if (message.overrideTagsStringified != null && message.hasOwnProperty("overrideTagsStringified"))
|
|
240747
243061
|
object.overrideTagsStringified = message.overrideTagsStringified;
|
|
243062
|
+
if (message.contentSlug != null && message.hasOwnProperty("contentSlug"))
|
|
243063
|
+
object.contentSlug = message.contentSlug;
|
|
240748
243064
|
return object;
|
|
240749
243065
|
};
|
|
240750
243066
|
|