@headspace/protos-events 1.10.0 → 1.12.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 +937 -69
  2. package/lib/index.js +2154 -187
  3. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -9,6 +9,219 @@ var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.ut
9
9
  // Exported root namespace
10
10
  var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});
11
11
 
12
+ $root.date = (function() {
13
+
14
+ /**
15
+ * Namespace date.
16
+ * @exports date
17
+ * @namespace
18
+ */
19
+ var date = {};
20
+
21
+ date.Date = (function() {
22
+
23
+ /**
24
+ * Properties of a Date.
25
+ * @memberof date
26
+ * @interface IDate
27
+ * @property {number|Long|null} [epochMilliseconds] Date epochMilliseconds
28
+ */
29
+
30
+ /**
31
+ * Constructs a new Date.
32
+ * @memberof date
33
+ * @classdesc Represents a Date.
34
+ * @implements IDate
35
+ * @constructor
36
+ * @param {date.IDate=} [properties] Properties to set
37
+ */
38
+ function Date(properties) {
39
+ if (properties)
40
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
41
+ if (properties[keys[i]] != null)
42
+ this[keys[i]] = properties[keys[i]];
43
+ }
44
+
45
+ /**
46
+ * Date epochMilliseconds.
47
+ * @member {number|Long} epochMilliseconds
48
+ * @memberof date.Date
49
+ * @instance
50
+ */
51
+ Date.prototype.epochMilliseconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
52
+
53
+ /**
54
+ * Creates a new Date instance using the specified properties.
55
+ * @function create
56
+ * @memberof date.Date
57
+ * @static
58
+ * @param {date.IDate=} [properties] Properties to set
59
+ * @returns {date.Date} Date instance
60
+ */
61
+ Date.create = function create(properties) {
62
+ return new Date(properties);
63
+ };
64
+
65
+ /**
66
+ * Encodes the specified Date message. Does not implicitly {@link date.Date.verify|verify} messages.
67
+ * @function encode
68
+ * @memberof date.Date
69
+ * @static
70
+ * @param {date.IDate} message Date message or plain object to encode
71
+ * @param {$protobuf.Writer} [writer] Writer to encode to
72
+ * @returns {$protobuf.Writer} Writer
73
+ */
74
+ Date.encode = function encode(message, writer) {
75
+ if (!writer)
76
+ writer = $Writer.create();
77
+ if (message.epochMilliseconds != null && message.hasOwnProperty("epochMilliseconds"))
78
+ writer.uint32(/* id 1, wireType 0 =*/8).int64(message.epochMilliseconds);
79
+ return writer;
80
+ };
81
+
82
+ /**
83
+ * Encodes the specified Date message, length delimited. Does not implicitly {@link date.Date.verify|verify} messages.
84
+ * @function encodeDelimited
85
+ * @memberof date.Date
86
+ * @static
87
+ * @param {date.IDate} message Date message or plain object to encode
88
+ * @param {$protobuf.Writer} [writer] Writer to encode to
89
+ * @returns {$protobuf.Writer} Writer
90
+ */
91
+ Date.encodeDelimited = function encodeDelimited(message, writer) {
92
+ return this.encode(message, writer).ldelim();
93
+ };
94
+
95
+ /**
96
+ * Decodes a Date message from the specified reader or buffer.
97
+ * @function decode
98
+ * @memberof date.Date
99
+ * @static
100
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
101
+ * @param {number} [length] Message length if known beforehand
102
+ * @returns {date.Date} Date
103
+ * @throws {Error} If the payload is not a reader or valid buffer
104
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
105
+ */
106
+ Date.decode = function decode(reader, length) {
107
+ if (!(reader instanceof $Reader))
108
+ reader = $Reader.create(reader);
109
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.date.Date();
110
+ while (reader.pos < end) {
111
+ var tag = reader.uint32();
112
+ switch (tag >>> 3) {
113
+ case 1:
114
+ message.epochMilliseconds = reader.int64();
115
+ break;
116
+ default:
117
+ reader.skipType(tag & 7);
118
+ break;
119
+ }
120
+ }
121
+ return message;
122
+ };
123
+
124
+ /**
125
+ * Decodes a Date message from the specified reader or buffer, length delimited.
126
+ * @function decodeDelimited
127
+ * @memberof date.Date
128
+ * @static
129
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
130
+ * @returns {date.Date} Date
131
+ * @throws {Error} If the payload is not a reader or valid buffer
132
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
133
+ */
134
+ Date.decodeDelimited = function decodeDelimited(reader) {
135
+ if (!(reader instanceof $Reader))
136
+ reader = new $Reader(reader);
137
+ return this.decode(reader, reader.uint32());
138
+ };
139
+
140
+ /**
141
+ * Verifies a Date message.
142
+ * @function verify
143
+ * @memberof date.Date
144
+ * @static
145
+ * @param {Object.<string,*>} message Plain object to verify
146
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
147
+ */
148
+ Date.verify = function verify(message) {
149
+ if (typeof message !== "object" || message === null)
150
+ return "object expected";
151
+ if (message.epochMilliseconds != null && message.hasOwnProperty("epochMilliseconds"))
152
+ if (!$util.isInteger(message.epochMilliseconds) && !(message.epochMilliseconds && $util.isInteger(message.epochMilliseconds.low) && $util.isInteger(message.epochMilliseconds.high)))
153
+ return "epochMilliseconds: integer|Long expected";
154
+ return null;
155
+ };
156
+
157
+ /**
158
+ * Creates a Date message from a plain object. Also converts values to their respective internal types.
159
+ * @function fromObject
160
+ * @memberof date.Date
161
+ * @static
162
+ * @param {Object.<string,*>} object Plain object
163
+ * @returns {date.Date} Date
164
+ */
165
+ Date.fromObject = function fromObject(object) {
166
+ if (object instanceof $root.date.Date)
167
+ return object;
168
+ var message = new $root.date.Date();
169
+ if (object.epochMilliseconds != null)
170
+ if ($util.Long)
171
+ (message.epochMilliseconds = $util.Long.fromValue(object.epochMilliseconds)).unsigned = false;
172
+ else if (typeof object.epochMilliseconds === "string")
173
+ message.epochMilliseconds = parseInt(object.epochMilliseconds, 10);
174
+ else if (typeof object.epochMilliseconds === "number")
175
+ message.epochMilliseconds = object.epochMilliseconds;
176
+ else if (typeof object.epochMilliseconds === "object")
177
+ message.epochMilliseconds = new $util.LongBits(object.epochMilliseconds.low >>> 0, object.epochMilliseconds.high >>> 0).toNumber();
178
+ return message;
179
+ };
180
+
181
+ /**
182
+ * Creates a plain object from a Date message. Also converts values to other types if specified.
183
+ * @function toObject
184
+ * @memberof date.Date
185
+ * @static
186
+ * @param {date.Date} message Date
187
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
188
+ * @returns {Object.<string,*>} Plain object
189
+ */
190
+ Date.toObject = function toObject(message, options) {
191
+ if (!options)
192
+ options = {};
193
+ var object = {};
194
+ if (options.defaults)
195
+ if ($util.Long) {
196
+ var long = new $util.Long(0, 0, false);
197
+ object.epochMilliseconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
198
+ } else
199
+ object.epochMilliseconds = options.longs === String ? "0" : 0;
200
+ if (message.epochMilliseconds != null && message.hasOwnProperty("epochMilliseconds"))
201
+ if (typeof message.epochMilliseconds === "number")
202
+ object.epochMilliseconds = options.longs === String ? String(message.epochMilliseconds) : message.epochMilliseconds;
203
+ else
204
+ object.epochMilliseconds = options.longs === String ? $util.Long.prototype.toString.call(message.epochMilliseconds) : options.longs === Number ? new $util.LongBits(message.epochMilliseconds.low >>> 0, message.epochMilliseconds.high >>> 0).toNumber() : message.epochMilliseconds;
205
+ return object;
206
+ };
207
+
208
+ /**
209
+ * Converts this Date to JSON.
210
+ * @function toJSON
211
+ * @memberof date.Date
212
+ * @instance
213
+ * @returns {Object.<string,*>} JSON object
214
+ */
215
+ Date.prototype.toJSON = function toJSON() {
216
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
217
+ };
218
+
219
+ return Date;
220
+ })();
221
+
222
+ return date;
223
+ })();
224
+
12
225
  $root.subscription = (function() {
13
226
 
14
227
  /**
@@ -48,6 +261,1514 @@ $root.subscription = (function() {
48
261
  return values;
49
262
  })();
50
263
 
264
+ subscription.SubscriptionGrpcManager = (function() {
265
+
266
+ /**
267
+ * Constructs a new SubscriptionGrpcManager service.
268
+ * @memberof subscription
269
+ * @classdesc Represents a SubscriptionGrpcManager
270
+ * @extends $protobuf.rpc.Service
271
+ * @constructor
272
+ * @param {$protobuf.RPCImpl} rpcImpl RPC implementation
273
+ * @param {boolean} [requestDelimited=false] Whether requests are length-delimited
274
+ * @param {boolean} [responseDelimited=false] Whether responses are length-delimited
275
+ */
276
+ function SubscriptionGrpcManager(rpcImpl, requestDelimited, responseDelimited) {
277
+ $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited);
278
+ }
279
+
280
+ (SubscriptionGrpcManager.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = SubscriptionGrpcManager;
281
+
282
+ /**
283
+ * Creates new SubscriptionGrpcManager service using the specified rpc implementation.
284
+ * @function create
285
+ * @memberof subscription.SubscriptionGrpcManager
286
+ * @static
287
+ * @param {$protobuf.RPCImpl} rpcImpl RPC implementation
288
+ * @param {boolean} [requestDelimited=false] Whether requests are length-delimited
289
+ * @param {boolean} [responseDelimited=false] Whether responses are length-delimited
290
+ * @returns {SubscriptionGrpcManager} RPC service. Useful where requests and/or responses are streamed.
291
+ */
292
+ SubscriptionGrpcManager.create = function create(rpcImpl, requestDelimited, responseDelimited) {
293
+ return new this(rpcImpl, requestDelimited, responseDelimited);
294
+ };
295
+
296
+ /**
297
+ * Callback as used by {@link subscription.SubscriptionGrpcManager#findSubscriptions}.
298
+ * @memberof subscription.SubscriptionGrpcManager
299
+ * @typedef findSubscriptionsCallback
300
+ * @type {function}
301
+ * @param {Error|null} error Error, if any
302
+ * @param {subscription.ManySubscriptionsResponse} [response] ManySubscriptionsResponse
303
+ */
304
+
305
+ /**
306
+ * Calls findSubscriptions.
307
+ * @function findSubscriptions
308
+ * @memberof subscription.SubscriptionGrpcManager
309
+ * @instance
310
+ * @param {subscription.IFindAllSubscriptionsRequest} request FindAllSubscriptionsRequest message or plain object
311
+ * @param {subscription.SubscriptionGrpcManager.findSubscriptionsCallback} callback Node-style callback called with the error, if any, and ManySubscriptionsResponse
312
+ * @returns {undefined}
313
+ * @variation 1
314
+ */
315
+ Object.defineProperty(SubscriptionGrpcManager.prototype.findSubscriptions = function findSubscriptions(request, callback) {
316
+ return this.rpcCall(findSubscriptions, $root.subscription.FindAllSubscriptionsRequest, $root.subscription.ManySubscriptionsResponse, request, callback);
317
+ }, "name", { value: "findSubscriptions" });
318
+
319
+ /**
320
+ * Calls findSubscriptions.
321
+ * @function findSubscriptions
322
+ * @memberof subscription.SubscriptionGrpcManager
323
+ * @instance
324
+ * @param {subscription.IFindAllSubscriptionsRequest} request FindAllSubscriptionsRequest message or plain object
325
+ * @returns {Promise<subscription.ManySubscriptionsResponse>} Promise
326
+ * @variation 2
327
+ */
328
+
329
+ /**
330
+ * Callback as used by {@link subscription.SubscriptionGrpcManager#findCurrentSubscription}.
331
+ * @memberof subscription.SubscriptionGrpcManager
332
+ * @typedef findCurrentSubscriptionCallback
333
+ * @type {function}
334
+ * @param {Error|null} error Error, if any
335
+ * @param {subscription.OneSubscriptionResponse} [response] OneSubscriptionResponse
336
+ */
337
+
338
+ /**
339
+ * Calls findCurrentSubscription.
340
+ * @function findCurrentSubscription
341
+ * @memberof subscription.SubscriptionGrpcManager
342
+ * @instance
343
+ * @param {subscription.IFindCurrentSubscriptionRequest} request FindCurrentSubscriptionRequest message or plain object
344
+ * @param {subscription.SubscriptionGrpcManager.findCurrentSubscriptionCallback} callback Node-style callback called with the error, if any, and OneSubscriptionResponse
345
+ * @returns {undefined}
346
+ * @variation 1
347
+ */
348
+ Object.defineProperty(SubscriptionGrpcManager.prototype.findCurrentSubscription = function findCurrentSubscription(request, callback) {
349
+ return this.rpcCall(findCurrentSubscription, $root.subscription.FindCurrentSubscriptionRequest, $root.subscription.OneSubscriptionResponse, request, callback);
350
+ }, "name", { value: "findCurrentSubscription" });
351
+
352
+ /**
353
+ * Calls findCurrentSubscription.
354
+ * @function findCurrentSubscription
355
+ * @memberof subscription.SubscriptionGrpcManager
356
+ * @instance
357
+ * @param {subscription.IFindCurrentSubscriptionRequest} request FindCurrentSubscriptionRequest message or plain object
358
+ * @returns {Promise<subscription.OneSubscriptionResponse>} Promise
359
+ * @variation 2
360
+ */
361
+
362
+ return SubscriptionGrpcManager;
363
+ })();
364
+
365
+ subscription.FindAllSubscriptionsRequest = (function() {
366
+
367
+ /**
368
+ * Properties of a FindAllSubscriptionsRequest.
369
+ * @memberof subscription
370
+ * @interface IFindAllSubscriptionsRequest
371
+ * @property {string|null} [userId] FindAllSubscriptionsRequest userId
372
+ */
373
+
374
+ /**
375
+ * Constructs a new FindAllSubscriptionsRequest.
376
+ * @memberof subscription
377
+ * @classdesc Represents a FindAllSubscriptionsRequest.
378
+ * @implements IFindAllSubscriptionsRequest
379
+ * @constructor
380
+ * @param {subscription.IFindAllSubscriptionsRequest=} [properties] Properties to set
381
+ */
382
+ function FindAllSubscriptionsRequest(properties) {
383
+ if (properties)
384
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
385
+ if (properties[keys[i]] != null)
386
+ this[keys[i]] = properties[keys[i]];
387
+ }
388
+
389
+ /**
390
+ * FindAllSubscriptionsRequest userId.
391
+ * @member {string} userId
392
+ * @memberof subscription.FindAllSubscriptionsRequest
393
+ * @instance
394
+ */
395
+ FindAllSubscriptionsRequest.prototype.userId = "";
396
+
397
+ /**
398
+ * Creates a new FindAllSubscriptionsRequest instance using the specified properties.
399
+ * @function create
400
+ * @memberof subscription.FindAllSubscriptionsRequest
401
+ * @static
402
+ * @param {subscription.IFindAllSubscriptionsRequest=} [properties] Properties to set
403
+ * @returns {subscription.FindAllSubscriptionsRequest} FindAllSubscriptionsRequest instance
404
+ */
405
+ FindAllSubscriptionsRequest.create = function create(properties) {
406
+ return new FindAllSubscriptionsRequest(properties);
407
+ };
408
+
409
+ /**
410
+ * Encodes the specified FindAllSubscriptionsRequest message. Does not implicitly {@link subscription.FindAllSubscriptionsRequest.verify|verify} messages.
411
+ * @function encode
412
+ * @memberof subscription.FindAllSubscriptionsRequest
413
+ * @static
414
+ * @param {subscription.IFindAllSubscriptionsRequest} message FindAllSubscriptionsRequest message or plain object to encode
415
+ * @param {$protobuf.Writer} [writer] Writer to encode to
416
+ * @returns {$protobuf.Writer} Writer
417
+ */
418
+ FindAllSubscriptionsRequest.encode = function encode(message, writer) {
419
+ if (!writer)
420
+ writer = $Writer.create();
421
+ if (message.userId != null && message.hasOwnProperty("userId"))
422
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.userId);
423
+ return writer;
424
+ };
425
+
426
+ /**
427
+ * Encodes the specified FindAllSubscriptionsRequest message, length delimited. Does not implicitly {@link subscription.FindAllSubscriptionsRequest.verify|verify} messages.
428
+ * @function encodeDelimited
429
+ * @memberof subscription.FindAllSubscriptionsRequest
430
+ * @static
431
+ * @param {subscription.IFindAllSubscriptionsRequest} message FindAllSubscriptionsRequest message or plain object to encode
432
+ * @param {$protobuf.Writer} [writer] Writer to encode to
433
+ * @returns {$protobuf.Writer} Writer
434
+ */
435
+ FindAllSubscriptionsRequest.encodeDelimited = function encodeDelimited(message, writer) {
436
+ return this.encode(message, writer).ldelim();
437
+ };
438
+
439
+ /**
440
+ * Decodes a FindAllSubscriptionsRequest message from the specified reader or buffer.
441
+ * @function decode
442
+ * @memberof subscription.FindAllSubscriptionsRequest
443
+ * @static
444
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
445
+ * @param {number} [length] Message length if known beforehand
446
+ * @returns {subscription.FindAllSubscriptionsRequest} FindAllSubscriptionsRequest
447
+ * @throws {Error} If the payload is not a reader or valid buffer
448
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
449
+ */
450
+ FindAllSubscriptionsRequest.decode = function decode(reader, length) {
451
+ if (!(reader instanceof $Reader))
452
+ reader = $Reader.create(reader);
453
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.subscription.FindAllSubscriptionsRequest();
454
+ while (reader.pos < end) {
455
+ var tag = reader.uint32();
456
+ switch (tag >>> 3) {
457
+ case 1:
458
+ message.userId = reader.string();
459
+ break;
460
+ default:
461
+ reader.skipType(tag & 7);
462
+ break;
463
+ }
464
+ }
465
+ return message;
466
+ };
467
+
468
+ /**
469
+ * Decodes a FindAllSubscriptionsRequest message from the specified reader or buffer, length delimited.
470
+ * @function decodeDelimited
471
+ * @memberof subscription.FindAllSubscriptionsRequest
472
+ * @static
473
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
474
+ * @returns {subscription.FindAllSubscriptionsRequest} FindAllSubscriptionsRequest
475
+ * @throws {Error} If the payload is not a reader or valid buffer
476
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
477
+ */
478
+ FindAllSubscriptionsRequest.decodeDelimited = function decodeDelimited(reader) {
479
+ if (!(reader instanceof $Reader))
480
+ reader = new $Reader(reader);
481
+ return this.decode(reader, reader.uint32());
482
+ };
483
+
484
+ /**
485
+ * Verifies a FindAllSubscriptionsRequest message.
486
+ * @function verify
487
+ * @memberof subscription.FindAllSubscriptionsRequest
488
+ * @static
489
+ * @param {Object.<string,*>} message Plain object to verify
490
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
491
+ */
492
+ FindAllSubscriptionsRequest.verify = function verify(message) {
493
+ if (typeof message !== "object" || message === null)
494
+ return "object expected";
495
+ if (message.userId != null && message.hasOwnProperty("userId"))
496
+ if (!$util.isString(message.userId))
497
+ return "userId: string expected";
498
+ return null;
499
+ };
500
+
501
+ /**
502
+ * Creates a FindAllSubscriptionsRequest message from a plain object. Also converts values to their respective internal types.
503
+ * @function fromObject
504
+ * @memberof subscription.FindAllSubscriptionsRequest
505
+ * @static
506
+ * @param {Object.<string,*>} object Plain object
507
+ * @returns {subscription.FindAllSubscriptionsRequest} FindAllSubscriptionsRequest
508
+ */
509
+ FindAllSubscriptionsRequest.fromObject = function fromObject(object) {
510
+ if (object instanceof $root.subscription.FindAllSubscriptionsRequest)
511
+ return object;
512
+ var message = new $root.subscription.FindAllSubscriptionsRequest();
513
+ if (object.userId != null)
514
+ message.userId = String(object.userId);
515
+ return message;
516
+ };
517
+
518
+ /**
519
+ * Creates a plain object from a FindAllSubscriptionsRequest message. Also converts values to other types if specified.
520
+ * @function toObject
521
+ * @memberof subscription.FindAllSubscriptionsRequest
522
+ * @static
523
+ * @param {subscription.FindAllSubscriptionsRequest} message FindAllSubscriptionsRequest
524
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
525
+ * @returns {Object.<string,*>} Plain object
526
+ */
527
+ FindAllSubscriptionsRequest.toObject = function toObject(message, options) {
528
+ if (!options)
529
+ options = {};
530
+ var object = {};
531
+ if (options.defaults)
532
+ object.userId = "";
533
+ if (message.userId != null && message.hasOwnProperty("userId"))
534
+ object.userId = message.userId;
535
+ return object;
536
+ };
537
+
538
+ /**
539
+ * Converts this FindAllSubscriptionsRequest to JSON.
540
+ * @function toJSON
541
+ * @memberof subscription.FindAllSubscriptionsRequest
542
+ * @instance
543
+ * @returns {Object.<string,*>} JSON object
544
+ */
545
+ FindAllSubscriptionsRequest.prototype.toJSON = function toJSON() {
546
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
547
+ };
548
+
549
+ return FindAllSubscriptionsRequest;
550
+ })();
551
+
552
+ subscription.FindCurrentSubscriptionRequest = (function() {
553
+
554
+ /**
555
+ * Properties of a FindCurrentSubscriptionRequest.
556
+ * @memberof subscription
557
+ * @interface IFindCurrentSubscriptionRequest
558
+ * @property {string|null} [userId] FindCurrentSubscriptionRequest userId
559
+ */
560
+
561
+ /**
562
+ * Constructs a new FindCurrentSubscriptionRequest.
563
+ * @memberof subscription
564
+ * @classdesc Represents a FindCurrentSubscriptionRequest.
565
+ * @implements IFindCurrentSubscriptionRequest
566
+ * @constructor
567
+ * @param {subscription.IFindCurrentSubscriptionRequest=} [properties] Properties to set
568
+ */
569
+ function FindCurrentSubscriptionRequest(properties) {
570
+ if (properties)
571
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
572
+ if (properties[keys[i]] != null)
573
+ this[keys[i]] = properties[keys[i]];
574
+ }
575
+
576
+ /**
577
+ * FindCurrentSubscriptionRequest userId.
578
+ * @member {string} userId
579
+ * @memberof subscription.FindCurrentSubscriptionRequest
580
+ * @instance
581
+ */
582
+ FindCurrentSubscriptionRequest.prototype.userId = "";
583
+
584
+ /**
585
+ * Creates a new FindCurrentSubscriptionRequest instance using the specified properties.
586
+ * @function create
587
+ * @memberof subscription.FindCurrentSubscriptionRequest
588
+ * @static
589
+ * @param {subscription.IFindCurrentSubscriptionRequest=} [properties] Properties to set
590
+ * @returns {subscription.FindCurrentSubscriptionRequest} FindCurrentSubscriptionRequest instance
591
+ */
592
+ FindCurrentSubscriptionRequest.create = function create(properties) {
593
+ return new FindCurrentSubscriptionRequest(properties);
594
+ };
595
+
596
+ /**
597
+ * Encodes the specified FindCurrentSubscriptionRequest message. Does not implicitly {@link subscription.FindCurrentSubscriptionRequest.verify|verify} messages.
598
+ * @function encode
599
+ * @memberof subscription.FindCurrentSubscriptionRequest
600
+ * @static
601
+ * @param {subscription.IFindCurrentSubscriptionRequest} message FindCurrentSubscriptionRequest message or plain object to encode
602
+ * @param {$protobuf.Writer} [writer] Writer to encode to
603
+ * @returns {$protobuf.Writer} Writer
604
+ */
605
+ FindCurrentSubscriptionRequest.encode = function encode(message, writer) {
606
+ if (!writer)
607
+ writer = $Writer.create();
608
+ if (message.userId != null && message.hasOwnProperty("userId"))
609
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.userId);
610
+ return writer;
611
+ };
612
+
613
+ /**
614
+ * Encodes the specified FindCurrentSubscriptionRequest message, length delimited. Does not implicitly {@link subscription.FindCurrentSubscriptionRequest.verify|verify} messages.
615
+ * @function encodeDelimited
616
+ * @memberof subscription.FindCurrentSubscriptionRequest
617
+ * @static
618
+ * @param {subscription.IFindCurrentSubscriptionRequest} message FindCurrentSubscriptionRequest message or plain object to encode
619
+ * @param {$protobuf.Writer} [writer] Writer to encode to
620
+ * @returns {$protobuf.Writer} Writer
621
+ */
622
+ FindCurrentSubscriptionRequest.encodeDelimited = function encodeDelimited(message, writer) {
623
+ return this.encode(message, writer).ldelim();
624
+ };
625
+
626
+ /**
627
+ * Decodes a FindCurrentSubscriptionRequest message from the specified reader or buffer.
628
+ * @function decode
629
+ * @memberof subscription.FindCurrentSubscriptionRequest
630
+ * @static
631
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
632
+ * @param {number} [length] Message length if known beforehand
633
+ * @returns {subscription.FindCurrentSubscriptionRequest} FindCurrentSubscriptionRequest
634
+ * @throws {Error} If the payload is not a reader or valid buffer
635
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
636
+ */
637
+ FindCurrentSubscriptionRequest.decode = function decode(reader, length) {
638
+ if (!(reader instanceof $Reader))
639
+ reader = $Reader.create(reader);
640
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.subscription.FindCurrentSubscriptionRequest();
641
+ while (reader.pos < end) {
642
+ var tag = reader.uint32();
643
+ switch (tag >>> 3) {
644
+ case 1:
645
+ message.userId = reader.string();
646
+ break;
647
+ default:
648
+ reader.skipType(tag & 7);
649
+ break;
650
+ }
651
+ }
652
+ return message;
653
+ };
654
+
655
+ /**
656
+ * Decodes a FindCurrentSubscriptionRequest message from the specified reader or buffer, length delimited.
657
+ * @function decodeDelimited
658
+ * @memberof subscription.FindCurrentSubscriptionRequest
659
+ * @static
660
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
661
+ * @returns {subscription.FindCurrentSubscriptionRequest} FindCurrentSubscriptionRequest
662
+ * @throws {Error} If the payload is not a reader or valid buffer
663
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
664
+ */
665
+ FindCurrentSubscriptionRequest.decodeDelimited = function decodeDelimited(reader) {
666
+ if (!(reader instanceof $Reader))
667
+ reader = new $Reader(reader);
668
+ return this.decode(reader, reader.uint32());
669
+ };
670
+
671
+ /**
672
+ * Verifies a FindCurrentSubscriptionRequest message.
673
+ * @function verify
674
+ * @memberof subscription.FindCurrentSubscriptionRequest
675
+ * @static
676
+ * @param {Object.<string,*>} message Plain object to verify
677
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
678
+ */
679
+ FindCurrentSubscriptionRequest.verify = function verify(message) {
680
+ if (typeof message !== "object" || message === null)
681
+ return "object expected";
682
+ if (message.userId != null && message.hasOwnProperty("userId"))
683
+ if (!$util.isString(message.userId))
684
+ return "userId: string expected";
685
+ return null;
686
+ };
687
+
688
+ /**
689
+ * Creates a FindCurrentSubscriptionRequest message from a plain object. Also converts values to their respective internal types.
690
+ * @function fromObject
691
+ * @memberof subscription.FindCurrentSubscriptionRequest
692
+ * @static
693
+ * @param {Object.<string,*>} object Plain object
694
+ * @returns {subscription.FindCurrentSubscriptionRequest} FindCurrentSubscriptionRequest
695
+ */
696
+ FindCurrentSubscriptionRequest.fromObject = function fromObject(object) {
697
+ if (object instanceof $root.subscription.FindCurrentSubscriptionRequest)
698
+ return object;
699
+ var message = new $root.subscription.FindCurrentSubscriptionRequest();
700
+ if (object.userId != null)
701
+ message.userId = String(object.userId);
702
+ return message;
703
+ };
704
+
705
+ /**
706
+ * Creates a plain object from a FindCurrentSubscriptionRequest message. Also converts values to other types if specified.
707
+ * @function toObject
708
+ * @memberof subscription.FindCurrentSubscriptionRequest
709
+ * @static
710
+ * @param {subscription.FindCurrentSubscriptionRequest} message FindCurrentSubscriptionRequest
711
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
712
+ * @returns {Object.<string,*>} Plain object
713
+ */
714
+ FindCurrentSubscriptionRequest.toObject = function toObject(message, options) {
715
+ if (!options)
716
+ options = {};
717
+ var object = {};
718
+ if (options.defaults)
719
+ object.userId = "";
720
+ if (message.userId != null && message.hasOwnProperty("userId"))
721
+ object.userId = message.userId;
722
+ return object;
723
+ };
724
+
725
+ /**
726
+ * Converts this FindCurrentSubscriptionRequest to JSON.
727
+ * @function toJSON
728
+ * @memberof subscription.FindCurrentSubscriptionRequest
729
+ * @instance
730
+ * @returns {Object.<string,*>} JSON object
731
+ */
732
+ FindCurrentSubscriptionRequest.prototype.toJSON = function toJSON() {
733
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
734
+ };
735
+
736
+ return FindCurrentSubscriptionRequest;
737
+ })();
738
+
739
+ subscription.ManySubscriptionsResponse = (function() {
740
+
741
+ /**
742
+ * Properties of a ManySubscriptionsResponse.
743
+ * @memberof subscription
744
+ * @interface IManySubscriptionsResponse
745
+ * @property {Array.<subscription.ISubscription>|null} [subscriptions] ManySubscriptionsResponse subscriptions
746
+ */
747
+
748
+ /**
749
+ * Constructs a new ManySubscriptionsResponse.
750
+ * @memberof subscription
751
+ * @classdesc Represents a ManySubscriptionsResponse.
752
+ * @implements IManySubscriptionsResponse
753
+ * @constructor
754
+ * @param {subscription.IManySubscriptionsResponse=} [properties] Properties to set
755
+ */
756
+ function ManySubscriptionsResponse(properties) {
757
+ this.subscriptions = [];
758
+ if (properties)
759
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
760
+ if (properties[keys[i]] != null)
761
+ this[keys[i]] = properties[keys[i]];
762
+ }
763
+
764
+ /**
765
+ * ManySubscriptionsResponse subscriptions.
766
+ * @member {Array.<subscription.ISubscription>} subscriptions
767
+ * @memberof subscription.ManySubscriptionsResponse
768
+ * @instance
769
+ */
770
+ ManySubscriptionsResponse.prototype.subscriptions = $util.emptyArray;
771
+
772
+ /**
773
+ * Creates a new ManySubscriptionsResponse instance using the specified properties.
774
+ * @function create
775
+ * @memberof subscription.ManySubscriptionsResponse
776
+ * @static
777
+ * @param {subscription.IManySubscriptionsResponse=} [properties] Properties to set
778
+ * @returns {subscription.ManySubscriptionsResponse} ManySubscriptionsResponse instance
779
+ */
780
+ ManySubscriptionsResponse.create = function create(properties) {
781
+ return new ManySubscriptionsResponse(properties);
782
+ };
783
+
784
+ /**
785
+ * Encodes the specified ManySubscriptionsResponse message. Does not implicitly {@link subscription.ManySubscriptionsResponse.verify|verify} messages.
786
+ * @function encode
787
+ * @memberof subscription.ManySubscriptionsResponse
788
+ * @static
789
+ * @param {subscription.IManySubscriptionsResponse} message ManySubscriptionsResponse message or plain object to encode
790
+ * @param {$protobuf.Writer} [writer] Writer to encode to
791
+ * @returns {$protobuf.Writer} Writer
792
+ */
793
+ ManySubscriptionsResponse.encode = function encode(message, writer) {
794
+ if (!writer)
795
+ writer = $Writer.create();
796
+ if (message.subscriptions != null && message.subscriptions.length)
797
+ for (var i = 0; i < message.subscriptions.length; ++i)
798
+ $root.subscription.Subscription.encode(message.subscriptions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
799
+ return writer;
800
+ };
801
+
802
+ /**
803
+ * Encodes the specified ManySubscriptionsResponse message, length delimited. Does not implicitly {@link subscription.ManySubscriptionsResponse.verify|verify} messages.
804
+ * @function encodeDelimited
805
+ * @memberof subscription.ManySubscriptionsResponse
806
+ * @static
807
+ * @param {subscription.IManySubscriptionsResponse} message ManySubscriptionsResponse message or plain object to encode
808
+ * @param {$protobuf.Writer} [writer] Writer to encode to
809
+ * @returns {$protobuf.Writer} Writer
810
+ */
811
+ ManySubscriptionsResponse.encodeDelimited = function encodeDelimited(message, writer) {
812
+ return this.encode(message, writer).ldelim();
813
+ };
814
+
815
+ /**
816
+ * Decodes a ManySubscriptionsResponse message from the specified reader or buffer.
817
+ * @function decode
818
+ * @memberof subscription.ManySubscriptionsResponse
819
+ * @static
820
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
821
+ * @param {number} [length] Message length if known beforehand
822
+ * @returns {subscription.ManySubscriptionsResponse} ManySubscriptionsResponse
823
+ * @throws {Error} If the payload is not a reader or valid buffer
824
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
825
+ */
826
+ ManySubscriptionsResponse.decode = function decode(reader, length) {
827
+ if (!(reader instanceof $Reader))
828
+ reader = $Reader.create(reader);
829
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.subscription.ManySubscriptionsResponse();
830
+ while (reader.pos < end) {
831
+ var tag = reader.uint32();
832
+ switch (tag >>> 3) {
833
+ case 1:
834
+ if (!(message.subscriptions && message.subscriptions.length))
835
+ message.subscriptions = [];
836
+ message.subscriptions.push($root.subscription.Subscription.decode(reader, reader.uint32()));
837
+ break;
838
+ default:
839
+ reader.skipType(tag & 7);
840
+ break;
841
+ }
842
+ }
843
+ return message;
844
+ };
845
+
846
+ /**
847
+ * Decodes a ManySubscriptionsResponse message from the specified reader or buffer, length delimited.
848
+ * @function decodeDelimited
849
+ * @memberof subscription.ManySubscriptionsResponse
850
+ * @static
851
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
852
+ * @returns {subscription.ManySubscriptionsResponse} ManySubscriptionsResponse
853
+ * @throws {Error} If the payload is not a reader or valid buffer
854
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
855
+ */
856
+ ManySubscriptionsResponse.decodeDelimited = function decodeDelimited(reader) {
857
+ if (!(reader instanceof $Reader))
858
+ reader = new $Reader(reader);
859
+ return this.decode(reader, reader.uint32());
860
+ };
861
+
862
+ /**
863
+ * Verifies a ManySubscriptionsResponse message.
864
+ * @function verify
865
+ * @memberof subscription.ManySubscriptionsResponse
866
+ * @static
867
+ * @param {Object.<string,*>} message Plain object to verify
868
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
869
+ */
870
+ ManySubscriptionsResponse.verify = function verify(message) {
871
+ if (typeof message !== "object" || message === null)
872
+ return "object expected";
873
+ if (message.subscriptions != null && message.hasOwnProperty("subscriptions")) {
874
+ if (!Array.isArray(message.subscriptions))
875
+ return "subscriptions: array expected";
876
+ for (var i = 0; i < message.subscriptions.length; ++i) {
877
+ var error = $root.subscription.Subscription.verify(message.subscriptions[i]);
878
+ if (error)
879
+ return "subscriptions." + error;
880
+ }
881
+ }
882
+ return null;
883
+ };
884
+
885
+ /**
886
+ * Creates a ManySubscriptionsResponse message from a plain object. Also converts values to their respective internal types.
887
+ * @function fromObject
888
+ * @memberof subscription.ManySubscriptionsResponse
889
+ * @static
890
+ * @param {Object.<string,*>} object Plain object
891
+ * @returns {subscription.ManySubscriptionsResponse} ManySubscriptionsResponse
892
+ */
893
+ ManySubscriptionsResponse.fromObject = function fromObject(object) {
894
+ if (object instanceof $root.subscription.ManySubscriptionsResponse)
895
+ return object;
896
+ var message = new $root.subscription.ManySubscriptionsResponse();
897
+ if (object.subscriptions) {
898
+ if (!Array.isArray(object.subscriptions))
899
+ throw TypeError(".subscription.ManySubscriptionsResponse.subscriptions: array expected");
900
+ message.subscriptions = [];
901
+ for (var i = 0; i < object.subscriptions.length; ++i) {
902
+ if (typeof object.subscriptions[i] !== "object")
903
+ throw TypeError(".subscription.ManySubscriptionsResponse.subscriptions: object expected");
904
+ message.subscriptions[i] = $root.subscription.Subscription.fromObject(object.subscriptions[i]);
905
+ }
906
+ }
907
+ return message;
908
+ };
909
+
910
+ /**
911
+ * Creates a plain object from a ManySubscriptionsResponse message. Also converts values to other types if specified.
912
+ * @function toObject
913
+ * @memberof subscription.ManySubscriptionsResponse
914
+ * @static
915
+ * @param {subscription.ManySubscriptionsResponse} message ManySubscriptionsResponse
916
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
917
+ * @returns {Object.<string,*>} Plain object
918
+ */
919
+ ManySubscriptionsResponse.toObject = function toObject(message, options) {
920
+ if (!options)
921
+ options = {};
922
+ var object = {};
923
+ if (options.arrays || options.defaults)
924
+ object.subscriptions = [];
925
+ if (message.subscriptions && message.subscriptions.length) {
926
+ object.subscriptions = [];
927
+ for (var j = 0; j < message.subscriptions.length; ++j)
928
+ object.subscriptions[j] = $root.subscription.Subscription.toObject(message.subscriptions[j], options);
929
+ }
930
+ return object;
931
+ };
932
+
933
+ /**
934
+ * Converts this ManySubscriptionsResponse to JSON.
935
+ * @function toJSON
936
+ * @memberof subscription.ManySubscriptionsResponse
937
+ * @instance
938
+ * @returns {Object.<string,*>} JSON object
939
+ */
940
+ ManySubscriptionsResponse.prototype.toJSON = function toJSON() {
941
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
942
+ };
943
+
944
+ return ManySubscriptionsResponse;
945
+ })();
946
+
947
+ subscription.OneSubscriptionResponse = (function() {
948
+
949
+ /**
950
+ * Properties of an OneSubscriptionResponse.
951
+ * @memberof subscription
952
+ * @interface IOneSubscriptionResponse
953
+ * @property {subscription.ISubscription|null} [subscription] OneSubscriptionResponse subscription
954
+ */
955
+
956
+ /**
957
+ * Constructs a new OneSubscriptionResponse.
958
+ * @memberof subscription
959
+ * @classdesc Represents an OneSubscriptionResponse.
960
+ * @implements IOneSubscriptionResponse
961
+ * @constructor
962
+ * @param {subscription.IOneSubscriptionResponse=} [properties] Properties to set
963
+ */
964
+ function OneSubscriptionResponse(properties) {
965
+ if (properties)
966
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
967
+ if (properties[keys[i]] != null)
968
+ this[keys[i]] = properties[keys[i]];
969
+ }
970
+
971
+ /**
972
+ * OneSubscriptionResponse subscription.
973
+ * @member {subscription.ISubscription|null|undefined} subscription
974
+ * @memberof subscription.OneSubscriptionResponse
975
+ * @instance
976
+ */
977
+ OneSubscriptionResponse.prototype.subscription = null;
978
+
979
+ /**
980
+ * Creates a new OneSubscriptionResponse instance using the specified properties.
981
+ * @function create
982
+ * @memberof subscription.OneSubscriptionResponse
983
+ * @static
984
+ * @param {subscription.IOneSubscriptionResponse=} [properties] Properties to set
985
+ * @returns {subscription.OneSubscriptionResponse} OneSubscriptionResponse instance
986
+ */
987
+ OneSubscriptionResponse.create = function create(properties) {
988
+ return new OneSubscriptionResponse(properties);
989
+ };
990
+
991
+ /**
992
+ * Encodes the specified OneSubscriptionResponse message. Does not implicitly {@link subscription.OneSubscriptionResponse.verify|verify} messages.
993
+ * @function encode
994
+ * @memberof subscription.OneSubscriptionResponse
995
+ * @static
996
+ * @param {subscription.IOneSubscriptionResponse} message OneSubscriptionResponse message or plain object to encode
997
+ * @param {$protobuf.Writer} [writer] Writer to encode to
998
+ * @returns {$protobuf.Writer} Writer
999
+ */
1000
+ OneSubscriptionResponse.encode = function encode(message, writer) {
1001
+ if (!writer)
1002
+ writer = $Writer.create();
1003
+ if (message.subscription != null && message.hasOwnProperty("subscription"))
1004
+ $root.subscription.Subscription.encode(message.subscription, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
1005
+ return writer;
1006
+ };
1007
+
1008
+ /**
1009
+ * Encodes the specified OneSubscriptionResponse message, length delimited. Does not implicitly {@link subscription.OneSubscriptionResponse.verify|verify} messages.
1010
+ * @function encodeDelimited
1011
+ * @memberof subscription.OneSubscriptionResponse
1012
+ * @static
1013
+ * @param {subscription.IOneSubscriptionResponse} message OneSubscriptionResponse message or plain object to encode
1014
+ * @param {$protobuf.Writer} [writer] Writer to encode to
1015
+ * @returns {$protobuf.Writer} Writer
1016
+ */
1017
+ OneSubscriptionResponse.encodeDelimited = function encodeDelimited(message, writer) {
1018
+ return this.encode(message, writer).ldelim();
1019
+ };
1020
+
1021
+ /**
1022
+ * Decodes an OneSubscriptionResponse message from the specified reader or buffer.
1023
+ * @function decode
1024
+ * @memberof subscription.OneSubscriptionResponse
1025
+ * @static
1026
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
1027
+ * @param {number} [length] Message length if known beforehand
1028
+ * @returns {subscription.OneSubscriptionResponse} OneSubscriptionResponse
1029
+ * @throws {Error} If the payload is not a reader or valid buffer
1030
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
1031
+ */
1032
+ OneSubscriptionResponse.decode = function decode(reader, length) {
1033
+ if (!(reader instanceof $Reader))
1034
+ reader = $Reader.create(reader);
1035
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.subscription.OneSubscriptionResponse();
1036
+ while (reader.pos < end) {
1037
+ var tag = reader.uint32();
1038
+ switch (tag >>> 3) {
1039
+ case 1:
1040
+ message.subscription = $root.subscription.Subscription.decode(reader, reader.uint32());
1041
+ break;
1042
+ default:
1043
+ reader.skipType(tag & 7);
1044
+ break;
1045
+ }
1046
+ }
1047
+ return message;
1048
+ };
1049
+
1050
+ /**
1051
+ * Decodes an OneSubscriptionResponse message from the specified reader or buffer, length delimited.
1052
+ * @function decodeDelimited
1053
+ * @memberof subscription.OneSubscriptionResponse
1054
+ * @static
1055
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
1056
+ * @returns {subscription.OneSubscriptionResponse} OneSubscriptionResponse
1057
+ * @throws {Error} If the payload is not a reader or valid buffer
1058
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
1059
+ */
1060
+ OneSubscriptionResponse.decodeDelimited = function decodeDelimited(reader) {
1061
+ if (!(reader instanceof $Reader))
1062
+ reader = new $Reader(reader);
1063
+ return this.decode(reader, reader.uint32());
1064
+ };
1065
+
1066
+ /**
1067
+ * Verifies an OneSubscriptionResponse message.
1068
+ * @function verify
1069
+ * @memberof subscription.OneSubscriptionResponse
1070
+ * @static
1071
+ * @param {Object.<string,*>} message Plain object to verify
1072
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
1073
+ */
1074
+ OneSubscriptionResponse.verify = function verify(message) {
1075
+ if (typeof message !== "object" || message === null)
1076
+ return "object expected";
1077
+ if (message.subscription != null && message.hasOwnProperty("subscription")) {
1078
+ var error = $root.subscription.Subscription.verify(message.subscription);
1079
+ if (error)
1080
+ return "subscription." + error;
1081
+ }
1082
+ return null;
1083
+ };
1084
+
1085
+ /**
1086
+ * Creates an OneSubscriptionResponse message from a plain object. Also converts values to their respective internal types.
1087
+ * @function fromObject
1088
+ * @memberof subscription.OneSubscriptionResponse
1089
+ * @static
1090
+ * @param {Object.<string,*>} object Plain object
1091
+ * @returns {subscription.OneSubscriptionResponse} OneSubscriptionResponse
1092
+ */
1093
+ OneSubscriptionResponse.fromObject = function fromObject(object) {
1094
+ if (object instanceof $root.subscription.OneSubscriptionResponse)
1095
+ return object;
1096
+ var message = new $root.subscription.OneSubscriptionResponse();
1097
+ if (object.subscription != null) {
1098
+ if (typeof object.subscription !== "object")
1099
+ throw TypeError(".subscription.OneSubscriptionResponse.subscription: object expected");
1100
+ message.subscription = $root.subscription.Subscription.fromObject(object.subscription);
1101
+ }
1102
+ return message;
1103
+ };
1104
+
1105
+ /**
1106
+ * Creates a plain object from an OneSubscriptionResponse message. Also converts values to other types if specified.
1107
+ * @function toObject
1108
+ * @memberof subscription.OneSubscriptionResponse
1109
+ * @static
1110
+ * @param {subscription.OneSubscriptionResponse} message OneSubscriptionResponse
1111
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
1112
+ * @returns {Object.<string,*>} Plain object
1113
+ */
1114
+ OneSubscriptionResponse.toObject = function toObject(message, options) {
1115
+ if (!options)
1116
+ options = {};
1117
+ var object = {};
1118
+ if (options.defaults)
1119
+ object.subscription = null;
1120
+ if (message.subscription != null && message.hasOwnProperty("subscription"))
1121
+ object.subscription = $root.subscription.Subscription.toObject(message.subscription, options);
1122
+ return object;
1123
+ };
1124
+
1125
+ /**
1126
+ * Converts this OneSubscriptionResponse to JSON.
1127
+ * @function toJSON
1128
+ * @memberof subscription.OneSubscriptionResponse
1129
+ * @instance
1130
+ * @returns {Object.<string,*>} JSON object
1131
+ */
1132
+ OneSubscriptionResponse.prototype.toJSON = function toJSON() {
1133
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1134
+ };
1135
+
1136
+ return OneSubscriptionResponse;
1137
+ })();
1138
+
1139
+ subscription.Subscription = (function() {
1140
+
1141
+ /**
1142
+ * Properties of a Subscription.
1143
+ * @memberof subscription
1144
+ * @interface ISubscription
1145
+ * @property {number|null} [id] Subscription id
1146
+ * @property {date.IDate|null} [startsAt] Subscription startsAt
1147
+ * @property {date.IDate|null} [endsAt] Subscription endsAt
1148
+ * @property {string|null} [status] Subscription status
1149
+ * @property {subscription.IPlan|null} [plan] Subscription plan
1150
+ * @property {string|null} [membership] Subscription membership
1151
+ * @property {string|null} [voucherCode] Subscription voucherCode
1152
+ */
1153
+
1154
+ /**
1155
+ * Constructs a new Subscription.
1156
+ * @memberof subscription
1157
+ * @classdesc Represents a Subscription.
1158
+ * @implements ISubscription
1159
+ * @constructor
1160
+ * @param {subscription.ISubscription=} [properties] Properties to set
1161
+ */
1162
+ function Subscription(properties) {
1163
+ if (properties)
1164
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
1165
+ if (properties[keys[i]] != null)
1166
+ this[keys[i]] = properties[keys[i]];
1167
+ }
1168
+
1169
+ /**
1170
+ * Subscription id.
1171
+ * @member {number} id
1172
+ * @memberof subscription.Subscription
1173
+ * @instance
1174
+ */
1175
+ Subscription.prototype.id = 0;
1176
+
1177
+ /**
1178
+ * Subscription startsAt.
1179
+ * @member {date.IDate|null|undefined} startsAt
1180
+ * @memberof subscription.Subscription
1181
+ * @instance
1182
+ */
1183
+ Subscription.prototype.startsAt = null;
1184
+
1185
+ /**
1186
+ * Subscription endsAt.
1187
+ * @member {date.IDate|null|undefined} endsAt
1188
+ * @memberof subscription.Subscription
1189
+ * @instance
1190
+ */
1191
+ Subscription.prototype.endsAt = null;
1192
+
1193
+ /**
1194
+ * Subscription status.
1195
+ * @member {string} status
1196
+ * @memberof subscription.Subscription
1197
+ * @instance
1198
+ */
1199
+ Subscription.prototype.status = "";
1200
+
1201
+ /**
1202
+ * Subscription plan.
1203
+ * @member {subscription.IPlan|null|undefined} plan
1204
+ * @memberof subscription.Subscription
1205
+ * @instance
1206
+ */
1207
+ Subscription.prototype.plan = null;
1208
+
1209
+ /**
1210
+ * Subscription membership.
1211
+ * @member {string} membership
1212
+ * @memberof subscription.Subscription
1213
+ * @instance
1214
+ */
1215
+ Subscription.prototype.membership = "";
1216
+
1217
+ /**
1218
+ * Subscription voucherCode.
1219
+ * @member {string} voucherCode
1220
+ * @memberof subscription.Subscription
1221
+ * @instance
1222
+ */
1223
+ Subscription.prototype.voucherCode = "";
1224
+
1225
+ /**
1226
+ * Creates a new Subscription instance using the specified properties.
1227
+ * @function create
1228
+ * @memberof subscription.Subscription
1229
+ * @static
1230
+ * @param {subscription.ISubscription=} [properties] Properties to set
1231
+ * @returns {subscription.Subscription} Subscription instance
1232
+ */
1233
+ Subscription.create = function create(properties) {
1234
+ return new Subscription(properties);
1235
+ };
1236
+
1237
+ /**
1238
+ * Encodes the specified Subscription message. Does not implicitly {@link subscription.Subscription.verify|verify} messages.
1239
+ * @function encode
1240
+ * @memberof subscription.Subscription
1241
+ * @static
1242
+ * @param {subscription.ISubscription} message Subscription message or plain object to encode
1243
+ * @param {$protobuf.Writer} [writer] Writer to encode to
1244
+ * @returns {$protobuf.Writer} Writer
1245
+ */
1246
+ Subscription.encode = function encode(message, writer) {
1247
+ if (!writer)
1248
+ writer = $Writer.create();
1249
+ if (message.id != null && message.hasOwnProperty("id"))
1250
+ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.id);
1251
+ if (message.startsAt != null && message.hasOwnProperty("startsAt"))
1252
+ $root.date.Date.encode(message.startsAt, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
1253
+ if (message.endsAt != null && message.hasOwnProperty("endsAt"))
1254
+ $root.date.Date.encode(message.endsAt, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
1255
+ if (message.status != null && message.hasOwnProperty("status"))
1256
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.status);
1257
+ if (message.plan != null && message.hasOwnProperty("plan"))
1258
+ $root.subscription.Plan.encode(message.plan, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
1259
+ if (message.membership != null && message.hasOwnProperty("membership"))
1260
+ writer.uint32(/* id 6, wireType 2 =*/50).string(message.membership);
1261
+ if (message.voucherCode != null && message.hasOwnProperty("voucherCode"))
1262
+ writer.uint32(/* id 7, wireType 2 =*/58).string(message.voucherCode);
1263
+ return writer;
1264
+ };
1265
+
1266
+ /**
1267
+ * Encodes the specified Subscription message, length delimited. Does not implicitly {@link subscription.Subscription.verify|verify} messages.
1268
+ * @function encodeDelimited
1269
+ * @memberof subscription.Subscription
1270
+ * @static
1271
+ * @param {subscription.ISubscription} message Subscription message or plain object to encode
1272
+ * @param {$protobuf.Writer} [writer] Writer to encode to
1273
+ * @returns {$protobuf.Writer} Writer
1274
+ */
1275
+ Subscription.encodeDelimited = function encodeDelimited(message, writer) {
1276
+ return this.encode(message, writer).ldelim();
1277
+ };
1278
+
1279
+ /**
1280
+ * Decodes a Subscription message from the specified reader or buffer.
1281
+ * @function decode
1282
+ * @memberof subscription.Subscription
1283
+ * @static
1284
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
1285
+ * @param {number} [length] Message length if known beforehand
1286
+ * @returns {subscription.Subscription} Subscription
1287
+ * @throws {Error} If the payload is not a reader or valid buffer
1288
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
1289
+ */
1290
+ Subscription.decode = function decode(reader, length) {
1291
+ if (!(reader instanceof $Reader))
1292
+ reader = $Reader.create(reader);
1293
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.subscription.Subscription();
1294
+ while (reader.pos < end) {
1295
+ var tag = reader.uint32();
1296
+ switch (tag >>> 3) {
1297
+ case 1:
1298
+ message.id = reader.int32();
1299
+ break;
1300
+ case 2:
1301
+ message.startsAt = $root.date.Date.decode(reader, reader.uint32());
1302
+ break;
1303
+ case 3:
1304
+ message.endsAt = $root.date.Date.decode(reader, reader.uint32());
1305
+ break;
1306
+ case 4:
1307
+ message.status = reader.string();
1308
+ break;
1309
+ case 5:
1310
+ message.plan = $root.subscription.Plan.decode(reader, reader.uint32());
1311
+ break;
1312
+ case 6:
1313
+ message.membership = reader.string();
1314
+ break;
1315
+ case 7:
1316
+ message.voucherCode = reader.string();
1317
+ break;
1318
+ default:
1319
+ reader.skipType(tag & 7);
1320
+ break;
1321
+ }
1322
+ }
1323
+ return message;
1324
+ };
1325
+
1326
+ /**
1327
+ * Decodes a Subscription message from the specified reader or buffer, length delimited.
1328
+ * @function decodeDelimited
1329
+ * @memberof subscription.Subscription
1330
+ * @static
1331
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
1332
+ * @returns {subscription.Subscription} Subscription
1333
+ * @throws {Error} If the payload is not a reader or valid buffer
1334
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
1335
+ */
1336
+ Subscription.decodeDelimited = function decodeDelimited(reader) {
1337
+ if (!(reader instanceof $Reader))
1338
+ reader = new $Reader(reader);
1339
+ return this.decode(reader, reader.uint32());
1340
+ };
1341
+
1342
+ /**
1343
+ * Verifies a Subscription message.
1344
+ * @function verify
1345
+ * @memberof subscription.Subscription
1346
+ * @static
1347
+ * @param {Object.<string,*>} message Plain object to verify
1348
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
1349
+ */
1350
+ Subscription.verify = function verify(message) {
1351
+ if (typeof message !== "object" || message === null)
1352
+ return "object expected";
1353
+ if (message.id != null && message.hasOwnProperty("id"))
1354
+ if (!$util.isInteger(message.id))
1355
+ return "id: integer expected";
1356
+ if (message.startsAt != null && message.hasOwnProperty("startsAt")) {
1357
+ var error = $root.date.Date.verify(message.startsAt);
1358
+ if (error)
1359
+ return "startsAt." + error;
1360
+ }
1361
+ if (message.endsAt != null && message.hasOwnProperty("endsAt")) {
1362
+ var error = $root.date.Date.verify(message.endsAt);
1363
+ if (error)
1364
+ return "endsAt." + error;
1365
+ }
1366
+ if (message.status != null && message.hasOwnProperty("status"))
1367
+ if (!$util.isString(message.status))
1368
+ return "status: string expected";
1369
+ if (message.plan != null && message.hasOwnProperty("plan")) {
1370
+ var error = $root.subscription.Plan.verify(message.plan);
1371
+ if (error)
1372
+ return "plan." + error;
1373
+ }
1374
+ if (message.membership != null && message.hasOwnProperty("membership"))
1375
+ if (!$util.isString(message.membership))
1376
+ return "membership: string expected";
1377
+ if (message.voucherCode != null && message.hasOwnProperty("voucherCode"))
1378
+ if (!$util.isString(message.voucherCode))
1379
+ return "voucherCode: string expected";
1380
+ return null;
1381
+ };
1382
+
1383
+ /**
1384
+ * Creates a Subscription message from a plain object. Also converts values to their respective internal types.
1385
+ * @function fromObject
1386
+ * @memberof subscription.Subscription
1387
+ * @static
1388
+ * @param {Object.<string,*>} object Plain object
1389
+ * @returns {subscription.Subscription} Subscription
1390
+ */
1391
+ Subscription.fromObject = function fromObject(object) {
1392
+ if (object instanceof $root.subscription.Subscription)
1393
+ return object;
1394
+ var message = new $root.subscription.Subscription();
1395
+ if (object.id != null)
1396
+ message.id = object.id | 0;
1397
+ if (object.startsAt != null) {
1398
+ if (typeof object.startsAt !== "object")
1399
+ throw TypeError(".subscription.Subscription.startsAt: object expected");
1400
+ message.startsAt = $root.date.Date.fromObject(object.startsAt);
1401
+ }
1402
+ if (object.endsAt != null) {
1403
+ if (typeof object.endsAt !== "object")
1404
+ throw TypeError(".subscription.Subscription.endsAt: object expected");
1405
+ message.endsAt = $root.date.Date.fromObject(object.endsAt);
1406
+ }
1407
+ if (object.status != null)
1408
+ message.status = String(object.status);
1409
+ if (object.plan != null) {
1410
+ if (typeof object.plan !== "object")
1411
+ throw TypeError(".subscription.Subscription.plan: object expected");
1412
+ message.plan = $root.subscription.Plan.fromObject(object.plan);
1413
+ }
1414
+ if (object.membership != null)
1415
+ message.membership = String(object.membership);
1416
+ if (object.voucherCode != null)
1417
+ message.voucherCode = String(object.voucherCode);
1418
+ return message;
1419
+ };
1420
+
1421
+ /**
1422
+ * Creates a plain object from a Subscription message. Also converts values to other types if specified.
1423
+ * @function toObject
1424
+ * @memberof subscription.Subscription
1425
+ * @static
1426
+ * @param {subscription.Subscription} message Subscription
1427
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
1428
+ * @returns {Object.<string,*>} Plain object
1429
+ */
1430
+ Subscription.toObject = function toObject(message, options) {
1431
+ if (!options)
1432
+ options = {};
1433
+ var object = {};
1434
+ if (options.defaults) {
1435
+ object.id = 0;
1436
+ object.startsAt = null;
1437
+ object.endsAt = null;
1438
+ object.status = "";
1439
+ object.plan = null;
1440
+ object.membership = "";
1441
+ object.voucherCode = "";
1442
+ }
1443
+ if (message.id != null && message.hasOwnProperty("id"))
1444
+ object.id = message.id;
1445
+ if (message.startsAt != null && message.hasOwnProperty("startsAt"))
1446
+ object.startsAt = $root.date.Date.toObject(message.startsAt, options);
1447
+ if (message.endsAt != null && message.hasOwnProperty("endsAt"))
1448
+ object.endsAt = $root.date.Date.toObject(message.endsAt, options);
1449
+ if (message.status != null && message.hasOwnProperty("status"))
1450
+ object.status = message.status;
1451
+ if (message.plan != null && message.hasOwnProperty("plan"))
1452
+ object.plan = $root.subscription.Plan.toObject(message.plan, options);
1453
+ if (message.membership != null && message.hasOwnProperty("membership"))
1454
+ object.membership = message.membership;
1455
+ if (message.voucherCode != null && message.hasOwnProperty("voucherCode"))
1456
+ object.voucherCode = message.voucherCode;
1457
+ return object;
1458
+ };
1459
+
1460
+ /**
1461
+ * Converts this Subscription to JSON.
1462
+ * @function toJSON
1463
+ * @memberof subscription.Subscription
1464
+ * @instance
1465
+ * @returns {Object.<string,*>} JSON object
1466
+ */
1467
+ Subscription.prototype.toJSON = function toJSON() {
1468
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1469
+ };
1470
+
1471
+ return Subscription;
1472
+ })();
1473
+
1474
+ subscription.Plan = (function() {
1475
+
1476
+ /**
1477
+ * Properties of a Plan.
1478
+ * @memberof subscription
1479
+ * @interface IPlan
1480
+ * @property {number|null} [id] Plan id
1481
+ * @property {string|null} [description] Plan description
1482
+ * @property {number|null} [termLength] Plan termLength
1483
+ * @property {string|null} [name] Plan name
1484
+ * @property {string|null} [subscriptionType] Plan subscriptionType
1485
+ * @property {string|null} [affiliation] Plan affiliation
1486
+ */
1487
+
1488
+ /**
1489
+ * Constructs a new Plan.
1490
+ * @memberof subscription
1491
+ * @classdesc Represents a Plan.
1492
+ * @implements IPlan
1493
+ * @constructor
1494
+ * @param {subscription.IPlan=} [properties] Properties to set
1495
+ */
1496
+ function Plan(properties) {
1497
+ if (properties)
1498
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
1499
+ if (properties[keys[i]] != null)
1500
+ this[keys[i]] = properties[keys[i]];
1501
+ }
1502
+
1503
+ /**
1504
+ * Plan id.
1505
+ * @member {number} id
1506
+ * @memberof subscription.Plan
1507
+ * @instance
1508
+ */
1509
+ Plan.prototype.id = 0;
1510
+
1511
+ /**
1512
+ * Plan description.
1513
+ * @member {string} description
1514
+ * @memberof subscription.Plan
1515
+ * @instance
1516
+ */
1517
+ Plan.prototype.description = "";
1518
+
1519
+ /**
1520
+ * Plan termLength.
1521
+ * @member {number} termLength
1522
+ * @memberof subscription.Plan
1523
+ * @instance
1524
+ */
1525
+ Plan.prototype.termLength = 0;
1526
+
1527
+ /**
1528
+ * Plan name.
1529
+ * @member {string} name
1530
+ * @memberof subscription.Plan
1531
+ * @instance
1532
+ */
1533
+ Plan.prototype.name = "";
1534
+
1535
+ /**
1536
+ * Plan subscriptionType.
1537
+ * @member {string} subscriptionType
1538
+ * @memberof subscription.Plan
1539
+ * @instance
1540
+ */
1541
+ Plan.prototype.subscriptionType = "";
1542
+
1543
+ /**
1544
+ * Plan affiliation.
1545
+ * @member {string} affiliation
1546
+ * @memberof subscription.Plan
1547
+ * @instance
1548
+ */
1549
+ Plan.prototype.affiliation = "";
1550
+
1551
+ /**
1552
+ * Creates a new Plan instance using the specified properties.
1553
+ * @function create
1554
+ * @memberof subscription.Plan
1555
+ * @static
1556
+ * @param {subscription.IPlan=} [properties] Properties to set
1557
+ * @returns {subscription.Plan} Plan instance
1558
+ */
1559
+ Plan.create = function create(properties) {
1560
+ return new Plan(properties);
1561
+ };
1562
+
1563
+ /**
1564
+ * Encodes the specified Plan message. Does not implicitly {@link subscription.Plan.verify|verify} messages.
1565
+ * @function encode
1566
+ * @memberof subscription.Plan
1567
+ * @static
1568
+ * @param {subscription.IPlan} message Plan message or plain object to encode
1569
+ * @param {$protobuf.Writer} [writer] Writer to encode to
1570
+ * @returns {$protobuf.Writer} Writer
1571
+ */
1572
+ Plan.encode = function encode(message, writer) {
1573
+ if (!writer)
1574
+ writer = $Writer.create();
1575
+ if (message.id != null && message.hasOwnProperty("id"))
1576
+ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.id);
1577
+ if (message.description != null && message.hasOwnProperty("description"))
1578
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.description);
1579
+ if (message.termLength != null && message.hasOwnProperty("termLength"))
1580
+ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.termLength);
1581
+ if (message.name != null && message.hasOwnProperty("name"))
1582
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.name);
1583
+ if (message.subscriptionType != null && message.hasOwnProperty("subscriptionType"))
1584
+ writer.uint32(/* id 5, wireType 2 =*/42).string(message.subscriptionType);
1585
+ if (message.affiliation != null && message.hasOwnProperty("affiliation"))
1586
+ writer.uint32(/* id 6, wireType 2 =*/50).string(message.affiliation);
1587
+ return writer;
1588
+ };
1589
+
1590
+ /**
1591
+ * Encodes the specified Plan message, length delimited. Does not implicitly {@link subscription.Plan.verify|verify} messages.
1592
+ * @function encodeDelimited
1593
+ * @memberof subscription.Plan
1594
+ * @static
1595
+ * @param {subscription.IPlan} message Plan message or plain object to encode
1596
+ * @param {$protobuf.Writer} [writer] Writer to encode to
1597
+ * @returns {$protobuf.Writer} Writer
1598
+ */
1599
+ Plan.encodeDelimited = function encodeDelimited(message, writer) {
1600
+ return this.encode(message, writer).ldelim();
1601
+ };
1602
+
1603
+ /**
1604
+ * Decodes a Plan message from the specified reader or buffer.
1605
+ * @function decode
1606
+ * @memberof subscription.Plan
1607
+ * @static
1608
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
1609
+ * @param {number} [length] Message length if known beforehand
1610
+ * @returns {subscription.Plan} Plan
1611
+ * @throws {Error} If the payload is not a reader or valid buffer
1612
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
1613
+ */
1614
+ Plan.decode = function decode(reader, length) {
1615
+ if (!(reader instanceof $Reader))
1616
+ reader = $Reader.create(reader);
1617
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.subscription.Plan();
1618
+ while (reader.pos < end) {
1619
+ var tag = reader.uint32();
1620
+ switch (tag >>> 3) {
1621
+ case 1:
1622
+ message.id = reader.int32();
1623
+ break;
1624
+ case 2:
1625
+ message.description = reader.string();
1626
+ break;
1627
+ case 3:
1628
+ message.termLength = reader.int32();
1629
+ break;
1630
+ case 4:
1631
+ message.name = reader.string();
1632
+ break;
1633
+ case 5:
1634
+ message.subscriptionType = reader.string();
1635
+ break;
1636
+ case 6:
1637
+ message.affiliation = reader.string();
1638
+ break;
1639
+ default:
1640
+ reader.skipType(tag & 7);
1641
+ break;
1642
+ }
1643
+ }
1644
+ return message;
1645
+ };
1646
+
1647
+ /**
1648
+ * Decodes a Plan message from the specified reader or buffer, length delimited.
1649
+ * @function decodeDelimited
1650
+ * @memberof subscription.Plan
1651
+ * @static
1652
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
1653
+ * @returns {subscription.Plan} Plan
1654
+ * @throws {Error} If the payload is not a reader or valid buffer
1655
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
1656
+ */
1657
+ Plan.decodeDelimited = function decodeDelimited(reader) {
1658
+ if (!(reader instanceof $Reader))
1659
+ reader = new $Reader(reader);
1660
+ return this.decode(reader, reader.uint32());
1661
+ };
1662
+
1663
+ /**
1664
+ * Verifies a Plan message.
1665
+ * @function verify
1666
+ * @memberof subscription.Plan
1667
+ * @static
1668
+ * @param {Object.<string,*>} message Plain object to verify
1669
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
1670
+ */
1671
+ Plan.verify = function verify(message) {
1672
+ if (typeof message !== "object" || message === null)
1673
+ return "object expected";
1674
+ if (message.id != null && message.hasOwnProperty("id"))
1675
+ if (!$util.isInteger(message.id))
1676
+ return "id: integer expected";
1677
+ if (message.description != null && message.hasOwnProperty("description"))
1678
+ if (!$util.isString(message.description))
1679
+ return "description: string expected";
1680
+ if (message.termLength != null && message.hasOwnProperty("termLength"))
1681
+ if (!$util.isInteger(message.termLength))
1682
+ return "termLength: integer expected";
1683
+ if (message.name != null && message.hasOwnProperty("name"))
1684
+ if (!$util.isString(message.name))
1685
+ return "name: string expected";
1686
+ if (message.subscriptionType != null && message.hasOwnProperty("subscriptionType"))
1687
+ if (!$util.isString(message.subscriptionType))
1688
+ return "subscriptionType: string expected";
1689
+ if (message.affiliation != null && message.hasOwnProperty("affiliation"))
1690
+ if (!$util.isString(message.affiliation))
1691
+ return "affiliation: string expected";
1692
+ return null;
1693
+ };
1694
+
1695
+ /**
1696
+ * Creates a Plan message from a plain object. Also converts values to their respective internal types.
1697
+ * @function fromObject
1698
+ * @memberof subscription.Plan
1699
+ * @static
1700
+ * @param {Object.<string,*>} object Plain object
1701
+ * @returns {subscription.Plan} Plan
1702
+ */
1703
+ Plan.fromObject = function fromObject(object) {
1704
+ if (object instanceof $root.subscription.Plan)
1705
+ return object;
1706
+ var message = new $root.subscription.Plan();
1707
+ if (object.id != null)
1708
+ message.id = object.id | 0;
1709
+ if (object.description != null)
1710
+ message.description = String(object.description);
1711
+ if (object.termLength != null)
1712
+ message.termLength = object.termLength | 0;
1713
+ if (object.name != null)
1714
+ message.name = String(object.name);
1715
+ if (object.subscriptionType != null)
1716
+ message.subscriptionType = String(object.subscriptionType);
1717
+ if (object.affiliation != null)
1718
+ message.affiliation = String(object.affiliation);
1719
+ return message;
1720
+ };
1721
+
1722
+ /**
1723
+ * Creates a plain object from a Plan message. Also converts values to other types if specified.
1724
+ * @function toObject
1725
+ * @memberof subscription.Plan
1726
+ * @static
1727
+ * @param {subscription.Plan} message Plan
1728
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
1729
+ * @returns {Object.<string,*>} Plain object
1730
+ */
1731
+ Plan.toObject = function toObject(message, options) {
1732
+ if (!options)
1733
+ options = {};
1734
+ var object = {};
1735
+ if (options.defaults) {
1736
+ object.id = 0;
1737
+ object.description = "";
1738
+ object.termLength = 0;
1739
+ object.name = "";
1740
+ object.subscriptionType = "";
1741
+ object.affiliation = "";
1742
+ }
1743
+ if (message.id != null && message.hasOwnProperty("id"))
1744
+ object.id = message.id;
1745
+ if (message.description != null && message.hasOwnProperty("description"))
1746
+ object.description = message.description;
1747
+ if (message.termLength != null && message.hasOwnProperty("termLength"))
1748
+ object.termLength = message.termLength;
1749
+ if (message.name != null && message.hasOwnProperty("name"))
1750
+ object.name = message.name;
1751
+ if (message.subscriptionType != null && message.hasOwnProperty("subscriptionType"))
1752
+ object.subscriptionType = message.subscriptionType;
1753
+ if (message.affiliation != null && message.hasOwnProperty("affiliation"))
1754
+ object.affiliation = message.affiliation;
1755
+ return object;
1756
+ };
1757
+
1758
+ /**
1759
+ * Converts this Plan to JSON.
1760
+ * @function toJSON
1761
+ * @memberof subscription.Plan
1762
+ * @instance
1763
+ * @returns {Object.<string,*>} JSON object
1764
+ */
1765
+ Plan.prototype.toJSON = function toJSON() {
1766
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1767
+ };
1768
+
1769
+ return Plan;
1770
+ })();
1771
+
51
1772
  return subscription;
