@miradorlabs/web-grpc 2.72.0 → 2.75.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,2570 @@
1
+ // source: proto/gateway/web/v1/beta_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
+ goog.exportSymbol('proto.gateway.web.v1.GenerateInviteCodesRequest', null, global);
23
+ goog.exportSymbol('proto.gateway.web.v1.GenerateInviteCodesResponse', null, global);
24
+ goog.exportSymbol('proto.gateway.web.v1.GetUserBetaStatusRequest', null, global);
25
+ goog.exportSymbol('proto.gateway.web.v1.GetUserBetaStatusResponse', null, global);
26
+ goog.exportSymbol('proto.gateway.web.v1.InviteCode', null, global);
27
+ goog.exportSymbol('proto.gateway.web.v1.InviteCodeState', null, global);
28
+ goog.exportSymbol('proto.gateway.web.v1.ListInviteCodesRequest', null, global);
29
+ goog.exportSymbol('proto.gateway.web.v1.ListInviteCodesResponse', null, global);
30
+ goog.exportSymbol('proto.gateway.web.v1.RedeemInviteCodeRequest', null, global);
31
+ goog.exportSymbol('proto.gateway.web.v1.RedeemInviteCodeResponse', null, global);
32
+ goog.exportSymbol('proto.gateway.web.v1.ReserveInviteCodeRequest', null, global);
33
+ goog.exportSymbol('proto.gateway.web.v1.ReserveInviteCodeResponse', null, global);
34
+ /**
35
+ * Generated by JsPbCodeGenerator.
36
+ * @param {Array=} opt_data Optional initial data array, typically from a
37
+ * server response, or constructed directly in Javascript. The array is used
38
+ * in place and becomes part of the constructed object. It is not cloned.
39
+ * If no data is provided, the constructed object will be empty, but still
40
+ * valid.
41
+ * @extends {jspb.Message}
42
+ * @constructor
43
+ */
44
+ proto.gateway.web.v1.GetUserBetaStatusRequest = function(opt_data) {
45
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
46
+ };
47
+ goog.inherits(proto.gateway.web.v1.GetUserBetaStatusRequest, jspb.Message);
48
+ if (goog.DEBUG && !COMPILED) {
49
+ /**
50
+ * @public
51
+ * @override
52
+ */
53
+ proto.gateway.web.v1.GetUserBetaStatusRequest.displayName = 'proto.gateway.web.v1.GetUserBetaStatusRequest';
54
+ }
55
+ /**
56
+ * Generated by JsPbCodeGenerator.
57
+ * @param {Array=} opt_data Optional initial data array, typically from a
58
+ * server response, or constructed directly in Javascript. The array is used
59
+ * in place and becomes part of the constructed object. It is not cloned.
60
+ * If no data is provided, the constructed object will be empty, but still
61
+ * valid.
62
+ * @extends {jspb.Message}
63
+ * @constructor
64
+ */
65
+ proto.gateway.web.v1.GetUserBetaStatusResponse = function(opt_data) {
66
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
67
+ };
68
+ goog.inherits(proto.gateway.web.v1.GetUserBetaStatusResponse, jspb.Message);
69
+ if (goog.DEBUG && !COMPILED) {
70
+ /**
71
+ * @public
72
+ * @override
73
+ */
74
+ proto.gateway.web.v1.GetUserBetaStatusResponse.displayName = 'proto.gateway.web.v1.GetUserBetaStatusResponse';
75
+ }
76
+ /**
77
+ * Generated by JsPbCodeGenerator.
78
+ * @param {Array=} opt_data Optional initial data array, typically from a
79
+ * server response, or constructed directly in Javascript. The array is used
80
+ * in place and becomes part of the constructed object. It is not cloned.
81
+ * If no data is provided, the constructed object will be empty, but still
82
+ * valid.
83
+ * @extends {jspb.Message}
84
+ * @constructor
85
+ */
86
+ proto.gateway.web.v1.InviteCode = function(opt_data) {
87
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
88
+ };
89
+ goog.inherits(proto.gateway.web.v1.InviteCode, jspb.Message);
90
+ if (goog.DEBUG && !COMPILED) {
91
+ /**
92
+ * @public
93
+ * @override
94
+ */
95
+ proto.gateway.web.v1.InviteCode.displayName = 'proto.gateway.web.v1.InviteCode';
96
+ }
97
+ /**
98
+ * Generated by JsPbCodeGenerator.
99
+ * @param {Array=} opt_data Optional initial data array, typically from a
100
+ * server response, or constructed directly in Javascript. The array is used
101
+ * in place and becomes part of the constructed object. It is not cloned.
102
+ * If no data is provided, the constructed object will be empty, but still
103
+ * valid.
104
+ * @extends {jspb.Message}
105
+ * @constructor
106
+ */
107
+ proto.gateway.web.v1.ReserveInviteCodeRequest = function(opt_data) {
108
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
109
+ };
110
+ goog.inherits(proto.gateway.web.v1.ReserveInviteCodeRequest, jspb.Message);
111
+ if (goog.DEBUG && !COMPILED) {
112
+ /**
113
+ * @public
114
+ * @override
115
+ */
116
+ proto.gateway.web.v1.ReserveInviteCodeRequest.displayName = 'proto.gateway.web.v1.ReserveInviteCodeRequest';
117
+ }
118
+ /**
119
+ * Generated by JsPbCodeGenerator.
120
+ * @param {Array=} opt_data Optional initial data array, typically from a
121
+ * server response, or constructed directly in Javascript. The array is used
122
+ * in place and becomes part of the constructed object. It is not cloned.
123
+ * If no data is provided, the constructed object will be empty, but still
124
+ * valid.
125
+ * @extends {jspb.Message}
126
+ * @constructor
127
+ */
128
+ proto.gateway.web.v1.ReserveInviteCodeResponse = function(opt_data) {
129
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
130
+ };
131
+ goog.inherits(proto.gateway.web.v1.ReserveInviteCodeResponse, jspb.Message);
132
+ if (goog.DEBUG && !COMPILED) {
133
+ /**
134
+ * @public
135
+ * @override
136
+ */
137
+ proto.gateway.web.v1.ReserveInviteCodeResponse.displayName = 'proto.gateway.web.v1.ReserveInviteCodeResponse';
138
+ }
139
+ /**
140
+ * Generated by JsPbCodeGenerator.
141
+ * @param {Array=} opt_data Optional initial data array, typically from a
142
+ * server response, or constructed directly in Javascript. The array is used
143
+ * in place and becomes part of the constructed object. It is not cloned.
144
+ * If no data is provided, the constructed object will be empty, but still
145
+ * valid.
146
+ * @extends {jspb.Message}
147
+ * @constructor
148
+ */
149
+ proto.gateway.web.v1.RedeemInviteCodeRequest = function(opt_data) {
150
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
151
+ };
152
+ goog.inherits(proto.gateway.web.v1.RedeemInviteCodeRequest, jspb.Message);
153
+ if (goog.DEBUG && !COMPILED) {
154
+ /**
155
+ * @public
156
+ * @override
157
+ */
158
+ proto.gateway.web.v1.RedeemInviteCodeRequest.displayName = 'proto.gateway.web.v1.RedeemInviteCodeRequest';
159
+ }
160
+ /**
161
+ * Generated by JsPbCodeGenerator.
162
+ * @param {Array=} opt_data Optional initial data array, typically from a
163
+ * server response, or constructed directly in Javascript. The array is used
164
+ * in place and becomes part of the constructed object. It is not cloned.
165
+ * If no data is provided, the constructed object will be empty, but still
166
+ * valid.
167
+ * @extends {jspb.Message}
168
+ * @constructor
169
+ */
170
+ proto.gateway.web.v1.RedeemInviteCodeResponse = function(opt_data) {
171
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
172
+ };
173
+ goog.inherits(proto.gateway.web.v1.RedeemInviteCodeResponse, jspb.Message);
174
+ if (goog.DEBUG && !COMPILED) {
175
+ /**
176
+ * @public
177
+ * @override
178
+ */
179
+ proto.gateway.web.v1.RedeemInviteCodeResponse.displayName = 'proto.gateway.web.v1.RedeemInviteCodeResponse';
180
+ }
181
+ /**
182
+ * Generated by JsPbCodeGenerator.
183
+ * @param {Array=} opt_data Optional initial data array, typically from a
184
+ * server response, or constructed directly in Javascript. The array is used
185
+ * in place and becomes part of the constructed object. It is not cloned.
186
+ * If no data is provided, the constructed object will be empty, but still
187
+ * valid.
188
+ * @extends {jspb.Message}
189
+ * @constructor
190
+ */
191
+ proto.gateway.web.v1.GenerateInviteCodesRequest = function(opt_data) {
192
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
193
+ };
194
+ goog.inherits(proto.gateway.web.v1.GenerateInviteCodesRequest, jspb.Message);
195
+ if (goog.DEBUG && !COMPILED) {
196
+ /**
197
+ * @public
198
+ * @override
199
+ */
200
+ proto.gateway.web.v1.GenerateInviteCodesRequest.displayName = 'proto.gateway.web.v1.GenerateInviteCodesRequest';
201
+ }
202
+ /**
203
+ * Generated by JsPbCodeGenerator.
204
+ * @param {Array=} opt_data Optional initial data array, typically from a
205
+ * server response, or constructed directly in Javascript. The array is used
206
+ * in place and becomes part of the constructed object. It is not cloned.
207
+ * If no data is provided, the constructed object will be empty, but still
208
+ * valid.
209
+ * @extends {jspb.Message}
210
+ * @constructor
211
+ */
212
+ proto.gateway.web.v1.GenerateInviteCodesResponse = function(opt_data) {
213
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.gateway.web.v1.GenerateInviteCodesResponse.repeatedFields_, null);
214
+ };
215
+ goog.inherits(proto.gateway.web.v1.GenerateInviteCodesResponse, jspb.Message);
216
+ if (goog.DEBUG && !COMPILED) {
217
+ /**
218
+ * @public
219
+ * @override
220
+ */
221
+ proto.gateway.web.v1.GenerateInviteCodesResponse.displayName = 'proto.gateway.web.v1.GenerateInviteCodesResponse';
222
+ }
223
+ /**
224
+ * Generated by JsPbCodeGenerator.
225
+ * @param {Array=} opt_data Optional initial data array, typically from a
226
+ * server response, or constructed directly in Javascript. The array is used
227
+ * in place and becomes part of the constructed object. It is not cloned.
228
+ * If no data is provided, the constructed object will be empty, but still
229
+ * valid.
230
+ * @extends {jspb.Message}
231
+ * @constructor
232
+ */
233
+ proto.gateway.web.v1.ListInviteCodesRequest = function(opt_data) {
234
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
235
+ };
236
+ goog.inherits(proto.gateway.web.v1.ListInviteCodesRequest, jspb.Message);
237
+ if (goog.DEBUG && !COMPILED) {
238
+ /**
239
+ * @public
240
+ * @override
241
+ */
242
+ proto.gateway.web.v1.ListInviteCodesRequest.displayName = 'proto.gateway.web.v1.ListInviteCodesRequest';
243
+ }
244
+ /**
245
+ * Generated by JsPbCodeGenerator.
246
+ * @param {Array=} opt_data Optional initial data array, typically from a
247
+ * server response, or constructed directly in Javascript. The array is used
248
+ * in place and becomes part of the constructed object. It is not cloned.
249
+ * If no data is provided, the constructed object will be empty, but still
250
+ * valid.
251
+ * @extends {jspb.Message}
252
+ * @constructor
253
+ */
254
+ proto.gateway.web.v1.ListInviteCodesResponse = function(opt_data) {
255
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.gateway.web.v1.ListInviteCodesResponse.repeatedFields_, null);
256
+ };
257
+ goog.inherits(proto.gateway.web.v1.ListInviteCodesResponse, jspb.Message);
258
+ if (goog.DEBUG && !COMPILED) {
259
+ /**
260
+ * @public
261
+ * @override
262
+ */
263
+ proto.gateway.web.v1.ListInviteCodesResponse.displayName = 'proto.gateway.web.v1.ListInviteCodesResponse';
264
+ }
265
+
266
+
267
+
268
+ if (jspb.Message.GENERATE_TO_OBJECT) {
269
+ /**
270
+ * Creates an object representation of this proto.
271
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
272
+ * Optional fields that are not set will be set to undefined.
273
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
274
+ * For the list of reserved names please see:
275
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
276
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
277
+ * JSPB instance for transitional soy proto support:
278
+ * http://goto/soy-param-migration
279
+ * @return {!Object}
280
+ */
281
+ proto.gateway.web.v1.GetUserBetaStatusRequest.prototype.toObject = function(opt_includeInstance) {
282
+ return proto.gateway.web.v1.GetUserBetaStatusRequest.toObject(opt_includeInstance, this);
283
+ };
284
+
285
+
286
+ /**
287
+ * Static version of the {@see toObject} method.
288
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
289
+ * the JSPB instance for transitional soy proto support:
290
+ * http://goto/soy-param-migration
291
+ * @param {!proto.gateway.web.v1.GetUserBetaStatusRequest} msg The msg instance to transform.
292
+ * @return {!Object}
293
+ * @suppress {unusedLocalVariables} f is only used for nested messages
294
+ */
295
+ proto.gateway.web.v1.GetUserBetaStatusRequest.toObject = function(includeInstance, msg) {
296
+ var f, obj = {
297
+
298
+ };
299
+
300
+ if (includeInstance) {
301
+ obj.$jspbMessageInstance = msg;
302
+ }
303
+ return obj;
304
+ };
305
+ }
306
+
307
+
308
+ /**
309
+ * Deserializes binary data (in protobuf wire format).
310
+ * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.
311
+ * @return {!proto.gateway.web.v1.GetUserBetaStatusRequest}
312
+ */
313
+ proto.gateway.web.v1.GetUserBetaStatusRequest.deserializeBinary = function(bytes) {
314
+ var reader = new jspb.BinaryReader(bytes);
315
+ var msg = new proto.gateway.web.v1.GetUserBetaStatusRequest;
316
+ return proto.gateway.web.v1.GetUserBetaStatusRequest.deserializeBinaryFromReader(msg, reader);
317
+ };
318
+
319
+
320
+ /**
321
+ * Deserializes binary data (in protobuf wire format) from the
322
+ * given reader into the given message object.
323
+ * @param {!proto.gateway.web.v1.GetUserBetaStatusRequest} msg The message object to deserialize into.
324
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
325
+ * @return {!proto.gateway.web.v1.GetUserBetaStatusRequest}
326
+ */
327
+ proto.gateway.web.v1.GetUserBetaStatusRequest.deserializeBinaryFromReader = function(msg, reader) {
328
+ while (reader.nextField()) {
329
+ if (reader.isEndGroup()) {
330
+ break;
331
+ }
332
+ var field = reader.getFieldNumber();
333
+ switch (field) {
334
+ default:
335
+ reader.skipField();
336
+ break;
337
+ }
338
+ }
339
+ return msg;
340
+ };
341
+
342
+
343
+ /**
344
+ * Serializes the message to binary data (in protobuf wire format).
345
+ * @return {!Uint8Array}
346
+ */
347
+ proto.gateway.web.v1.GetUserBetaStatusRequest.prototype.serializeBinary = function() {
348
+ var writer = new jspb.BinaryWriter();
349
+ proto.gateway.web.v1.GetUserBetaStatusRequest.serializeBinaryToWriter(this, writer);
350
+ return writer.getResultBuffer();
351
+ };
352
+
353
+
354
+ /**
355
+ * Serializes the given message to binary data (in protobuf wire
356
+ * format), writing to the given BinaryWriter.
357
+ * @param {!proto.gateway.web.v1.GetUserBetaStatusRequest} message
358
+ * @param {!jspb.BinaryWriter} writer
359
+ * @suppress {unusedLocalVariables} f is only used for nested messages
360
+ */
361
+ proto.gateway.web.v1.GetUserBetaStatusRequest.serializeBinaryToWriter = function(message, writer) {
362
+ var f = undefined;
363
+ };
364
+
365
+
366
+
367
+
368
+
369
+ if (jspb.Message.GENERATE_TO_OBJECT) {
370
+ /**
371
+ * Creates an object representation of this proto.
372
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
373
+ * Optional fields that are not set will be set to undefined.
374
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
375
+ * For the list of reserved names please see:
376
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
377
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
378
+ * JSPB instance for transitional soy proto support:
379
+ * http://goto/soy-param-migration
380
+ * @return {!Object}
381
+ */
382
+ proto.gateway.web.v1.GetUserBetaStatusResponse.prototype.toObject = function(opt_includeInstance) {
383
+ return proto.gateway.web.v1.GetUserBetaStatusResponse.toObject(opt_includeInstance, this);
384
+ };
385
+
386
+
387
+ /**
388
+ * Static version of the {@see toObject} method.
389
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
390
+ * the JSPB instance for transitional soy proto support:
391
+ * http://goto/soy-param-migration
392
+ * @param {!proto.gateway.web.v1.GetUserBetaStatusResponse} msg The msg instance to transform.
393
+ * @return {!Object}
394
+ * @suppress {unusedLocalVariables} f is only used for nested messages
395
+ */
396
+ proto.gateway.web.v1.GetUserBetaStatusResponse.toObject = function(includeInstance, msg) {
397
+ var f, obj = {
398
+ status: (f = msg.getStatus()) && proto_gateway_common_v1_status_pb.ResponseStatus.toObject(includeInstance, f),
399
+ allowed: jspb.Message.getBooleanFieldWithDefault(msg, 2, false)
400
+ };
401
+
402
+ if (includeInstance) {
403
+ obj.$jspbMessageInstance = msg;
404
+ }
405
+ return obj;
406
+ };
407
+ }
408
+
409
+
410
+ /**
411
+ * Deserializes binary data (in protobuf wire format).
412
+ * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.
413
+ * @return {!proto.gateway.web.v1.GetUserBetaStatusResponse}
414
+ */
415
+ proto.gateway.web.v1.GetUserBetaStatusResponse.deserializeBinary = function(bytes) {
416
+ var reader = new jspb.BinaryReader(bytes);
417
+ var msg = new proto.gateway.web.v1.GetUserBetaStatusResponse;
418
+ return proto.gateway.web.v1.GetUserBetaStatusResponse.deserializeBinaryFromReader(msg, reader);
419
+ };
420
+
421
+
422
+ /**
423
+ * Deserializes binary data (in protobuf wire format) from the
424
+ * given reader into the given message object.
425
+ * @param {!proto.gateway.web.v1.GetUserBetaStatusResponse} msg The message object to deserialize into.
426
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
427
+ * @return {!proto.gateway.web.v1.GetUserBetaStatusResponse}
428
+ */
429
+ proto.gateway.web.v1.GetUserBetaStatusResponse.deserializeBinaryFromReader = function(msg, reader) {
430
+ while (reader.nextField()) {
431
+ if (reader.isEndGroup()) {
432
+ break;
433
+ }
434
+ var field = reader.getFieldNumber();
435
+ switch (field) {
436
+ case 1:
437
+ var value = new proto_gateway_common_v1_status_pb.ResponseStatus;
438
+ reader.readMessage(value,proto_gateway_common_v1_status_pb.ResponseStatus.deserializeBinaryFromReader);
439
+ msg.setStatus(value);
440
+ break;
441
+ case 2:
442
+ var value = /** @type {boolean} */ (reader.readBool());
443
+ msg.setAllowed(value);
444
+ break;
445
+ default:
446
+ reader.skipField();
447
+ break;
448
+ }
449
+ }
450
+ return msg;
451
+ };
452
+
453
+
454
+ /**
455
+ * Serializes the message to binary data (in protobuf wire format).
456
+ * @return {!Uint8Array}
457
+ */
458
+ proto.gateway.web.v1.GetUserBetaStatusResponse.prototype.serializeBinary = function() {
459
+ var writer = new jspb.BinaryWriter();
460
+ proto.gateway.web.v1.GetUserBetaStatusResponse.serializeBinaryToWriter(this, writer);
461
+ return writer.getResultBuffer();
462
+ };
463
+
464
+
465
+ /**
466
+ * Serializes the given message to binary data (in protobuf wire
467
+ * format), writing to the given BinaryWriter.
468
+ * @param {!proto.gateway.web.v1.GetUserBetaStatusResponse} message
469
+ * @param {!jspb.BinaryWriter} writer
470
+ * @suppress {unusedLocalVariables} f is only used for nested messages
471
+ */
472
+ proto.gateway.web.v1.GetUserBetaStatusResponse.serializeBinaryToWriter = function(message, writer) {
473
+ var f = undefined;
474
+ f = message.getStatus();
475
+ if (f != null) {
476
+ writer.writeMessage(
477
+ 1,
478
+ f,
479
+ proto_gateway_common_v1_status_pb.ResponseStatus.serializeBinaryToWriter
480
+ );
481
+ }
482
+ f = message.getAllowed();
483
+ if (f) {
484
+ writer.writeBool(
485
+ 2,
486
+ f
487
+ );
488
+ }
489
+ };
490
+
491
+
492
+ /**
493
+ * optional gateway.common.v1.ResponseStatus status = 1;
494
+ * @return {?proto.gateway.common.v1.ResponseStatus}
495
+ */
496
+ proto.gateway.web.v1.GetUserBetaStatusResponse.prototype.getStatus = function() {
497
+ return /** @type{?proto.gateway.common.v1.ResponseStatus} */ (
498
+ jspb.Message.getWrapperField(this, proto_gateway_common_v1_status_pb.ResponseStatus, 1));
499
+ };
500
+
501
+
502
+ /**
503
+ * @param {?proto.gateway.common.v1.ResponseStatus|undefined} value
504
+ * @return {!proto.gateway.web.v1.GetUserBetaStatusResponse} returns this
505
+ */
506
+ proto.gateway.web.v1.GetUserBetaStatusResponse.prototype.setStatus = function(value) {
507
+ return jspb.Message.setWrapperField(this, 1, value);
508
+ };
509
+
510
+
511
+ /**
512
+ * Clears the message field making it undefined.
513
+ * @return {!proto.gateway.web.v1.GetUserBetaStatusResponse} returns this
514
+ */
515
+ proto.gateway.web.v1.GetUserBetaStatusResponse.prototype.clearStatus = function() {
516
+ return this.setStatus(undefined);
517
+ };
518
+
519
+
520
+ /**
521
+ * Returns whether this field is set.
522
+ * @return {boolean}
523
+ */
524
+ proto.gateway.web.v1.GetUserBetaStatusResponse.prototype.hasStatus = function() {
525
+ return jspb.Message.getField(this, 1) != null;
526
+ };
527
+
528
+
529
+ /**
530
+ * optional bool allowed = 2;
531
+ * @return {boolean}
532
+ */
533
+ proto.gateway.web.v1.GetUserBetaStatusResponse.prototype.getAllowed = function() {
534
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));
535
+ };
536
+
537
+
538
+ /**
539
+ * @param {boolean} value
540
+ * @return {!proto.gateway.web.v1.GetUserBetaStatusResponse} returns this
541
+ */
542
+ proto.gateway.web.v1.GetUserBetaStatusResponse.prototype.setAllowed = function(value) {
543
+ return jspb.Message.setProto3BooleanField(this, 2, value);
544
+ };
545
+
546
+
547
+
548
+
549
+
550
+ if (jspb.Message.GENERATE_TO_OBJECT) {
551
+ /**
552
+ * Creates an object representation of this proto.
553
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
554
+ * Optional fields that are not set will be set to undefined.
555
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
556
+ * For the list of reserved names please see:
557
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
558
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
559
+ * JSPB instance for transitional soy proto support:
560
+ * http://goto/soy-param-migration
561
+ * @return {!Object}
562
+ */
563
+ proto.gateway.web.v1.InviteCode.prototype.toObject = function(opt_includeInstance) {
564
+ return proto.gateway.web.v1.InviteCode.toObject(opt_includeInstance, this);
565
+ };
566
+
567
+
568
+ /**
569
+ * Static version of the {@see toObject} method.
570
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
571
+ * the JSPB instance for transitional soy proto support:
572
+ * http://goto/soy-param-migration
573
+ * @param {!proto.gateway.web.v1.InviteCode} msg The msg instance to transform.
574
+ * @return {!Object}
575
+ * @suppress {unusedLocalVariables} f is only used for nested messages
576
+ */
577
+ proto.gateway.web.v1.InviteCode.toObject = function(includeInstance, msg) {
578
+ var f, obj = {
579
+ id: jspb.Message.getFieldWithDefault(msg, 1, ""),
580
+ code: jspb.Message.getFieldWithDefault(msg, 2, ""),
581
+ state: jspb.Message.getFieldWithDefault(msg, 3, 0),
582
+ label: jspb.Message.getFieldWithDefault(msg, 4, ""),
583
+ redeemedByUserId: jspb.Message.getFieldWithDefault(msg, 5, ""),
584
+ createdAt: (f = msg.getCreatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
585
+ expiresAt: (f = msg.getExpiresAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
586
+ reservedAt: (f = msg.getReservedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
587
+ redeemedAt: (f = msg.getRedeemedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
588
+ };
589
+
590
+ if (includeInstance) {
591
+ obj.$jspbMessageInstance = msg;
592
+ }
593
+ return obj;
594
+ };
595
+ }
596
+
597
+
598
+ /**
599
+ * Deserializes binary data (in protobuf wire format).
600
+ * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.
601
+ * @return {!proto.gateway.web.v1.InviteCode}
602
+ */
603
+ proto.gateway.web.v1.InviteCode.deserializeBinary = function(bytes) {
604
+ var reader = new jspb.BinaryReader(bytes);
605
+ var msg = new proto.gateway.web.v1.InviteCode;
606
+ return proto.gateway.web.v1.InviteCode.deserializeBinaryFromReader(msg, reader);
607
+ };
608
+
609
+
610
+ /**
611
+ * Deserializes binary data (in protobuf wire format) from the
612
+ * given reader into the given message object.
613
+ * @param {!proto.gateway.web.v1.InviteCode} msg The message object to deserialize into.
614
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
615
+ * @return {!proto.gateway.web.v1.InviteCode}
616
+ */
617
+ proto.gateway.web.v1.InviteCode.deserializeBinaryFromReader = function(msg, reader) {
618
+ while (reader.nextField()) {
619
+ if (reader.isEndGroup()) {
620
+ break;
621
+ }
622
+ var field = reader.getFieldNumber();
623
+ switch (field) {
624
+ case 1:
625
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
626
+ msg.setId(value);
627
+ break;
628
+ case 2:
629
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
630
+ msg.setCode(value);
631
+ break;
632
+ case 3:
633
+ var value = /** @type {!proto.gateway.web.v1.InviteCodeState} */ (reader.readEnum());
634
+ msg.setState(value);
635
+ break;
636
+ case 4:
637
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
638
+ msg.setLabel(value);
639
+ break;
640
+ case 5:
641
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
642
+ msg.setRedeemedByUserId(value);
643
+ break;
644
+ case 6:
645
+ var value = new google_protobuf_timestamp_pb.Timestamp;
646
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
647
+ msg.setCreatedAt(value);
648
+ break;
649
+ case 7:
650
+ var value = new google_protobuf_timestamp_pb.Timestamp;
651
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
652
+ msg.setExpiresAt(value);
653
+ break;
654
+ case 8:
655
+ var value = new google_protobuf_timestamp_pb.Timestamp;
656
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
657
+ msg.setReservedAt(value);
658
+ break;
659
+ case 9:
660
+ var value = new google_protobuf_timestamp_pb.Timestamp;
661
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
662
+ msg.setRedeemedAt(value);
663
+ break;
664
+ default:
665
+ reader.skipField();
666
+ break;
667
+ }
668
+ }
669
+ return msg;
670
+ };
671
+
672
+
673
+ /**
674
+ * Serializes the message to binary data (in protobuf wire format).
675
+ * @return {!Uint8Array}
676
+ */
677
+ proto.gateway.web.v1.InviteCode.prototype.serializeBinary = function() {
678
+ var writer = new jspb.BinaryWriter();
679
+ proto.gateway.web.v1.InviteCode.serializeBinaryToWriter(this, writer);
680
+ return writer.getResultBuffer();
681
+ };
682
+
683
+
684
+ /**
685
+ * Serializes the given message to binary data (in protobuf wire
686
+ * format), writing to the given BinaryWriter.
687
+ * @param {!proto.gateway.web.v1.InviteCode} message
688
+ * @param {!jspb.BinaryWriter} writer
689
+ * @suppress {unusedLocalVariables} f is only used for nested messages
690
+ */
691
+ proto.gateway.web.v1.InviteCode.serializeBinaryToWriter = function(message, writer) {
692
+ var f = undefined;
693
+ f = message.getId();
694
+ if (f.length > 0) {
695
+ writer.writeString(
696
+ 1,
697
+ f
698
+ );
699
+ }
700
+ f = message.getCode();
701
+ if (f.length > 0) {
702
+ writer.writeString(
703
+ 2,
704
+ f
705
+ );
706
+ }
707
+ f = message.getState();
708
+ if (f !== 0.0) {
709
+ writer.writeEnum(
710
+ 3,
711
+ f
712
+ );
713
+ }
714
+ f = message.getLabel();
715
+ if (f.length > 0) {
716
+ writer.writeString(
717
+ 4,
718
+ f
719
+ );
720
+ }
721
+ f = message.getRedeemedByUserId();
722
+ if (f.length > 0) {
723
+ writer.writeString(
724
+ 5,
725
+ f
726
+ );
727
+ }
728
+ f = message.getCreatedAt();
729
+ if (f != null) {
730
+ writer.writeMessage(
731
+ 6,
732
+ f,
733
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
734
+ );
735
+ }
736
+ f = message.getExpiresAt();
737
+ if (f != null) {
738
+ writer.writeMessage(
739
+ 7,
740
+ f,
741
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
742
+ );
743
+ }
744
+ f = message.getReservedAt();
745
+ if (f != null) {
746
+ writer.writeMessage(
747
+ 8,
748
+ f,
749
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
750
+ );
751
+ }
752
+ f = message.getRedeemedAt();
753
+ if (f != null) {
754
+ writer.writeMessage(
755
+ 9,
756
+ f,
757
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
758
+ );
759
+ }
760
+ };
761
+
762
+
763
+ /**
764
+ * optional string id = 1;
765
+ * @return {string}
766
+ */
767
+ proto.gateway.web.v1.InviteCode.prototype.getId = function() {
768
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
769
+ };
770
+
771
+
772
+ /**
773
+ * @param {string} value
774
+ * @return {!proto.gateway.web.v1.InviteCode} returns this
775
+ */
776
+ proto.gateway.web.v1.InviteCode.prototype.setId = function(value) {
777
+ return jspb.Message.setProto3StringField(this, 1, value);
778
+ };
779
+
780
+
781
+ /**
782
+ * optional string code = 2;
783
+ * @return {string}
784
+ */
785
+ proto.gateway.web.v1.InviteCode.prototype.getCode = function() {
786
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
787
+ };
788
+
789
+
790
+ /**
791
+ * @param {string} value
792
+ * @return {!proto.gateway.web.v1.InviteCode} returns this
793
+ */
794
+ proto.gateway.web.v1.InviteCode.prototype.setCode = function(value) {
795
+ return jspb.Message.setProto3StringField(this, 2, value);
796
+ };
797
+
798
+
799
+ /**
800
+ * optional InviteCodeState state = 3;
801
+ * @return {!proto.gateway.web.v1.InviteCodeState}
802
+ */
803
+ proto.gateway.web.v1.InviteCode.prototype.getState = function() {
804
+ return /** @type {!proto.gateway.web.v1.InviteCodeState} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
805
+ };
806
+
807
+
808
+ /**
809
+ * @param {!proto.gateway.web.v1.InviteCodeState} value
810
+ * @return {!proto.gateway.web.v1.InviteCode} returns this
811
+ */
812
+ proto.gateway.web.v1.InviteCode.prototype.setState = function(value) {
813
+ return jspb.Message.setProto3EnumField(this, 3, value);
814
+ };
815
+
816
+
817
+ /**
818
+ * optional string label = 4;
819
+ * @return {string}
820
+ */
821
+ proto.gateway.web.v1.InviteCode.prototype.getLabel = function() {
822
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
823
+ };
824
+
825
+
826
+ /**
827
+ * @param {string} value
828
+ * @return {!proto.gateway.web.v1.InviteCode} returns this
829
+ */
830
+ proto.gateway.web.v1.InviteCode.prototype.setLabel = function(value) {
831
+ return jspb.Message.setProto3StringField(this, 4, value);
832
+ };
833
+
834
+
835
+ /**
836
+ * optional string redeemed_by_user_id = 5;
837
+ * @return {string}
838
+ */
839
+ proto.gateway.web.v1.InviteCode.prototype.getRedeemedByUserId = function() {
840
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
841
+ };
842
+
843
+
844
+ /**
845
+ * @param {string} value
846
+ * @return {!proto.gateway.web.v1.InviteCode} returns this
847
+ */
848
+ proto.gateway.web.v1.InviteCode.prototype.setRedeemedByUserId = function(value) {
849
+ return jspb.Message.setProto3StringField(this, 5, value);
850
+ };
851
+
852
+
853
+ /**
854
+ * optional google.protobuf.Timestamp created_at = 6;
855
+ * @return {?proto.google.protobuf.Timestamp}
856
+ */
857
+ proto.gateway.web.v1.InviteCode.prototype.getCreatedAt = function() {
858
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
859
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6));
860
+ };
861
+
862
+
863
+ /**
864
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
865
+ * @return {!proto.gateway.web.v1.InviteCode} returns this
866
+ */
867
+ proto.gateway.web.v1.InviteCode.prototype.setCreatedAt = function(value) {
868
+ return jspb.Message.setWrapperField(this, 6, value);
869
+ };
870
+
871
+
872
+ /**
873
+ * Clears the message field making it undefined.
874
+ * @return {!proto.gateway.web.v1.InviteCode} returns this
875
+ */
876
+ proto.gateway.web.v1.InviteCode.prototype.clearCreatedAt = function() {
877
+ return this.setCreatedAt(undefined);
878
+ };
879
+
880
+
881
+ /**
882
+ * Returns whether this field is set.
883
+ * @return {boolean}
884
+ */
885
+ proto.gateway.web.v1.InviteCode.prototype.hasCreatedAt = function() {
886
+ return jspb.Message.getField(this, 6) != null;
887
+ };
888
+
889
+
890
+ /**
891
+ * optional google.protobuf.Timestamp expires_at = 7;
892
+ * @return {?proto.google.protobuf.Timestamp}
893
+ */
894
+ proto.gateway.web.v1.InviteCode.prototype.getExpiresAt = function() {
895
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
896
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 7));
897
+ };
898
+
899
+
900
+ /**
901
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
902
+ * @return {!proto.gateway.web.v1.InviteCode} returns this
903
+ */
904
+ proto.gateway.web.v1.InviteCode.prototype.setExpiresAt = function(value) {
905
+ return jspb.Message.setWrapperField(this, 7, value);
906
+ };
907
+
908
+
909
+ /**
910
+ * Clears the message field making it undefined.
911
+ * @return {!proto.gateway.web.v1.InviteCode} returns this
912
+ */
913
+ proto.gateway.web.v1.InviteCode.prototype.clearExpiresAt = function() {
914
+ return this.setExpiresAt(undefined);
915
+ };
916
+
917
+
918
+ /**
919
+ * Returns whether this field is set.
920
+ * @return {boolean}
921
+ */
922
+ proto.gateway.web.v1.InviteCode.prototype.hasExpiresAt = function() {
923
+ return jspb.Message.getField(this, 7) != null;
924
+ };
925
+
926
+
927
+ /**
928
+ * optional google.protobuf.Timestamp reserved_at = 8;
929
+ * @return {?proto.google.protobuf.Timestamp}
930
+ */
931
+ proto.gateway.web.v1.InviteCode.prototype.getReservedAt = function() {
932
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
933
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 8));
934
+ };
935
+
936
+
937
+ /**
938
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
939
+ * @return {!proto.gateway.web.v1.InviteCode} returns this
940
+ */
941
+ proto.gateway.web.v1.InviteCode.prototype.setReservedAt = function(value) {
942
+ return jspb.Message.setWrapperField(this, 8, value);
943
+ };
944
+
945
+
946
+ /**
947
+ * Clears the message field making it undefined.
948
+ * @return {!proto.gateway.web.v1.InviteCode} returns this
949
+ */
950
+ proto.gateway.web.v1.InviteCode.prototype.clearReservedAt = function() {
951
+ return this.setReservedAt(undefined);
952
+ };
953
+
954
+
955
+ /**
956
+ * Returns whether this field is set.
957
+ * @return {boolean}
958
+ */
959
+ proto.gateway.web.v1.InviteCode.prototype.hasReservedAt = function() {
960
+ return jspb.Message.getField(this, 8) != null;
961
+ };
962
+
963
+
964
+ /**
965
+ * optional google.protobuf.Timestamp redeemed_at = 9;
966
+ * @return {?proto.google.protobuf.Timestamp}
967
+ */
968
+ proto.gateway.web.v1.InviteCode.prototype.getRedeemedAt = function() {
969
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
970
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 9));
971
+ };
972
+
973
+
974
+ /**
975
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
976
+ * @return {!proto.gateway.web.v1.InviteCode} returns this
977
+ */
978
+ proto.gateway.web.v1.InviteCode.prototype.setRedeemedAt = function(value) {
979
+ return jspb.Message.setWrapperField(this, 9, value);
980
+ };
981
+
982
+
983
+ /**
984
+ * Clears the message field making it undefined.
985
+ * @return {!proto.gateway.web.v1.InviteCode} returns this
986
+ */
987
+ proto.gateway.web.v1.InviteCode.prototype.clearRedeemedAt = function() {
988
+ return this.setRedeemedAt(undefined);
989
+ };
990
+
991
+
992
+ /**
993
+ * Returns whether this field is set.
994
+ * @return {boolean}
995
+ */
996
+ proto.gateway.web.v1.InviteCode.prototype.hasRedeemedAt = function() {
997
+ return jspb.Message.getField(this, 9) != null;
998
+ };
999
+
1000
+
1001
+
1002
+
1003
+
1004
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1005
+ /**
1006
+ * Creates an object representation of this proto.
1007
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1008
+ * Optional fields that are not set will be set to undefined.
1009
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1010
+ * For the list of reserved names please see:
1011
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1012
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1013
+ * JSPB instance for transitional soy proto support:
1014
+ * http://goto/soy-param-migration
1015
+ * @return {!Object}
1016
+ */
1017
+ proto.gateway.web.v1.ReserveInviteCodeRequest.prototype.toObject = function(opt_includeInstance) {
1018
+ return proto.gateway.web.v1.ReserveInviteCodeRequest.toObject(opt_includeInstance, this);
1019
+ };
1020
+
1021
+
1022
+ /**
1023
+ * Static version of the {@see toObject} method.
1024
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1025
+ * the JSPB instance for transitional soy proto support:
1026
+ * http://goto/soy-param-migration
1027
+ * @param {!proto.gateway.web.v1.ReserveInviteCodeRequest} msg The msg instance to transform.
1028
+ * @return {!Object}
1029
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1030
+ */
1031
+ proto.gateway.web.v1.ReserveInviteCodeRequest.toObject = function(includeInstance, msg) {
1032
+ var f, obj = {
1033
+ code: jspb.Message.getFieldWithDefault(msg, 1, ""),
1034
+ ttlSeconds: jspb.Message.getFieldWithDefault(msg, 2, 0),
1035
+ reservationToken: jspb.Message.getFieldWithDefault(msg, 3, "")
1036
+ };
1037
+
1038
+ if (includeInstance) {
1039
+ obj.$jspbMessageInstance = msg;
1040
+ }
1041
+ return obj;
1042
+ };
1043
+ }
1044
+
1045
+
1046
+ /**
1047
+ * Deserializes binary data (in protobuf wire format).
1048
+ * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.
1049
+ * @return {!proto.gateway.web.v1.ReserveInviteCodeRequest}
1050
+ */
1051
+ proto.gateway.web.v1.ReserveInviteCodeRequest.deserializeBinary = function(bytes) {
1052
+ var reader = new jspb.BinaryReader(bytes);
1053
+ var msg = new proto.gateway.web.v1.ReserveInviteCodeRequest;
1054
+ return proto.gateway.web.v1.ReserveInviteCodeRequest.deserializeBinaryFromReader(msg, reader);
1055
+ };
1056
+
1057
+
1058
+ /**
1059
+ * Deserializes binary data (in protobuf wire format) from the
1060
+ * given reader into the given message object.
1061
+ * @param {!proto.gateway.web.v1.ReserveInviteCodeRequest} msg The message object to deserialize into.
1062
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1063
+ * @return {!proto.gateway.web.v1.ReserveInviteCodeRequest}
1064
+ */
1065
+ proto.gateway.web.v1.ReserveInviteCodeRequest.deserializeBinaryFromReader = function(msg, reader) {
1066
+ while (reader.nextField()) {
1067
+ if (reader.isEndGroup()) {
1068
+ break;
1069
+ }
1070
+ var field = reader.getFieldNumber();
1071
+ switch (field) {
1072
+ case 1:
1073
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
1074
+ msg.setCode(value);
1075
+ break;
1076
+ case 2:
1077
+ var value = /** @type {number} */ (reader.readInt32());
1078
+ msg.setTtlSeconds(value);
1079
+ break;
1080
+ case 3:
1081
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
1082
+ msg.setReservationToken(value);
1083
+ break;
1084
+ default:
1085
+ reader.skipField();
1086
+ break;
1087
+ }
1088
+ }
1089
+ return msg;
1090
+ };
1091
+
1092
+
1093
+ /**
1094
+ * Serializes the message to binary data (in protobuf wire format).
1095
+ * @return {!Uint8Array}
1096
+ */
1097
+ proto.gateway.web.v1.ReserveInviteCodeRequest.prototype.serializeBinary = function() {
1098
+ var writer = new jspb.BinaryWriter();
1099
+ proto.gateway.web.v1.ReserveInviteCodeRequest.serializeBinaryToWriter(this, writer);
1100
+ return writer.getResultBuffer();
1101
+ };
1102
+
1103
+
1104
+ /**
1105
+ * Serializes the given message to binary data (in protobuf wire
1106
+ * format), writing to the given BinaryWriter.
1107
+ * @param {!proto.gateway.web.v1.ReserveInviteCodeRequest} message
1108
+ * @param {!jspb.BinaryWriter} writer
1109
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1110
+ */
1111
+ proto.gateway.web.v1.ReserveInviteCodeRequest.serializeBinaryToWriter = function(message, writer) {
1112
+ var f = undefined;
1113
+ f = message.getCode();
1114
+ if (f.length > 0) {
1115
+ writer.writeString(
1116
+ 1,
1117
+ f
1118
+ );
1119
+ }
1120
+ f = message.getTtlSeconds();
1121
+ if (f !== 0) {
1122
+ writer.writeInt32(
1123
+ 2,
1124
+ f
1125
+ );
1126
+ }
1127
+ f = message.getReservationToken();
1128
+ if (f.length > 0) {
1129
+ writer.writeString(
1130
+ 3,
1131
+ f
1132
+ );
1133
+ }
1134
+ };
1135
+
1136
+
1137
+ /**
1138
+ * optional string code = 1;
1139
+ * @return {string}
1140
+ */
1141
+ proto.gateway.web.v1.ReserveInviteCodeRequest.prototype.getCode = function() {
1142
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1143
+ };
1144
+
1145
+
1146
+ /**
1147
+ * @param {string} value
1148
+ * @return {!proto.gateway.web.v1.ReserveInviteCodeRequest} returns this
1149
+ */
1150
+ proto.gateway.web.v1.ReserveInviteCodeRequest.prototype.setCode = function(value) {
1151
+ return jspb.Message.setProto3StringField(this, 1, value);
1152
+ };
1153
+
1154
+
1155
+ /**
1156
+ * optional int32 ttl_seconds = 2;
1157
+ * @return {number}
1158
+ */
1159
+ proto.gateway.web.v1.ReserveInviteCodeRequest.prototype.getTtlSeconds = function() {
1160
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
1161
+ };
1162
+
1163
+
1164
+ /**
1165
+ * @param {number} value
1166
+ * @return {!proto.gateway.web.v1.ReserveInviteCodeRequest} returns this
1167
+ */
1168
+ proto.gateway.web.v1.ReserveInviteCodeRequest.prototype.setTtlSeconds = function(value) {
1169
+ return jspb.Message.setProto3IntField(this, 2, value);
1170
+ };
1171
+
1172
+
1173
+ /**
1174
+ * optional string reservation_token = 3;
1175
+ * @return {string}
1176
+ */
1177
+ proto.gateway.web.v1.ReserveInviteCodeRequest.prototype.getReservationToken = function() {
1178
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
1179
+ };
1180
+
1181
+
1182
+ /**
1183
+ * @param {string} value
1184
+ * @return {!proto.gateway.web.v1.ReserveInviteCodeRequest} returns this
1185
+ */
1186
+ proto.gateway.web.v1.ReserveInviteCodeRequest.prototype.setReservationToken = function(value) {
1187
+ return jspb.Message.setProto3StringField(this, 3, value);
1188
+ };
1189
+
1190
+
1191
+
1192
+
1193
+
1194
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1195
+ /**
1196
+ * Creates an object representation of this proto.
1197
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1198
+ * Optional fields that are not set will be set to undefined.
1199
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1200
+ * For the list of reserved names please see:
1201
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1202
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1203
+ * JSPB instance for transitional soy proto support:
1204
+ * http://goto/soy-param-migration
1205
+ * @return {!Object}
1206
+ */
1207
+ proto.gateway.web.v1.ReserveInviteCodeResponse.prototype.toObject = function(opt_includeInstance) {
1208
+ return proto.gateway.web.v1.ReserveInviteCodeResponse.toObject(opt_includeInstance, this);
1209
+ };
1210
+
1211
+
1212
+ /**
1213
+ * Static version of the {@see toObject} method.
1214
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1215
+ * the JSPB instance for transitional soy proto support:
1216
+ * http://goto/soy-param-migration
1217
+ * @param {!proto.gateway.web.v1.ReserveInviteCodeResponse} msg The msg instance to transform.
1218
+ * @return {!Object}
1219
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1220
+ */
1221
+ proto.gateway.web.v1.ReserveInviteCodeResponse.toObject = function(includeInstance, msg) {
1222
+ var f, obj = {
1223
+ status: (f = msg.getStatus()) && proto_gateway_common_v1_status_pb.ResponseStatus.toObject(includeInstance, f),
1224
+ reserved: jspb.Message.getBooleanFieldWithDefault(msg, 2, false),
1225
+ state: jspb.Message.getFieldWithDefault(msg, 3, 0),
1226
+ reservationToken: jspb.Message.getFieldWithDefault(msg, 4, ""),
1227
+ expiresAt: (f = msg.getExpiresAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
1228
+ };
1229
+
1230
+ if (includeInstance) {
1231
+ obj.$jspbMessageInstance = msg;
1232
+ }
1233
+ return obj;
1234
+ };
1235
+ }
1236
+
1237
+
1238
+ /**
1239
+ * Deserializes binary data (in protobuf wire format).
1240
+ * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.
1241
+ * @return {!proto.gateway.web.v1.ReserveInviteCodeResponse}
1242
+ */
1243
+ proto.gateway.web.v1.ReserveInviteCodeResponse.deserializeBinary = function(bytes) {
1244
+ var reader = new jspb.BinaryReader(bytes);
1245
+ var msg = new proto.gateway.web.v1.ReserveInviteCodeResponse;
1246
+ return proto.gateway.web.v1.ReserveInviteCodeResponse.deserializeBinaryFromReader(msg, reader);
1247
+ };
1248
+
1249
+
1250
+ /**
1251
+ * Deserializes binary data (in protobuf wire format) from the
1252
+ * given reader into the given message object.
1253
+ * @param {!proto.gateway.web.v1.ReserveInviteCodeResponse} msg The message object to deserialize into.
1254
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1255
+ * @return {!proto.gateway.web.v1.ReserveInviteCodeResponse}
1256
+ */
1257
+ proto.gateway.web.v1.ReserveInviteCodeResponse.deserializeBinaryFromReader = function(msg, reader) {
1258
+ while (reader.nextField()) {
1259
+ if (reader.isEndGroup()) {
1260
+ break;
1261
+ }
1262
+ var field = reader.getFieldNumber();
1263
+ switch (field) {
1264
+ case 1:
1265
+ var value = new proto_gateway_common_v1_status_pb.ResponseStatus;
1266
+ reader.readMessage(value,proto_gateway_common_v1_status_pb.ResponseStatus.deserializeBinaryFromReader);
1267
+ msg.setStatus(value);
1268
+ break;
1269
+ case 2:
1270
+ var value = /** @type {boolean} */ (reader.readBool());
1271
+ msg.setReserved(value);
1272
+ break;
1273
+ case 3:
1274
+ var value = /** @type {!proto.gateway.web.v1.InviteCodeState} */ (reader.readEnum());
1275
+ msg.setState(value);
1276
+ break;
1277
+ case 4:
1278
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
1279
+ msg.setReservationToken(value);
1280
+ break;
1281
+ case 5:
1282
+ var value = new google_protobuf_timestamp_pb.Timestamp;
1283
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
1284
+ msg.setExpiresAt(value);
1285
+ break;
1286
+ default:
1287
+ reader.skipField();
1288
+ break;
1289
+ }
1290
+ }
1291
+ return msg;
1292
+ };
1293
+
1294
+
1295
+ /**
1296
+ * Serializes the message to binary data (in protobuf wire format).
1297
+ * @return {!Uint8Array}
1298
+ */
1299
+ proto.gateway.web.v1.ReserveInviteCodeResponse.prototype.serializeBinary = function() {
1300
+ var writer = new jspb.BinaryWriter();
1301
+ proto.gateway.web.v1.ReserveInviteCodeResponse.serializeBinaryToWriter(this, writer);
1302
+ return writer.getResultBuffer();
1303
+ };
1304
+
1305
+
1306
+ /**
1307
+ * Serializes the given message to binary data (in protobuf wire
1308
+ * format), writing to the given BinaryWriter.
1309
+ * @param {!proto.gateway.web.v1.ReserveInviteCodeResponse} message
1310
+ * @param {!jspb.BinaryWriter} writer
1311
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1312
+ */
1313
+ proto.gateway.web.v1.ReserveInviteCodeResponse.serializeBinaryToWriter = function(message, writer) {
1314
+ var f = undefined;
1315
+ f = message.getStatus();
1316
+ if (f != null) {
1317
+ writer.writeMessage(
1318
+ 1,
1319
+ f,
1320
+ proto_gateway_common_v1_status_pb.ResponseStatus.serializeBinaryToWriter
1321
+ );
1322
+ }
1323
+ f = message.getReserved();
1324
+ if (f) {
1325
+ writer.writeBool(
1326
+ 2,
1327
+ f
1328
+ );
1329
+ }
1330
+ f = message.getState();
1331
+ if (f !== 0.0) {
1332
+ writer.writeEnum(
1333
+ 3,
1334
+ f
1335
+ );
1336
+ }
1337
+ f = message.getReservationToken();
1338
+ if (f.length > 0) {
1339
+ writer.writeString(
1340
+ 4,
1341
+ f
1342
+ );
1343
+ }
1344
+ f = message.getExpiresAt();
1345
+ if (f != null) {
1346
+ writer.writeMessage(
1347
+ 5,
1348
+ f,
1349
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
1350
+ );
1351
+ }
1352
+ };
1353
+
1354
+
1355
+ /**
1356
+ * optional gateway.common.v1.ResponseStatus status = 1;
1357
+ * @return {?proto.gateway.common.v1.ResponseStatus}
1358
+ */
1359
+ proto.gateway.web.v1.ReserveInviteCodeResponse.prototype.getStatus = function() {
1360
+ return /** @type{?proto.gateway.common.v1.ResponseStatus} */ (
1361
+ jspb.Message.getWrapperField(this, proto_gateway_common_v1_status_pb.ResponseStatus, 1));
1362
+ };
1363
+
1364
+
1365
+ /**
1366
+ * @param {?proto.gateway.common.v1.ResponseStatus|undefined} value
1367
+ * @return {!proto.gateway.web.v1.ReserveInviteCodeResponse} returns this
1368
+ */
1369
+ proto.gateway.web.v1.ReserveInviteCodeResponse.prototype.setStatus = function(value) {
1370
+ return jspb.Message.setWrapperField(this, 1, value);
1371
+ };
1372
+
1373
+
1374
+ /**
1375
+ * Clears the message field making it undefined.
1376
+ * @return {!proto.gateway.web.v1.ReserveInviteCodeResponse} returns this
1377
+ */
1378
+ proto.gateway.web.v1.ReserveInviteCodeResponse.prototype.clearStatus = function() {
1379
+ return this.setStatus(undefined);
1380
+ };
1381
+
1382
+
1383
+ /**
1384
+ * Returns whether this field is set.
1385
+ * @return {boolean}
1386
+ */
1387
+ proto.gateway.web.v1.ReserveInviteCodeResponse.prototype.hasStatus = function() {
1388
+ return jspb.Message.getField(this, 1) != null;
1389
+ };
1390
+
1391
+
1392
+ /**
1393
+ * optional bool reserved = 2;
1394
+ * @return {boolean}
1395
+ */
1396
+ proto.gateway.web.v1.ReserveInviteCodeResponse.prototype.getReserved = function() {
1397
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));
1398
+ };
1399
+
1400
+
1401
+ /**
1402
+ * @param {boolean} value
1403
+ * @return {!proto.gateway.web.v1.ReserveInviteCodeResponse} returns this
1404
+ */
1405
+ proto.gateway.web.v1.ReserveInviteCodeResponse.prototype.setReserved = function(value) {
1406
+ return jspb.Message.setProto3BooleanField(this, 2, value);
1407
+ };
1408
+
1409
+
1410
+ /**
1411
+ * optional InviteCodeState state = 3;
1412
+ * @return {!proto.gateway.web.v1.InviteCodeState}
1413
+ */
1414
+ proto.gateway.web.v1.ReserveInviteCodeResponse.prototype.getState = function() {
1415
+ return /** @type {!proto.gateway.web.v1.InviteCodeState} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
1416
+ };
1417
+
1418
+
1419
+ /**
1420
+ * @param {!proto.gateway.web.v1.InviteCodeState} value
1421
+ * @return {!proto.gateway.web.v1.ReserveInviteCodeResponse} returns this
1422
+ */
1423
+ proto.gateway.web.v1.ReserveInviteCodeResponse.prototype.setState = function(value) {
1424
+ return jspb.Message.setProto3EnumField(this, 3, value);
1425
+ };
1426
+
1427
+
1428
+ /**
1429
+ * optional string reservation_token = 4;
1430
+ * @return {string}
1431
+ */
1432
+ proto.gateway.web.v1.ReserveInviteCodeResponse.prototype.getReservationToken = function() {
1433
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
1434
+ };
1435
+
1436
+
1437
+ /**
1438
+ * @param {string} value
1439
+ * @return {!proto.gateway.web.v1.ReserveInviteCodeResponse} returns this
1440
+ */
1441
+ proto.gateway.web.v1.ReserveInviteCodeResponse.prototype.setReservationToken = function(value) {
1442
+ return jspb.Message.setProto3StringField(this, 4, value);
1443
+ };
1444
+
1445
+
1446
+ /**
1447
+ * optional google.protobuf.Timestamp expires_at = 5;
1448
+ * @return {?proto.google.protobuf.Timestamp}
1449
+ */
1450
+ proto.gateway.web.v1.ReserveInviteCodeResponse.prototype.getExpiresAt = function() {
1451
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
1452
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5));
1453
+ };
1454
+
1455
+
1456
+ /**
1457
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
1458
+ * @return {!proto.gateway.web.v1.ReserveInviteCodeResponse} returns this
1459
+ */
1460
+ proto.gateway.web.v1.ReserveInviteCodeResponse.prototype.setExpiresAt = function(value) {
1461
+ return jspb.Message.setWrapperField(this, 5, value);
1462
+ };
1463
+
1464
+
1465
+ /**
1466
+ * Clears the message field making it undefined.
1467
+ * @return {!proto.gateway.web.v1.ReserveInviteCodeResponse} returns this
1468
+ */
1469
+ proto.gateway.web.v1.ReserveInviteCodeResponse.prototype.clearExpiresAt = function() {
1470
+ return this.setExpiresAt(undefined);
1471
+ };
1472
+
1473
+
1474
+ /**
1475
+ * Returns whether this field is set.
1476
+ * @return {boolean}
1477
+ */
1478
+ proto.gateway.web.v1.ReserveInviteCodeResponse.prototype.hasExpiresAt = function() {
1479
+ return jspb.Message.getField(this, 5) != null;
1480
+ };
1481
+
1482
+
1483
+
1484
+
1485
+
1486
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1487
+ /**
1488
+ * Creates an object representation of this proto.
1489
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1490
+ * Optional fields that are not set will be set to undefined.
1491
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1492
+ * For the list of reserved names please see:
1493
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1494
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1495
+ * JSPB instance for transitional soy proto support:
1496
+ * http://goto/soy-param-migration
1497
+ * @return {!Object}
1498
+ */
1499
+ proto.gateway.web.v1.RedeemInviteCodeRequest.prototype.toObject = function(opt_includeInstance) {
1500
+ return proto.gateway.web.v1.RedeemInviteCodeRequest.toObject(opt_includeInstance, this);
1501
+ };
1502
+
1503
+
1504
+ /**
1505
+ * Static version of the {@see toObject} method.
1506
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1507
+ * the JSPB instance for transitional soy proto support:
1508
+ * http://goto/soy-param-migration
1509
+ * @param {!proto.gateway.web.v1.RedeemInviteCodeRequest} msg The msg instance to transform.
1510
+ * @return {!Object}
1511
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1512
+ */
1513
+ proto.gateway.web.v1.RedeemInviteCodeRequest.toObject = function(includeInstance, msg) {
1514
+ var f, obj = {
1515
+ reservationToken: jspb.Message.getFieldWithDefault(msg, 1, "")
1516
+ };
1517
+
1518
+ if (includeInstance) {
1519
+ obj.$jspbMessageInstance = msg;
1520
+ }
1521
+ return obj;
1522
+ };
1523
+ }
1524
+
1525
+
1526
+ /**
1527
+ * Deserializes binary data (in protobuf wire format).
1528
+ * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.
1529
+ * @return {!proto.gateway.web.v1.RedeemInviteCodeRequest}
1530
+ */
1531
+ proto.gateway.web.v1.RedeemInviteCodeRequest.deserializeBinary = function(bytes) {
1532
+ var reader = new jspb.BinaryReader(bytes);
1533
+ var msg = new proto.gateway.web.v1.RedeemInviteCodeRequest;
1534
+ return proto.gateway.web.v1.RedeemInviteCodeRequest.deserializeBinaryFromReader(msg, reader);
1535
+ };
1536
+
1537
+
1538
+ /**
1539
+ * Deserializes binary data (in protobuf wire format) from the
1540
+ * given reader into the given message object.
1541
+ * @param {!proto.gateway.web.v1.RedeemInviteCodeRequest} msg The message object to deserialize into.
1542
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1543
+ * @return {!proto.gateway.web.v1.RedeemInviteCodeRequest}
1544
+ */
1545
+ proto.gateway.web.v1.RedeemInviteCodeRequest.deserializeBinaryFromReader = function(msg, reader) {
1546
+ while (reader.nextField()) {
1547
+ if (reader.isEndGroup()) {
1548
+ break;
1549
+ }
1550
+ var field = reader.getFieldNumber();
1551
+ switch (field) {
1552
+ case 1:
1553
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
1554
+ msg.setReservationToken(value);
1555
+ break;
1556
+ default:
1557
+ reader.skipField();
1558
+ break;
1559
+ }
1560
+ }
1561
+ return msg;
1562
+ };
1563
+
1564
+
1565
+ /**
1566
+ * Serializes the message to binary data (in protobuf wire format).
1567
+ * @return {!Uint8Array}
1568
+ */
1569
+ proto.gateway.web.v1.RedeemInviteCodeRequest.prototype.serializeBinary = function() {
1570
+ var writer = new jspb.BinaryWriter();
1571
+ proto.gateway.web.v1.RedeemInviteCodeRequest.serializeBinaryToWriter(this, writer);
1572
+ return writer.getResultBuffer();
1573
+ };
1574
+
1575
+
1576
+ /**
1577
+ * Serializes the given message to binary data (in protobuf wire
1578
+ * format), writing to the given BinaryWriter.
1579
+ * @param {!proto.gateway.web.v1.RedeemInviteCodeRequest} message
1580
+ * @param {!jspb.BinaryWriter} writer
1581
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1582
+ */
1583
+ proto.gateway.web.v1.RedeemInviteCodeRequest.serializeBinaryToWriter = function(message, writer) {
1584
+ var f = undefined;
1585
+ f = message.getReservationToken();
1586
+ if (f.length > 0) {
1587
+ writer.writeString(
1588
+ 1,
1589
+ f
1590
+ );
1591
+ }
1592
+ };
1593
+
1594
+
1595
+ /**
1596
+ * optional string reservation_token = 1;
1597
+ * @return {string}
1598
+ */
1599
+ proto.gateway.web.v1.RedeemInviteCodeRequest.prototype.getReservationToken = function() {
1600
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1601
+ };
1602
+
1603
+
1604
+ /**
1605
+ * @param {string} value
1606
+ * @return {!proto.gateway.web.v1.RedeemInviteCodeRequest} returns this
1607
+ */
1608
+ proto.gateway.web.v1.RedeemInviteCodeRequest.prototype.setReservationToken = function(value) {
1609
+ return jspb.Message.setProto3StringField(this, 1, value);
1610
+ };
1611
+
1612
+
1613
+
1614
+
1615
+
1616
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1617
+ /**
1618
+ * Creates an object representation of this proto.
1619
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1620
+ * Optional fields that are not set will be set to undefined.
1621
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1622
+ * For the list of reserved names please see:
1623
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1624
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1625
+ * JSPB instance for transitional soy proto support:
1626
+ * http://goto/soy-param-migration
1627
+ * @return {!Object}
1628
+ */
1629
+ proto.gateway.web.v1.RedeemInviteCodeResponse.prototype.toObject = function(opt_includeInstance) {
1630
+ return proto.gateway.web.v1.RedeemInviteCodeResponse.toObject(opt_includeInstance, this);
1631
+ };
1632
+
1633
+
1634
+ /**
1635
+ * Static version of the {@see toObject} method.
1636
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1637
+ * the JSPB instance for transitional soy proto support:
1638
+ * http://goto/soy-param-migration
1639
+ * @param {!proto.gateway.web.v1.RedeemInviteCodeResponse} msg The msg instance to transform.
1640
+ * @return {!Object}
1641
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1642
+ */
1643
+ proto.gateway.web.v1.RedeemInviteCodeResponse.toObject = function(includeInstance, msg) {
1644
+ var f, obj = {
1645
+ status: (f = msg.getStatus()) && proto_gateway_common_v1_status_pb.ResponseStatus.toObject(includeInstance, f),
1646
+ redeemed: jspb.Message.getBooleanFieldWithDefault(msg, 2, false),
1647
+ state: jspb.Message.getFieldWithDefault(msg, 3, 0)
1648
+ };
1649
+
1650
+ if (includeInstance) {
1651
+ obj.$jspbMessageInstance = msg;
1652
+ }
1653
+ return obj;
1654
+ };
1655
+ }
1656
+
1657
+
1658
+ /**
1659
+ * Deserializes binary data (in protobuf wire format).
1660
+ * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.
1661
+ * @return {!proto.gateway.web.v1.RedeemInviteCodeResponse}
1662
+ */
1663
+ proto.gateway.web.v1.RedeemInviteCodeResponse.deserializeBinary = function(bytes) {
1664
+ var reader = new jspb.BinaryReader(bytes);
1665
+ var msg = new proto.gateway.web.v1.RedeemInviteCodeResponse;
1666
+ return proto.gateway.web.v1.RedeemInviteCodeResponse.deserializeBinaryFromReader(msg, reader);
1667
+ };
1668
+
1669
+
1670
+ /**
1671
+ * Deserializes binary data (in protobuf wire format) from the
1672
+ * given reader into the given message object.
1673
+ * @param {!proto.gateway.web.v1.RedeemInviteCodeResponse} msg The message object to deserialize into.
1674
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1675
+ * @return {!proto.gateway.web.v1.RedeemInviteCodeResponse}
1676
+ */
1677
+ proto.gateway.web.v1.RedeemInviteCodeResponse.deserializeBinaryFromReader = function(msg, reader) {
1678
+ while (reader.nextField()) {
1679
+ if (reader.isEndGroup()) {
1680
+ break;
1681
+ }
1682
+ var field = reader.getFieldNumber();
1683
+ switch (field) {
1684
+ case 1:
1685
+ var value = new proto_gateway_common_v1_status_pb.ResponseStatus;
1686
+ reader.readMessage(value,proto_gateway_common_v1_status_pb.ResponseStatus.deserializeBinaryFromReader);
1687
+ msg.setStatus(value);
1688
+ break;
1689
+ case 2:
1690
+ var value = /** @type {boolean} */ (reader.readBool());
1691
+ msg.setRedeemed(value);
1692
+ break;
1693
+ case 3:
1694
+ var value = /** @type {!proto.gateway.web.v1.InviteCodeState} */ (reader.readEnum());
1695
+ msg.setState(value);
1696
+ break;
1697
+ default:
1698
+ reader.skipField();
1699
+ break;
1700
+ }
1701
+ }
1702
+ return msg;
1703
+ };
1704
+
1705
+
1706
+ /**
1707
+ * Serializes the message to binary data (in protobuf wire format).
1708
+ * @return {!Uint8Array}
1709
+ */
1710
+ proto.gateway.web.v1.RedeemInviteCodeResponse.prototype.serializeBinary = function() {
1711
+ var writer = new jspb.BinaryWriter();
1712
+ proto.gateway.web.v1.RedeemInviteCodeResponse.serializeBinaryToWriter(this, writer);
1713
+ return writer.getResultBuffer();
1714
+ };
1715
+
1716
+
1717
+ /**
1718
+ * Serializes the given message to binary data (in protobuf wire
1719
+ * format), writing to the given BinaryWriter.
1720
+ * @param {!proto.gateway.web.v1.RedeemInviteCodeResponse} message
1721
+ * @param {!jspb.BinaryWriter} writer
1722
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1723
+ */
1724
+ proto.gateway.web.v1.RedeemInviteCodeResponse.serializeBinaryToWriter = function(message, writer) {
1725
+ var f = undefined;
1726
+ f = message.getStatus();
1727
+ if (f != null) {
1728
+ writer.writeMessage(
1729
+ 1,
1730
+ f,
1731
+ proto_gateway_common_v1_status_pb.ResponseStatus.serializeBinaryToWriter
1732
+ );
1733
+ }
1734
+ f = message.getRedeemed();
1735
+ if (f) {
1736
+ writer.writeBool(
1737
+ 2,
1738
+ f
1739
+ );
1740
+ }
1741
+ f = message.getState();
1742
+ if (f !== 0.0) {
1743
+ writer.writeEnum(
1744
+ 3,
1745
+ f
1746
+ );
1747
+ }
1748
+ };
1749
+
1750
+
1751
+ /**
1752
+ * optional gateway.common.v1.ResponseStatus status = 1;
1753
+ * @return {?proto.gateway.common.v1.ResponseStatus}
1754
+ */
1755
+ proto.gateway.web.v1.RedeemInviteCodeResponse.prototype.getStatus = function() {
1756
+ return /** @type{?proto.gateway.common.v1.ResponseStatus} */ (
1757
+ jspb.Message.getWrapperField(this, proto_gateway_common_v1_status_pb.ResponseStatus, 1));
1758
+ };
1759
+
1760
+
1761
+ /**
1762
+ * @param {?proto.gateway.common.v1.ResponseStatus|undefined} value
1763
+ * @return {!proto.gateway.web.v1.RedeemInviteCodeResponse} returns this
1764
+ */
1765
+ proto.gateway.web.v1.RedeemInviteCodeResponse.prototype.setStatus = function(value) {
1766
+ return jspb.Message.setWrapperField(this, 1, value);
1767
+ };
1768
+
1769
+
1770
+ /**
1771
+ * Clears the message field making it undefined.
1772
+ * @return {!proto.gateway.web.v1.RedeemInviteCodeResponse} returns this
1773
+ */
1774
+ proto.gateway.web.v1.RedeemInviteCodeResponse.prototype.clearStatus = function() {
1775
+ return this.setStatus(undefined);
1776
+ };
1777
+
1778
+
1779
+ /**
1780
+ * Returns whether this field is set.
1781
+ * @return {boolean}
1782
+ */
1783
+ proto.gateway.web.v1.RedeemInviteCodeResponse.prototype.hasStatus = function() {
1784
+ return jspb.Message.getField(this, 1) != null;
1785
+ };
1786
+
1787
+
1788
+ /**
1789
+ * optional bool redeemed = 2;
1790
+ * @return {boolean}
1791
+ */
1792
+ proto.gateway.web.v1.RedeemInviteCodeResponse.prototype.getRedeemed = function() {
1793
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));
1794
+ };
1795
+
1796
+
1797
+ /**
1798
+ * @param {boolean} value
1799
+ * @return {!proto.gateway.web.v1.RedeemInviteCodeResponse} returns this
1800
+ */
1801
+ proto.gateway.web.v1.RedeemInviteCodeResponse.prototype.setRedeemed = function(value) {
1802
+ return jspb.Message.setProto3BooleanField(this, 2, value);
1803
+ };
1804
+
1805
+
1806
+ /**
1807
+ * optional InviteCodeState state = 3;
1808
+ * @return {!proto.gateway.web.v1.InviteCodeState}
1809
+ */
1810
+ proto.gateway.web.v1.RedeemInviteCodeResponse.prototype.getState = function() {
1811
+ return /** @type {!proto.gateway.web.v1.InviteCodeState} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
1812
+ };
1813
+
1814
+
1815
+ /**
1816
+ * @param {!proto.gateway.web.v1.InviteCodeState} value
1817
+ * @return {!proto.gateway.web.v1.RedeemInviteCodeResponse} returns this
1818
+ */
1819
+ proto.gateway.web.v1.RedeemInviteCodeResponse.prototype.setState = function(value) {
1820
+ return jspb.Message.setProto3EnumField(this, 3, value);
1821
+ };
1822
+
1823
+
1824
+
1825
+
1826
+
1827
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1828
+ /**
1829
+ * Creates an object representation of this proto.
1830
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1831
+ * Optional fields that are not set will be set to undefined.
1832
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1833
+ * For the list of reserved names please see:
1834
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1835
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1836
+ * JSPB instance for transitional soy proto support:
1837
+ * http://goto/soy-param-migration
1838
+ * @return {!Object}
1839
+ */
1840
+ proto.gateway.web.v1.GenerateInviteCodesRequest.prototype.toObject = function(opt_includeInstance) {
1841
+ return proto.gateway.web.v1.GenerateInviteCodesRequest.toObject(opt_includeInstance, this);
1842
+ };
1843
+
1844
+
1845
+ /**
1846
+ * Static version of the {@see toObject} method.
1847
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1848
+ * the JSPB instance for transitional soy proto support:
1849
+ * http://goto/soy-param-migration
1850
+ * @param {!proto.gateway.web.v1.GenerateInviteCodesRequest} msg The msg instance to transform.
1851
+ * @return {!Object}
1852
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1853
+ */
1854
+ proto.gateway.web.v1.GenerateInviteCodesRequest.toObject = function(includeInstance, msg) {
1855
+ var f, obj = {
1856
+ count: jspb.Message.getFieldWithDefault(msg, 1, 0),
1857
+ label: jspb.Message.getFieldWithDefault(msg, 2, ""),
1858
+ expiresAt: (f = msg.getExpiresAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
1859
+ };
1860
+
1861
+ if (includeInstance) {
1862
+ obj.$jspbMessageInstance = msg;
1863
+ }
1864
+ return obj;
1865
+ };
1866
+ }
1867
+
1868
+
1869
+ /**
1870
+ * Deserializes binary data (in protobuf wire format).
1871
+ * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.
1872
+ * @return {!proto.gateway.web.v1.GenerateInviteCodesRequest}
1873
+ */
1874
+ proto.gateway.web.v1.GenerateInviteCodesRequest.deserializeBinary = function(bytes) {
1875
+ var reader = new jspb.BinaryReader(bytes);
1876
+ var msg = new proto.gateway.web.v1.GenerateInviteCodesRequest;
1877
+ return proto.gateway.web.v1.GenerateInviteCodesRequest.deserializeBinaryFromReader(msg, reader);
1878
+ };
1879
+
1880
+
1881
+ /**
1882
+ * Deserializes binary data (in protobuf wire format) from the
1883
+ * given reader into the given message object.
1884
+ * @param {!proto.gateway.web.v1.GenerateInviteCodesRequest} msg The message object to deserialize into.
1885
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1886
+ * @return {!proto.gateway.web.v1.GenerateInviteCodesRequest}
1887
+ */
1888
+ proto.gateway.web.v1.GenerateInviteCodesRequest.deserializeBinaryFromReader = function(msg, reader) {
1889
+ while (reader.nextField()) {
1890
+ if (reader.isEndGroup()) {
1891
+ break;
1892
+ }
1893
+ var field = reader.getFieldNumber();
1894
+ switch (field) {
1895
+ case 1:
1896
+ var value = /** @type {number} */ (reader.readInt32());
1897
+ msg.setCount(value);
1898
+ break;
1899
+ case 2:
1900
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
1901
+ msg.setLabel(value);
1902
+ break;
1903
+ case 3:
1904
+ var value = new google_protobuf_timestamp_pb.Timestamp;
1905
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
1906
+ msg.setExpiresAt(value);
1907
+ break;
1908
+ default:
1909
+ reader.skipField();
1910
+ break;
1911
+ }
1912
+ }
1913
+ return msg;
1914
+ };
1915
+
1916
+
1917
+ /**
1918
+ * Serializes the message to binary data (in protobuf wire format).
1919
+ * @return {!Uint8Array}
1920
+ */
1921
+ proto.gateway.web.v1.GenerateInviteCodesRequest.prototype.serializeBinary = function() {
1922
+ var writer = new jspb.BinaryWriter();
1923
+ proto.gateway.web.v1.GenerateInviteCodesRequest.serializeBinaryToWriter(this, writer);
1924
+ return writer.getResultBuffer();
1925
+ };
1926
+
1927
+
1928
+ /**
1929
+ * Serializes the given message to binary data (in protobuf wire
1930
+ * format), writing to the given BinaryWriter.
1931
+ * @param {!proto.gateway.web.v1.GenerateInviteCodesRequest} message
1932
+ * @param {!jspb.BinaryWriter} writer
1933
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1934
+ */
1935
+ proto.gateway.web.v1.GenerateInviteCodesRequest.serializeBinaryToWriter = function(message, writer) {
1936
+ var f = undefined;
1937
+ f = message.getCount();
1938
+ if (f !== 0) {
1939
+ writer.writeInt32(
1940
+ 1,
1941
+ f
1942
+ );
1943
+ }
1944
+ f = message.getLabel();
1945
+ if (f.length > 0) {
1946
+ writer.writeString(
1947
+ 2,
1948
+ f
1949
+ );
1950
+ }
1951
+ f = message.getExpiresAt();
1952
+ if (f != null) {
1953
+ writer.writeMessage(
1954
+ 3,
1955
+ f,
1956
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
1957
+ );
1958
+ }
1959
+ };
1960
+
1961
+
1962
+ /**
1963
+ * optional int32 count = 1;
1964
+ * @return {number}
1965
+ */
1966
+ proto.gateway.web.v1.GenerateInviteCodesRequest.prototype.getCount = function() {
1967
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
1968
+ };
1969
+
1970
+
1971
+ /**
1972
+ * @param {number} value
1973
+ * @return {!proto.gateway.web.v1.GenerateInviteCodesRequest} returns this
1974
+ */
1975
+ proto.gateway.web.v1.GenerateInviteCodesRequest.prototype.setCount = function(value) {
1976
+ return jspb.Message.setProto3IntField(this, 1, value);
1977
+ };
1978
+
1979
+
1980
+ /**
1981
+ * optional string label = 2;
1982
+ * @return {string}
1983
+ */
1984
+ proto.gateway.web.v1.GenerateInviteCodesRequest.prototype.getLabel = function() {
1985
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1986
+ };
1987
+
1988
+
1989
+ /**
1990
+ * @param {string} value
1991
+ * @return {!proto.gateway.web.v1.GenerateInviteCodesRequest} returns this
1992
+ */
1993
+ proto.gateway.web.v1.GenerateInviteCodesRequest.prototype.setLabel = function(value) {
1994
+ return jspb.Message.setProto3StringField(this, 2, value);
1995
+ };
1996
+
1997
+
1998
+ /**
1999
+ * optional google.protobuf.Timestamp expires_at = 3;
2000
+ * @return {?proto.google.protobuf.Timestamp}
2001
+ */
2002
+ proto.gateway.web.v1.GenerateInviteCodesRequest.prototype.getExpiresAt = function() {
2003
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
2004
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3));
2005
+ };
2006
+
2007
+
2008
+ /**
2009
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
2010
+ * @return {!proto.gateway.web.v1.GenerateInviteCodesRequest} returns this
2011
+ */
2012
+ proto.gateway.web.v1.GenerateInviteCodesRequest.prototype.setExpiresAt = function(value) {
2013
+ return jspb.Message.setWrapperField(this, 3, value);
2014
+ };
2015
+
2016
+
2017
+ /**
2018
+ * Clears the message field making it undefined.
2019
+ * @return {!proto.gateway.web.v1.GenerateInviteCodesRequest} returns this
2020
+ */
2021
+ proto.gateway.web.v1.GenerateInviteCodesRequest.prototype.clearExpiresAt = function() {
2022
+ return this.setExpiresAt(undefined);
2023
+ };
2024
+
2025
+
2026
+ /**
2027
+ * Returns whether this field is set.
2028
+ * @return {boolean}
2029
+ */
2030
+ proto.gateway.web.v1.GenerateInviteCodesRequest.prototype.hasExpiresAt = function() {
2031
+ return jspb.Message.getField(this, 3) != null;
2032
+ };
2033
+
2034
+
2035
+
2036
+ /**
2037
+ * List of repeated fields within this message type.
2038
+ * @private {!Array<number>}
2039
+ * @const
2040
+ */
2041
+ proto.gateway.web.v1.GenerateInviteCodesResponse.repeatedFields_ = [2];
2042
+
2043
+
2044
+
2045
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2046
+ /**
2047
+ * Creates an object representation of this proto.
2048
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2049
+ * Optional fields that are not set will be set to undefined.
2050
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2051
+ * For the list of reserved names please see:
2052
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2053
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2054
+ * JSPB instance for transitional soy proto support:
2055
+ * http://goto/soy-param-migration
2056
+ * @return {!Object}
2057
+ */
2058
+ proto.gateway.web.v1.GenerateInviteCodesResponse.prototype.toObject = function(opt_includeInstance) {
2059
+ return proto.gateway.web.v1.GenerateInviteCodesResponse.toObject(opt_includeInstance, this);
2060
+ };
2061
+
2062
+
2063
+ /**
2064
+ * Static version of the {@see toObject} method.
2065
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2066
+ * the JSPB instance for transitional soy proto support:
2067
+ * http://goto/soy-param-migration
2068
+ * @param {!proto.gateway.web.v1.GenerateInviteCodesResponse} msg The msg instance to transform.
2069
+ * @return {!Object}
2070
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2071
+ */
2072
+ proto.gateway.web.v1.GenerateInviteCodesResponse.toObject = function(includeInstance, msg) {
2073
+ var f, obj = {
2074
+ status: (f = msg.getStatus()) && proto_gateway_common_v1_status_pb.ResponseStatus.toObject(includeInstance, f),
2075
+ codesList: jspb.Message.toObjectList(msg.getCodesList(),
2076
+ proto.gateway.web.v1.InviteCode.toObject, includeInstance)
2077
+ };
2078
+
2079
+ if (includeInstance) {
2080
+ obj.$jspbMessageInstance = msg;
2081
+ }
2082
+ return obj;
2083
+ };
2084
+ }
2085
+
2086
+
2087
+ /**
2088
+ * Deserializes binary data (in protobuf wire format).
2089
+ * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.
2090
+ * @return {!proto.gateway.web.v1.GenerateInviteCodesResponse}
2091
+ */
2092
+ proto.gateway.web.v1.GenerateInviteCodesResponse.deserializeBinary = function(bytes) {
2093
+ var reader = new jspb.BinaryReader(bytes);
2094
+ var msg = new proto.gateway.web.v1.GenerateInviteCodesResponse;
2095
+ return proto.gateway.web.v1.GenerateInviteCodesResponse.deserializeBinaryFromReader(msg, reader);
2096
+ };
2097
+
2098
+
2099
+ /**
2100
+ * Deserializes binary data (in protobuf wire format) from the
2101
+ * given reader into the given message object.
2102
+ * @param {!proto.gateway.web.v1.GenerateInviteCodesResponse} msg The message object to deserialize into.
2103
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2104
+ * @return {!proto.gateway.web.v1.GenerateInviteCodesResponse}
2105
+ */
2106
+ proto.gateway.web.v1.GenerateInviteCodesResponse.deserializeBinaryFromReader = function(msg, reader) {
2107
+ while (reader.nextField()) {
2108
+ if (reader.isEndGroup()) {
2109
+ break;
2110
+ }
2111
+ var field = reader.getFieldNumber();
2112
+ switch (field) {
2113
+ case 1:
2114
+ var value = new proto_gateway_common_v1_status_pb.ResponseStatus;
2115
+ reader.readMessage(value,proto_gateway_common_v1_status_pb.ResponseStatus.deserializeBinaryFromReader);
2116
+ msg.setStatus(value);
2117
+ break;
2118
+ case 2:
2119
+ var value = new proto.gateway.web.v1.InviteCode;
2120
+ reader.readMessage(value,proto.gateway.web.v1.InviteCode.deserializeBinaryFromReader);
2121
+ msg.addCodes(value);
2122
+ break;
2123
+ default:
2124
+ reader.skipField();
2125
+ break;
2126
+ }
2127
+ }
2128
+ return msg;
2129
+ };
2130
+
2131
+
2132
+ /**
2133
+ * Serializes the message to binary data (in protobuf wire format).
2134
+ * @return {!Uint8Array}
2135
+ */
2136
+ proto.gateway.web.v1.GenerateInviteCodesResponse.prototype.serializeBinary = function() {
2137
+ var writer = new jspb.BinaryWriter();
2138
+ proto.gateway.web.v1.GenerateInviteCodesResponse.serializeBinaryToWriter(this, writer);
2139
+ return writer.getResultBuffer();
2140
+ };
2141
+
2142
+
2143
+ /**
2144
+ * Serializes the given message to binary data (in protobuf wire
2145
+ * format), writing to the given BinaryWriter.
2146
+ * @param {!proto.gateway.web.v1.GenerateInviteCodesResponse} message
2147
+ * @param {!jspb.BinaryWriter} writer
2148
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2149
+ */
2150
+ proto.gateway.web.v1.GenerateInviteCodesResponse.serializeBinaryToWriter = function(message, writer) {
2151
+ var f = undefined;
2152
+ f = message.getStatus();
2153
+ if (f != null) {
2154
+ writer.writeMessage(
2155
+ 1,
2156
+ f,
2157
+ proto_gateway_common_v1_status_pb.ResponseStatus.serializeBinaryToWriter
2158
+ );
2159
+ }
2160
+ f = message.getCodesList();
2161
+ if (f.length > 0) {
2162
+ writer.writeRepeatedMessage(
2163
+ 2,
2164
+ f,
2165
+ proto.gateway.web.v1.InviteCode.serializeBinaryToWriter
2166
+ );
2167
+ }
2168
+ };
2169
+
2170
+
2171
+ /**
2172
+ * optional gateway.common.v1.ResponseStatus status = 1;
2173
+ * @return {?proto.gateway.common.v1.ResponseStatus}
2174
+ */
2175
+ proto.gateway.web.v1.GenerateInviteCodesResponse.prototype.getStatus = function() {
2176
+ return /** @type{?proto.gateway.common.v1.ResponseStatus} */ (
2177
+ jspb.Message.getWrapperField(this, proto_gateway_common_v1_status_pb.ResponseStatus, 1));
2178
+ };
2179
+
2180
+
2181
+ /**
2182
+ * @param {?proto.gateway.common.v1.ResponseStatus|undefined} value
2183
+ * @return {!proto.gateway.web.v1.GenerateInviteCodesResponse} returns this
2184
+ */
2185
+ proto.gateway.web.v1.GenerateInviteCodesResponse.prototype.setStatus = function(value) {
2186
+ return jspb.Message.setWrapperField(this, 1, value);
2187
+ };
2188
+
2189
+
2190
+ /**
2191
+ * Clears the message field making it undefined.
2192
+ * @return {!proto.gateway.web.v1.GenerateInviteCodesResponse} returns this
2193
+ */
2194
+ proto.gateway.web.v1.GenerateInviteCodesResponse.prototype.clearStatus = function() {
2195
+ return this.setStatus(undefined);
2196
+ };
2197
+
2198
+
2199
+ /**
2200
+ * Returns whether this field is set.
2201
+ * @return {boolean}
2202
+ */
2203
+ proto.gateway.web.v1.GenerateInviteCodesResponse.prototype.hasStatus = function() {
2204
+ return jspb.Message.getField(this, 1) != null;
2205
+ };
2206
+
2207
+
2208
+ /**
2209
+ * repeated InviteCode codes = 2;
2210
+ * @return {!Array<!proto.gateway.web.v1.InviteCode>}
2211
+ */
2212
+ proto.gateway.web.v1.GenerateInviteCodesResponse.prototype.getCodesList = function() {
2213
+ return /** @type{!Array<!proto.gateway.web.v1.InviteCode>} */ (
2214
+ jspb.Message.getRepeatedWrapperField(this, proto.gateway.web.v1.InviteCode, 2));
2215
+ };
2216
+
2217
+
2218
+ /**
2219
+ * @param {!Array<!proto.gateway.web.v1.InviteCode>} value
2220
+ * @return {!proto.gateway.web.v1.GenerateInviteCodesResponse} returns this
2221
+ */
2222
+ proto.gateway.web.v1.GenerateInviteCodesResponse.prototype.setCodesList = function(value) {
2223
+ return jspb.Message.setRepeatedWrapperField(this, 2, value);
2224
+ };
2225
+
2226
+
2227
+ /**
2228
+ * @param {!proto.gateway.web.v1.InviteCode=} opt_value
2229
+ * @param {number=} opt_index
2230
+ * @return {!proto.gateway.web.v1.InviteCode}
2231
+ */
2232
+ proto.gateway.web.v1.GenerateInviteCodesResponse.prototype.addCodes = function(opt_value, opt_index) {
2233
+ return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.gateway.web.v1.InviteCode, opt_index);
2234
+ };
2235
+
2236
+
2237
+ /**
2238
+ * Clears the list making it empty but non-null.
2239
+ * @return {!proto.gateway.web.v1.GenerateInviteCodesResponse} returns this
2240
+ */
2241
+ proto.gateway.web.v1.GenerateInviteCodesResponse.prototype.clearCodesList = function() {
2242
+ return this.setCodesList([]);
2243
+ };
2244
+
2245
+
2246
+
2247
+
2248
+
2249
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2250
+ /**
2251
+ * Creates an object representation of this proto.
2252
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2253
+ * Optional fields that are not set will be set to undefined.
2254
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2255
+ * For the list of reserved names please see:
2256
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2257
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2258
+ * JSPB instance for transitional soy proto support:
2259
+ * http://goto/soy-param-migration
2260
+ * @return {!Object}
2261
+ */
2262
+ proto.gateway.web.v1.ListInviteCodesRequest.prototype.toObject = function(opt_includeInstance) {
2263
+ return proto.gateway.web.v1.ListInviteCodesRequest.toObject(opt_includeInstance, this);
2264
+ };
2265
+
2266
+
2267
+ /**
2268
+ * Static version of the {@see toObject} method.
2269
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2270
+ * the JSPB instance for transitional soy proto support:
2271
+ * http://goto/soy-param-migration
2272
+ * @param {!proto.gateway.web.v1.ListInviteCodesRequest} msg The msg instance to transform.
2273
+ * @return {!Object}
2274
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2275
+ */
2276
+ proto.gateway.web.v1.ListInviteCodesRequest.toObject = function(includeInstance, msg) {
2277
+ var f, obj = {
2278
+
2279
+ };
2280
+
2281
+ if (includeInstance) {
2282
+ obj.$jspbMessageInstance = msg;
2283
+ }
2284
+ return obj;
2285
+ };
2286
+ }
2287
+
2288
+
2289
+ /**
2290
+ * Deserializes binary data (in protobuf wire format).
2291
+ * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.
2292
+ * @return {!proto.gateway.web.v1.ListInviteCodesRequest}
2293
+ */
2294
+ proto.gateway.web.v1.ListInviteCodesRequest.deserializeBinary = function(bytes) {
2295
+ var reader = new jspb.BinaryReader(bytes);
2296
+ var msg = new proto.gateway.web.v1.ListInviteCodesRequest;
2297
+ return proto.gateway.web.v1.ListInviteCodesRequest.deserializeBinaryFromReader(msg, reader);
2298
+ };
2299
+
2300
+
2301
+ /**
2302
+ * Deserializes binary data (in protobuf wire format) from the
2303
+ * given reader into the given message object.
2304
+ * @param {!proto.gateway.web.v1.ListInviteCodesRequest} msg The message object to deserialize into.
2305
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2306
+ * @return {!proto.gateway.web.v1.ListInviteCodesRequest}
2307
+ */
2308
+ proto.gateway.web.v1.ListInviteCodesRequest.deserializeBinaryFromReader = function(msg, reader) {
2309
+ while (reader.nextField()) {
2310
+ if (reader.isEndGroup()) {
2311
+ break;
2312
+ }
2313
+ var field = reader.getFieldNumber();
2314
+ switch (field) {
2315
+ default:
2316
+ reader.skipField();
2317
+ break;
2318
+ }
2319
+ }
2320
+ return msg;
2321
+ };
2322
+
2323
+
2324
+ /**
2325
+ * Serializes the message to binary data (in protobuf wire format).
2326
+ * @return {!Uint8Array}
2327
+ */
2328
+ proto.gateway.web.v1.ListInviteCodesRequest.prototype.serializeBinary = function() {
2329
+ var writer = new jspb.BinaryWriter();
2330
+ proto.gateway.web.v1.ListInviteCodesRequest.serializeBinaryToWriter(this, writer);
2331
+ return writer.getResultBuffer();
2332
+ };
2333
+
2334
+
2335
+ /**
2336
+ * Serializes the given message to binary data (in protobuf wire
2337
+ * format), writing to the given BinaryWriter.
2338
+ * @param {!proto.gateway.web.v1.ListInviteCodesRequest} message
2339
+ * @param {!jspb.BinaryWriter} writer
2340
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2341
+ */
2342
+ proto.gateway.web.v1.ListInviteCodesRequest.serializeBinaryToWriter = function(message, writer) {
2343
+ var f = undefined;
2344
+ };
2345
+
2346
+
2347
+
2348
+ /**
2349
+ * List of repeated fields within this message type.
2350
+ * @private {!Array<number>}
2351
+ * @const
2352
+ */
2353
+ proto.gateway.web.v1.ListInviteCodesResponse.repeatedFields_ = [2];
2354
+
2355
+
2356
+
2357
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2358
+ /**
2359
+ * Creates an object representation of this proto.
2360
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2361
+ * Optional fields that are not set will be set to undefined.
2362
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2363
+ * For the list of reserved names please see:
2364
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2365
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2366
+ * JSPB instance for transitional soy proto support:
2367
+ * http://goto/soy-param-migration
2368
+ * @return {!Object}
2369
+ */
2370
+ proto.gateway.web.v1.ListInviteCodesResponse.prototype.toObject = function(opt_includeInstance) {
2371
+ return proto.gateway.web.v1.ListInviteCodesResponse.toObject(opt_includeInstance, this);
2372
+ };
2373
+
2374
+
2375
+ /**
2376
+ * Static version of the {@see toObject} method.
2377
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2378
+ * the JSPB instance for transitional soy proto support:
2379
+ * http://goto/soy-param-migration
2380
+ * @param {!proto.gateway.web.v1.ListInviteCodesResponse} msg The msg instance to transform.
2381
+ * @return {!Object}
2382
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2383
+ */
2384
+ proto.gateway.web.v1.ListInviteCodesResponse.toObject = function(includeInstance, msg) {
2385
+ var f, obj = {
2386
+ status: (f = msg.getStatus()) && proto_gateway_common_v1_status_pb.ResponseStatus.toObject(includeInstance, f),
2387
+ codesList: jspb.Message.toObjectList(msg.getCodesList(),
2388
+ proto.gateway.web.v1.InviteCode.toObject, includeInstance)
2389
+ };
2390
+
2391
+ if (includeInstance) {
2392
+ obj.$jspbMessageInstance = msg;
2393
+ }
2394
+ return obj;
2395
+ };
2396
+ }
2397
+
2398
+
2399
+ /**
2400
+ * Deserializes binary data (in protobuf wire format).
2401
+ * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.
2402
+ * @return {!proto.gateway.web.v1.ListInviteCodesResponse}
2403
+ */
2404
+ proto.gateway.web.v1.ListInviteCodesResponse.deserializeBinary = function(bytes) {
2405
+ var reader = new jspb.BinaryReader(bytes);
2406
+ var msg = new proto.gateway.web.v1.ListInviteCodesResponse;
2407
+ return proto.gateway.web.v1.ListInviteCodesResponse.deserializeBinaryFromReader(msg, reader);
2408
+ };
2409
+
2410
+
2411
+ /**
2412
+ * Deserializes binary data (in protobuf wire format) from the
2413
+ * given reader into the given message object.
2414
+ * @param {!proto.gateway.web.v1.ListInviteCodesResponse} msg The message object to deserialize into.
2415
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2416
+ * @return {!proto.gateway.web.v1.ListInviteCodesResponse}
2417
+ */
2418
+ proto.gateway.web.v1.ListInviteCodesResponse.deserializeBinaryFromReader = function(msg, reader) {
2419
+ while (reader.nextField()) {
2420
+ if (reader.isEndGroup()) {
2421
+ break;
2422
+ }
2423
+ var field = reader.getFieldNumber();
2424
+ switch (field) {
2425
+ case 1:
2426
+ var value = new proto_gateway_common_v1_status_pb.ResponseStatus;
2427
+ reader.readMessage(value,proto_gateway_common_v1_status_pb.ResponseStatus.deserializeBinaryFromReader);
2428
+ msg.setStatus(value);
2429
+ break;
2430
+ case 2:
2431
+ var value = new proto.gateway.web.v1.InviteCode;
2432
+ reader.readMessage(value,proto.gateway.web.v1.InviteCode.deserializeBinaryFromReader);
2433
+ msg.addCodes(value);
2434
+ break;
2435
+ default:
2436
+ reader.skipField();
2437
+ break;
2438
+ }
2439
+ }
2440
+ return msg;
2441
+ };
2442
+
2443
+
2444
+ /**
2445
+ * Serializes the message to binary data (in protobuf wire format).
2446
+ * @return {!Uint8Array}
2447
+ */
2448
+ proto.gateway.web.v1.ListInviteCodesResponse.prototype.serializeBinary = function() {
2449
+ var writer = new jspb.BinaryWriter();
2450
+ proto.gateway.web.v1.ListInviteCodesResponse.serializeBinaryToWriter(this, writer);
2451
+ return writer.getResultBuffer();
2452
+ };
2453
+
2454
+
2455
+ /**
2456
+ * Serializes the given message to binary data (in protobuf wire
2457
+ * format), writing to the given BinaryWriter.
2458
+ * @param {!proto.gateway.web.v1.ListInviteCodesResponse} message
2459
+ * @param {!jspb.BinaryWriter} writer
2460
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2461
+ */
2462
+ proto.gateway.web.v1.ListInviteCodesResponse.serializeBinaryToWriter = function(message, writer) {
2463
+ var f = undefined;
2464
+ f = message.getStatus();
2465
+ if (f != null) {
2466
+ writer.writeMessage(
2467
+ 1,
2468
+ f,
2469
+ proto_gateway_common_v1_status_pb.ResponseStatus.serializeBinaryToWriter
2470
+ );
2471
+ }
2472
+ f = message.getCodesList();
2473
+ if (f.length > 0) {
2474
+ writer.writeRepeatedMessage(
2475
+ 2,
2476
+ f,
2477
+ proto.gateway.web.v1.InviteCode.serializeBinaryToWriter
2478
+ );
2479
+ }
2480
+ };
2481
+
2482
+
2483
+ /**
2484
+ * optional gateway.common.v1.ResponseStatus status = 1;
2485
+ * @return {?proto.gateway.common.v1.ResponseStatus}
2486
+ */
2487
+ proto.gateway.web.v1.ListInviteCodesResponse.prototype.getStatus = function() {
2488
+ return /** @type{?proto.gateway.common.v1.ResponseStatus} */ (
2489
+ jspb.Message.getWrapperField(this, proto_gateway_common_v1_status_pb.ResponseStatus, 1));
2490
+ };
2491
+
2492
+
2493
+ /**
2494
+ * @param {?proto.gateway.common.v1.ResponseStatus|undefined} value
2495
+ * @return {!proto.gateway.web.v1.ListInviteCodesResponse} returns this
2496
+ */
2497
+ proto.gateway.web.v1.ListInviteCodesResponse.prototype.setStatus = function(value) {
2498
+ return jspb.Message.setWrapperField(this, 1, value);
2499
+ };
2500
+
2501
+
2502
+ /**
2503
+ * Clears the message field making it undefined.
2504
+ * @return {!proto.gateway.web.v1.ListInviteCodesResponse} returns this
2505
+ */
2506
+ proto.gateway.web.v1.ListInviteCodesResponse.prototype.clearStatus = function() {
2507
+ return this.setStatus(undefined);
2508
+ };
2509
+
2510
+
2511
+ /**
2512
+ * Returns whether this field is set.
2513
+ * @return {boolean}
2514
+ */
2515
+ proto.gateway.web.v1.ListInviteCodesResponse.prototype.hasStatus = function() {
2516
+ return jspb.Message.getField(this, 1) != null;
2517
+ };
2518
+
2519
+
2520
+ /**
2521
+ * repeated InviteCode codes = 2;
2522
+ * @return {!Array<!proto.gateway.web.v1.InviteCode>}
2523
+ */
2524
+ proto.gateway.web.v1.ListInviteCodesResponse.prototype.getCodesList = function() {
2525
+ return /** @type{!Array<!proto.gateway.web.v1.InviteCode>} */ (
2526
+ jspb.Message.getRepeatedWrapperField(this, proto.gateway.web.v1.InviteCode, 2));
2527
+ };
2528
+
2529
+
2530
+ /**
2531
+ * @param {!Array<!proto.gateway.web.v1.InviteCode>} value
2532
+ * @return {!proto.gateway.web.v1.ListInviteCodesResponse} returns this
2533
+ */
2534
+ proto.gateway.web.v1.ListInviteCodesResponse.prototype.setCodesList = function(value) {
2535
+ return jspb.Message.setRepeatedWrapperField(this, 2, value);
2536
+ };
2537
+
2538
+
2539
+ /**
2540
+ * @param {!proto.gateway.web.v1.InviteCode=} opt_value
2541
+ * @param {number=} opt_index
2542
+ * @return {!proto.gateway.web.v1.InviteCode}
2543
+ */
2544
+ proto.gateway.web.v1.ListInviteCodesResponse.prototype.addCodes = function(opt_value, opt_index) {
2545
+ return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.gateway.web.v1.InviteCode, opt_index);
2546
+ };
2547
+
2548
+
2549
+ /**
2550
+ * Clears the list making it empty but non-null.
2551
+ * @return {!proto.gateway.web.v1.ListInviteCodesResponse} returns this
2552
+ */
2553
+ proto.gateway.web.v1.ListInviteCodesResponse.prototype.clearCodesList = function() {
2554
+ return this.setCodesList([]);
2555
+ };
2556
+
2557
+
2558
+ /**
2559
+ * @enum {number}
2560
+ */
2561
+ proto.gateway.web.v1.InviteCodeState = {
2562
+ INVITE_CODE_STATE_UNSPECIFIED: 0,
2563
+ INVITE_CODE_STATE_AVAILABLE: 1,
2564
+ INVITE_CODE_STATE_RESERVED: 2,
2565
+ INVITE_CODE_STATE_REDEEMED: 3,
2566
+ INVITE_CODE_STATE_EXPIRED: 4,
2567
+ INVITE_CODE_STATE_REVOKED: 5
2568
+ };
2569
+
2570
+ goog.object.extend(exports, proto.gateway.web.v1);