@headspace/protos-events 1.567.0 → 1.568.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/lib/index.d.ts +420 -0
  2. package/lib/index.js +1157 -0
  3. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -77037,6 +77037,1163 @@ $root.SurveyAnswer = (function() {
77037
77037
  return SurveyAnswer;
77038
77038
  })();
77039
77039
 
77040
+ $root.Survey = (function() {
77041
+
77042
+ /**
77043
+ * Properties of a Survey.
77044
+ * @name ISurvey
77045
+ * @interface ISurvey
77046
+ * @property {string|null} [name] Survey name
77047
+ * @property {string|null} [slug] Survey slug
77048
+ * @property {Array.<contentful.ILanguageTextEntity>|null} [title] Survey title
77049
+ * @property {Array.<contentful.ILanguageTextEntity>|null} [description] Survey description
77050
+ * @property {Array.<contentful.ILanguageTextEntity>|null} [actionButtonTitle] Survey actionButtonTitle
77051
+ * @property {Array.<contentful.ILanguageMediaEntity>|null} [tileMedia] Survey tileMedia
77052
+ * @property {Array.<contentful.ILanguageTextEntity>|null} [label] Survey label
77053
+ * @property {Array.<contentful.ILanguageTextEntity>|null} [duration] Survey duration
77054
+ */
77055
+
77056
+ /**
77057
+ * Constructs a new Survey.
77058
+ * @name Survey
77059
+ * @classdesc Represents a Survey.
77060
+ * @implements ISurvey
77061
+ * @constructor
77062
+ * @param {ISurvey=} [properties] Properties to set
77063
+ */
77064
+ function Survey(properties) {
77065
+ this.title = [];
77066
+ this.description = [];
77067
+ this.actionButtonTitle = [];
77068
+ this.tileMedia = [];
77069
+ this.label = [];
77070
+ this.duration = [];
77071
+ if (properties)
77072
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
77073
+ if (properties[keys[i]] != null)
77074
+ this[keys[i]] = properties[keys[i]];
77075
+ }
77076
+
77077
+ /**
77078
+ * Survey name.
77079
+ * @member {string} name
77080
+ * @memberof Survey
77081
+ * @instance
77082
+ */
77083
+ Survey.prototype.name = "";
77084
+
77085
+ /**
77086
+ * Survey slug.
77087
+ * @member {string} slug
77088
+ * @memberof Survey
77089
+ * @instance
77090
+ */
77091
+ Survey.prototype.slug = "";
77092
+
77093
+ /**
77094
+ * Survey title.
77095
+ * @member {Array.<contentful.ILanguageTextEntity>} title
77096
+ * @memberof Survey
77097
+ * @instance
77098
+ */
77099
+ Survey.prototype.title = $util.emptyArray;
77100
+
77101
+ /**
77102
+ * Survey description.
77103
+ * @member {Array.<contentful.ILanguageTextEntity>} description
77104
+ * @memberof Survey
77105
+ * @instance
77106
+ */
77107
+ Survey.prototype.description = $util.emptyArray;
77108
+
77109
+ /**
77110
+ * Survey actionButtonTitle.
77111
+ * @member {Array.<contentful.ILanguageTextEntity>} actionButtonTitle
77112
+ * @memberof Survey
77113
+ * @instance
77114
+ */
77115
+ Survey.prototype.actionButtonTitle = $util.emptyArray;
77116
+
77117
+ /**
77118
+ * Survey tileMedia.
77119
+ * @member {Array.<contentful.ILanguageMediaEntity>} tileMedia
77120
+ * @memberof Survey
77121
+ * @instance
77122
+ */
77123
+ Survey.prototype.tileMedia = $util.emptyArray;
77124
+
77125
+ /**
77126
+ * Survey label.
77127
+ * @member {Array.<contentful.ILanguageTextEntity>} label
77128
+ * @memberof Survey
77129
+ * @instance
77130
+ */
77131
+ Survey.prototype.label = $util.emptyArray;
77132
+
77133
+ /**
77134
+ * Survey duration.
77135
+ * @member {Array.<contentful.ILanguageTextEntity>} duration
77136
+ * @memberof Survey
77137
+ * @instance
77138
+ */
77139
+ Survey.prototype.duration = $util.emptyArray;
77140
+
77141
+ /**
77142
+ * Creates a new Survey instance using the specified properties.
77143
+ * @function create
77144
+ * @memberof Survey
77145
+ * @static
77146
+ * @param {ISurvey=} [properties] Properties to set
77147
+ * @returns {Survey} Survey instance
77148
+ */
77149
+ Survey.create = function create(properties) {
77150
+ return new Survey(properties);
77151
+ };
77152
+
77153
+ /**
77154
+ * Encodes the specified Survey message. Does not implicitly {@link Survey.verify|verify} messages.
77155
+ * @function encode
77156
+ * @memberof Survey
77157
+ * @static
77158
+ * @param {ISurvey} message Survey message or plain object to encode
77159
+ * @param {$protobuf.Writer} [writer] Writer to encode to
77160
+ * @returns {$protobuf.Writer} Writer
77161
+ */
77162
+ Survey.encode = function encode(message, writer) {
77163
+ if (!writer)
77164
+ writer = $Writer.create();
77165
+ if (message.name != null && message.hasOwnProperty("name"))
77166
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
77167
+ if (message.slug != null && message.hasOwnProperty("slug"))
77168
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.slug);
77169
+ if (message.title != null && message.title.length)
77170
+ for (var i = 0; i < message.title.length; ++i)
77171
+ $root.contentful.LanguageTextEntity.encode(message.title[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
77172
+ if (message.description != null && message.description.length)
77173
+ for (var i = 0; i < message.description.length; ++i)
77174
+ $root.contentful.LanguageTextEntity.encode(message.description[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
77175
+ if (message.actionButtonTitle != null && message.actionButtonTitle.length)
77176
+ for (var i = 0; i < message.actionButtonTitle.length; ++i)
77177
+ $root.contentful.LanguageTextEntity.encode(message.actionButtonTitle[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
77178
+ if (message.tileMedia != null && message.tileMedia.length)
77179
+ for (var i = 0; i < message.tileMedia.length; ++i)
77180
+ $root.contentful.LanguageMediaEntity.encode(message.tileMedia[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
77181
+ if (message.label != null && message.label.length)
77182
+ for (var i = 0; i < message.label.length; ++i)
77183
+ $root.contentful.LanguageTextEntity.encode(message.label[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
77184
+ if (message.duration != null && message.duration.length)
77185
+ for (var i = 0; i < message.duration.length; ++i)
77186
+ $root.contentful.LanguageTextEntity.encode(message.duration[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
77187
+ return writer;
77188
+ };
77189
+
77190
+ /**
77191
+ * Encodes the specified Survey message, length delimited. Does not implicitly {@link Survey.verify|verify} messages.
77192
+ * @function encodeDelimited
77193
+ * @memberof Survey
77194
+ * @static
77195
+ * @param {ISurvey} message Survey message or plain object to encode
77196
+ * @param {$protobuf.Writer} [writer] Writer to encode to
77197
+ * @returns {$protobuf.Writer} Writer
77198
+ */
77199
+ Survey.encodeDelimited = function encodeDelimited(message, writer) {
77200
+ return this.encode(message, writer).ldelim();
77201
+ };
77202
+
77203
+ /**
77204
+ * Decodes a Survey message from the specified reader or buffer.
77205
+ * @function decode
77206
+ * @memberof Survey
77207
+ * @static
77208
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
77209
+ * @param {number} [length] Message length if known beforehand
77210
+ * @returns {Survey} Survey
77211
+ * @throws {Error} If the payload is not a reader or valid buffer
77212
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
77213
+ */
77214
+ Survey.decode = function decode(reader, length) {
77215
+ if (!(reader instanceof $Reader))
77216
+ reader = $Reader.create(reader);
77217
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.Survey();
77218
+ while (reader.pos < end) {
77219
+ var tag = reader.uint32();
77220
+ switch (tag >>> 3) {
77221
+ case 1:
77222
+ message.name = reader.string();
77223
+ break;
77224
+ case 2:
77225
+ message.slug = reader.string();
77226
+ break;
77227
+ case 3:
77228
+ if (!(message.title && message.title.length))
77229
+ message.title = [];
77230
+ message.title.push($root.contentful.LanguageTextEntity.decode(reader, reader.uint32()));
77231
+ break;
77232
+ case 4:
77233
+ if (!(message.description && message.description.length))
77234
+ message.description = [];
77235
+ message.description.push($root.contentful.LanguageTextEntity.decode(reader, reader.uint32()));
77236
+ break;
77237
+ case 5:
77238
+ if (!(message.actionButtonTitle && message.actionButtonTitle.length))
77239
+ message.actionButtonTitle = [];
77240
+ message.actionButtonTitle.push($root.contentful.LanguageTextEntity.decode(reader, reader.uint32()));
77241
+ break;
77242
+ case 6:
77243
+ if (!(message.tileMedia && message.tileMedia.length))
77244
+ message.tileMedia = [];
77245
+ message.tileMedia.push($root.contentful.LanguageMediaEntity.decode(reader, reader.uint32()));
77246
+ break;
77247
+ case 7:
77248
+ if (!(message.label && message.label.length))
77249
+ message.label = [];
77250
+ message.label.push($root.contentful.LanguageTextEntity.decode(reader, reader.uint32()));
77251
+ break;
77252
+ case 8:
77253
+ if (!(message.duration && message.duration.length))
77254
+ message.duration = [];
77255
+ message.duration.push($root.contentful.LanguageTextEntity.decode(reader, reader.uint32()));
77256
+ break;
77257
+ default:
77258
+ reader.skipType(tag & 7);
77259
+ break;
77260
+ }
77261
+ }
77262
+ return message;
77263
+ };
77264
+
77265
+ /**
77266
+ * Decodes a Survey message from the specified reader or buffer, length delimited.
77267
+ * @function decodeDelimited
77268
+ * @memberof Survey
77269
+ * @static
77270
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
77271
+ * @returns {Survey} Survey
77272
+ * @throws {Error} If the payload is not a reader or valid buffer
77273
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
77274
+ */
77275
+ Survey.decodeDelimited = function decodeDelimited(reader) {
77276
+ if (!(reader instanceof $Reader))
77277
+ reader = new $Reader(reader);
77278
+ return this.decode(reader, reader.uint32());
77279
+ };
77280
+
77281
+ /**
77282
+ * Verifies a Survey message.
77283
+ * @function verify
77284
+ * @memberof Survey
77285
+ * @static
77286
+ * @param {Object.<string,*>} message Plain object to verify
77287
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
77288
+ */
77289
+ Survey.verify = function verify(message) {
77290
+ if (typeof message !== "object" || message === null)
77291
+ return "object expected";
77292
+ if (message.name != null && message.hasOwnProperty("name"))
77293
+ if (!$util.isString(message.name))
77294
+ return "name: string expected";
77295
+ if (message.slug != null && message.hasOwnProperty("slug"))
77296
+ if (!$util.isString(message.slug))
77297
+ return "slug: string expected";
77298
+ if (message.title != null && message.hasOwnProperty("title")) {
77299
+ if (!Array.isArray(message.title))
77300
+ return "title: array expected";
77301
+ for (var i = 0; i < message.title.length; ++i) {
77302
+ var error = $root.contentful.LanguageTextEntity.verify(message.title[i]);
77303
+ if (error)
77304
+ return "title." + error;
77305
+ }
77306
+ }
77307
+ if (message.description != null && message.hasOwnProperty("description")) {
77308
+ if (!Array.isArray(message.description))
77309
+ return "description: array expected";
77310
+ for (var i = 0; i < message.description.length; ++i) {
77311
+ var error = $root.contentful.LanguageTextEntity.verify(message.description[i]);
77312
+ if (error)
77313
+ return "description." + error;
77314
+ }
77315
+ }
77316
+ if (message.actionButtonTitle != null && message.hasOwnProperty("actionButtonTitle")) {
77317
+ if (!Array.isArray(message.actionButtonTitle))
77318
+ return "actionButtonTitle: array expected";
77319
+ for (var i = 0; i < message.actionButtonTitle.length; ++i) {
77320
+ var error = $root.contentful.LanguageTextEntity.verify(message.actionButtonTitle[i]);
77321
+ if (error)
77322
+ return "actionButtonTitle." + error;
77323
+ }
77324
+ }
77325
+ if (message.tileMedia != null && message.hasOwnProperty("tileMedia")) {
77326
+ if (!Array.isArray(message.tileMedia))
77327
+ return "tileMedia: array expected";
77328
+ for (var i = 0; i < message.tileMedia.length; ++i) {
77329
+ var error = $root.contentful.LanguageMediaEntity.verify(message.tileMedia[i]);
77330
+ if (error)
77331
+ return "tileMedia." + error;
77332
+ }
77333
+ }
77334
+ if (message.label != null && message.hasOwnProperty("label")) {
77335
+ if (!Array.isArray(message.label))
77336
+ return "label: array expected";
77337
+ for (var i = 0; i < message.label.length; ++i) {
77338
+ var error = $root.contentful.LanguageTextEntity.verify(message.label[i]);
77339
+ if (error)
77340
+ return "label." + error;
77341
+ }
77342
+ }
77343
+ if (message.duration != null && message.hasOwnProperty("duration")) {
77344
+ if (!Array.isArray(message.duration))
77345
+ return "duration: array expected";
77346
+ for (var i = 0; i < message.duration.length; ++i) {
77347
+ var error = $root.contentful.LanguageTextEntity.verify(message.duration[i]);
77348
+ if (error)
77349
+ return "duration." + error;
77350
+ }
77351
+ }
77352
+ return null;
77353
+ };
77354
+
77355
+ /**
77356
+ * Creates a Survey message from a plain object. Also converts values to their respective internal types.
77357
+ * @function fromObject
77358
+ * @memberof Survey
77359
+ * @static
77360
+ * @param {Object.<string,*>} object Plain object
77361
+ * @returns {Survey} Survey
77362
+ */
77363
+ Survey.fromObject = function fromObject(object) {
77364
+ if (object instanceof $root.Survey)
77365
+ return object;
77366
+ var message = new $root.Survey();
77367
+ if (object.name != null)
77368
+ message.name = String(object.name);
77369
+ if (object.slug != null)
77370
+ message.slug = String(object.slug);
77371
+ if (object.title) {
77372
+ if (!Array.isArray(object.title))
77373
+ throw TypeError(".Survey.title: array expected");
77374
+ message.title = [];
77375
+ for (var i = 0; i < object.title.length; ++i) {
77376
+ if (typeof object.title[i] !== "object")
77377
+ throw TypeError(".Survey.title: object expected");
77378
+ message.title[i] = $root.contentful.LanguageTextEntity.fromObject(object.title[i]);
77379
+ }
77380
+ }
77381
+ if (object.description) {
77382
+ if (!Array.isArray(object.description))
77383
+ throw TypeError(".Survey.description: array expected");
77384
+ message.description = [];
77385
+ for (var i = 0; i < object.description.length; ++i) {
77386
+ if (typeof object.description[i] !== "object")
77387
+ throw TypeError(".Survey.description: object expected");
77388
+ message.description[i] = $root.contentful.LanguageTextEntity.fromObject(object.description[i]);
77389
+ }
77390
+ }
77391
+ if (object.actionButtonTitle) {
77392
+ if (!Array.isArray(object.actionButtonTitle))
77393
+ throw TypeError(".Survey.actionButtonTitle: array expected");
77394
+ message.actionButtonTitle = [];
77395
+ for (var i = 0; i < object.actionButtonTitle.length; ++i) {
77396
+ if (typeof object.actionButtonTitle[i] !== "object")
77397
+ throw TypeError(".Survey.actionButtonTitle: object expected");
77398
+ message.actionButtonTitle[i] = $root.contentful.LanguageTextEntity.fromObject(object.actionButtonTitle[i]);
77399
+ }
77400
+ }
77401
+ if (object.tileMedia) {
77402
+ if (!Array.isArray(object.tileMedia))
77403
+ throw TypeError(".Survey.tileMedia: array expected");
77404
+ message.tileMedia = [];
77405
+ for (var i = 0; i < object.tileMedia.length; ++i) {
77406
+ if (typeof object.tileMedia[i] !== "object")
77407
+ throw TypeError(".Survey.tileMedia: object expected");
77408
+ message.tileMedia[i] = $root.contentful.LanguageMediaEntity.fromObject(object.tileMedia[i]);
77409
+ }
77410
+ }
77411
+ if (object.label) {
77412
+ if (!Array.isArray(object.label))
77413
+ throw TypeError(".Survey.label: array expected");
77414
+ message.label = [];
77415
+ for (var i = 0; i < object.label.length; ++i) {
77416
+ if (typeof object.label[i] !== "object")
77417
+ throw TypeError(".Survey.label: object expected");
77418
+ message.label[i] = $root.contentful.LanguageTextEntity.fromObject(object.label[i]);
77419
+ }
77420
+ }
77421
+ if (object.duration) {
77422
+ if (!Array.isArray(object.duration))
77423
+ throw TypeError(".Survey.duration: array expected");
77424
+ message.duration = [];
77425
+ for (var i = 0; i < object.duration.length; ++i) {
77426
+ if (typeof object.duration[i] !== "object")
77427
+ throw TypeError(".Survey.duration: object expected");
77428
+ message.duration[i] = $root.contentful.LanguageTextEntity.fromObject(object.duration[i]);
77429
+ }
77430
+ }
77431
+ return message;
77432
+ };
77433
+
77434
+ /**
77435
+ * Creates a plain object from a Survey message. Also converts values to other types if specified.
77436
+ * @function toObject
77437
+ * @memberof Survey
77438
+ * @static
77439
+ * @param {Survey} message Survey
77440
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
77441
+ * @returns {Object.<string,*>} Plain object
77442
+ */
77443
+ Survey.toObject = function toObject(message, options) {
77444
+ if (!options)
77445
+ options = {};
77446
+ var object = {};
77447
+ if (options.arrays || options.defaults) {
77448
+ object.title = [];
77449
+ object.description = [];
77450
+ object.actionButtonTitle = [];
77451
+ object.tileMedia = [];
77452
+ object.label = [];
77453
+ object.duration = [];
77454
+ }
77455
+ if (options.defaults) {
77456
+ object.name = "";
77457
+ object.slug = "";
77458
+ }
77459
+ if (message.name != null && message.hasOwnProperty("name"))
77460
+ object.name = message.name;
77461
+ if (message.slug != null && message.hasOwnProperty("slug"))
77462
+ object.slug = message.slug;
77463
+ if (message.title && message.title.length) {
77464
+ object.title = [];
77465
+ for (var j = 0; j < message.title.length; ++j)
77466
+ object.title[j] = $root.contentful.LanguageTextEntity.toObject(message.title[j], options);
77467
+ }
77468
+ if (message.description && message.description.length) {
77469
+ object.description = [];
77470
+ for (var j = 0; j < message.description.length; ++j)
77471
+ object.description[j] = $root.contentful.LanguageTextEntity.toObject(message.description[j], options);
77472
+ }
77473
+ if (message.actionButtonTitle && message.actionButtonTitle.length) {
77474
+ object.actionButtonTitle = [];
77475
+ for (var j = 0; j < message.actionButtonTitle.length; ++j)
77476
+ object.actionButtonTitle[j] = $root.contentful.LanguageTextEntity.toObject(message.actionButtonTitle[j], options);
77477
+ }
77478
+ if (message.tileMedia && message.tileMedia.length) {
77479
+ object.tileMedia = [];
77480
+ for (var j = 0; j < message.tileMedia.length; ++j)
77481
+ object.tileMedia[j] = $root.contentful.LanguageMediaEntity.toObject(message.tileMedia[j], options);
77482
+ }
77483
+ if (message.label && message.label.length) {
77484
+ object.label = [];
77485
+ for (var j = 0; j < message.label.length; ++j)
77486
+ object.label[j] = $root.contentful.LanguageTextEntity.toObject(message.label[j], options);
77487
+ }
77488
+ if (message.duration && message.duration.length) {
77489
+ object.duration = [];
77490
+ for (var j = 0; j < message.duration.length; ++j)
77491
+ object.duration[j] = $root.contentful.LanguageTextEntity.toObject(message.duration[j], options);
77492
+ }
77493
+ return object;
77494
+ };
77495
+
77496
+ /**
77497
+ * Converts this Survey to JSON.
77498
+ * @function toJSON
77499
+ * @memberof Survey
77500
+ * @instance
77501
+ * @returns {Object.<string,*>} JSON object
77502
+ */
77503
+ Survey.prototype.toJSON = function toJSON() {
77504
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
77505
+ };
77506
+
77507
+ return Survey;
77508
+ })();
77509
+
77510
+ $root.SurveyCreated = (function() {
77511
+
77512
+ /**
77513
+ * Properties of a SurveyCreated.
77514
+ * @name ISurveyCreated
77515
+ * @interface ISurveyCreated
77516
+ * @property {number|Long|null} [timestamp] SurveyCreated timestamp
77517
+ * @property {ISurvey|null} [survey] SurveyCreated survey
77518
+ */
77519
+
77520
+ /**
77521
+ * Constructs a new SurveyCreated.
77522
+ * @name SurveyCreated
77523
+ * @classdesc Represents a SurveyCreated.
77524
+ * @implements ISurveyCreated
77525
+ * @constructor
77526
+ * @param {ISurveyCreated=} [properties] Properties to set
77527
+ */
77528
+ function SurveyCreated(properties) {
77529
+ if (properties)
77530
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
77531
+ if (properties[keys[i]] != null)
77532
+ this[keys[i]] = properties[keys[i]];
77533
+ }
77534
+
77535
+ /**
77536
+ * SurveyCreated timestamp.
77537
+ * @member {number|Long} timestamp
77538
+ * @memberof SurveyCreated
77539
+ * @instance
77540
+ */
77541
+ SurveyCreated.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
77542
+
77543
+ /**
77544
+ * SurveyCreated survey.
77545
+ * @member {ISurvey|null|undefined} survey
77546
+ * @memberof SurveyCreated
77547
+ * @instance
77548
+ */
77549
+ SurveyCreated.prototype.survey = null;
77550
+
77551
+ /**
77552
+ * Creates a new SurveyCreated instance using the specified properties.
77553
+ * @function create
77554
+ * @memberof SurveyCreated
77555
+ * @static
77556
+ * @param {ISurveyCreated=} [properties] Properties to set
77557
+ * @returns {SurveyCreated} SurveyCreated instance
77558
+ */
77559
+ SurveyCreated.create = function create(properties) {
77560
+ return new SurveyCreated(properties);
77561
+ };
77562
+
77563
+ /**
77564
+ * Encodes the specified SurveyCreated message. Does not implicitly {@link SurveyCreated.verify|verify} messages.
77565
+ * @function encode
77566
+ * @memberof SurveyCreated
77567
+ * @static
77568
+ * @param {ISurveyCreated} message SurveyCreated message or plain object to encode
77569
+ * @param {$protobuf.Writer} [writer] Writer to encode to
77570
+ * @returns {$protobuf.Writer} Writer
77571
+ */
77572
+ SurveyCreated.encode = function encode(message, writer) {
77573
+ if (!writer)
77574
+ writer = $Writer.create();
77575
+ if (message.timestamp != null && message.hasOwnProperty("timestamp"))
77576
+ writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.timestamp);
77577
+ if (message.survey != null && message.hasOwnProperty("survey"))
77578
+ $root.Survey.encode(message.survey, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
77579
+ return writer;
77580
+ };
77581
+
77582
+ /**
77583
+ * Encodes the specified SurveyCreated message, length delimited. Does not implicitly {@link SurveyCreated.verify|verify} messages.
77584
+ * @function encodeDelimited
77585
+ * @memberof SurveyCreated
77586
+ * @static
77587
+ * @param {ISurveyCreated} message SurveyCreated message or plain object to encode
77588
+ * @param {$protobuf.Writer} [writer] Writer to encode to
77589
+ * @returns {$protobuf.Writer} Writer
77590
+ */
77591
+ SurveyCreated.encodeDelimited = function encodeDelimited(message, writer) {
77592
+ return this.encode(message, writer).ldelim();
77593
+ };
77594
+
77595
+ /**
77596
+ * Decodes a SurveyCreated message from the specified reader or buffer.
77597
+ * @function decode
77598
+ * @memberof SurveyCreated
77599
+ * @static
77600
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
77601
+ * @param {number} [length] Message length if known beforehand
77602
+ * @returns {SurveyCreated} SurveyCreated
77603
+ * @throws {Error} If the payload is not a reader or valid buffer
77604
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
77605
+ */
77606
+ SurveyCreated.decode = function decode(reader, length) {
77607
+ if (!(reader instanceof $Reader))
77608
+ reader = $Reader.create(reader);
77609
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SurveyCreated();
77610
+ while (reader.pos < end) {
77611
+ var tag = reader.uint32();
77612
+ switch (tag >>> 3) {
77613
+ case 1:
77614
+ message.timestamp = reader.uint64();
77615
+ break;
77616
+ case 2:
77617
+ message.survey = $root.Survey.decode(reader, reader.uint32());
77618
+ break;
77619
+ default:
77620
+ reader.skipType(tag & 7);
77621
+ break;
77622
+ }
77623
+ }
77624
+ return message;
77625
+ };
77626
+
77627
+ /**
77628
+ * Decodes a SurveyCreated message from the specified reader or buffer, length delimited.
77629
+ * @function decodeDelimited
77630
+ * @memberof SurveyCreated
77631
+ * @static
77632
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
77633
+ * @returns {SurveyCreated} SurveyCreated
77634
+ * @throws {Error} If the payload is not a reader or valid buffer
77635
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
77636
+ */
77637
+ SurveyCreated.decodeDelimited = function decodeDelimited(reader) {
77638
+ if (!(reader instanceof $Reader))
77639
+ reader = new $Reader(reader);
77640
+ return this.decode(reader, reader.uint32());
77641
+ };
77642
+
77643
+ /**
77644
+ * Verifies a SurveyCreated message.
77645
+ * @function verify
77646
+ * @memberof SurveyCreated
77647
+ * @static
77648
+ * @param {Object.<string,*>} message Plain object to verify
77649
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
77650
+ */
77651
+ SurveyCreated.verify = function verify(message) {
77652
+ if (typeof message !== "object" || message === null)
77653
+ return "object expected";
77654
+ if (message.timestamp != null && message.hasOwnProperty("timestamp"))
77655
+ if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high)))
77656
+ return "timestamp: integer|Long expected";
77657
+ if (message.survey != null && message.hasOwnProperty("survey")) {
77658
+ var error = $root.Survey.verify(message.survey);
77659
+ if (error)
77660
+ return "survey." + error;
77661
+ }
77662
+ return null;
77663
+ };
77664
+
77665
+ /**
77666
+ * Creates a SurveyCreated message from a plain object. Also converts values to their respective internal types.
77667
+ * @function fromObject
77668
+ * @memberof SurveyCreated
77669
+ * @static
77670
+ * @param {Object.<string,*>} object Plain object
77671
+ * @returns {SurveyCreated} SurveyCreated
77672
+ */
77673
+ SurveyCreated.fromObject = function fromObject(object) {
77674
+ if (object instanceof $root.SurveyCreated)
77675
+ return object;
77676
+ var message = new $root.SurveyCreated();
77677
+ if (object.timestamp != null)
77678
+ if ($util.Long)
77679
+ (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true;
77680
+ else if (typeof object.timestamp === "string")
77681
+ message.timestamp = parseInt(object.timestamp, 10);
77682
+ else if (typeof object.timestamp === "number")
77683
+ message.timestamp = object.timestamp;
77684
+ else if (typeof object.timestamp === "object")
77685
+ message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(true);
77686
+ if (object.survey != null) {
77687
+ if (typeof object.survey !== "object")
77688
+ throw TypeError(".SurveyCreated.survey: object expected");
77689
+ message.survey = $root.Survey.fromObject(object.survey);
77690
+ }
77691
+ return message;
77692
+ };
77693
+
77694
+ /**
77695
+ * Creates a plain object from a SurveyCreated message. Also converts values to other types if specified.
77696
+ * @function toObject
77697
+ * @memberof SurveyCreated
77698
+ * @static
77699
+ * @param {SurveyCreated} message SurveyCreated
77700
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
77701
+ * @returns {Object.<string,*>} Plain object
77702
+ */
77703
+ SurveyCreated.toObject = function toObject(message, options) {
77704
+ if (!options)
77705
+ options = {};
77706
+ var object = {};
77707
+ if (options.defaults) {
77708
+ if ($util.Long) {
77709
+ var long = new $util.Long(0, 0, true);
77710
+ object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
77711
+ } else
77712
+ object.timestamp = options.longs === String ? "0" : 0;
77713
+ object.survey = null;
77714
+ }
77715
+ if (message.timestamp != null && message.hasOwnProperty("timestamp"))
77716
+ if (typeof message.timestamp === "number")
77717
+ object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp;
77718
+ else
77719
+ 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;
77720
+ if (message.survey != null && message.hasOwnProperty("survey"))
77721
+ object.survey = $root.Survey.toObject(message.survey, options);
77722
+ return object;
77723
+ };
77724
+
77725
+ /**
77726
+ * Converts this SurveyCreated to JSON.
77727
+ * @function toJSON
77728
+ * @memberof SurveyCreated
77729
+ * @instance
77730
+ * @returns {Object.<string,*>} JSON object
77731
+ */
77732
+ SurveyCreated.prototype.toJSON = function toJSON() {
77733
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
77734
+ };
77735
+
77736
+ return SurveyCreated;
77737
+ })();
77738
+
77739
+ $root.SurveyUpdated = (function() {
77740
+
77741
+ /**
77742
+ * Properties of a SurveyUpdated.
77743
+ * @name ISurveyUpdated
77744
+ * @interface ISurveyUpdated
77745
+ * @property {number|Long|null} [timestamp] SurveyUpdated timestamp
77746
+ * @property {ISurvey|null} [survey] SurveyUpdated survey
77747
+ */
77748
+
77749
+ /**
77750
+ * Constructs a new SurveyUpdated.
77751
+ * @name SurveyUpdated
77752
+ * @classdesc Represents a SurveyUpdated.
77753
+ * @implements ISurveyUpdated
77754
+ * @constructor
77755
+ * @param {ISurveyUpdated=} [properties] Properties to set
77756
+ */
77757
+ function SurveyUpdated(properties) {
77758
+ if (properties)
77759
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
77760
+ if (properties[keys[i]] != null)
77761
+ this[keys[i]] = properties[keys[i]];
77762
+ }
77763
+
77764
+ /**
77765
+ * SurveyUpdated timestamp.
77766
+ * @member {number|Long} timestamp
77767
+ * @memberof SurveyUpdated
77768
+ * @instance
77769
+ */
77770
+ SurveyUpdated.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
77771
+
77772
+ /**
77773
+ * SurveyUpdated survey.
77774
+ * @member {ISurvey|null|undefined} survey
77775
+ * @memberof SurveyUpdated
77776
+ * @instance
77777
+ */
77778
+ SurveyUpdated.prototype.survey = null;
77779
+
77780
+ /**
77781
+ * Creates a new SurveyUpdated instance using the specified properties.
77782
+ * @function create
77783
+ * @memberof SurveyUpdated
77784
+ * @static
77785
+ * @param {ISurveyUpdated=} [properties] Properties to set
77786
+ * @returns {SurveyUpdated} SurveyUpdated instance
77787
+ */
77788
+ SurveyUpdated.create = function create(properties) {
77789
+ return new SurveyUpdated(properties);
77790
+ };
77791
+
77792
+ /**
77793
+ * Encodes the specified SurveyUpdated message. Does not implicitly {@link SurveyUpdated.verify|verify} messages.
77794
+ * @function encode
77795
+ * @memberof SurveyUpdated
77796
+ * @static
77797
+ * @param {ISurveyUpdated} message SurveyUpdated message or plain object to encode
77798
+ * @param {$protobuf.Writer} [writer] Writer to encode to
77799
+ * @returns {$protobuf.Writer} Writer
77800
+ */
77801
+ SurveyUpdated.encode = function encode(message, writer) {
77802
+ if (!writer)
77803
+ writer = $Writer.create();
77804
+ if (message.timestamp != null && message.hasOwnProperty("timestamp"))
77805
+ writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.timestamp);
77806
+ if (message.survey != null && message.hasOwnProperty("survey"))
77807
+ $root.Survey.encode(message.survey, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
77808
+ return writer;
77809
+ };
77810
+
77811
+ /**
77812
+ * Encodes the specified SurveyUpdated message, length delimited. Does not implicitly {@link SurveyUpdated.verify|verify} messages.
77813
+ * @function encodeDelimited
77814
+ * @memberof SurveyUpdated
77815
+ * @static
77816
+ * @param {ISurveyUpdated} message SurveyUpdated message or plain object to encode
77817
+ * @param {$protobuf.Writer} [writer] Writer to encode to
77818
+ * @returns {$protobuf.Writer} Writer
77819
+ */
77820
+ SurveyUpdated.encodeDelimited = function encodeDelimited(message, writer) {
77821
+ return this.encode(message, writer).ldelim();
77822
+ };
77823
+
77824
+ /**
77825
+ * Decodes a SurveyUpdated message from the specified reader or buffer.
77826
+ * @function decode
77827
+ * @memberof SurveyUpdated
77828
+ * @static
77829
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
77830
+ * @param {number} [length] Message length if known beforehand
77831
+ * @returns {SurveyUpdated} SurveyUpdated
77832
+ * @throws {Error} If the payload is not a reader or valid buffer
77833
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
77834
+ */
77835
+ SurveyUpdated.decode = function decode(reader, length) {
77836
+ if (!(reader instanceof $Reader))
77837
+ reader = $Reader.create(reader);
77838
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SurveyUpdated();
77839
+ while (reader.pos < end) {
77840
+ var tag = reader.uint32();
77841
+ switch (tag >>> 3) {
77842
+ case 1:
77843
+ message.timestamp = reader.uint64();
77844
+ break;
77845
+ case 2:
77846
+ message.survey = $root.Survey.decode(reader, reader.uint32());
77847
+ break;
77848
+ default:
77849
+ reader.skipType(tag & 7);
77850
+ break;
77851
+ }
77852
+ }
77853
+ return message;
77854
+ };
77855
+
77856
+ /**
77857
+ * Decodes a SurveyUpdated message from the specified reader or buffer, length delimited.
77858
+ * @function decodeDelimited
77859
+ * @memberof SurveyUpdated
77860
+ * @static
77861
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
77862
+ * @returns {SurveyUpdated} SurveyUpdated
77863
+ * @throws {Error} If the payload is not a reader or valid buffer
77864
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
77865
+ */
77866
+ SurveyUpdated.decodeDelimited = function decodeDelimited(reader) {
77867
+ if (!(reader instanceof $Reader))
77868
+ reader = new $Reader(reader);
77869
+ return this.decode(reader, reader.uint32());
77870
+ };
77871
+
77872
+ /**
77873
+ * Verifies a SurveyUpdated message.
77874
+ * @function verify
77875
+ * @memberof SurveyUpdated
77876
+ * @static
77877
+ * @param {Object.<string,*>} message Plain object to verify
77878
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
77879
+ */
77880
+ SurveyUpdated.verify = function verify(message) {
77881
+ if (typeof message !== "object" || message === null)
77882
+ return "object expected";
77883
+ if (message.timestamp != null && message.hasOwnProperty("timestamp"))
77884
+ if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high)))
77885
+ return "timestamp: integer|Long expected";
77886
+ if (message.survey != null && message.hasOwnProperty("survey")) {
77887
+ var error = $root.Survey.verify(message.survey);
77888
+ if (error)
77889
+ return "survey." + error;
77890
+ }
77891
+ return null;
77892
+ };
77893
+
77894
+ /**
77895
+ * Creates a SurveyUpdated message from a plain object. Also converts values to their respective internal types.
77896
+ * @function fromObject
77897
+ * @memberof SurveyUpdated
77898
+ * @static
77899
+ * @param {Object.<string,*>} object Plain object
77900
+ * @returns {SurveyUpdated} SurveyUpdated
77901
+ */
77902
+ SurveyUpdated.fromObject = function fromObject(object) {
77903
+ if (object instanceof $root.SurveyUpdated)
77904
+ return object;
77905
+ var message = new $root.SurveyUpdated();
77906
+ if (object.timestamp != null)
77907
+ if ($util.Long)
77908
+ (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true;
77909
+ else if (typeof object.timestamp === "string")
77910
+ message.timestamp = parseInt(object.timestamp, 10);
77911
+ else if (typeof object.timestamp === "number")
77912
+ message.timestamp = object.timestamp;
77913
+ else if (typeof object.timestamp === "object")
77914
+ message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(true);
77915
+ if (object.survey != null) {
77916
+ if (typeof object.survey !== "object")
77917
+ throw TypeError(".SurveyUpdated.survey: object expected");
77918
+ message.survey = $root.Survey.fromObject(object.survey);
77919
+ }
77920
+ return message;
77921
+ };
77922
+
77923
+ /**
77924
+ * Creates a plain object from a SurveyUpdated message. Also converts values to other types if specified.
77925
+ * @function toObject
77926
+ * @memberof SurveyUpdated
77927
+ * @static
77928
+ * @param {SurveyUpdated} message SurveyUpdated
77929
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
77930
+ * @returns {Object.<string,*>} Plain object
77931
+ */
77932
+ SurveyUpdated.toObject = function toObject(message, options) {
77933
+ if (!options)
77934
+ options = {};
77935
+ var object = {};
77936
+ if (options.defaults) {
77937
+ if ($util.Long) {
77938
+ var long = new $util.Long(0, 0, true);
77939
+ object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
77940
+ } else
77941
+ object.timestamp = options.longs === String ? "0" : 0;
77942
+ object.survey = null;
77943
+ }
77944
+ if (message.timestamp != null && message.hasOwnProperty("timestamp"))
77945
+ if (typeof message.timestamp === "number")
77946
+ object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp;
77947
+ else
77948
+ 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;
77949
+ if (message.survey != null && message.hasOwnProperty("survey"))
77950
+ object.survey = $root.Survey.toObject(message.survey, options);
77951
+ return object;
77952
+ };
77953
+
77954
+ /**
77955
+ * Converts this SurveyUpdated to JSON.
77956
+ * @function toJSON
77957
+ * @memberof SurveyUpdated
77958
+ * @instance
77959
+ * @returns {Object.<string,*>} JSON object
77960
+ */
77961
+ SurveyUpdated.prototype.toJSON = function toJSON() {
77962
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
77963
+ };
77964
+
77965
+ return SurveyUpdated;
77966
+ })();
77967
+
77968
+ $root.SurveyDeleted = (function() {
77969
+
77970
+ /**
77971
+ * Properties of a SurveyDeleted.
77972
+ * @name ISurveyDeleted
77973
+ * @interface ISurveyDeleted
77974
+ * @property {number|Long|null} [timestamp] SurveyDeleted timestamp
77975
+ * @property {ISurvey|null} [survey] SurveyDeleted survey
77976
+ */
77977
+
77978
+ /**
77979
+ * Constructs a new SurveyDeleted.
77980
+ * @name SurveyDeleted
77981
+ * @classdesc Represents a SurveyDeleted.
77982
+ * @implements ISurveyDeleted
77983
+ * @constructor
77984
+ * @param {ISurveyDeleted=} [properties] Properties to set
77985
+ */
77986
+ function SurveyDeleted(properties) {
77987
+ if (properties)
77988
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
77989
+ if (properties[keys[i]] != null)
77990
+ this[keys[i]] = properties[keys[i]];
77991
+ }
77992
+
77993
+ /**
77994
+ * SurveyDeleted timestamp.
77995
+ * @member {number|Long} timestamp
77996
+ * @memberof SurveyDeleted
77997
+ * @instance
77998
+ */
77999
+ SurveyDeleted.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
78000
+
78001
+ /**
78002
+ * SurveyDeleted survey.
78003
+ * @member {ISurvey|null|undefined} survey
78004
+ * @memberof SurveyDeleted
78005
+ * @instance
78006
+ */
78007
+ SurveyDeleted.prototype.survey = null;
78008
+
78009
+ /**
78010
+ * Creates a new SurveyDeleted instance using the specified properties.
78011
+ * @function create
78012
+ * @memberof SurveyDeleted
78013
+ * @static
78014
+ * @param {ISurveyDeleted=} [properties] Properties to set
78015
+ * @returns {SurveyDeleted} SurveyDeleted instance
78016
+ */
78017
+ SurveyDeleted.create = function create(properties) {
78018
+ return new SurveyDeleted(properties);
78019
+ };
78020
+
78021
+ /**
78022
+ * Encodes the specified SurveyDeleted message. Does not implicitly {@link SurveyDeleted.verify|verify} messages.
78023
+ * @function encode
78024
+ * @memberof SurveyDeleted
78025
+ * @static
78026
+ * @param {ISurveyDeleted} message SurveyDeleted message or plain object to encode
78027
+ * @param {$protobuf.Writer} [writer] Writer to encode to
78028
+ * @returns {$protobuf.Writer} Writer
78029
+ */
78030
+ SurveyDeleted.encode = function encode(message, writer) {
78031
+ if (!writer)
78032
+ writer = $Writer.create();
78033
+ if (message.timestamp != null && message.hasOwnProperty("timestamp"))
78034
+ writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.timestamp);
78035
+ if (message.survey != null && message.hasOwnProperty("survey"))
78036
+ $root.Survey.encode(message.survey, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
78037
+ return writer;
78038
+ };
78039
+
78040
+ /**
78041
+ * Encodes the specified SurveyDeleted message, length delimited. Does not implicitly {@link SurveyDeleted.verify|verify} messages.
78042
+ * @function encodeDelimited
78043
+ * @memberof SurveyDeleted
78044
+ * @static
78045
+ * @param {ISurveyDeleted} message SurveyDeleted message or plain object to encode
78046
+ * @param {$protobuf.Writer} [writer] Writer to encode to
78047
+ * @returns {$protobuf.Writer} Writer
78048
+ */
78049
+ SurveyDeleted.encodeDelimited = function encodeDelimited(message, writer) {
78050
+ return this.encode(message, writer).ldelim();
78051
+ };
78052
+
78053
+ /**
78054
+ * Decodes a SurveyDeleted message from the specified reader or buffer.
78055
+ * @function decode
78056
+ * @memberof SurveyDeleted
78057
+ * @static
78058
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
78059
+ * @param {number} [length] Message length if known beforehand
78060
+ * @returns {SurveyDeleted} SurveyDeleted
78061
+ * @throws {Error} If the payload is not a reader or valid buffer
78062
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
78063
+ */
78064
+ SurveyDeleted.decode = function decode(reader, length) {
78065
+ if (!(reader instanceof $Reader))
78066
+ reader = $Reader.create(reader);
78067
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SurveyDeleted();
78068
+ while (reader.pos < end) {
78069
+ var tag = reader.uint32();
78070
+ switch (tag >>> 3) {
78071
+ case 1:
78072
+ message.timestamp = reader.uint64();
78073
+ break;
78074
+ case 2:
78075
+ message.survey = $root.Survey.decode(reader, reader.uint32());
78076
+ break;
78077
+ default:
78078
+ reader.skipType(tag & 7);
78079
+ break;
78080
+ }
78081
+ }
78082
+ return message;
78083
+ };
78084
+
78085
+ /**
78086
+ * Decodes a SurveyDeleted message from the specified reader or buffer, length delimited.
78087
+ * @function decodeDelimited
78088
+ * @memberof SurveyDeleted
78089
+ * @static
78090
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
78091
+ * @returns {SurveyDeleted} SurveyDeleted
78092
+ * @throws {Error} If the payload is not a reader or valid buffer
78093
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
78094
+ */
78095
+ SurveyDeleted.decodeDelimited = function decodeDelimited(reader) {
78096
+ if (!(reader instanceof $Reader))
78097
+ reader = new $Reader(reader);
78098
+ return this.decode(reader, reader.uint32());
78099
+ };
78100
+
78101
+ /**
78102
+ * Verifies a SurveyDeleted message.
78103
+ * @function verify
78104
+ * @memberof SurveyDeleted
78105
+ * @static
78106
+ * @param {Object.<string,*>} message Plain object to verify
78107
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
78108
+ */
78109
+ SurveyDeleted.verify = function verify(message) {
78110
+ if (typeof message !== "object" || message === null)
78111
+ return "object expected";
78112
+ if (message.timestamp != null && message.hasOwnProperty("timestamp"))
78113
+ if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high)))
78114
+ return "timestamp: integer|Long expected";
78115
+ if (message.survey != null && message.hasOwnProperty("survey")) {
78116
+ var error = $root.Survey.verify(message.survey);
78117
+ if (error)
78118
+ return "survey." + error;
78119
+ }
78120
+ return null;
78121
+ };
78122
+
78123
+ /**
78124
+ * Creates a SurveyDeleted message from a plain object. Also converts values to their respective internal types.
78125
+ * @function fromObject
78126
+ * @memberof SurveyDeleted
78127
+ * @static
78128
+ * @param {Object.<string,*>} object Plain object
78129
+ * @returns {SurveyDeleted} SurveyDeleted
78130
+ */
78131
+ SurveyDeleted.fromObject = function fromObject(object) {
78132
+ if (object instanceof $root.SurveyDeleted)
78133
+ return object;
78134
+ var message = new $root.SurveyDeleted();
78135
+ if (object.timestamp != null)
78136
+ if ($util.Long)
78137
+ (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true;
78138
+ else if (typeof object.timestamp === "string")
78139
+ message.timestamp = parseInt(object.timestamp, 10);
78140
+ else if (typeof object.timestamp === "number")
78141
+ message.timestamp = object.timestamp;
78142
+ else if (typeof object.timestamp === "object")
78143
+ message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(true);
78144
+ if (object.survey != null) {
78145
+ if (typeof object.survey !== "object")
78146
+ throw TypeError(".SurveyDeleted.survey: object expected");
78147
+ message.survey = $root.Survey.fromObject(object.survey);
78148
+ }
78149
+ return message;
78150
+ };
78151
+
78152
+ /**
78153
+ * Creates a plain object from a SurveyDeleted message. Also converts values to other types if specified.
78154
+ * @function toObject
78155
+ * @memberof SurveyDeleted
78156
+ * @static
78157
+ * @param {SurveyDeleted} message SurveyDeleted
78158
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
78159
+ * @returns {Object.<string,*>} Plain object
78160
+ */
78161
+ SurveyDeleted.toObject = function toObject(message, options) {
78162
+ if (!options)
78163
+ options = {};
78164
+ var object = {};
78165
+ if (options.defaults) {
78166
+ if ($util.Long) {
78167
+ var long = new $util.Long(0, 0, true);
78168
+ object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
78169
+ } else
78170
+ object.timestamp = options.longs === String ? "0" : 0;
78171
+ object.survey = null;
78172
+ }
78173
+ if (message.timestamp != null && message.hasOwnProperty("timestamp"))
78174
+ if (typeof message.timestamp === "number")
78175
+ object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp;
78176
+ else
78177
+ 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;
78178
+ if (message.survey != null && message.hasOwnProperty("survey"))
78179
+ object.survey = $root.Survey.toObject(message.survey, options);
78180
+ return object;
78181
+ };
78182
+
78183
+ /**
78184
+ * Converts this SurveyDeleted to JSON.
78185
+ * @function toJSON
78186
+ * @memberof SurveyDeleted
78187
+ * @instance
78188
+ * @returns {Object.<string,*>} JSON object
78189
+ */
78190
+ SurveyDeleted.prototype.toJSON = function toJSON() {
78191
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
78192
+ };
78193
+
78194
+ return SurveyDeleted;
78195
+ })();
78196
+
77040
78197
  $root.AssessmentScore = (function() {
77041
78198
 
77042
78199
  /**