52
1773
  })();
53
1774
 
@@ -4340,26 +6061,24 @@ $root.SubscriptionPaymentDeclined = (function() {
4340
6061
  return SubscriptionPaymentDeclined;
4341
6062
  })();
4342
6063
 
4343
- $root.UserPasswordUpdated = (function() {
6064
+ $root.UserDoubleOptInEmailRequested = (function() {
4344
6065
 
4345
6066
  /**
4346
- * Properties of a UserPasswordUpdated.
4347
- * @exports IUserPasswordUpdated
4348
- * @interface IUserPasswordUpdated
4349
- * @property {string|null} [userId] UserPasswordUpdated userId
4350
- * @property {number|Long|null} [updatedOn] UserPasswordUpdated updatedOn
4351
- * @property {string|null} [email] UserPasswordUpdated email
6067
+ * Properties of a UserDoubleOptInEmailRequested.
6068
+ * @exports IUserDoubleOptInEmailRequested
6069
+ * @interface IUserDoubleOptInEmailRequested
6070
+ * @property {string|null} [userId] UserDoubleOptInEmailRequested userId
4352
6071
  */
4353
6072
 
4354
6073
  /**
4355
- * Constructs a new UserPasswordUpdated.
4356
- * @exports UserPasswordUpdated
4357
- * @classdesc Represents a UserPasswordUpdated.
4358
- * @implements IUserPasswordUpdated
6074
+ * Constructs a new UserDoubleOptInEmailRequested.
6075
+ * @exports UserDoubleOptInEmailRequested
6076
+ * @classdesc Represents a UserDoubleOptInEmailRequested.
6077
+ * @implements IUserDoubleOptInEmailRequested
4359
6078
  * @constructor
4360
- * @param {IUserPasswordUpdated=} [properties] Properties to set
6079
+ * @param {IUserDoubleOptInEmailRequested=} [properties] Properties to set
4361
6080
  */
4362
- function UserPasswordUpdated(properties) {
6081
+ function UserDoubleOptInEmailRequested(properties) {
4363
6082
  if (properties)
4364
6083
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
4365
6084
  if (properties[keys[i]] != null)
@@ -4367,102 +6086,76 @@ $root.UserPasswordUpdated = (function() {
4367
6086
  }
4368
6087
 
4369
6088
  /**
4370
- * UserPasswordUpdated userId.
6089
+ * UserDoubleOptInEmailRequested userId.
4371
6090
  * @member {string} userId
4372
- * @memberof UserPasswordUpdated
4373
- * @instance
4374
- */
4375
- UserPasswordUpdated.prototype.userId = "";
4376
-
4377
- /**
4378
- * UserPasswordUpdated updatedOn.
4379
- * @member {number|Long} updatedOn
4380
- * @memberof UserPasswordUpdated
4381
- * @instance
4382
- */
4383
- UserPasswordUpdated.prototype.updatedOn = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
4384
-
4385
- /**
4386
- * UserPasswordUpdated email.
4387
- * @member {string} email
4388
- * @memberof UserPasswordUpdated
6091
+ * @memberof UserDoubleOptInEmailRequested
4389
6092
  * @instance
4390
6093
  */
4391
- UserPasswordUpdated.prototype.email = "";
6094
+ UserDoubleOptInEmailRequested.prototype.userId = "";
4392
6095
 
4393
6096
  /**
4394
- * Creates a new UserPasswordUpdated instance using the specified properties.
6097
+ * Creates a new UserDoubleOptInEmailRequested instance using the specified properties.
4395
6098
  * @function create
4396
- * @memberof UserPasswordUpdated
6099
+ * @memberof UserDoubleOptInEmailRequested
4397
6100
  * @static
4398
- * @param {IUserPasswordUpdated=} [properties] Properties to set
4399
- * @returns {UserPasswordUpdated} UserPasswordUpdated instance
6101
+ * @param {IUserDoubleOptInEmailRequested=} [properties] Properties to set
6102
+ * @returns {UserDoubleOptInEmailRequested} UserDoubleOptInEmailRequested instance
4400
6103
  */
4401
- UserPasswordUpdated.create = function create(properties) {
4402
- return new UserPasswordUpdated(properties);
6104
+ UserDoubleOptInEmailRequested.create = function create(properties) {
6105
+ return new UserDoubleOptInEmailRequested(properties);
4403
6106
  };
4404
6107
 
4405
6108
  /**
4406
- * Encodes the specified UserPasswordUpdated message. Does not implicitly {@link UserPasswordUpdated.verify|verify} messages.
6109
+ * Encodes the specified UserDoubleOptInEmailRequested message. Does not implicitly {@link UserDoubleOptInEmailRequested.verify|verify} messages.
4407
6110
  * @function encode
4408
- * @memberof UserPasswordUpdated
6111
+ * @memberof UserDoubleOptInEmailRequested
4409
6112
  * @static
4410
- * @param {IUserPasswordUpdated} message UserPasswordUpdated message or plain object to encode
6113
+ * @param {IUserDoubleOptInEmailRequested} message UserDoubleOptInEmailRequested message or plain object to encode
4411
6114
  * @param {$protobuf.Writer} [writer] Writer to encode to
4412
6115
  * @returns {$protobuf.Writer} Writer
4413
6116
  */
4414
- UserPasswordUpdated.encode = function encode(message, writer) {
6117
+ UserDoubleOptInEmailRequested.encode = function encode(message, writer) {
4415
6118
  if (!writer)
4416
6119
  writer = $Writer.create();
4417
6120
  if (message.userId != null && message.hasOwnProperty("userId"))
4418
6121
  writer.uint32(/* id 1, wireType 2 =*/10).string(message.userId);
4419
- if (message.updatedOn != null && message.hasOwnProperty("updatedOn"))
4420
- writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.updatedOn);
4421
- if (message.email != null && message.hasOwnProperty("email"))
4422
- writer.uint32(/* id 3, wireType 2 =*/26).string(message.email);
4423
6122
  return writer;
4424
6123
  };
4425
6124
 
4426
6125
  /**
4427
- * Encodes the specified UserPasswordUpdated message, length delimited. Does not implicitly {@link UserPasswordUpdated.verify|verify} messages.
6126
+ * Encodes the specified UserDoubleOptInEmailRequested message, length delimited. Does not implicitly {@link UserDoubleOptInEmailRequested.verify|verify} messages.
4428
6127
  * @function encodeDelimited
4429
- * @memberof UserPasswordUpdated
6128
+ * @memberof UserDoubleOptInEmailRequested
4430
6129
  * @static
4431
- * @param {IUserPasswordUpdated} message UserPasswordUpdated message or plain object to encode
6130
+ * @param {IUserDoubleOptInEmailRequested} message UserDoubleOptInEmailRequested message or plain object to encode
4432
6131
  * @param {$protobuf.Writer} [writer] Writer to encode to
4433
6132
  * @returns {$protobuf.Writer} Writer
4434
6133
  */
4435
- UserPasswordUpdated.encodeDelimited = function encodeDelimited(message, writer) {
6134
+ UserDoubleOptInEmailRequested.encodeDelimited = function encodeDelimited(message, writer) {
4436
6135
  return this.encode(message, writer).ldelim();
4437
6136
  };
4438
6137
 
4439
6138
  /**
4440
- * Decodes a UserPasswordUpdated message from the specified reader or buffer.
6139
+ * Decodes a UserDoubleOptInEmailRequested message from the specified reader or buffer.
4441
6140
  * @function decode
4442
- * @memberof UserPasswordUpdated
6141
+ * @memberof UserDoubleOptInEmailRequested
4443
6142
  * @static
4444
6143
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
4445
6144
  * @param {number} [length] Message length if known beforehand
4446
- * @returns {UserPasswordUpdated} UserPasswordUpdated
6145
+ * @returns {UserDoubleOptInEmailRequested} UserDoubleOptInEmailRequested
4447
6146
  * @throws {Error} If the payload is not a reader or valid buffer
4448
6147
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
4449
6148
  */
4450
- UserPasswordUpdated.decode = function decode(reader, length) {
6149
+ UserDoubleOptInEmailRequested.decode = function decode(reader, length) {
4451
6150
  if (!(reader instanceof $Reader))
4452
6151
  reader = $Reader.create(reader);
4453
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.UserPasswordUpdated();
6152
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.UserDoubleOptInEmailRequested();
4454
6153
  while (reader.pos < end) {
4455
6154
  var tag = reader.uint32();
4456
6155
  switch (tag >>> 3) {
4457
6156
  case 1:
4458
6157
  message.userId = reader.string();
4459
6158
  break;
4460
- case 2:
4461
- message.updatedOn = reader.uint64();
4462
- break;
4463
- case 3:
4464
- message.email = reader.string();
4465
- break;
4466
6159
  default:
4467
6160
  reader.skipType(tag & 7);
4468
6161
  break;
@@ -4472,140 +6165,109 @@ $root.UserPasswordUpdated = (function() {
4472
6165
  };
4473
6166
 
4474
6167
  /**
4475
- * Decodes a UserPasswordUpdated message from the specified reader or buffer, length delimited.
6168
+ * Decodes a UserDoubleOptInEmailRequested message from the specified reader or buffer, length delimited.
4476
6169
  * @function decodeDelimited
4477
- * @memberof UserPasswordUpdated
6170
+ * @memberof UserDoubleOptInEmailRequested
4478
6171
  * @static
4479
6172
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
4480
- * @returns {UserPasswordUpdated} UserPasswordUpdated
6173
+ * @returns {UserDoubleOptInEmailRequested} UserDoubleOptInEmailRequested
4481
6174
  * @throws {Error} If the payload is not a reader or valid buffer
4482
6175
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
4483
6176
  */
4484
- UserPasswordUpdated.decodeDelimited = function decodeDelimited(reader) {
6177
+ UserDoubleOptInEmailRequested.decodeDelimited = function decodeDelimited(reader) {
4485
6178
  if (!(reader instanceof $Reader))
4486
6179
  reader = new $Reader(reader);
4487
6180
  return this.decode(reader, reader.uint32());
4488
6181
  };
4489
6182
 
4490
6183
  /**
4491
- * Verifies a UserPasswordUpdated message.
6184
+ * Verifies a UserDoubleOptInEmailRequested message.
4492
6185
  * @function verify
4493
- * @memberof UserPasswordUpdated
6186
+ * @memberof UserDoubleOptInEmailRequested
4494
6187
  * @static
4495
6188
  * @param {Object.<string,*>} message Plain object to verify
4496
6189
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
4497
6190
  */
4498
- UserPasswordUpdated.verify = function verify(message) {
6191
+ UserDoubleOptInEmailRequested.verify = function verify(message) {
4499
6192
  if (typeof message !== "object" || message === null)
4500
6193
  return "object expected";
4501
6194
  if (message.userId != null && message.hasOwnProperty("userId"))
4502
6195
  if (!$util.isString(message.userId))
4503
6196
  return "userId: string expected";
4504
- if (message.updatedOn != null && message.hasOwnProperty("updatedOn"))
4505
- if (!$util.isInteger(message.updatedOn) && !(message.updatedOn && $util.isInteger(message.updatedOn.low) && $util.isInteger(message.updatedOn.high)))
4506
- return "updatedOn: integer|Long expected";
4507
- if (message.email != null && message.hasOwnProperty("email"))
4508
- if (!$util.isString(message.email))
4509
- return "email: string expected";
4510
6197
  return null;
4511
6198
  };
4512
6199
 
4513
6200
  /**
4514
- * Creates a UserPasswordUpdated message from a plain object. Also converts values to their respective internal types.
6201
+ * Creates a UserDoubleOptInEmailRequested message from a plain object. Also converts values to their respective internal types.
4515
6202
  * @function fromObject
4516
- * @memberof UserPasswordUpdated
6203
+ * @memberof UserDoubleOptInEmailRequested
4517
6204
  * @static
4518
6205
  * @param {Object.<string,*>} object Plain object
4519
- * @returns {UserPasswordUpdated} UserPasswordUpdated
6206
+ * @returns {UserDoubleOptInEmailRequested} UserDoubleOptInEmailRequested
4520
6207
  */
4521
- UserPasswordUpdated.fromObject = function fromObject(object) {
4522
- if (object instanceof $root.UserPasswordUpdated)
6208
+ UserDoubleOptInEmailRequested.fromObject = function fromObject(object) {
6209
+ if (object instanceof $root.UserDoubleOptInEmailRequested)
4523
6210
  return object;
4524
- var message = new $root.UserPasswordUpdated();
6211
+ var message = new $root.UserDoubleOptInEmailRequested();
4525
6212
  if (object.userId != null)
4526
6213
  message.userId = String(object.userId);
4527
- if (object.updatedOn != null)
4528
- if ($util.Long)
4529
- (message.updatedOn = $util.Long.fromValue(object.updatedOn)).unsigned = true;
4530
- else if (typeof object.updatedOn === "string")
4531
- message.updatedOn = parseInt(object.updatedOn, 10);
4532
- else if (typeof object.updatedOn === "number")
4533
- message.updatedOn = object.updatedOn;
4534
- else if (typeof object.updatedOn === "object")
4535
- message.updatedOn = new $util.LongBits(object.updatedOn.low >>> 0, object.updatedOn.high >>> 0).toNumber(true);
4536
- if (object.email != null)
4537
- message.email = String(object.email);
4538
6214
  return message;
4539
6215
  };
4540
6216
 
4541
6217
  /**
4542
- * Creates a plain object from a UserPasswordUpdated message. Also converts values to other types if specified.
6218
+ * Creates a plain object from a UserDoubleOptInEmailRequested message. Also converts values to other types if specified.
4543
6219
  * @function toObject
4544
- * @memberof UserPasswordUpdated
6220
+ * @memberof UserDoubleOptInEmailRequested
4545
6221
  * @static
4546
- * @param {UserPasswordUpdated} message UserPasswordUpdated
6222
+ * @param {UserDoubleOptInEmailRequested} message UserDoubleOptInEmailRequested
4547
6223
  * @param {$protobuf.IConversionOptions} [options] Conversion options
4548
6224
  * @returns {Object.<string,*>} Plain object
4549
6225
  */
4550
- UserPasswordUpdated.toObject = function toObject(message, options) {
6226
+ UserDoubleOptInEmailRequested.toObject = function toObject(message, options) {
4551
6227
  if (!options)
4552
6228
  options = {};
4553
6229
  var object = {};
4554
- if (options.defaults) {
6230
+ if (options.defaults)
4555
6231
  object.userId = "";
4556
- if ($util.Long) {
4557
- var long = new $util.Long(0, 0, true);
4558
- object.updatedOn = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
4559
- } else
4560
- object.updatedOn = options.longs === String ? "0" : 0;
4561
- object.email = "";
4562
- }
4563
6232
  if (message.userId != null && message.hasOwnProperty("userId"))
4564
6233
  object.userId = message.userId;
4565
- if (message.updatedOn != null && message.hasOwnProperty("updatedOn"))
4566
- if (typeof message.updatedOn === "number")
4567
- object.updatedOn = options.longs === String ? String(message.updatedOn) : message.updatedOn;
4568
- else
4569
- object.updatedOn = options.longs === String ? $util.Long.prototype.toString.call(message.updatedOn) : options.longs === Number ? new $util.LongBits(message.updatedOn.low >>> 0, message.updatedOn.high >>> 0).toNumber(true) : message.updatedOn;
4570
- if (message.email != null && message.hasOwnProperty("email"))
4571
- object.email = message.email;
4572
6234
  return object;
4573
6235
  };
4574
6236
 
4575
6237
  /**
4576
- * Converts this UserPasswordUpdated to JSON.
6238
+ * Converts this UserDoubleOptInEmailRequested to JSON.
4577
6239
  * @function toJSON
4578
- * @memberof UserPasswordUpdated
6240
+ * @memberof UserDoubleOptInEmailRequested
4579
6241
  * @instance
4580
6242
  * @returns {Object.<string,*>} JSON object
4581
6243
  */
4582
- UserPasswordUpdated.prototype.toJSON = function toJSON() {
6244
+ UserDoubleOptInEmailRequested.prototype.toJSON = function toJSON() {
4583
6245
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
4584
6246
  };
4585
6247
 
4586
- return UserPasswordUpdated;
6248
+ return UserDoubleOptInEmailRequested;
4587
6249
  })();
4588
6250
 
4589
- $root.UserEmailVerificationRequested = (function() {
6251
+ $root.UserEmailUpdated = (function() {
4590
6252
 
4591
6253
  /**
4592
- * Properties of a UserEmailVerificationRequested.
4593
- * @exports IUserEmailVerificationRequested
4594
- * @interface IUserEmailVerificationRequested
4595
- * @property {string|null} [userId] UserEmailVerificationRequested userId
4596
- * @property {string|null} [verificationCode] UserEmailVerificationRequested verificationCode
4597
- * @property {number|Long|null} [timestamp] UserEmailVerificationRequested timestamp
6254
+ * Properties of a UserEmailUpdated.
6255
+ * @exports IUserEmailUpdated
6256
+ * @interface IUserEmailUpdated
6257
+ * @property {string|null} [userId] UserEmailUpdated userId
6258
+ * @property {string|null} [email] UserEmailUpdated email
6259
+ * @property {number|Long|null} [timestamp] UserEmailUpdated timestamp
4598
6260
  */
4599
6261
 
4600
6262
  /**
4601
- * Constructs a new UserEmailVerificationRequested.
4602
- * @exports UserEmailVerificationRequested
4603
- * @classdesc Represents a UserEmailVerificationRequested.
4604
- * @implements IUserEmailVerificationRequested
6263
+ * Constructs a new UserEmailUpdated.
6264
+ * @exports UserEmailUpdated
6265
+ * @classdesc Represents a UserEmailUpdated.
6266
+ * @implements IUserEmailUpdated
4605
6267
  * @constructor
4606
- * @param {IUserEmailVerificationRequested=} [properties] Properties to set
6268
+ * @param {IUserEmailUpdated=} [properties] Properties to set
4607
6269
  */
4608
- function UserEmailVerificationRequested(properties) {
6270
+ function UserEmailUpdated(properties) {
4609
6271
  if (properties)
4610
6272
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
4611
6273
  if (properties[keys[i]] != null)
@@ -4613,16 +6275,262 @@ $root.UserEmailVerificationRequested = (function() {
4613
6275
  }
4614
6276
 
4615
6277
  /**
4616
- * UserEmailVerificationRequested userId.
6278
+ * UserEmailUpdated userId.
4617
6279
  * @member {string} userId
4618
- * @memberof UserEmailVerificationRequested
6280
+ * @memberof UserEmailUpdated
4619
6281
  * @instance
4620
6282
  */
4621
- UserEmailVerificationRequested.prototype.userId = "";
6283
+ UserEmailUpdated.prototype.userId = "";
4622
6284
 
4623
6285
  /**
4624
- * UserEmailVerificationRequested verificationCode.
4625
- * @member {string} verificationCode
6286
+ * UserEmailUpdated email.
6287
+ * @member {string} email
6288
+ * @memberof UserEmailUpdated
6289
+ * @instance
6290
+ */
6291
+ UserEmailUpdated.prototype.email = "";
6292
+
6293
+ /**
6294
+ * UserEmailUpdated timestamp.
6295
+ * @member {number|Long} timestamp
6296
+ * @memberof UserEmailUpdated
6297
+ * @instance
6298
+ */
6299
+ UserEmailUpdated.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
6300
+
6301
+ /**
6302
+ * Creates a new UserEmailUpdated instance using the specified properties.
6303
+ * @function create
6304
+ * @memberof UserEmailUpdated
6305
+ * @static
6306
+ * @param {IUserEmailUpdated=} [properties] Properties to set
6307
+ * @returns {UserEmailUpdated} UserEmailUpdated instance
6308
+ */
6309
+ UserEmailUpdated.create = function create(properties) {
6310
+ return new UserEmailUpdated(properties);
6311
+ };
6312
+
6313
+ /**
6314
+ * Encodes the specified UserEmailUpdated message. Does not implicitly {@link UserEmailUpdated.verify|verify} messages.
6315
+ * @function encode
6316
+ * @memberof UserEmailUpdated
6317
+ * @static
6318
+ * @param {IUserEmailUpdated} message UserEmailUpdated message or plain object to encode
6319
+ * @param {$protobuf.Writer} [writer] Writer to encode to
6320
+ * @returns {$protobuf.Writer} Writer
6321
+ */
6322
+ UserEmailUpdated.encode = function encode(message, writer) {
6323
+ if (!writer)
6324
+ writer = $Writer.create();
6325
+ if (message.userId != null && message.hasOwnProperty("userId"))
6326
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.userId);
6327
+ if (message.email != null && message.hasOwnProperty("email"))
6328
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.email);
6329
+ if (message.timestamp != null && message.hasOwnProperty("timestamp"))
6330
+ writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.timestamp);
6331
+ return writer;
6332
+ };
6333
+
6334
+ /**
6335
+ * Encodes the specified UserEmailUpdated message, length delimited. Does not implicitly {@link UserEmailUpdated.verify|verify} messages.
6336
+ * @function encodeDelimited
6337
+ * @memberof UserEmailUpdated
6338
+ * @static
6339
+ * @param {IUserEmailUpdated} message UserEmailUpdated message or plain object to encode
6340
+ * @param {$protobuf.Writer} [writer] Writer to encode to
6341
+ * @returns {$protobuf.Writer} Writer
6342
+ */
6343
+ UserEmailUpdated.encodeDelimited = function encodeDelimited(message, writer) {
6344
+ return this.encode(message, writer).ldelim();
6345
+ };
6346
+
6347
+ /**
6348
+ * Decodes a UserEmailUpdated message from the specified reader or buffer.
6349
+ * @function decode
6350
+ * @memberof UserEmailUpdated
6351
+ * @static
6352
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
6353
+ * @param {number} [length] Message length if known beforehand
6354
+ * @returns {UserEmailUpdated} UserEmailUpdated
6355
+ * @throws {Error} If the payload is not a reader or valid buffer
6356
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
6357
+ */
6358
+ UserEmailUpdated.decode = function decode(reader, length) {
6359
+ if (!(reader instanceof $Reader))
6360
+ reader = $Reader.create(reader);
6361
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.UserEmailUpdated();
6362
+ while (reader.pos < end) {
6363
+ var tag = reader.uint32();
6364
+ switch (tag >>> 3) {
6365
+ case 1:
6366
+ message.userId = reader.string();
6367
+ break;
6368
+ case 2:
6369
+ message.email = reader.string();
6370
+ break;
6371
+ case 3:
6372
+ message.timestamp = reader.uint64();
6373
+ break;
6374
+ default:
6375
+ reader.skipType(tag & 7);
6376
+ break;
6377
+ }
6378
+ }
6379
+ return message;
6380
+ };
6381
+
6382
+ /**
6383
+ * Decodes a UserEmailUpdated message from the specified reader or buffer, length delimited.
6384
+ * @function decodeDelimited
6385
+ * @memberof UserEmailUpdated
6386
+ * @static
6387
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
6388
+ * @returns {UserEmailUpdated} UserEmailUpdated
6389
+ * @throws {Error} If the payload is not a reader or valid buffer
6390
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
6391
+ */
6392
+ UserEmailUpdated.decodeDelimited = function decodeDelimited(reader) {
6393
+ if (!(reader instanceof $Reader))
6394
+ reader = new $Reader(reader);
6395
+ return this.decode(reader, reader.uint32());
6396
+ };
6397
+
6398
+ /**
6399
+ * Verifies a UserEmailUpdated message.
6400
+ * @function verify
6401
+ * @memberof UserEmailUpdated
6402
+ * @static
6403
+ * @param {Object.<string,*>} message Plain object to verify
6404
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
6405
+ */
6406
+ UserEmailUpdated.verify = function verify(message) {
6407
+ if (typeof message !== "object" || message === null)
6408
+ return "object expected";
6409
+ if (message.userId != null && message.hasOwnProperty("userId"))
6410
+ if (!$util.isString(message.userId))
6411
+ return "userId: string expected";
6412
+ if (message.email != null && message.hasOwnProperty("email"))
6413
+ if (!$util.isString(message.email))
6414
+ return "email: string expected";
6415
+ if (message.timestamp != null && message.hasOwnProperty("timestamp"))
6416
+ if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high)))
6417
+ return "timestamp: integer|Long expected";
6418
+ return null;
6419
+ };
6420
+
6421
+ /**
6422
+ * Creates a UserEmailUpdated message from a plain object. Also converts values to their respective internal types.
6423
+ * @function fromObject
6424
+ * @memberof UserEmailUpdated
6425
+ * @static
6426
+ * @param {Object.<string,*>} object Plain object
6427
+ * @returns {UserEmailUpdated} UserEmailUpdated
6428
+ */
6429
+ UserEmailUpdated.fromObject = function fromObject(object) {
6430
+ if (object instanceof $root.UserEmailUpdated)
6431
+ return object;
6432
+ var message = new $root.UserEmailUpdated();
6433
+ if (object.userId != null)
6434
+ message.userId = String(object.userId);
6435
+ if (object.email != null)
6436
+ message.email = String(object.email);
6437
+ if (object.timestamp != null)
6438
+ if ($util.Long)
6439
+ (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true;
6440
+ else if (typeof object.timestamp === "string")
6441
+ message.timestamp = parseInt(object.timestamp, 10);
6442
+ else if (typeof object.timestamp === "number")
6443
+ message.timestamp = object.timestamp;
6444
+ else if (typeof object.timestamp === "object")
6445
+ message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(true);
6446
+ return message;
6447
+ };
6448
+
6449
+ /**
6450
+ * Creates a plain object from a UserEmailUpdated message. Also converts values to other types if specified.
6451
+ * @function toObject
6452
+ * @memberof UserEmailUpdated
6453
+ * @static
6454
+ * @param {UserEmailUpdated} message UserEmailUpdated
6455
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
6456
+ * @returns {Object.<string,*>} Plain object
6457
+ */
6458
+ UserEmailUpdated.toObject = function toObject(message, options) {
6459
+ if (!options)
6460
+ options = {};
6461
+ var object = {};
6462
+ if (options.defaults) {
6463
+ object.userId = "";
6464
+ object.email = "";
6465
+ if ($util.Long) {
6466
+ var long = new $util.Long(0, 0, true);
6467
+ object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
6468
+ } else
6469
+ object.timestamp = options.longs === String ? "0" : 0;
6470
+ }
6471
+ if (message.userId != null && message.hasOwnProperty("userId"))
6472
+ object.userId = message.userId;
6473
+ if (message.email != null && message.hasOwnProperty("email"))
6474
+ object.email = message.email;
6475
+ if (message.timestamp != null && message.hasOwnProperty("timestamp"))
6476
+ if (typeof message.timestamp === "number")
6477
+ object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp;
6478
+ else
6479
+ 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;
6480
+ return object;
6481
+ };
6482
+
6483
+ /**
6484
+ * Converts this UserEmailUpdated to JSON.
6485
+ * @function toJSON
6486
+ * @memberof UserEmailUpdated
6487
+ * @instance
6488
+ * @returns {Object.<string,*>} JSON object
6489
+ */
6490
+ UserEmailUpdated.prototype.toJSON = function toJSON() {
6491
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
6492
+ };
6493
+
6494
+ return UserEmailUpdated;
6495
+ })();
6496
+
6497
+ $root.UserEmailVerificationRequested = (function() {
6498
+
6499
+ /**
6500
+ * Properties of a UserEmailVerificationRequested.
6501
+ * @exports IUserEmailVerificationRequested
6502
+ * @interface IUserEmailVerificationRequested
6503
+ * @property {string|null} [userId] UserEmailVerificationRequested userId
6504
+ * @property {string|null} [verificationCode] UserEmailVerificationRequested verificationCode
6505
+ * @property {number|Long|null} [timestamp] UserEmailVerificationRequested timestamp
6506
+ */
6507
+
6508
+ /**
6509
+ * Constructs a new UserEmailVerificationRequested.
6510
+ * @exports UserEmailVerificationRequested
6511
+ * @classdesc Represents a UserEmailVerificationRequested.
6512
+ * @implements IUserEmailVerificationRequested
6513
+ * @constructor
6514
+ * @param {IUserEmailVerificationRequested=} [properties] Properties to set
6515
+ */
6516
+ function UserEmailVerificationRequested(properties) {
6517
+ if (properties)
6518
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
6519
+ if (properties[keys[i]] != null)
6520
+ this[keys[i]] = properties[keys[i]];
6521
+ }
6522
+
6523
+ /**
6524
+ * UserEmailVerificationRequested userId.
6525
+ * @member {string} userId
6526
+ * @memberof UserEmailVerificationRequested
6527
+ * @instance
6528
+ */
6529
+ UserEmailVerificationRequested.prototype.userId = "";
6530
+
6531
+ /**
6532
+ * UserEmailVerificationRequested verificationCode.
6533
+ * @member {string} verificationCode
4626
6534
  * @memberof UserEmailVerificationRequested
4627
6535
  * @instance
4628
6536
  */
@@ -4832,24 +6740,26 @@ $root.UserEmailVerificationRequested = (function() {
4832
6740
  return UserEmailVerificationRequested;
4833
6741
  })();
4834
6742
 
4835
- $root.UserDoubleOptInEmailRequested = (function() {
6743
+ $root.UserPasswordUpdated = (function() {
4836
6744
 
4837
6745
  /**
4838
- * Properties of a UserDoubleOptInEmailRequested.
4839
- * @exports IUserDoubleOptInEmailRequested
4840
- * @interface IUserDoubleOptInEmailRequested
4841
- * @property {string|null} [userId] UserDoubleOptInEmailRequested userId
6746
+ * Properties of a UserPasswordUpdated.
6747
+ * @exports IUserPasswordUpdated
6748
+ * @interface IUserPasswordUpdated
6749
+ * @property {string|null} [userId] UserPasswordUpdated userId
6750
+ * @property {number|Long|null} [updatedOn] UserPasswordUpdated updatedOn
6751
+ * @property {string|null} [email] UserPasswordUpdated email
4842
6752
  */
4843
6753
 
4844
6754
  /**
4845
- * Constructs a new UserDoubleOptInEmailRequested.
4846
- * @exports UserDoubleOptInEmailRequested
4847
- * @classdesc Represents a UserDoubleOptInEmailRequested.
4848
- * @implements IUserDoubleOptInEmailRequested
6755
+ * Constructs a new UserPasswordUpdated.
6756
+ * @exports UserPasswordUpdated
6757
+ * @classdesc Represents a UserPasswordUpdated.
6758
+ * @implements IUserPasswordUpdated
4849
6759
  * @constructor
4850
- * @param {IUserDoubleOptInEmailRequested=} [properties] Properties to set
6760
+ * @param {IUserPasswordUpdated=} [properties] Properties to set
4851
6761
  */
4852
- function UserDoubleOptInEmailRequested(properties) {
6762
+ function UserPasswordUpdated(properties) {
4853
6763
  if (properties)
4854
6764
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
4855
6765
  if (properties[keys[i]] != null)
@@ -4857,76 +6767,102 @@ $root.UserDoubleOptInEmailRequested = (function() {
4857
6767
  }
4858
6768
 
4859
6769
  /**
4860
- * UserDoubleOptInEmailRequested userId.
6770
+ * UserPasswordUpdated userId.
4861
6771
  * @member {string} userId
4862
- * @memberof UserDoubleOptInEmailRequested
6772
+ * @memberof UserPasswordUpdated
4863
6773
  * @instance
4864
6774
  */
4865
- UserDoubleOptInEmailRequested.prototype.userId = "";
6775
+ UserPasswordUpdated.prototype.userId = "";
4866
6776
 
4867
6777
  /**
4868
- * Creates a new UserDoubleOptInEmailRequested instance using the specified properties.
6778
+ * UserPasswordUpdated updatedOn.
6779
+ * @member {number|Long} updatedOn
6780
+ * @memberof UserPasswordUpdated
6781
+ * @instance
6782
+ */
6783
+ UserPasswordUpdated.prototype.updatedOn = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
6784
+
6785
+ /**
6786
+ * UserPasswordUpdated email.
6787
+ * @member {string} email
6788
+ * @memberof UserPasswordUpdated
6789
+ * @instance
6790
+ */
6791
+ UserPasswordUpdated.prototype.email = "";
6792
+
6793
+ /**
6794
+ * Creates a new UserPasswordUpdated instance using the specified properties.
4869
6795
  * @function create
4870
- * @memberof UserDoubleOptInEmailRequested
6796
+ * @memberof UserPasswordUpdated
4871
6797
  * @static
4872
- * @param {IUserDoubleOptInEmailRequested=} [properties] Properties to set
4873
- * @returns {UserDoubleOptInEmailRequested} UserDoubleOptInEmailRequested instance
6798
+ * @param {IUserPasswordUpdated=} [properties] Properties to set
6799
+ * @returns {UserPasswordUpdated} UserPasswordUpdated instance
4874
6800
  */
4875
- UserDoubleOptInEmailRequested.create = function create(properties) {
4876
- return new UserDoubleOptInEmailRequested(properties);
6801
+ UserPasswordUpdated.create = function create(properties) {
6802
+ return new UserPasswordUpdated(properties);
4877
6803
  };
4878
6804
 
4879
6805
  /**
4880
- * Encodes the specified UserDoubleOptInEmailRequested message. Does not implicitly {@link UserDoubleOptInEmailRequested.verify|verify} messages.
6806
+ * Encodes the specified UserPasswordUpdated message. Does not implicitly {@link UserPasswordUpdated.verify|verify} messages.
4881
6807
  * @function encode
4882
- * @memberof UserDoubleOptInEmailRequested
6808
+ * @memberof UserPasswordUpdated
4883
6809
  * @static
4884
- * @param {IUserDoubleOptInEmailRequested} message UserDoubleOptInEmailRequested message or plain object to encode
6810
+ * @param {IUserPasswordUpdated} message UserPasswordUpdated message or plain object to encode
4885
6811
  * @param {$protobuf.Writer} [writer] Writer to encode to
4886
6812
  * @returns {$protobuf.Writer} Writer
4887
6813
  */
4888
- UserDoubleOptInEmailRequested.encode = function encode(message, writer) {
6814
+ UserPasswordUpdated.encode = function encode(message, writer) {
4889
6815
  if (!writer)
4890
6816
  writer = $Writer.create();
4891
6817
  if (message.userId != null && message.hasOwnProperty("userId"))
4892
6818
  writer.uint32(/* id 1, wireType 2 =*/10).string(message.userId);
6819
+ if (message.updatedOn != null && message.hasOwnProperty("updatedOn"))
6820
+ writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.updatedOn);
6821
+ if (message.email != null && message.hasOwnProperty("email"))
6822
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.email);
4893
6823
  return writer;
4894
6824
  };
4895
6825
 
4896
6826
  /**
4897
- * Encodes the specified UserDoubleOptInEmailRequested message, length delimited. Does not implicitly {@link UserDoubleOptInEmailRequested.verify|verify} messages.
6827
+ * Encodes the specified UserPasswordUpdated message, length delimited. Does not implicitly {@link UserPasswordUpdated.verify|verify} messages.
4898
6828
  * @function encodeDelimited
4899
- * @memberof UserDoubleOptInEmailRequested
6829
+ * @memberof UserPasswordUpdated
4900
6830
  * @static
4901
- * @param {IUserDoubleOptInEmailRequested} message UserDoubleOptInEmailRequested message or plain object to encode
6831
+ * @param {IUserPasswordUpdated} message UserPasswordUpdated message or plain object to encode
4902
6832
  * @param {$protobuf.Writer} [writer] Writer to encode to
4903
6833
  * @returns {$protobuf.Writer} Writer
4904
6834
  */
4905
- UserDoubleOptInEmailRequested.encodeDelimited = function encodeDelimited(message, writer) {
6835
+ UserPasswordUpdated.encodeDelimited = function encodeDelimited(message, writer) {
4906
6836
  return this.encode(message, writer).ldelim();
4907
6837
  };
4908
6838
 
4909
6839
  /**
4910
- * Decodes a UserDoubleOptInEmailRequested message from the specified reader or buffer.
6840
+ * Decodes a UserPasswordUpdated message from the specified reader or buffer.
4911
6841
  * @function decode
4912
- * @memberof UserDoubleOptInEmailRequested
6842
+ * @memberof UserPasswordUpdated
4913
6843
  * @static
4914
6844
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
4915
6845
  * @param {number} [length] Message length if known beforehand
4916
- * @returns {UserDoubleOptInEmailRequested} UserDoubleOptInEmailRequested
6846
+ * @returns {UserPasswordUpdated} UserPasswordUpdated
4917
6847
  * @throws {Error} If the payload is not a reader or valid buffer
4918
6848
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
4919
6849
  */
4920
- UserDoubleOptInEmailRequested.decode = function decode(reader, length) {
6850
+ UserPasswordUpdated.decode = function decode(reader, length) {
4921
6851
  if (!(reader instanceof $Reader))
4922
6852
  reader = $Reader.create(reader);
4923
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.UserDoubleOptInEmailRequested();
6853
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.UserPasswordUpdated();
4924
6854
  while (reader.pos < end) {
4925
6855
  var tag = reader.uint32();
4926
6856
  switch (tag >>> 3) {
4927
6857
  case 1:
4928
6858
  message.userId = reader.string();
4929
6859
  break;
6860
+ case 2:
6861
+ message.updatedOn = reader.uint64();
6862
+ break;
6863
+ case 3:
6864
+ message.email = reader.string();
6865
+ break;
4930
6866
  default:
4931
6867
  reader.skipType(tag & 7);
4932
6868
  break;
@@ -4936,87 +6872,118 @@ $root.UserDoubleOptInEmailRequested = (function() {
4936
6872
  };
4937
6873
 
4938
6874
  /**
4939
- * Decodes a UserDoubleOptInEmailRequested message from the specified reader or buffer, length delimited.
6875
+ * Decodes a UserPasswordUpdated message from the specified reader or buffer, length delimited.
4940
6876
  * @function decodeDelimited
4941
- * @memberof UserDoubleOptInEmailRequested
6877
+ * @memberof UserPasswordUpdated
4942
6878
  * @static
4943
6879
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
4944
- * @returns {UserDoubleOptInEmailRequested} UserDoubleOptInEmailRequested
6880
+ * @returns {UserPasswordUpdated} UserPasswordUpdated
4945
6881
  * @throws {Error} If the payload is not a reader or valid buffer
4946
6882
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
4947
6883
  */
4948
- UserDoubleOptInEmailRequested.decodeDelimited = function decodeDelimited(reader) {
6884
+ UserPasswordUpdated.decodeDelimited = function decodeDelimited(reader) {
4949
6885
  if (!(reader instanceof $Reader))
4950
6886
  reader = new $Reader(reader);
4951
6887
  return this.decode(reader, reader.uint32());
4952
6888
  };
4953
6889
 
4954
6890
  /**
4955
- * Verifies a UserDoubleOptInEmailRequested message.
6891
+ * Verifies a UserPasswordUpdated message.
4956
6892
  * @function verify
4957
- * @memberof UserDoubleOptInEmailRequested
6893
+ * @memberof UserPasswordUpdated
4958
6894
  * @static
4959
6895
  * @param {Object.<string,*>} message Plain object to verify
4960
6896
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
4961
6897
  */
4962
- UserDoubleOptInEmailRequested.verify = function verify(message) {
6898
+ UserPasswordUpdated.verify = function verify(message) {
4963
6899
  if (typeof message !== "object" || message === null)
4964
6900
  return "object expected";
4965
6901
  if (message.userId != null && message.hasOwnProperty("userId"))
4966
6902
  if (!$util.isString(message.userId))
4967
6903
  return "userId: string expected";
6904
+ if (message.updatedOn != null && message.hasOwnProperty("updatedOn"))
6905
+ if (!$util.isInteger(message.updatedOn) && !(message.updatedOn && $util.isInteger(message.updatedOn.low) && $util.isInteger(message.updatedOn.high)))
6906
+ return "updatedOn: integer|Long expected";
6907
+ if (message.email != null && message.hasOwnProperty("email"))
6908
+ if (!$util.isString(message.email))
6909
+ return "email: string expected";
4968
6910
  return null;
4969
6911
  };
4970
6912
 
4971
6913
  /**
4972
- * Creates a UserDoubleOptInEmailRequested message from a plain object. Also converts values to their respective internal types.
6914
+ * Creates a UserPasswordUpdated message from a plain object. Also converts values to their respective internal types.
4973
6915
  * @function fromObject
4974
- * @memberof UserDoubleOptInEmailRequested
6916
+ * @memberof UserPasswordUpdated
4975
6917
  * @static
4976
6918
  * @param {Object.<string,*>} object Plain object
4977
- * @returns {UserDoubleOptInEmailRequested} UserDoubleOptInEmailRequested
6919
+ * @returns {UserPasswordUpdated} UserPasswordUpdated
4978
6920
  */
4979
- UserDoubleOptInEmailRequested.fromObject = function fromObject(object) {
4980
- if (object instanceof $root.UserDoubleOptInEmailRequested)
6921
+ UserPasswordUpdated.fromObject = function fromObject(object) {
6922
+ if (object instanceof $root.UserPasswordUpdated)
4981
6923
  return object;
4982
- var message = new $root.UserDoubleOptInEmailRequested();
6924
+ var message = new $root.UserPasswordUpdated();
4983
6925
  if (object.userId != null)
4984
6926
  message.userId = String(object.userId);
6927
+ if (object.updatedOn != null)
6928
+ if ($util.Long)
6929
+ (message.updatedOn = $util.Long.fromValue(object.updatedOn)).unsigned = true;
6930
+ else if (typeof object.updatedOn === "string")
6931
+ message.updatedOn = parseInt(object.updatedOn, 10);
6932
+ else if (typeof object.updatedOn === "number")
6933
+ message.updatedOn = object.updatedOn;
6934
+ else if (typeof object.updatedOn === "object")
6935
+ message.updatedOn = new $util.LongBits(object.updatedOn.low >>> 0, object.updatedOn.high >>> 0).toNumber(true);
6936
+ if (object.email != null)
6937
+ message.email = String(object.email);
4985
6938
  return message;
4986
6939
  };
4987
6940
 
4988
6941
  /**
4989
- * Creates a plain object from a UserDoubleOptInEmailRequested message. Also converts values to other types if specified.
6942
+ * Creates a plain object from a UserPasswordUpdated message. Also converts values to other types if specified.
4990
6943
  * @function toObject
4991
- * @memberof UserDoubleOptInEmailRequested
6944
+ * @memberof UserPasswordUpdated
4992
6945
  * @static
4993
- * @param {UserDoubleOptInEmailRequested} message UserDoubleOptInEmailRequested
6946
+ * @param {UserPasswordUpdated} message UserPasswordUpdated
4994
6947
  * @param {$protobuf.IConversionOptions} [options] Conversion options
4995
6948
  * @returns {Object.<string,*>} Plain object
4996
6949
  */
4997
- UserDoubleOptInEmailRequested.toObject = function toObject(message, options) {
6950
+ UserPasswordUpdated.toObject = function toObject(message, options) {
4998
6951
  if (!options)
4999
6952
  options = {};
5000
6953
  var object = {};
5001
- if (options.defaults)
6954
+ if (options.defaults) {
5002
6955
  object.userId = "";
6956
+ if ($util.Long) {
6957
+ var long = new $util.Long(0, 0, true);
6958
+ object.updatedOn = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
6959
+ } else
6960
+ object.updatedOn = options.longs === String ? "0" : 0;
6961
+ object.email = "";
6962
+ }
5003
6963
  if (message.userId != null && message.hasOwnProperty("userId"))
5004
6964
  object.userId = message.userId;
6965
+ if (message.updatedOn != null && message.hasOwnProperty("updatedOn"))
6966
+ if (typeof message.updatedOn === "number")
6967
+ object.updatedOn = options.longs === String ? String(message.updatedOn) : message.updatedOn;
6968
+ else
6969
+ object.updatedOn = options.longs === String ? $util.Long.prototype.toString.call(message.updatedOn) : options.longs === Number ? new $util.LongBits(message.updatedOn.low >>> 0, message.updatedOn.high >>> 0).toNumber(true) : message.updatedOn;
6970
+ if (message.email != null && message.hasOwnProperty("email"))
6971
+ object.email = message.email;
5005
6972
  return object;
5006
6973
  };
5007
6974
 
5008
6975
  /**
5009
- * Converts this UserDoubleOptInEmailRequested to JSON.
6976
+ * Converts this UserPasswordUpdated to JSON.
5010
6977
  * @function toJSON
5011
- * @memberof UserDoubleOptInEmailRequested
6978
+ * @memberof UserPasswordUpdated
5012
6979
  * @instance
5013
6980
  * @returns {Object.<string,*>} JSON object
5014
6981
  */
5015
- UserDoubleOptInEmailRequested.prototype.toJSON = function toJSON() {
6982
+ UserPasswordUpdated.prototype.toJSON = function toJSON() {
5016
6983
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
5017
6984
  };
5018
6985
 
5019
- return UserDoubleOptInEmailRequested;
6986
+ return UserPasswordUpdated;
5020
6987
  })();
5021
6988
 
5022
6989
  module.exports = $root;