@miradorlabs/web-grpc 3.1.0 → 3.3.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.
@@ -0,0 +1,1650 @@
1
+ // source: proto/gateway/web/v1/admin_gateway.proto
2
+ /**
3
+ * @fileoverview
4
+ * @enhanceable
5
+ * @suppress {missingRequire} reports error on implicit type usages.
6
+ * @suppress {messageConventions} JS Compiler reports an error if a variable or
7
+ * field starts with 'MSG_' and isn't a translatable message.
8
+ * @public
9
+ */
10
+ // GENERATED CODE -- DO NOT EDIT!
11
+ /* eslint-disable */
12
+ // @ts-nocheck
13
+
14
+ var jspb = require('google-protobuf');
15
+ var goog = jspb;
16
+ var global = globalThis;
17
+
18
+ var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
19
+ goog.object.extend(proto, google_protobuf_timestamp_pb);
20
+ var proto_gateway_common_v1_status_pb = require('../../../../proto/gateway/common/v1/status_pb.js');
21
+ goog.object.extend(proto, proto_gateway_common_v1_status_pb);
22
+ var proto_gateway_web_v1_beta_gateway_pb = require('../../../../proto/gateway/web/v1/beta_gateway_pb.js');
23
+ goog.object.extend(proto, proto_gateway_web_v1_beta_gateway_pb);
24
+ var proto_gateway_web_v1_reference_gateway_pb = require('../../../../proto/gateway/web/v1/reference_gateway_pb.js');
25
+ goog.object.extend(proto, proto_gateway_web_v1_reference_gateway_pb);
26
+ goog.exportSymbol('proto.gateway.web.v1.GenerateInviteCodesRequest', null, global);
27
+ goog.exportSymbol('proto.gateway.web.v1.GenerateInviteCodesResponse', null, global);
28
+ goog.exportSymbol('proto.gateway.web.v1.GetAdminStatusRequest', null, global);
29
+ goog.exportSymbol('proto.gateway.web.v1.GetAdminStatusResponse', null, global);
30
+ goog.exportSymbol('proto.gateway.web.v1.InviteCode', null, global);
31
+ goog.exportSymbol('proto.gateway.web.v1.ListInviteCodesRequest', null, global);
32
+ goog.exportSymbol('proto.gateway.web.v1.ListInviteCodesResponse', null, global);
33
+ /**
34
+ * Generated by JsPbCodeGenerator.
35
+ * @param {Array=} opt_data Optional initial data array, typically from a
36
+ * server response, or constructed directly in Javascript. The array is used
37
+ * in place and becomes part of the constructed object. It is not cloned.
38
+ * If no data is provided, the constructed object will be empty, but still
39
+ * valid.
40
+ * @extends {jspb.Message}
41
+ * @constructor
42
+ */
43
+ proto.gateway.web.v1.GetAdminStatusRequest = function(opt_data) {
44
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
45
+ };
46
+ goog.inherits(proto.gateway.web.v1.GetAdminStatusRequest, jspb.Message);
47
+ if (goog.DEBUG && !COMPILED) {
48
+ /**
49
+ * @public
50
+ * @override
51
+ */
52
+ proto.gateway.web.v1.GetAdminStatusRequest.displayName = 'proto.gateway.web.v1.GetAdminStatusRequest';
53
+ }
54
+ /**
55
+ * Generated by JsPbCodeGenerator.
56
+ * @param {Array=} opt_data Optional initial data array, typically from a
57
+ * server response, or constructed directly in Javascript. The array is used
58
+ * in place and becomes part of the constructed object. It is not cloned.
59
+ * If no data is provided, the constructed object will be empty, but still
60
+ * valid.
61
+ * @extends {jspb.Message}
62
+ * @constructor
63
+ */
64
+ proto.gateway.web.v1.GetAdminStatusResponse = function(opt_data) {
65
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
66
+ };
67
+ goog.inherits(proto.gateway.web.v1.GetAdminStatusResponse, jspb.Message);
68
+ if (goog.DEBUG && !COMPILED) {
69
+ /**
70
+ * @public
71
+ * @override
72
+ */
73
+ proto.gateway.web.v1.GetAdminStatusResponse.displayName = 'proto.gateway.web.v1.GetAdminStatusResponse';
74
+ }
75
+ /**
76
+ * Generated by JsPbCodeGenerator.
77
+ * @param {Array=} opt_data Optional initial data array, typically from a
78
+ * server response, or constructed directly in Javascript. The array is used
79
+ * in place and becomes part of the constructed object. It is not cloned.
80
+ * If no data is provided, the constructed object will be empty, but still
81
+ * valid.
82
+ * @extends {jspb.Message}
83
+ * @constructor
84
+ */
85
+ proto.gateway.web.v1.InviteCode = function(opt_data) {
86
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
87
+ };
88
+ goog.inherits(proto.gateway.web.v1.InviteCode, jspb.Message);
89
+ if (goog.DEBUG && !COMPILED) {
90
+ /**
91
+ * @public
92
+ * @override
93
+ */
94
+ proto.gateway.web.v1.InviteCode.displayName = 'proto.gateway.web.v1.InviteCode';
95
+ }
96
+ /**
97
+ * Generated by JsPbCodeGenerator.
98
+ * @param {Array=} opt_data Optional initial data array, typically from a
99
+ * server response, or constructed directly in Javascript. The array is used
100
+ * in place and becomes part of the constructed object. It is not cloned.
101
+ * If no data is provided, the constructed object will be empty, but still
102
+ * valid.
103
+ * @extends {jspb.Message}
104
+ * @constructor
105
+ */
106
+ proto.gateway.web.v1.GenerateInviteCodesRequest = function(opt_data) {
107
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
108
+ };
109
+ goog.inherits(proto.gateway.web.v1.GenerateInviteCodesRequest, jspb.Message);
110
+ if (goog.DEBUG && !COMPILED) {
111
+ /**
112
+ * @public
113
+ * @override
114
+ */
115
+ proto.gateway.web.v1.GenerateInviteCodesRequest.displayName = 'proto.gateway.web.v1.GenerateInviteCodesRequest';
116
+ }
117
+ /**
118
+ * Generated by JsPbCodeGenerator.
119
+ * @param {Array=} opt_data Optional initial data array, typically from a
120
+ * server response, or constructed directly in Javascript. The array is used
121
+ * in place and becomes part of the constructed object. It is not cloned.
122
+ * If no data is provided, the constructed object will be empty, but still
123
+ * valid.
124
+ * @extends {jspb.Message}
125
+ * @constructor
126
+ */
127
+ proto.gateway.web.v1.GenerateInviteCodesResponse = function(opt_data) {
128
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.gateway.web.v1.GenerateInviteCodesResponse.repeatedFields_, null);
129
+ };
130
+ goog.inherits(proto.gateway.web.v1.GenerateInviteCodesResponse, jspb.Message);
131
+ if (goog.DEBUG && !COMPILED) {
132
+ /**
133
+ * @public
134
+ * @override
135
+ */
136
+ proto.gateway.web.v1.GenerateInviteCodesResponse.displayName = 'proto.gateway.web.v1.GenerateInviteCodesResponse';
137
+ }
138
+ /**
139
+ * Generated by JsPbCodeGenerator.
140
+ * @param {Array=} opt_data Optional initial data array, typically from a
141
+ * server response, or constructed directly in Javascript. The array is used
142
+ * in place and becomes part of the constructed object. It is not cloned.
143
+ * If no data is provided, the constructed object will be empty, but still
144
+ * valid.
145
+ * @extends {jspb.Message}
146
+ * @constructor
147
+ */
148
+ proto.gateway.web.v1.ListInviteCodesRequest = function(opt_data) {
149
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
150
+ };
151
+ goog.inherits(proto.gateway.web.v1.ListInviteCodesRequest, jspb.Message);
152
+ if (goog.DEBUG && !COMPILED) {
153
+ /**
154
+ * @public
155
+ * @override
156
+ */
157
+ proto.gateway.web.v1.ListInviteCodesRequest.displayName = 'proto.gateway.web.v1.ListInviteCodesRequest';
158
+ }
159
+ /**
160
+ * Generated by JsPbCodeGenerator.
161
+ * @param {Array=} opt_data Optional initial data array, typically from a
162
+ * server response, or constructed directly in Javascript. The array is used
163
+ * in place and becomes part of the constructed object. It is not cloned.
164
+ * If no data is provided, the constructed object will be empty, but still
165
+ * valid.
166
+ * @extends {jspb.Message}
167
+ * @constructor
168
+ */
169
+ proto.gateway.web.v1.ListInviteCodesResponse = function(opt_data) {
170
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.gateway.web.v1.ListInviteCodesResponse.repeatedFields_, null);
171
+ };
172
+ goog.inherits(proto.gateway.web.v1.ListInviteCodesResponse, jspb.Message);
173
+ if (goog.DEBUG && !COMPILED) {
174
+ /**
175
+ * @public
176
+ * @override
177
+ */
178
+ proto.gateway.web.v1.ListInviteCodesResponse.displayName = 'proto.gateway.web.v1.ListInviteCodesResponse';
179
+ }
180
+
181
+
182
+
183
+ if (jspb.Message.GENERATE_TO_OBJECT) {
184
+ /**
185
+ * Creates an object representation of this proto.
186
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
187
+ * Optional fields that are not set will be set to undefined.
188
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
189
+ * For the list of reserved names please see:
190
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
191
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
192
+ * JSPB instance for transitional soy proto support:
193
+ * http://goto/soy-param-migration
194
+ * @return {!Object}
195
+ */
196
+ proto.gateway.web.v1.GetAdminStatusRequest.prototype.toObject = function(opt_includeInstance) {
197
+ return proto.gateway.web.v1.GetAdminStatusRequest.toObject(opt_includeInstance, this);
198
+ };
199
+
200
+
201
+ /**
202
+ * Static version of the {@see toObject} method.
203
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
204
+ * the JSPB instance for transitional soy proto support:
205
+ * http://goto/soy-param-migration
206
+ * @param {!proto.gateway.web.v1.GetAdminStatusRequest} msg The msg instance to transform.
207
+ * @return {!Object}
208
+ * @suppress {unusedLocalVariables} f is only used for nested messages
209
+ */
210
+ proto.gateway.web.v1.GetAdminStatusRequest.toObject = function(includeInstance, msg) {
211
+ var f, obj = {
212
+
213
+ };
214
+
215
+ if (includeInstance) {
216
+ obj.$jspbMessageInstance = msg;
217
+ }
218
+ return obj;
219
+ };
220
+ }
221
+
222
+
223
+ /**
224
+ * Deserializes binary data (in protobuf wire format).
225
+ * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.
226
+ * @return {!proto.gateway.web.v1.GetAdminStatusRequest}
227
+ */
228
+ proto.gateway.web.v1.GetAdminStatusRequest.deserializeBinary = function(bytes) {
229
+ var reader = new jspb.BinaryReader(bytes);
230
+ var msg = new proto.gateway.web.v1.GetAdminStatusRequest;
231
+ return proto.gateway.web.v1.GetAdminStatusRequest.deserializeBinaryFromReader(msg, reader);
232
+ };
233
+
234
+
235
+ /**
236
+ * Deserializes binary data (in protobuf wire format) from the
237
+ * given reader into the given message object.
238
+ * @param {!proto.gateway.web.v1.GetAdminStatusRequest} msg The message object to deserialize into.
239
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
240
+ * @return {!proto.gateway.web.v1.GetAdminStatusRequest}
241
+ */
242
+ proto.gateway.web.v1.GetAdminStatusRequest.deserializeBinaryFromReader = function(msg, reader) {
243
+ while (reader.nextField()) {
244
+ if (reader.isEndGroup()) {
245
+ break;
246
+ }
247
+ var field = reader.getFieldNumber();
248
+ switch (field) {
249
+ default:
250
+ reader.skipField();
251
+ break;
252
+ }
253
+ }
254
+ return msg;
255
+ };
256
+
257
+
258
+ /**
259
+ * Serializes the message to binary data (in protobuf wire format).
260
+ * @return {!Uint8Array}
261
+ */
262
+ proto.gateway.web.v1.GetAdminStatusRequest.prototype.serializeBinary = function() {
263
+ var writer = new jspb.BinaryWriter();
264
+ proto.gateway.web.v1.GetAdminStatusRequest.serializeBinaryToWriter(this, writer);
265
+ return writer.getResultBuffer();
266
+ };
267
+
268
+
269
+ /**
270
+ * Serializes the given message to binary data (in protobuf wire
271
+ * format), writing to the given BinaryWriter.
272
+ * @param {!proto.gateway.web.v1.GetAdminStatusRequest} message
273
+ * @param {!jspb.BinaryWriter} writer
274
+ * @suppress {unusedLocalVariables} f is only used for nested messages
275
+ */
276
+ proto.gateway.web.v1.GetAdminStatusRequest.serializeBinaryToWriter = function(message, writer) {
277
+ var f = undefined;
278
+ };
279
+
280
+
281
+
282
+
283
+
284
+ if (jspb.Message.GENERATE_TO_OBJECT) {
285
+ /**
286
+ * Creates an object representation of this proto.
287
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
288
+ * Optional fields that are not set will be set to undefined.
289
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
290
+ * For the list of reserved names please see:
291
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
292
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
293
+ * JSPB instance for transitional soy proto support:
294
+ * http://goto/soy-param-migration
295
+ * @return {!Object}
296
+ */
297
+ proto.gateway.web.v1.GetAdminStatusResponse.prototype.toObject = function(opt_includeInstance) {
298
+ return proto.gateway.web.v1.GetAdminStatusResponse.toObject(opt_includeInstance, this);
299
+ };
300
+
301
+
302
+ /**
303
+ * Static version of the {@see toObject} method.
304
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
305
+ * the JSPB instance for transitional soy proto support:
306
+ * http://goto/soy-param-migration
307
+ * @param {!proto.gateway.web.v1.GetAdminStatusResponse} msg The msg instance to transform.
308
+ * @return {!Object}
309
+ * @suppress {unusedLocalVariables} f is only used for nested messages
310
+ */
311
+ proto.gateway.web.v1.GetAdminStatusResponse.toObject = function(includeInstance, msg) {
312
+ var f, obj = {
313
+ status: (f = msg.getStatus()) && proto_gateway_common_v1_status_pb.ResponseStatus.toObject(includeInstance, f),
314
+ admin: jspb.Message.getBooleanFieldWithDefault(msg, 2, false)
315
+ };
316
+
317
+ if (includeInstance) {
318
+ obj.$jspbMessageInstance = msg;
319
+ }
320
+ return obj;
321
+ };
322
+ }
323
+
324
+
325
+ /**
326
+ * Deserializes binary data (in protobuf wire format).
327
+ * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.
328
+ * @return {!proto.gateway.web.v1.GetAdminStatusResponse}
329
+ */
330
+ proto.gateway.web.v1.GetAdminStatusResponse.deserializeBinary = function(bytes) {
331
+ var reader = new jspb.BinaryReader(bytes);
332
+ var msg = new proto.gateway.web.v1.GetAdminStatusResponse;
333
+ return proto.gateway.web.v1.GetAdminStatusResponse.deserializeBinaryFromReader(msg, reader);
334
+ };
335
+
336
+
337
+ /**
338
+ * Deserializes binary data (in protobuf wire format) from the
339
+ * given reader into the given message object.
340
+ * @param {!proto.gateway.web.v1.GetAdminStatusResponse} msg The message object to deserialize into.
341
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
342
+ * @return {!proto.gateway.web.v1.GetAdminStatusResponse}
343
+ */
344
+ proto.gateway.web.v1.GetAdminStatusResponse.deserializeBinaryFromReader = function(msg, reader) {
345
+ while (reader.nextField()) {
346
+ if (reader.isEndGroup()) {
347
+ break;
348
+ }
349
+ var field = reader.getFieldNumber();
350
+ switch (field) {
351
+ case 1:
352
+ var value = new proto_gateway_common_v1_status_pb.ResponseStatus;
353
+ reader.readMessage(value,proto_gateway_common_v1_status_pb.ResponseStatus.deserializeBinaryFromReader);
354
+ msg.setStatus(value);
355
+ break;
356
+ case 2:
357
+ var value = /** @type {boolean} */ (reader.readBool());
358
+ msg.setAdmin(value);
359
+ break;
360
+ default:
361
+ reader.skipField();
362
+ break;
363
+ }
364
+ }
365
+ return msg;
366
+ };
367
+
368
+
369
+ /**
370
+ * Serializes the message to binary data (in protobuf wire format).
371
+ * @return {!Uint8Array}
372
+ */
373
+ proto.gateway.web.v1.GetAdminStatusResponse.prototype.serializeBinary = function() {
374
+ var writer = new jspb.BinaryWriter();
375
+ proto.gateway.web.v1.GetAdminStatusResponse.serializeBinaryToWriter(this, writer);
376
+ return writer.getResultBuffer();
377
+ };
378
+
379
+
380
+ /**
381
+ * Serializes the given message to binary data (in protobuf wire
382
+ * format), writing to the given BinaryWriter.
383
+ * @param {!proto.gateway.web.v1.GetAdminStatusResponse} message
384
+ * @param {!jspb.BinaryWriter} writer
385
+ * @suppress {unusedLocalVariables} f is only used for nested messages
386
+ */
387
+ proto.gateway.web.v1.GetAdminStatusResponse.serializeBinaryToWriter = function(message, writer) {
388
+ var f = undefined;
389
+ f = message.getStatus();
390
+ if (f != null) {
391
+ writer.writeMessage(
392
+ 1,
393
+ f,
394
+ proto_gateway_common_v1_status_pb.ResponseStatus.serializeBinaryToWriter
395
+ );
396
+ }
397
+ f = message.getAdmin();
398
+ if (f) {
399
+ writer.writeBool(
400
+ 2,
401
+ f
402
+ );
403
+ }
404
+ };
405
+
406
+
407
+ /**
408
+ * optional gateway.common.v1.ResponseStatus status = 1;
409
+ * @return {?proto.gateway.common.v1.ResponseStatus}
410
+ */
411
+ proto.gateway.web.v1.GetAdminStatusResponse.prototype.getStatus = function() {
412
+ return /** @type{?proto.gateway.common.v1.ResponseStatus} */ (
413
+ jspb.Message.getWrapperField(this, proto_gateway_common_v1_status_pb.ResponseStatus, 1));
414
+ };
415
+
416
+
417
+ /**
418
+ * @param {?proto.gateway.common.v1.ResponseStatus|undefined} value
419
+ * @return {!proto.gateway.web.v1.GetAdminStatusResponse} returns this
420
+ */
421
+ proto.gateway.web.v1.GetAdminStatusResponse.prototype.setStatus = function(value) {
422
+ return jspb.Message.setWrapperField(this, 1, value);
423
+ };
424
+
425
+
426
+ /**
427
+ * Clears the message field making it undefined.
428
+ * @return {!proto.gateway.web.v1.GetAdminStatusResponse} returns this
429
+ */
430
+ proto.gateway.web.v1.GetAdminStatusResponse.prototype.clearStatus = function() {
431
+ return this.setStatus(undefined);
432
+ };
433
+
434
+
435
+ /**
436
+ * Returns whether this field is set.
437
+ * @return {boolean}
438
+ */
439
+ proto.gateway.web.v1.GetAdminStatusResponse.prototype.hasStatus = function() {
440
+ return jspb.Message.getField(this, 1) != null;
441
+ };
442
+
443
+
444
+ /**
445
+ * optional bool admin = 2;
446
+ * @return {boolean}
447
+ */
448
+ proto.gateway.web.v1.GetAdminStatusResponse.prototype.getAdmin = function() {
449
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));
450
+ };
451
+
452
+
453
+ /**
454
+ * @param {boolean} value
455
+ * @return {!proto.gateway.web.v1.GetAdminStatusResponse} returns this
456
+ */
457
+ proto.gateway.web.v1.GetAdminStatusResponse.prototype.setAdmin = function(value) {
458
+ return jspb.Message.setProto3BooleanField(this, 2, value);
459
+ };
460
+
461
+
462
+
463
+
464
+
465
+ if (jspb.Message.GENERATE_TO_OBJECT) {
466
+ /**
467
+ * Creates an object representation of this proto.
468
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
469
+ * Optional fields that are not set will be set to undefined.
470
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
471
+ * For the list of reserved names please see:
472
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
473
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
474
+ * JSPB instance for transitional soy proto support:
475
+ * http://goto/soy-param-migration
476
+ * @return {!Object}
477
+ */
478
+ proto.gateway.web.v1.InviteCode.prototype.toObject = function(opt_includeInstance) {
479
+ return proto.gateway.web.v1.InviteCode.toObject(opt_includeInstance, this);
480
+ };
481
+
482
+
483
+ /**
484
+ * Static version of the {@see toObject} method.
485
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
486
+ * the JSPB instance for transitional soy proto support:
487
+ * http://goto/soy-param-migration
488
+ * @param {!proto.gateway.web.v1.InviteCode} msg The msg instance to transform.
489
+ * @return {!Object}
490
+ * @suppress {unusedLocalVariables} f is only used for nested messages
491
+ */
492
+ proto.gateway.web.v1.InviteCode.toObject = function(includeInstance, msg) {
493
+ var f, obj = {
494
+ id: jspb.Message.getFieldWithDefault(msg, 1, ""),
495
+ code: jspb.Message.getFieldWithDefault(msg, 2, ""),
496
+ state: jspb.Message.getFieldWithDefault(msg, 3, 0),
497
+ label: jspb.Message.getFieldWithDefault(msg, 4, ""),
498
+ redeemedByUserId: jspb.Message.getFieldWithDefault(msg, 5, ""),
499
+ createdAt: (f = msg.getCreatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
500
+ expiresAt: (f = msg.getExpiresAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
501
+ reservedAt: (f = msg.getReservedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
502
+ redeemedAt: (f = msg.getRedeemedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
503
+ };
504
+
505
+ if (includeInstance) {
506
+ obj.$jspbMessageInstance = msg;
507
+ }
508
+ return obj;
509
+ };
510
+ }
511
+
512
+
513
+ /**
514
+ * Deserializes binary data (in protobuf wire format).
515
+ * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.
516
+ * @return {!proto.gateway.web.v1.InviteCode}
517
+ */
518
+ proto.gateway.web.v1.InviteCode.deserializeBinary = function(bytes) {
519
+ var reader = new jspb.BinaryReader(bytes);
520
+ var msg = new proto.gateway.web.v1.InviteCode;
521
+ return proto.gateway.web.v1.InviteCode.deserializeBinaryFromReader(msg, reader);
522
+ };
523
+
524
+
525
+ /**
526
+ * Deserializes binary data (in protobuf wire format) from the
527
+ * given reader into the given message object.
528
+ * @param {!proto.gateway.web.v1.InviteCode} msg The message object to deserialize into.
529
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
530
+ * @return {!proto.gateway.web.v1.InviteCode}
531
+ */
532
+ proto.gateway.web.v1.InviteCode.deserializeBinaryFromReader = function(msg, reader) {
533
+ while (reader.nextField()) {
534
+ if (reader.isEndGroup()) {
535
+ break;
536
+ }
537
+ var field = reader.getFieldNumber();
538
+ switch (field) {
539
+ case 1:
540
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
541
+ msg.setId(value);
542
+ break;
543
+ case 2:
544
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
545
+ msg.setCode(value);
546
+ break;
547
+ case 3:
548
+ var value = /** @type {!proto.gateway.web.v1.InviteCodeState} */ (reader.readEnum());
549
+ msg.setState(value);
550
+ break;
551
+ case 4:
552
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
553
+ msg.setLabel(value);
554
+ break;
555
+ case 5:
556
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
557
+ msg.setRedeemedByUserId(value);
558
+ break;
559
+ case 6:
560
+ var value = new google_protobuf_timestamp_pb.Timestamp;
561
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
562
+ msg.setCreatedAt(value);
563
+ break;
564
+ case 7:
565
+ var value = new google_protobuf_timestamp_pb.Timestamp;
566
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
567
+ msg.setExpiresAt(value);
568
+ break;
569
+ case 8:
570
+ var value = new google_protobuf_timestamp_pb.Timestamp;
571
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
572
+ msg.setReservedAt(value);
573
+ break;
574
+ case 9:
575
+ var value = new google_protobuf_timestamp_pb.Timestamp;
576
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
577
+ msg.setRedeemedAt(value);
578
+ break;
579
+ default:
580
+ reader.skipField();
581
+ break;
582
+ }
583
+ }
584
+ return msg;
585
+ };
586
+
587
+
588
+ /**
589
+ * Serializes the message to binary data (in protobuf wire format).
590
+ * @return {!Uint8Array}
591
+ */
592
+ proto.gateway.web.v1.InviteCode.prototype.serializeBinary = function() {
593
+ var writer = new jspb.BinaryWriter();
594
+ proto.gateway.web.v1.InviteCode.serializeBinaryToWriter(this, writer);
595
+ return writer.getResultBuffer();
596
+ };
597
+
598
+
599
+ /**
600
+ * Serializes the given message to binary data (in protobuf wire
601
+ * format), writing to the given BinaryWriter.
602
+ * @param {!proto.gateway.web.v1.InviteCode} message
603
+ * @param {!jspb.BinaryWriter} writer
604
+ * @suppress {unusedLocalVariables} f is only used for nested messages
605
+ */
606
+ proto.gateway.web.v1.InviteCode.serializeBinaryToWriter = function(message, writer) {
607
+ var f = undefined;
608
+ f = message.getId();
609
+ if (f.length > 0) {
610
+ writer.writeString(
611
+ 1,
612
+ f
613
+ );
614
+ }
615
+ f = message.getCode();
616
+ if (f.length > 0) {
617
+ writer.writeString(
618
+ 2,
619
+ f
620
+ );
621
+ }
622
+ f = message.getState();
623
+ if (f !== 0.0) {
624
+ writer.writeEnum(
625
+ 3,
626
+ f
627
+ );
628
+ }
629
+ f = message.getLabel();
630
+ if (f.length > 0) {
631
+ writer.writeString(
632
+ 4,
633
+ f
634
+ );
635
+ }
636
+ f = message.getRedeemedByUserId();
637
+ if (f.length > 0) {
638
+ writer.writeString(
639
+ 5,
640
+ f
641
+ );
642
+ }
643
+ f = message.getCreatedAt();
644
+ if (f != null) {
645
+ writer.writeMessage(
646
+ 6,
647
+ f,
648
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
649
+ );
650
+ }
651
+ f = message.getExpiresAt();
652
+ if (f != null) {
653
+ writer.writeMessage(
654
+ 7,
655
+ f,
656
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
657
+ );
658
+ }
659
+ f = message.getReservedAt();
660
+ if (f != null) {
661
+ writer.writeMessage(
662
+ 8,
663
+ f,
664
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
665
+ );
666
+ }
667
+ f = message.getRedeemedAt();
668
+ if (f != null) {
669
+ writer.writeMessage(
670
+ 9,
671
+ f,
672
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
673
+ );
674
+ }
675
+ };
676
+
677
+
678
+ /**
679
+ * optional string id = 1;
680
+ * @return {string}
681
+ */
682
+ proto.gateway.web.v1.InviteCode.prototype.getId = function() {
683
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
684
+ };
685
+
686
+
687
+ /**
688
+ * @param {string} value
689
+ * @return {!proto.gateway.web.v1.InviteCode} returns this
690
+ */
691
+ proto.gateway.web.v1.InviteCode.prototype.setId = function(value) {
692
+ return jspb.Message.setProto3StringField(this, 1, value);
693
+ };
694
+
695
+
696
+ /**
697
+ * optional string code = 2;
698
+ * @return {string}
699
+ */
700
+ proto.gateway.web.v1.InviteCode.prototype.getCode = function() {
701
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
702
+ };
703
+
704
+
705
+ /**
706
+ * @param {string} value
707
+ * @return {!proto.gateway.web.v1.InviteCode} returns this
708
+ */
709
+ proto.gateway.web.v1.InviteCode.prototype.setCode = function(value) {
710
+ return jspb.Message.setProto3StringField(this, 2, value);
711
+ };
712
+
713
+
714
+ /**
715
+ * optional InviteCodeState state = 3;
716
+ * @return {!proto.gateway.web.v1.InviteCodeState}
717
+ */
718
+ proto.gateway.web.v1.InviteCode.prototype.getState = function() {
719
+ return /** @type {!proto.gateway.web.v1.InviteCodeState} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
720
+ };
721
+
722
+
723
+ /**
724
+ * @param {!proto.gateway.web.v1.InviteCodeState} value
725
+ * @return {!proto.gateway.web.v1.InviteCode} returns this
726
+ */
727
+ proto.gateway.web.v1.InviteCode.prototype.setState = function(value) {
728
+ return jspb.Message.setProto3EnumField(this, 3, value);
729
+ };
730
+
731
+
732
+ /**
733
+ * optional string label = 4;
734
+ * @return {string}
735
+ */
736
+ proto.gateway.web.v1.InviteCode.prototype.getLabel = function() {
737
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
738
+ };
739
+
740
+
741
+ /**
742
+ * @param {string} value
743
+ * @return {!proto.gateway.web.v1.InviteCode} returns this
744
+ */
745
+ proto.gateway.web.v1.InviteCode.prototype.setLabel = function(value) {
746
+ return jspb.Message.setProto3StringField(this, 4, value);
747
+ };
748
+
749
+
750
+ /**
751
+ * optional string redeemed_by_user_id = 5;
752
+ * @return {string}
753
+ */
754
+ proto.gateway.web.v1.InviteCode.prototype.getRedeemedByUserId = function() {
755
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
756
+ };
757
+
758
+
759
+ /**
760
+ * @param {string} value
761
+ * @return {!proto.gateway.web.v1.InviteCode} returns this
762
+ */
763
+ proto.gateway.web.v1.InviteCode.prototype.setRedeemedByUserId = function(value) {
764
+ return jspb.Message.setProto3StringField(this, 5, value);
765
+ };
766
+
767
+
768
+ /**
769
+ * optional google.protobuf.Timestamp created_at = 6;
770
+ * @return {?proto.google.protobuf.Timestamp}
771
+ */
772
+ proto.gateway.web.v1.InviteCode.prototype.getCreatedAt = function() {
773
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
774
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6));
775
+ };
776
+
777
+
778
+ /**
779
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
780
+ * @return {!proto.gateway.web.v1.InviteCode} returns this
781
+ */
782
+ proto.gateway.web.v1.InviteCode.prototype.setCreatedAt = function(value) {
783
+ return jspb.Message.setWrapperField(this, 6, value);
784
+ };
785
+
786
+
787
+ /**
788
+ * Clears the message field making it undefined.
789
+ * @return {!proto.gateway.web.v1.InviteCode} returns this
790
+ */
791
+ proto.gateway.web.v1.InviteCode.prototype.clearCreatedAt = function() {
792
+ return this.setCreatedAt(undefined);
793
+ };
794
+
795
+
796
+ /**
797
+ * Returns whether this field is set.
798
+ * @return {boolean}
799
+ */
800
+ proto.gateway.web.v1.InviteCode.prototype.hasCreatedAt = function() {
801
+ return jspb.Message.getField(this, 6) != null;
802
+ };
803
+
804
+
805
+ /**
806
+ * optional google.protobuf.Timestamp expires_at = 7;
807
+ * @return {?proto.google.protobuf.Timestamp}
808
+ */
809
+ proto.gateway.web.v1.InviteCode.prototype.getExpiresAt = function() {
810
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
811
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 7));
812
+ };
813
+
814
+
815
+ /**
816
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
817
+ * @return {!proto.gateway.web.v1.InviteCode} returns this
818
+ */
819
+ proto.gateway.web.v1.InviteCode.prototype.setExpiresAt = function(value) {
820
+ return jspb.Message.setWrapperField(this, 7, value);
821
+ };
822
+
823
+
824
+ /**
825
+ * Clears the message field making it undefined.
826
+ * @return {!proto.gateway.web.v1.InviteCode} returns this
827
+ */
828
+ proto.gateway.web.v1.InviteCode.prototype.clearExpiresAt = function() {
829
+ return this.setExpiresAt(undefined);
830
+ };
831
+
832
+
833
+ /**
834
+ * Returns whether this field is set.
835
+ * @return {boolean}
836
+ */
837
+ proto.gateway.web.v1.InviteCode.prototype.hasExpiresAt = function() {
838
+ return jspb.Message.getField(this, 7) != null;
839
+ };
840
+
841
+
842
+ /**
843
+ * optional google.protobuf.Timestamp reserved_at = 8;
844
+ * @return {?proto.google.protobuf.Timestamp}
845
+ */
846
+ proto.gateway.web.v1.InviteCode.prototype.getReservedAt = function() {
847
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
848
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 8));
849
+ };
850
+
851
+
852
+ /**
853
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
854
+ * @return {!proto.gateway.web.v1.InviteCode} returns this
855
+ */
856
+ proto.gateway.web.v1.InviteCode.prototype.setReservedAt = function(value) {
857
+ return jspb.Message.setWrapperField(this, 8, value);
858
+ };
859
+
860
+
861
+ /**
862
+ * Clears the message field making it undefined.
863
+ * @return {!proto.gateway.web.v1.InviteCode} returns this
864
+ */
865
+ proto.gateway.web.v1.InviteCode.prototype.clearReservedAt = function() {
866
+ return this.setReservedAt(undefined);
867
+ };
868
+
869
+
870
+ /**
871
+ * Returns whether this field is set.
872
+ * @return {boolean}
873
+ */
874
+ proto.gateway.web.v1.InviteCode.prototype.hasReservedAt = function() {
875
+ return jspb.Message.getField(this, 8) != null;
876
+ };
877
+
878
+
879
+ /**
880
+ * optional google.protobuf.Timestamp redeemed_at = 9;
881
+ * @return {?proto.google.protobuf.Timestamp}
882
+ */
883
+ proto.gateway.web.v1.InviteCode.prototype.getRedeemedAt = function() {
884
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
885
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 9));
886
+ };
887
+
888
+
889
+ /**
890
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
891
+ * @return {!proto.gateway.web.v1.InviteCode} returns this
892
+ */
893
+ proto.gateway.web.v1.InviteCode.prototype.setRedeemedAt = function(value) {
894
+ return jspb.Message.setWrapperField(this, 9, value);
895
+ };
896
+
897
+
898
+ /**
899
+ * Clears the message field making it undefined.
900
+ * @return {!proto.gateway.web.v1.InviteCode} returns this
901
+ */
902
+ proto.gateway.web.v1.InviteCode.prototype.clearRedeemedAt = function() {
903
+ return this.setRedeemedAt(undefined);
904
+ };
905
+
906
+
907
+ /**
908
+ * Returns whether this field is set.
909
+ * @return {boolean}
910
+ */
911
+ proto.gateway.web.v1.InviteCode.prototype.hasRedeemedAt = function() {
912
+ return jspb.Message.getField(this, 9) != null;
913
+ };
914
+
915
+
916
+
917
+
918
+
919
+ if (jspb.Message.GENERATE_TO_OBJECT) {
920
+ /**
921
+ * Creates an object representation of this proto.
922
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
923
+ * Optional fields that are not set will be set to undefined.
924
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
925
+ * For the list of reserved names please see:
926
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
927
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
928
+ * JSPB instance for transitional soy proto support:
929
+ * http://goto/soy-param-migration
930
+ * @return {!Object}
931
+ */
932
+ proto.gateway.web.v1.GenerateInviteCodesRequest.prototype.toObject = function(opt_includeInstance) {
933
+ return proto.gateway.web.v1.GenerateInviteCodesRequest.toObject(opt_includeInstance, this);
934
+ };
935
+
936
+
937
+ /**
938
+ * Static version of the {@see toObject} method.
939
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
940
+ * the JSPB instance for transitional soy proto support:
941
+ * http://goto/soy-param-migration
942
+ * @param {!proto.gateway.web.v1.GenerateInviteCodesRequest} msg The msg instance to transform.
943
+ * @return {!Object}
944
+ * @suppress {unusedLocalVariables} f is only used for nested messages
945
+ */
946
+ proto.gateway.web.v1.GenerateInviteCodesRequest.toObject = function(includeInstance, msg) {
947
+ var f, obj = {
948
+ count: jspb.Message.getFieldWithDefault(msg, 1, 0),
949
+ label: jspb.Message.getFieldWithDefault(msg, 2, ""),
950
+ expiresAt: (f = msg.getExpiresAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
951
+ };
952
+
953
+ if (includeInstance) {
954
+ obj.$jspbMessageInstance = msg;
955
+ }
956
+ return obj;
957
+ };
958
+ }
959
+
960
+
961
+ /**
962
+ * Deserializes binary data (in protobuf wire format).
963
+ * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.
964
+ * @return {!proto.gateway.web.v1.GenerateInviteCodesRequest}
965
+ */
966
+ proto.gateway.web.v1.GenerateInviteCodesRequest.deserializeBinary = function(bytes) {
967
+ var reader = new jspb.BinaryReader(bytes);
968
+ var msg = new proto.gateway.web.v1.GenerateInviteCodesRequest;
969
+ return proto.gateway.web.v1.GenerateInviteCodesRequest.deserializeBinaryFromReader(msg, reader);
970
+ };
971
+
972
+
973
+ /**
974
+ * Deserializes binary data (in protobuf wire format) from the
975
+ * given reader into the given message object.
976
+ * @param {!proto.gateway.web.v1.GenerateInviteCodesRequest} msg The message object to deserialize into.
977
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
978
+ * @return {!proto.gateway.web.v1.GenerateInviteCodesRequest}
979
+ */
980
+ proto.gateway.web.v1.GenerateInviteCodesRequest.deserializeBinaryFromReader = function(msg, reader) {
981
+ while (reader.nextField()) {
982
+ if (reader.isEndGroup()) {
983
+ break;
984
+ }
985
+ var field = reader.getFieldNumber();
986
+ switch (field) {
987
+ case 1:
988
+ var value = /** @type {number} */ (reader.readInt32());
989
+ msg.setCount(value);
990
+ break;
991
+ case 2:
992
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
993
+ msg.setLabel(value);
994
+ break;
995
+ case 3:
996
+ var value = new google_protobuf_timestamp_pb.Timestamp;
997
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
998
+ msg.setExpiresAt(value);
999
+ break;
1000
+ default:
1001
+ reader.skipField();
1002
+ break;
1003
+ }
1004
+ }
1005
+ return msg;
1006
+ };
1007
+
1008
+
1009
+ /**
1010
+ * Serializes the message to binary data (in protobuf wire format).
1011
+ * @return {!Uint8Array}
1012
+ */
1013
+ proto.gateway.web.v1.GenerateInviteCodesRequest.prototype.serializeBinary = function() {
1014
+ var writer = new jspb.BinaryWriter();
1015
+ proto.gateway.web.v1.GenerateInviteCodesRequest.serializeBinaryToWriter(this, writer);
1016
+ return writer.getResultBuffer();
1017
+ };
1018
+
1019
+
1020
+ /**
1021
+ * Serializes the given message to binary data (in protobuf wire
1022
+ * format), writing to the given BinaryWriter.
1023
+ * @param {!proto.gateway.web.v1.GenerateInviteCodesRequest} message
1024
+ * @param {!jspb.BinaryWriter} writer
1025
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1026
+ */
1027
+ proto.gateway.web.v1.GenerateInviteCodesRequest.serializeBinaryToWriter = function(message, writer) {
1028
+ var f = undefined;
1029
+ f = message.getCount();
1030
+ if (f !== 0) {
1031
+ writer.writeInt32(
1032
+ 1,
1033
+ f
1034
+ );
1035
+ }
1036
+ f = message.getLabel();
1037
+ if (f.length > 0) {
1038
+ writer.writeString(
1039
+ 2,
1040
+ f
1041
+ );
1042
+ }
1043
+ f = message.getExpiresAt();
1044
+ if (f != null) {
1045
+ writer.writeMessage(
1046
+ 3,
1047
+ f,
1048
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
1049
+ );
1050
+ }
1051
+ };
1052
+
1053
+
1054
+ /**
1055
+ * optional int32 count = 1;
1056
+ * @return {number}
1057
+ */
1058
+ proto.gateway.web.v1.GenerateInviteCodesRequest.prototype.getCount = function() {
1059
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
1060
+ };
1061
+
1062
+
1063
+ /**
1064
+ * @param {number} value
1065
+ * @return {!proto.gateway.web.v1.GenerateInviteCodesRequest} returns this
1066
+ */
1067
+ proto.gateway.web.v1.GenerateInviteCodesRequest.prototype.setCount = function(value) {
1068
+ return jspb.Message.setProto3IntField(this, 1, value);
1069
+ };
1070
+
1071
+
1072
+ /**
1073
+ * optional string label = 2;
1074
+ * @return {string}
1075
+ */
1076
+ proto.gateway.web.v1.GenerateInviteCodesRequest.prototype.getLabel = function() {
1077
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1078
+ };
1079
+
1080
+
1081
+ /**
1082
+ * @param {string} value
1083
+ * @return {!proto.gateway.web.v1.GenerateInviteCodesRequest} returns this
1084
+ */
1085
+ proto.gateway.web.v1.GenerateInviteCodesRequest.prototype.setLabel = function(value) {
1086
+ return jspb.Message.setProto3StringField(this, 2, value);
1087
+ };
1088
+
1089
+
1090
+ /**
1091
+ * optional google.protobuf.Timestamp expires_at = 3;
1092
+ * @return {?proto.google.protobuf.Timestamp}
1093
+ */
1094
+ proto.gateway.web.v1.GenerateInviteCodesRequest.prototype.getExpiresAt = function() {
1095
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
1096
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3));
1097
+ };
1098
+
1099
+
1100
+ /**
1101
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
1102
+ * @return {!proto.gateway.web.v1.GenerateInviteCodesRequest} returns this
1103
+ */
1104
+ proto.gateway.web.v1.GenerateInviteCodesRequest.prototype.setExpiresAt = function(value) {
1105
+ return jspb.Message.setWrapperField(this, 3, value);
1106
+ };
1107
+
1108
+
1109
+ /**
1110
+ * Clears the message field making it undefined.
1111
+ * @return {!proto.gateway.web.v1.GenerateInviteCodesRequest} returns this
1112
+ */
1113
+ proto.gateway.web.v1.GenerateInviteCodesRequest.prototype.clearExpiresAt = function() {
1114
+ return this.setExpiresAt(undefined);
1115
+ };
1116
+
1117
+
1118
+ /**
1119
+ * Returns whether this field is set.
1120
+ * @return {boolean}
1121
+ */
1122
+ proto.gateway.web.v1.GenerateInviteCodesRequest.prototype.hasExpiresAt = function() {
1123
+ return jspb.Message.getField(this, 3) != null;
1124
+ };
1125
+
1126
+
1127
+
1128
+ /**
1129
+ * List of repeated fields within this message type.
1130
+ * @private {!Array<number>}
1131
+ * @const
1132
+ */
1133
+ proto.gateway.web.v1.GenerateInviteCodesResponse.repeatedFields_ = [2];
1134
+
1135
+
1136
+
1137
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1138
+ /**
1139
+ * Creates an object representation of this proto.
1140
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1141
+ * Optional fields that are not set will be set to undefined.
1142
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1143
+ * For the list of reserved names please see:
1144
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1145
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1146
+ * JSPB instance for transitional soy proto support:
1147
+ * http://goto/soy-param-migration
1148
+ * @return {!Object}
1149
+ */
1150
+ proto.gateway.web.v1.GenerateInviteCodesResponse.prototype.toObject = function(opt_includeInstance) {
1151
+ return proto.gateway.web.v1.GenerateInviteCodesResponse.toObject(opt_includeInstance, this);
1152
+ };
1153
+
1154
+
1155
+ /**
1156
+ * Static version of the {@see toObject} method.
1157
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1158
+ * the JSPB instance for transitional soy proto support:
1159
+ * http://goto/soy-param-migration
1160
+ * @param {!proto.gateway.web.v1.GenerateInviteCodesResponse} msg The msg instance to transform.
1161
+ * @return {!Object}
1162
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1163
+ */
1164
+ proto.gateway.web.v1.GenerateInviteCodesResponse.toObject = function(includeInstance, msg) {
1165
+ var f, obj = {
1166
+ status: (f = msg.getStatus()) && proto_gateway_common_v1_status_pb.ResponseStatus.toObject(includeInstance, f),
1167
+ codesList: jspb.Message.toObjectList(msg.getCodesList(),
1168
+ proto.gateway.web.v1.InviteCode.toObject, includeInstance)
1169
+ };
1170
+
1171
+ if (includeInstance) {
1172
+ obj.$jspbMessageInstance = msg;
1173
+ }
1174
+ return obj;
1175
+ };
1176
+ }
1177
+
1178
+
1179
+ /**
1180
+ * Deserializes binary data (in protobuf wire format).
1181
+ * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.
1182
+ * @return {!proto.gateway.web.v1.GenerateInviteCodesResponse}
1183
+ */
1184
+ proto.gateway.web.v1.GenerateInviteCodesResponse.deserializeBinary = function(bytes) {
1185
+ var reader = new jspb.BinaryReader(bytes);
1186
+ var msg = new proto.gateway.web.v1.GenerateInviteCodesResponse;
1187
+ return proto.gateway.web.v1.GenerateInviteCodesResponse.deserializeBinaryFromReader(msg, reader);
1188
+ };
1189
+
1190
+
1191
+ /**
1192
+ * Deserializes binary data (in protobuf wire format) from the
1193
+ * given reader into the given message object.
1194
+ * @param {!proto.gateway.web.v1.GenerateInviteCodesResponse} msg The message object to deserialize into.
1195
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1196
+ * @return {!proto.gateway.web.v1.GenerateInviteCodesResponse}
1197
+ */
1198
+ proto.gateway.web.v1.GenerateInviteCodesResponse.deserializeBinaryFromReader = function(msg, reader) {
1199
+ while (reader.nextField()) {
1200
+ if (reader.isEndGroup()) {
1201
+ break;
1202
+ }
1203
+ var field = reader.getFieldNumber();
1204
+ switch (field) {
1205
+ case 1:
1206
+ var value = new proto_gateway_common_v1_status_pb.ResponseStatus;
1207
+ reader.readMessage(value,proto_gateway_common_v1_status_pb.ResponseStatus.deserializeBinaryFromReader);
1208
+ msg.setStatus(value);
1209
+ break;
1210
+ case 2:
1211
+ var value = new proto.gateway.web.v1.InviteCode;
1212
+ reader.readMessage(value,proto.gateway.web.v1.InviteCode.deserializeBinaryFromReader);
1213
+ msg.addCodes(value);
1214
+ break;
1215
+ default:
1216
+ reader.skipField();
1217
+ break;
1218
+ }
1219
+ }
1220
+ return msg;
1221
+ };
1222
+
1223
+
1224
+ /**
1225
+ * Serializes the message to binary data (in protobuf wire format).
1226
+ * @return {!Uint8Array}
1227
+ */
1228
+ proto.gateway.web.v1.GenerateInviteCodesResponse.prototype.serializeBinary = function() {
1229
+ var writer = new jspb.BinaryWriter();
1230
+ proto.gateway.web.v1.GenerateInviteCodesResponse.serializeBinaryToWriter(this, writer);
1231
+ return writer.getResultBuffer();
1232
+ };
1233
+
1234
+
1235
+ /**
1236
+ * Serializes the given message to binary data (in protobuf wire
1237
+ * format), writing to the given BinaryWriter.
1238
+ * @param {!proto.gateway.web.v1.GenerateInviteCodesResponse} message
1239
+ * @param {!jspb.BinaryWriter} writer
1240
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1241
+ */
1242
+ proto.gateway.web.v1.GenerateInviteCodesResponse.serializeBinaryToWriter = function(message, writer) {
1243
+ var f = undefined;
1244
+ f = message.getStatus();
1245
+ if (f != null) {
1246
+ writer.writeMessage(
1247
+ 1,
1248
+ f,
1249
+ proto_gateway_common_v1_status_pb.ResponseStatus.serializeBinaryToWriter
1250
+ );
1251
+ }
1252
+ f = message.getCodesList();
1253
+ if (f.length > 0) {
1254
+ writer.writeRepeatedMessage(
1255
+ 2,
1256
+ f,
1257
+ proto.gateway.web.v1.InviteCode.serializeBinaryToWriter
1258
+ );
1259
+ }
1260
+ };
1261
+
1262
+
1263
+ /**
1264
+ * optional gateway.common.v1.ResponseStatus status = 1;
1265
+ * @return {?proto.gateway.common.v1.ResponseStatus}
1266
+ */
1267
+ proto.gateway.web.v1.GenerateInviteCodesResponse.prototype.getStatus = function() {
1268
+ return /** @type{?proto.gateway.common.v1.ResponseStatus} */ (
1269
+ jspb.Message.getWrapperField(this, proto_gateway_common_v1_status_pb.ResponseStatus, 1));
1270
+ };
1271
+
1272
+
1273
+ /**
1274
+ * @param {?proto.gateway.common.v1.ResponseStatus|undefined} value
1275
+ * @return {!proto.gateway.web.v1.GenerateInviteCodesResponse} returns this
1276
+ */
1277
+ proto.gateway.web.v1.GenerateInviteCodesResponse.prototype.setStatus = function(value) {
1278
+ return jspb.Message.setWrapperField(this, 1, value);
1279
+ };
1280
+
1281
+
1282
+ /**
1283
+ * Clears the message field making it undefined.
1284
+ * @return {!proto.gateway.web.v1.GenerateInviteCodesResponse} returns this
1285
+ */
1286
+ proto.gateway.web.v1.GenerateInviteCodesResponse.prototype.clearStatus = function() {
1287
+ return this.setStatus(undefined);
1288
+ };
1289
+
1290
+
1291
+ /**
1292
+ * Returns whether this field is set.
1293
+ * @return {boolean}
1294
+ */
1295
+ proto.gateway.web.v1.GenerateInviteCodesResponse.prototype.hasStatus = function() {
1296
+ return jspb.Message.getField(this, 1) != null;
1297
+ };
1298
+
1299
+
1300
+ /**
1301
+ * repeated InviteCode codes = 2;
1302
+ * @return {!Array<!proto.gateway.web.v1.InviteCode>}
1303
+ */
1304
+ proto.gateway.web.v1.GenerateInviteCodesResponse.prototype.getCodesList = function() {
1305
+ return /** @type{!Array<!proto.gateway.web.v1.InviteCode>} */ (
1306
+ jspb.Message.getRepeatedWrapperField(this, proto.gateway.web.v1.InviteCode, 2));
1307
+ };
1308
+
1309
+
1310
+ /**
1311
+ * @param {!Array<!proto.gateway.web.v1.InviteCode>} value
1312
+ * @return {!proto.gateway.web.v1.GenerateInviteCodesResponse} returns this
1313
+ */
1314
+ proto.gateway.web.v1.GenerateInviteCodesResponse.prototype.setCodesList = function(value) {
1315
+ return jspb.Message.setRepeatedWrapperField(this, 2, value);
1316
+ };
1317
+
1318
+
1319
+ /**
1320
+ * @param {!proto.gateway.web.v1.InviteCode=} opt_value
1321
+ * @param {number=} opt_index
1322
+ * @return {!proto.gateway.web.v1.InviteCode}
1323
+ */
1324
+ proto.gateway.web.v1.GenerateInviteCodesResponse.prototype.addCodes = function(opt_value, opt_index) {
1325
+ return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.gateway.web.v1.InviteCode, opt_index);
1326
+ };
1327
+
1328
+
1329
+ /**
1330
+ * Clears the list making it empty but non-null.
1331
+ * @return {!proto.gateway.web.v1.GenerateInviteCodesResponse} returns this
1332
+ */
1333
+ proto.gateway.web.v1.GenerateInviteCodesResponse.prototype.clearCodesList = function() {
1334
+ return this.setCodesList([]);
1335
+ };
1336
+
1337
+
1338
+
1339
+
1340
+
1341
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1342
+ /**
1343
+ * Creates an object representation of this proto.
1344
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1345
+ * Optional fields that are not set will be set to undefined.
1346
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1347
+ * For the list of reserved names please see:
1348
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1349
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1350
+ * JSPB instance for transitional soy proto support:
1351
+ * http://goto/soy-param-migration
1352
+ * @return {!Object}
1353
+ */
1354
+ proto.gateway.web.v1.ListInviteCodesRequest.prototype.toObject = function(opt_includeInstance) {
1355
+ return proto.gateway.web.v1.ListInviteCodesRequest.toObject(opt_includeInstance, this);
1356
+ };
1357
+
1358
+
1359
+ /**
1360
+ * Static version of the {@see toObject} method.
1361
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1362
+ * the JSPB instance for transitional soy proto support:
1363
+ * http://goto/soy-param-migration
1364
+ * @param {!proto.gateway.web.v1.ListInviteCodesRequest} msg The msg instance to transform.
1365
+ * @return {!Object}
1366
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1367
+ */
1368
+ proto.gateway.web.v1.ListInviteCodesRequest.toObject = function(includeInstance, msg) {
1369
+ var f, obj = {
1370
+
1371
+ };
1372
+
1373
+ if (includeInstance) {
1374
+ obj.$jspbMessageInstance = msg;
1375
+ }
1376
+ return obj;
1377
+ };
1378
+ }
1379
+
1380
+
1381
+ /**
1382
+ * Deserializes binary data (in protobuf wire format).
1383
+ * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.
1384
+ * @return {!proto.gateway.web.v1.ListInviteCodesRequest}
1385
+ */
1386
+ proto.gateway.web.v1.ListInviteCodesRequest.deserializeBinary = function(bytes) {
1387
+ var reader = new jspb.BinaryReader(bytes);
1388
+ var msg = new proto.gateway.web.v1.ListInviteCodesRequest;
1389
+ return proto.gateway.web.v1.ListInviteCodesRequest.deserializeBinaryFromReader(msg, reader);
1390
+ };
1391
+
1392
+
1393
+ /**
1394
+ * Deserializes binary data (in protobuf wire format) from the
1395
+ * given reader into the given message object.
1396
+ * @param {!proto.gateway.web.v1.ListInviteCodesRequest} msg The message object to deserialize into.
1397
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1398
+ * @return {!proto.gateway.web.v1.ListInviteCodesRequest}
1399
+ */
1400
+ proto.gateway.web.v1.ListInviteCodesRequest.deserializeBinaryFromReader = function(msg, reader) {
1401
+ while (reader.nextField()) {
1402
+ if (reader.isEndGroup()) {
1403
+ break;
1404
+ }
1405
+ var field = reader.getFieldNumber();
1406
+ switch (field) {
1407
+ default:
1408
+ reader.skipField();
1409
+ break;
1410
+ }
1411
+ }
1412
+ return msg;
1413
+ };
1414
+
1415
+
1416
+ /**
1417
+ * Serializes the message to binary data (in protobuf wire format).
1418
+ * @return {!Uint8Array}
1419
+ */
1420
+ proto.gateway.web.v1.ListInviteCodesRequest.prototype.serializeBinary = function() {
1421
+ var writer = new jspb.BinaryWriter();
1422
+ proto.gateway.web.v1.ListInviteCodesRequest.serializeBinaryToWriter(this, writer);
1423
+ return writer.getResultBuffer();
1424
+ };
1425
+
1426
+
1427
+ /**
1428
+ * Serializes the given message to binary data (in protobuf wire
1429
+ * format), writing to the given BinaryWriter.
1430
+ * @param {!proto.gateway.web.v1.ListInviteCodesRequest} message
1431
+ * @param {!jspb.BinaryWriter} writer
1432
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1433
+ */
1434
+ proto.gateway.web.v1.ListInviteCodesRequest.serializeBinaryToWriter = function(message, writer) {
1435
+ var f = undefined;
1436
+ };
1437
+
1438
+
1439
+
1440
+ /**
1441
+ * List of repeated fields within this message type.
1442
+ * @private {!Array<number>}
1443
+ * @const
1444
+ */
1445
+ proto.gateway.web.v1.ListInviteCodesResponse.repeatedFields_ = [2];
1446
+
1447
+
1448
+
1449
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1450
+ /**
1451
+ * Creates an object representation of this proto.
1452
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1453
+ * Optional fields that are not set will be set to undefined.
1454
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1455
+ * For the list of reserved names please see:
1456
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1457
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1458
+ * JSPB instance for transitional soy proto support:
1459
+ * http://goto/soy-param-migration
1460
+ * @return {!Object}
1461
+ */
1462
+ proto.gateway.web.v1.ListInviteCodesResponse.prototype.toObject = function(opt_includeInstance) {
1463
+ return proto.gateway.web.v1.ListInviteCodesResponse.toObject(opt_includeInstance, this);
1464
+ };
1465
+
1466
+
1467
+ /**
1468
+ * Static version of the {@see toObject} method.
1469
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1470
+ * the JSPB instance for transitional soy proto support:
1471
+ * http://goto/soy-param-migration
1472
+ * @param {!proto.gateway.web.v1.ListInviteCodesResponse} msg The msg instance to transform.
1473
+ * @return {!Object}
1474
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1475
+ */
1476
+ proto.gateway.web.v1.ListInviteCodesResponse.toObject = function(includeInstance, msg) {
1477
+ var f, obj = {
1478
+ status: (f = msg.getStatus()) && proto_gateway_common_v1_status_pb.ResponseStatus.toObject(includeInstance, f),
1479
+ codesList: jspb.Message.toObjectList(msg.getCodesList(),
1480
+ proto.gateway.web.v1.InviteCode.toObject, includeInstance)
1481
+ };
1482
+
1483
+ if (includeInstance) {
1484
+ obj.$jspbMessageInstance = msg;
1485
+ }
1486
+ return obj;
1487
+ };
1488
+ }
1489
+
1490
+
1491
+ /**
1492
+ * Deserializes binary data (in protobuf wire format).
1493
+ * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.
1494
+ * @return {!proto.gateway.web.v1.ListInviteCodesResponse}
1495
+ */
1496
+ proto.gateway.web.v1.ListInviteCodesResponse.deserializeBinary = function(bytes) {
1497
+ var reader = new jspb.BinaryReader(bytes);
1498
+ var msg = new proto.gateway.web.v1.ListInviteCodesResponse;
1499
+ return proto.gateway.web.v1.ListInviteCodesResponse.deserializeBinaryFromReader(msg, reader);
1500
+ };
1501
+
1502
+
1503
+ /**
1504
+ * Deserializes binary data (in protobuf wire format) from the
1505
+ * given reader into the given message object.
1506
+ * @param {!proto.gateway.web.v1.ListInviteCodesResponse} msg The message object to deserialize into.
1507
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1508
+ * @return {!proto.gateway.web.v1.ListInviteCodesResponse}
1509
+ */
1510
+ proto.gateway.web.v1.ListInviteCodesResponse.deserializeBinaryFromReader = function(msg, reader) {
1511
+ while (reader.nextField()) {
1512
+ if (reader.isEndGroup()) {
1513
+ break;
1514
+ }
1515
+ var field = reader.getFieldNumber();
1516
+ switch (field) {
1517
+ case 1:
1518
+ var value = new proto_gateway_common_v1_status_pb.ResponseStatus;
1519
+ reader.readMessage(value,proto_gateway_common_v1_status_pb.ResponseStatus.deserializeBinaryFromReader);
1520
+ msg.setStatus(value);
1521
+ break;
1522
+ case 2:
1523
+ var value = new proto.gateway.web.v1.InviteCode;
1524
+ reader.readMessage(value,proto.gateway.web.v1.InviteCode.deserializeBinaryFromReader);
1525
+ msg.addCodes(value);
1526
+ break;
1527
+ default:
1528
+ reader.skipField();
1529
+ break;
1530
+ }
1531
+ }
1532
+ return msg;
1533
+ };
1534
+
1535
+
1536
+ /**
1537
+ * Serializes the message to binary data (in protobuf wire format).
1538
+ * @return {!Uint8Array}
1539
+ */
1540
+ proto.gateway.web.v1.ListInviteCodesResponse.prototype.serializeBinary = function() {
1541
+ var writer = new jspb.BinaryWriter();
1542
+ proto.gateway.web.v1.ListInviteCodesResponse.serializeBinaryToWriter(this, writer);
1543
+ return writer.getResultBuffer();
1544
+ };
1545
+
1546
+
1547
+ /**
1548
+ * Serializes the given message to binary data (in protobuf wire
1549
+ * format), writing to the given BinaryWriter.
1550
+ * @param {!proto.gateway.web.v1.ListInviteCodesResponse} message
1551
+ * @param {!jspb.BinaryWriter} writer
1552
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1553
+ */
1554
+ proto.gateway.web.v1.ListInviteCodesResponse.serializeBinaryToWriter = function(message, writer) {
1555
+ var f = undefined;
1556
+ f = message.getStatus();
1557
+ if (f != null) {
1558
+ writer.writeMessage(
1559
+ 1,
1560
+ f,
1561
+ proto_gateway_common_v1_status_pb.ResponseStatus.serializeBinaryToWriter
1562
+ );
1563
+ }
1564
+ f = message.getCodesList();
1565
+ if (f.length > 0) {
1566
+ writer.writeRepeatedMessage(
1567
+ 2,
1568
+ f,
1569
+ proto.gateway.web.v1.InviteCode.serializeBinaryToWriter
1570
+ );
1571
+ }
1572
+ };
1573
+
1574
+
1575
+ /**
1576
+ * optional gateway.common.v1.ResponseStatus status = 1;
1577
+ * @return {?proto.gateway.common.v1.ResponseStatus}
1578
+ */
1579
+ proto.gateway.web.v1.ListInviteCodesResponse.prototype.getStatus = function() {
1580
+ return /** @type{?proto.gateway.common.v1.ResponseStatus} */ (
1581
+ jspb.Message.getWrapperField(this, proto_gateway_common_v1_status_pb.ResponseStatus, 1));
1582
+ };
1583
+
1584
+
1585
+ /**
1586
+ * @param {?proto.gateway.common.v1.ResponseStatus|undefined} value
1587
+ * @return {!proto.gateway.web.v1.ListInviteCodesResponse} returns this
1588
+ */
1589
+ proto.gateway.web.v1.ListInviteCodesResponse.prototype.setStatus = function(value) {
1590
+ return jspb.Message.setWrapperField(this, 1, value);
1591
+ };
1592
+
1593
+
1594
+ /**
1595
+ * Clears the message field making it undefined.
1596
+ * @return {!proto.gateway.web.v1.ListInviteCodesResponse} returns this
1597
+ */
1598
+ proto.gateway.web.v1.ListInviteCodesResponse.prototype.clearStatus = function() {
1599
+ return this.setStatus(undefined);
1600
+ };
1601
+
1602
+
1603
+ /**
1604
+ * Returns whether this field is set.
1605
+ * @return {boolean}
1606
+ */
1607
+ proto.gateway.web.v1.ListInviteCodesResponse.prototype.hasStatus = function() {
1608
+ return jspb.Message.getField(this, 1) != null;
1609
+ };
1610
+
1611
+
1612
+ /**
1613
+ * repeated InviteCode codes = 2;
1614
+ * @return {!Array<!proto.gateway.web.v1.InviteCode>}
1615
+ */
1616
+ proto.gateway.web.v1.ListInviteCodesResponse.prototype.getCodesList = function() {
1617
+ return /** @type{!Array<!proto.gateway.web.v1.InviteCode>} */ (
1618
+ jspb.Message.getRepeatedWrapperField(this, proto.gateway.web.v1.InviteCode, 2));
1619
+ };
1620
+
1621
+
1622
+ /**
1623
+ * @param {!Array<!proto.gateway.web.v1.InviteCode>} value
1624
+ * @return {!proto.gateway.web.v1.ListInviteCodesResponse} returns this
1625
+ */
1626
+ proto.gateway.web.v1.ListInviteCodesResponse.prototype.setCodesList = function(value) {
1627
+ return jspb.Message.setRepeatedWrapperField(this, 2, value);
1628
+ };
1629
+
1630
+
1631
+ /**
1632
+ * @param {!proto.gateway.web.v1.InviteCode=} opt_value
1633
+ * @param {number=} opt_index
1634
+ * @return {!proto.gateway.web.v1.InviteCode}
1635
+ */
1636
+ proto.gateway.web.v1.ListInviteCodesResponse.prototype.addCodes = function(opt_value, opt_index) {
1637
+ return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.gateway.web.v1.InviteCode, opt_index);
1638
+ };
1639
+
1640
+
1641
+ /**
1642
+ * Clears the list making it empty but non-null.
1643
+ * @return {!proto.gateway.web.v1.ListInviteCodesResponse} returns this
1644
+ */
1645
+ proto.gateway.web.v1.ListInviteCodesResponse.prototype.clearCodesList = function() {
1646
+ return this.setCodesList([]);
1647
+ };
1648
+
1649
+
1650
+ goog.object.extend(exports, proto.gateway.web.v1);