@miradorlabs/web-grpc 3.1.0 → 3.2.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.
@@ -19,14 +19,9 @@ var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/time
19
19
  goog.object.extend(proto, google_protobuf_timestamp_pb);
20
20
  var proto_gateway_common_v1_status_pb = require('../../../../proto/gateway/common/v1/status_pb.js');
21
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
22
  goog.exportSymbol('proto.gateway.web.v1.GetUserBetaStatusRequest', null, global);
25
23
  goog.exportSymbol('proto.gateway.web.v1.GetUserBetaStatusResponse', null, global);
26
- goog.exportSymbol('proto.gateway.web.v1.InviteCode', null, global);
27
24
  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
25
  goog.exportSymbol('proto.gateway.web.v1.RedeemInviteCodeRequest', null, global);
31
26
  goog.exportSymbol('proto.gateway.web.v1.RedeemInviteCodeResponse', null, global);
32
27
  goog.exportSymbol('proto.gateway.web.v1.ReserveInviteCodeRequest', null, global);
@@ -73,27 +68,6 @@ if (goog.DEBUG && !COMPILED) {
73
68
  */
74
69
  proto.gateway.web.v1.GetUserBetaStatusResponse.displayName = 'proto.gateway.web.v1.GetUserBetaStatusResponse';
75
70
  }
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
71
  /**
98
72
  * Generated by JsPbCodeGenerator.
99
73
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -178,90 +152,6 @@ if (goog.DEBUG && !COMPILED) {
178
152
  */
179
153
  proto.gateway.web.v1.RedeemInviteCodeResponse.displayName = 'proto.gateway.web.v1.RedeemInviteCodeResponse';
180
154
  }
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
155
 
266
156
 
267
157
 
@@ -560,8 +450,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
560
450
  * http://goto/soy-param-migration
561
451
  * @return {!Object}
562
452
  */
563
- proto.gateway.web.v1.InviteCode.prototype.toObject = function(opt_includeInstance) {
564
- return proto.gateway.web.v1.InviteCode.toObject(opt_includeInstance, this);
453
+ proto.gateway.web.v1.ReserveInviteCodeRequest.prototype.toObject = function(opt_includeInstance) {
454
+ return proto.gateway.web.v1.ReserveInviteCodeRequest.toObject(opt_includeInstance, this);
565
455
  };
566
456
 
567
457
 
@@ -570,21 +460,15 @@ proto.gateway.web.v1.InviteCode.prototype.toObject = function(opt_includeInstanc
570
460
  * @param {boolean|undefined} includeInstance Deprecated. Whether to include
571
461
  * the JSPB instance for transitional soy proto support:
572
462
  * http://goto/soy-param-migration
573
- * @param {!proto.gateway.web.v1.InviteCode} msg The msg instance to transform.
463
+ * @param {!proto.gateway.web.v1.ReserveInviteCodeRequest} msg The msg instance to transform.
574
464
  * @return {!Object}
575
465
  * @suppress {unusedLocalVariables} f is only used for nested messages
576
466
  */
577
- proto.gateway.web.v1.InviteCode.toObject = function(includeInstance, msg) {
467
+ proto.gateway.web.v1.ReserveInviteCodeRequest.toObject = function(includeInstance, msg) {
578
468
  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)
469
+ code: jspb.Message.getFieldWithDefault(msg, 1, ""),
470
+ ttlSeconds: jspb.Message.getFieldWithDefault(msg, 2, 0),
471
+ reservationToken: jspb.Message.getFieldWithDefault(msg, 3, "")
588
472
  };
589
473
 
590
474
  if (includeInstance) {
@@ -598,23 +482,23 @@ redeemedAt: (f = msg.getRedeemedAt()) && google_protobuf_timestamp_pb.Timestamp.
598
482
  /**
599
483
  * Deserializes binary data (in protobuf wire format).
600
484
  * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.
601
- * @return {!proto.gateway.web.v1.InviteCode}
485
+ * @return {!proto.gateway.web.v1.ReserveInviteCodeRequest}
602
486
  */
603
- proto.gateway.web.v1.InviteCode.deserializeBinary = function(bytes) {
487
+ proto.gateway.web.v1.ReserveInviteCodeRequest.deserializeBinary = function(bytes) {
604
488
  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);
489
+ var msg = new proto.gateway.web.v1.ReserveInviteCodeRequest;
490
+ return proto.gateway.web.v1.ReserveInviteCodeRequest.deserializeBinaryFromReader(msg, reader);
607
491
  };
608
492
 
609
493
 
610
494
  /**
611
495
  * Deserializes binary data (in protobuf wire format) from the
612
496
  * given reader into the given message object.
613
- * @param {!proto.gateway.web.v1.InviteCode} msg The message object to deserialize into.
497
+ * @param {!proto.gateway.web.v1.ReserveInviteCodeRequest} msg The message object to deserialize into.
614
498
  * @param {!jspb.BinaryReader} reader The BinaryReader to use.
615
- * @return {!proto.gateway.web.v1.InviteCode}
499
+ * @return {!proto.gateway.web.v1.ReserveInviteCodeRequest}
616
500
  */
617
- proto.gateway.web.v1.InviteCode.deserializeBinaryFromReader = function(msg, reader) {
501
+ proto.gateway.web.v1.ReserveInviteCodeRequest.deserializeBinaryFromReader = function(msg, reader) {
618
502
  while (reader.nextField()) {
619
503
  if (reader.isEndGroup()) {
620
504
  break;
@@ -623,43 +507,15 @@ proto.gateway.web.v1.InviteCode.deserializeBinaryFromReader = function(msg, read
623
507
  switch (field) {
624
508
  case 1:
625
509
  var value = /** @type {string} */ (reader.readStringRequireUtf8());
626
- msg.setId(value);
510
+ msg.setCode(value);
627
511
  break;
628
512
  case 2:
629
- var value = /** @type {string} */ (reader.readStringRequireUtf8());
630
- msg.setCode(value);
513
+ var value = /** @type {number} */ (reader.readInt32());
514
+ msg.setTtlSeconds(value);
631
515
  break;
632
516
  case 3:
633
- var value = /** @type {!proto.gateway.web.v1.InviteCodeState} */ (reader.readEnum());
634
- msg.setState(value);
635
- break;
636
- case 4:
637
517
  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);
518
+ msg.setReservationToken(value);
663
519
  break;
664
520
  default:
665
521
  reader.skipField();
@@ -674,9 +530,9 @@ proto.gateway.web.v1.InviteCode.deserializeBinaryFromReader = function(msg, read
674
530
  * Serializes the message to binary data (in protobuf wire format).
675
531
  * @return {!Uint8Array}
676
532
  */
677
- proto.gateway.web.v1.InviteCode.prototype.serializeBinary = function() {
533
+ proto.gateway.web.v1.ReserveInviteCodeRequest.prototype.serializeBinary = function() {
678
534
  var writer = new jspb.BinaryWriter();
679
- proto.gateway.web.v1.InviteCode.serializeBinaryToWriter(this, writer);
535
+ proto.gateway.web.v1.ReserveInviteCodeRequest.serializeBinaryToWriter(this, writer);
680
536
  return writer.getResultBuffer();
681
537
  };
682
538
 
@@ -684,1426 +540,157 @@ proto.gateway.web.v1.InviteCode.prototype.serializeBinary = function() {
684
540
  /**
685
541
  * Serializes the given message to binary data (in protobuf wire
686
542
  * format), writing to the given BinaryWriter.
687
- * @param {!proto.gateway.web.v1.InviteCode} message
543
+ * @param {!proto.gateway.web.v1.ReserveInviteCodeRequest} message
688
544
  * @param {!jspb.BinaryWriter} writer
689
545
  * @suppress {unusedLocalVariables} f is only used for nested messages
690
546
  */
691
- proto.gateway.web.v1.InviteCode.serializeBinaryToWriter = function(message, writer) {
547
+ proto.gateway.web.v1.ReserveInviteCodeRequest.serializeBinaryToWriter = function(message, writer) {
692
548
  var f = undefined;
693
- f = message.getId();
549
+ f = message.getCode();
694
550
  if (f.length > 0) {
695
551
  writer.writeString(
696
552
  1,
697
553
  f
698
554
  );
699
555
  }
700
- f = message.getCode();
701
- if (f.length > 0) {
702
- writer.writeString(
556
+ f = message.getTtlSeconds();
557
+ if (f !== 0) {
558
+ writer.writeInt32(
703
559
  2,
704
560
  f
705
561
  );
706
562
  }
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();
563
+ f = message.getReservationToken();
722
564
  if (f.length > 0) {
723
565
  writer.writeString(
724
- 5,
566
+ 3,
725
567
  f
726
568
  );
727
569
  }
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
570
  };
761
571
 
762
572
 
763
573
  /**
764
- * optional string id = 1;
574
+ * optional string code = 1;
765
575
  * @return {string}
766
576
  */
767
- proto.gateway.web.v1.InviteCode.prototype.getId = function() {
577
+ proto.gateway.web.v1.ReserveInviteCodeRequest.prototype.getCode = function() {
768
578
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
769
579
  };
770
580
 
771
581
 
772
582
  /**
773
583
  * @param {string} value
774
- * @return {!proto.gateway.web.v1.InviteCode} returns this
584
+ * @return {!proto.gateway.web.v1.ReserveInviteCodeRequest} returns this
775
585
  */
776
- proto.gateway.web.v1.InviteCode.prototype.setId = function(value) {
586
+ proto.gateway.web.v1.ReserveInviteCodeRequest.prototype.setCode = function(value) {
777
587
  return jspb.Message.setProto3StringField(this, 1, value);
778
588
  };
779
589
 
780
590
 
781
591
  /**
782
- * optional string code = 2;
783
- * @return {string}
592
+ * optional int32 ttl_seconds = 2;
593
+ * @return {number}
784
594
  */
785
- proto.gateway.web.v1.InviteCode.prototype.getCode = function() {
786
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
595
+ proto.gateway.web.v1.ReserveInviteCodeRequest.prototype.getTtlSeconds = function() {
596
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
787
597
  };
788
598
 
789
599
 
790
600
  /**
791
- * @param {string} value
792
- * @return {!proto.gateway.web.v1.InviteCode} returns this
601
+ * @param {number} value
602
+ * @return {!proto.gateway.web.v1.ReserveInviteCodeRequest} returns this
793
603
  */
794
- proto.gateway.web.v1.InviteCode.prototype.setCode = function(value) {
795
- return jspb.Message.setProto3StringField(this, 2, value);
604
+ proto.gateway.web.v1.ReserveInviteCodeRequest.prototype.setTtlSeconds = function(value) {
605
+ return jspb.Message.setProto3IntField(this, 2, value);
796
606
  };
797
607
 
798
608
 
799
609
  /**
800
- * optional InviteCodeState state = 3;
801
- * @return {!proto.gateway.web.v1.InviteCodeState}
610
+ * optional string reservation_token = 3;
611
+ * @return {string}
802
612
  */
803
- proto.gateway.web.v1.InviteCode.prototype.getState = function() {
804
- return /** @type {!proto.gateway.web.v1.InviteCodeState} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
613
+ proto.gateway.web.v1.ReserveInviteCodeRequest.prototype.getReservationToken = function() {
614
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
805
615
  };
806
616
 
807
617
 
808
618
  /**
809
- * @param {!proto.gateway.web.v1.InviteCodeState} value
810
- * @return {!proto.gateway.web.v1.InviteCode} returns this
619
+ * @param {string} value
620
+ * @return {!proto.gateway.web.v1.ReserveInviteCodeRequest} returns this
811
621
  */
812
- proto.gateway.web.v1.InviteCode.prototype.setState = function(value) {
813
- return jspb.Message.setProto3EnumField(this, 3, value);
622
+ proto.gateway.web.v1.ReserveInviteCodeRequest.prototype.setReservationToken = function(value) {
623
+ return jspb.Message.setProto3StringField(this, 3, value);
814
624
  };
815
625
 
816
626
 
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
627
 
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
628
 
834
629
 
630
+ if (jspb.Message.GENERATE_TO_OBJECT) {
835
631
  /**
836
- * optional string redeemed_by_user_id = 5;
837
- * @return {string}
632
+ * Creates an object representation of this proto.
633
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
634
+ * Optional fields that are not set will be set to undefined.
635
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
636
+ * For the list of reserved names please see:
637
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
638
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
639
+ * JSPB instance for transitional soy proto support:
640
+ * http://goto/soy-param-migration
641
+ * @return {!Object}
838
642
  */
839
- proto.gateway.web.v1.InviteCode.prototype.getRedeemedByUserId = function() {
840
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
643
+ proto.gateway.web.v1.ReserveInviteCodeResponse.prototype.toObject = function(opt_includeInstance) {
644
+ return proto.gateway.web.v1.ReserveInviteCodeResponse.toObject(opt_includeInstance, this);
841
645
  };
842
646
 
843
647
 
844
648
  /**
845
- * @param {string} value
846
- * @return {!proto.gateway.web.v1.InviteCode} returns this
649
+ * Static version of the {@see toObject} method.
650
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
651
+ * the JSPB instance for transitional soy proto support:
652
+ * http://goto/soy-param-migration
653
+ * @param {!proto.gateway.web.v1.ReserveInviteCodeResponse} msg The msg instance to transform.
654
+ * @return {!Object}
655
+ * @suppress {unusedLocalVariables} f is only used for nested messages
847
656
  */
848
- proto.gateway.web.v1.InviteCode.prototype.setRedeemedByUserId = function(value) {
849
- return jspb.Message.setProto3StringField(this, 5, value);
657
+ proto.gateway.web.v1.ReserveInviteCodeResponse.toObject = function(includeInstance, msg) {
658
+ var f, obj = {
659
+ status: (f = msg.getStatus()) && proto_gateway_common_v1_status_pb.ResponseStatus.toObject(includeInstance, f),
660
+ reserved: jspb.Message.getBooleanFieldWithDefault(msg, 2, false),
661
+ state: jspb.Message.getFieldWithDefault(msg, 3, 0),
662
+ reservationToken: jspb.Message.getFieldWithDefault(msg, 4, ""),
663
+ expiresAt: (f = msg.getExpiresAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
664
+ };
665
+
666
+ if (includeInstance) {
667
+ obj.$jspbMessageInstance = msg;
668
+ }
669
+ return obj;
850
670
  };
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
- }
671
+ }
2085
672
 
2086
673
 
2087
674
  /**
2088
675
  * Deserializes binary data (in protobuf wire format).
2089
676
  * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.
2090
- * @return {!proto.gateway.web.v1.GenerateInviteCodesResponse}
677
+ * @return {!proto.gateway.web.v1.ReserveInviteCodeResponse}
2091
678
  */
2092
- proto.gateway.web.v1.GenerateInviteCodesResponse.deserializeBinary = function(bytes) {
679
+ proto.gateway.web.v1.ReserveInviteCodeResponse.deserializeBinary = function(bytes) {
2093
680
  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);
681
+ var msg = new proto.gateway.web.v1.ReserveInviteCodeResponse;
682
+ return proto.gateway.web.v1.ReserveInviteCodeResponse.deserializeBinaryFromReader(msg, reader);
2096
683
  };
2097
684
 
2098
685
 
2099
686
  /**
2100
687
  * Deserializes binary data (in protobuf wire format) from the
2101
688
  * given reader into the given message object.
2102
- * @param {!proto.gateway.web.v1.GenerateInviteCodesResponse} msg The message object to deserialize into.
689
+ * @param {!proto.gateway.web.v1.ReserveInviteCodeResponse} msg The message object to deserialize into.
2103
690
  * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2104
- * @return {!proto.gateway.web.v1.GenerateInviteCodesResponse}
691
+ * @return {!proto.gateway.web.v1.ReserveInviteCodeResponse}
2105
692
  */
2106
- proto.gateway.web.v1.GenerateInviteCodesResponse.deserializeBinaryFromReader = function(msg, reader) {
693
+ proto.gateway.web.v1.ReserveInviteCodeResponse.deserializeBinaryFromReader = function(msg, reader) {
2107
694
  while (reader.nextField()) {
2108
695
  if (reader.isEndGroup()) {
2109
696
  break;
@@ -2116,9 +703,21 @@ proto.gateway.web.v1.GenerateInviteCodesResponse.deserializeBinaryFromReader = f
2116
703
  msg.setStatus(value);
2117
704
  break;
2118
705
  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);
706
+ var value = /** @type {boolean} */ (reader.readBool());
707
+ msg.setReserved(value);
708
+ break;
709
+ case 3:
710
+ var value = /** @type {!proto.gateway.web.v1.InviteCodeState} */ (reader.readEnum());
711
+ msg.setState(value);
712
+ break;
713
+ case 4:
714
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
715
+ msg.setReservationToken(value);
716
+ break;
717
+ case 5:
718
+ var value = new google_protobuf_timestamp_pb.Timestamp;
719
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
720
+ msg.setExpiresAt(value);
2122
721
  break;
2123
722
  default:
2124
723
  reader.skipField();
@@ -2133,9 +732,9 @@ proto.gateway.web.v1.GenerateInviteCodesResponse.deserializeBinaryFromReader = f
2133
732
  * Serializes the message to binary data (in protobuf wire format).
2134
733
  * @return {!Uint8Array}
2135
734
  */
2136
- proto.gateway.web.v1.GenerateInviteCodesResponse.prototype.serializeBinary = function() {
735
+ proto.gateway.web.v1.ReserveInviteCodeResponse.prototype.serializeBinary = function() {
2137
736
  var writer = new jspb.BinaryWriter();
2138
- proto.gateway.web.v1.GenerateInviteCodesResponse.serializeBinaryToWriter(this, writer);
737
+ proto.gateway.web.v1.ReserveInviteCodeResponse.serializeBinaryToWriter(this, writer);
2139
738
  return writer.getResultBuffer();
2140
739
  };
2141
740
 
@@ -2143,11 +742,11 @@ proto.gateway.web.v1.GenerateInviteCodesResponse.prototype.serializeBinary = fun
2143
742
  /**
2144
743
  * Serializes the given message to binary data (in protobuf wire
2145
744
  * format), writing to the given BinaryWriter.
2146
- * @param {!proto.gateway.web.v1.GenerateInviteCodesResponse} message
745
+ * @param {!proto.gateway.web.v1.ReserveInviteCodeResponse} message
2147
746
  * @param {!jspb.BinaryWriter} writer
2148
747
  * @suppress {unusedLocalVariables} f is only used for nested messages
2149
748
  */
2150
- proto.gateway.web.v1.GenerateInviteCodesResponse.serializeBinaryToWriter = function(message, writer) {
749
+ proto.gateway.web.v1.ReserveInviteCodeResponse.serializeBinaryToWriter = function(message, writer) {
2151
750
  var f = undefined;
2152
751
  f = message.getStatus();
2153
752
  if (f != null) {
@@ -2157,12 +756,33 @@ proto.gateway.web.v1.GenerateInviteCodesResponse.serializeBinaryToWriter = funct
2157
756
  proto_gateway_common_v1_status_pb.ResponseStatus.serializeBinaryToWriter
2158
757
  );
2159
758
  }
2160
- f = message.getCodesList();
2161
- if (f.length > 0) {
2162
- writer.writeRepeatedMessage(
759
+ f = message.getReserved();
760
+ if (f) {
761
+ writer.writeBool(
2163
762
  2,
763
+ f
764
+ );
765
+ }
766
+ f = message.getState();
767
+ if (f !== 0.0) {
768
+ writer.writeEnum(
769
+ 3,
770
+ f
771
+ );
772
+ }
773
+ f = message.getReservationToken();
774
+ if (f.length > 0) {
775
+ writer.writeString(
776
+ 4,
777
+ f
778
+ );
779
+ }
780
+ f = message.getExpiresAt();
781
+ if (f != null) {
782
+ writer.writeMessage(
783
+ 5,
2164
784
  f,
2165
- proto.gateway.web.v1.InviteCode.serializeBinaryToWriter
785
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
2166
786
  );
2167
787
  }
2168
788
  };
@@ -2172,7 +792,7 @@ proto.gateway.web.v1.GenerateInviteCodesResponse.serializeBinaryToWriter = funct
2172
792
  * optional gateway.common.v1.ResponseStatus status = 1;
2173
793
  * @return {?proto.gateway.common.v1.ResponseStatus}
2174
794
  */
2175
- proto.gateway.web.v1.GenerateInviteCodesResponse.prototype.getStatus = function() {
795
+ proto.gateway.web.v1.ReserveInviteCodeResponse.prototype.getStatus = function() {
2176
796
  return /** @type{?proto.gateway.common.v1.ResponseStatus} */ (
2177
797
  jspb.Message.getWrapperField(this, proto_gateway_common_v1_status_pb.ResponseStatus, 1));
2178
798
  };
@@ -2180,18 +800,18 @@ proto.gateway.web.v1.GenerateInviteCodesResponse.prototype.getStatus = function(
2180
800
 
2181
801
  /**
2182
802
  * @param {?proto.gateway.common.v1.ResponseStatus|undefined} value
2183
- * @return {!proto.gateway.web.v1.GenerateInviteCodesResponse} returns this
803
+ * @return {!proto.gateway.web.v1.ReserveInviteCodeResponse} returns this
2184
804
  */
2185
- proto.gateway.web.v1.GenerateInviteCodesResponse.prototype.setStatus = function(value) {
805
+ proto.gateway.web.v1.ReserveInviteCodeResponse.prototype.setStatus = function(value) {
2186
806
  return jspb.Message.setWrapperField(this, 1, value);
2187
807
  };
2188
808
 
2189
809
 
2190
810
  /**
2191
811
  * Clears the message field making it undefined.
2192
- * @return {!proto.gateway.web.v1.GenerateInviteCodesResponse} returns this
812
+ * @return {!proto.gateway.web.v1.ReserveInviteCodeResponse} returns this
2193
813
  */
2194
- proto.gateway.web.v1.GenerateInviteCodesResponse.prototype.clearStatus = function() {
814
+ proto.gateway.web.v1.ReserveInviteCodeResponse.prototype.clearStatus = function() {
2195
815
  return this.setStatus(undefined);
2196
816
  };
2197
817
 
@@ -2200,46 +820,99 @@ proto.gateway.web.v1.GenerateInviteCodesResponse.prototype.clearStatus = functio
2200
820
  * Returns whether this field is set.
2201
821
  * @return {boolean}
2202
822
  */
2203
- proto.gateway.web.v1.GenerateInviteCodesResponse.prototype.hasStatus = function() {
823
+ proto.gateway.web.v1.ReserveInviteCodeResponse.prototype.hasStatus = function() {
2204
824
  return jspb.Message.getField(this, 1) != null;
2205
825
  };
2206
826
 
2207
827
 
2208
828
  /**
2209
- * repeated InviteCode codes = 2;
2210
- * @return {!Array<!proto.gateway.web.v1.InviteCode>}
829
+ * optional bool reserved = 2;
830
+ * @return {boolean}
831
+ */
832
+ proto.gateway.web.v1.ReserveInviteCodeResponse.prototype.getReserved = function() {
833
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));
834
+ };
835
+
836
+
837
+ /**
838
+ * @param {boolean} value
839
+ * @return {!proto.gateway.web.v1.ReserveInviteCodeResponse} returns this
840
+ */
841
+ proto.gateway.web.v1.ReserveInviteCodeResponse.prototype.setReserved = function(value) {
842
+ return jspb.Message.setProto3BooleanField(this, 2, value);
843
+ };
844
+
845
+
846
+ /**
847
+ * optional InviteCodeState state = 3;
848
+ * @return {!proto.gateway.web.v1.InviteCodeState}
849
+ */
850
+ proto.gateway.web.v1.ReserveInviteCodeResponse.prototype.getState = function() {
851
+ return /** @type {!proto.gateway.web.v1.InviteCodeState} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
852
+ };
853
+
854
+
855
+ /**
856
+ * @param {!proto.gateway.web.v1.InviteCodeState} value
857
+ * @return {!proto.gateway.web.v1.ReserveInviteCodeResponse} returns this
858
+ */
859
+ proto.gateway.web.v1.ReserveInviteCodeResponse.prototype.setState = function(value) {
860
+ return jspb.Message.setProto3EnumField(this, 3, value);
861
+ };
862
+
863
+
864
+ /**
865
+ * optional string reservation_token = 4;
866
+ * @return {string}
867
+ */
868
+ proto.gateway.web.v1.ReserveInviteCodeResponse.prototype.getReservationToken = function() {
869
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
870
+ };
871
+
872
+
873
+ /**
874
+ * @param {string} value
875
+ * @return {!proto.gateway.web.v1.ReserveInviteCodeResponse} returns this
876
+ */
877
+ proto.gateway.web.v1.ReserveInviteCodeResponse.prototype.setReservationToken = function(value) {
878
+ return jspb.Message.setProto3StringField(this, 4, value);
879
+ };
880
+
881
+
882
+ /**
883
+ * optional google.protobuf.Timestamp expires_at = 5;
884
+ * @return {?proto.google.protobuf.Timestamp}
2211
885
  */
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));
886
+ proto.gateway.web.v1.ReserveInviteCodeResponse.prototype.getExpiresAt = function() {
887
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
888
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5));
2215
889
  };
2216
890
 
2217
891
 
2218
892
  /**
2219
- * @param {!Array<!proto.gateway.web.v1.InviteCode>} value
2220
- * @return {!proto.gateway.web.v1.GenerateInviteCodesResponse} returns this
893
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
894
+ * @return {!proto.gateway.web.v1.ReserveInviteCodeResponse} returns this
2221
895
  */
2222
- proto.gateway.web.v1.GenerateInviteCodesResponse.prototype.setCodesList = function(value) {
2223
- return jspb.Message.setRepeatedWrapperField(this, 2, value);
896
+ proto.gateway.web.v1.ReserveInviteCodeResponse.prototype.setExpiresAt = function(value) {
897
+ return jspb.Message.setWrapperField(this, 5, value);
2224
898
  };
2225
899
 
2226
900
 
2227
901
  /**
2228
- * @param {!proto.gateway.web.v1.InviteCode=} opt_value
2229
- * @param {number=} opt_index
2230
- * @return {!proto.gateway.web.v1.InviteCode}
902
+ * Clears the message field making it undefined.
903
+ * @return {!proto.gateway.web.v1.ReserveInviteCodeResponse} returns this
2231
904
  */
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);
905
+ proto.gateway.web.v1.ReserveInviteCodeResponse.prototype.clearExpiresAt = function() {
906
+ return this.setExpiresAt(undefined);
2234
907
  };
2235
908
 
2236
909
 
2237
910
  /**
2238
- * Clears the list making it empty but non-null.
2239
- * @return {!proto.gateway.web.v1.GenerateInviteCodesResponse} returns this
911
+ * Returns whether this field is set.
912
+ * @return {boolean}
2240
913
  */
2241
- proto.gateway.web.v1.GenerateInviteCodesResponse.prototype.clearCodesList = function() {
2242
- return this.setCodesList([]);
914
+ proto.gateway.web.v1.ReserveInviteCodeResponse.prototype.hasExpiresAt = function() {
915
+ return jspb.Message.getField(this, 5) != null;
2243
916
  };
2244
917
 
2245
918
 
@@ -2259,8 +932,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
2259
932
  * http://goto/soy-param-migration
2260
933
  * @return {!Object}
2261
934
  */
2262
- proto.gateway.web.v1.ListInviteCodesRequest.prototype.toObject = function(opt_includeInstance) {
2263
- return proto.gateway.web.v1.ListInviteCodesRequest.toObject(opt_includeInstance, this);
935
+ proto.gateway.web.v1.RedeemInviteCodeRequest.prototype.toObject = function(opt_includeInstance) {
936
+ return proto.gateway.web.v1.RedeemInviteCodeRequest.toObject(opt_includeInstance, this);
2264
937
  };
2265
938
 
2266
939
 
@@ -2269,13 +942,13 @@ proto.gateway.web.v1.ListInviteCodesRequest.prototype.toObject = function(opt_in
2269
942
  * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2270
943
  * the JSPB instance for transitional soy proto support:
2271
944
  * http://goto/soy-param-migration
2272
- * @param {!proto.gateway.web.v1.ListInviteCodesRequest} msg The msg instance to transform.
945
+ * @param {!proto.gateway.web.v1.RedeemInviteCodeRequest} msg The msg instance to transform.
2273
946
  * @return {!Object}
2274
947
  * @suppress {unusedLocalVariables} f is only used for nested messages
2275
948
  */
2276
- proto.gateway.web.v1.ListInviteCodesRequest.toObject = function(includeInstance, msg) {
949
+ proto.gateway.web.v1.RedeemInviteCodeRequest.toObject = function(includeInstance, msg) {
2277
950
  var f, obj = {
2278
-
951
+ reservationToken: jspb.Message.getFieldWithDefault(msg, 1, "")
2279
952
  };
2280
953
 
2281
954
  if (includeInstance) {
@@ -2289,29 +962,33 @@ proto.gateway.web.v1.ListInviteCodesRequest.toObject = function(includeInstance,
2289
962
  /**
2290
963
  * Deserializes binary data (in protobuf wire format).
2291
964
  * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.
2292
- * @return {!proto.gateway.web.v1.ListInviteCodesRequest}
965
+ * @return {!proto.gateway.web.v1.RedeemInviteCodeRequest}
2293
966
  */
2294
- proto.gateway.web.v1.ListInviteCodesRequest.deserializeBinary = function(bytes) {
967
+ proto.gateway.web.v1.RedeemInviteCodeRequest.deserializeBinary = function(bytes) {
2295
968
  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);
969
+ var msg = new proto.gateway.web.v1.RedeemInviteCodeRequest;
970
+ return proto.gateway.web.v1.RedeemInviteCodeRequest.deserializeBinaryFromReader(msg, reader);
2298
971
  };
2299
972
 
2300
973
 
2301
974
  /**
2302
975
  * Deserializes binary data (in protobuf wire format) from the
2303
976
  * given reader into the given message object.
2304
- * @param {!proto.gateway.web.v1.ListInviteCodesRequest} msg The message object to deserialize into.
977
+ * @param {!proto.gateway.web.v1.RedeemInviteCodeRequest} msg The message object to deserialize into.
2305
978
  * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2306
- * @return {!proto.gateway.web.v1.ListInviteCodesRequest}
979
+ * @return {!proto.gateway.web.v1.RedeemInviteCodeRequest}
2307
980
  */
2308
- proto.gateway.web.v1.ListInviteCodesRequest.deserializeBinaryFromReader = function(msg, reader) {
981
+ proto.gateway.web.v1.RedeemInviteCodeRequest.deserializeBinaryFromReader = function(msg, reader) {
2309
982
  while (reader.nextField()) {
2310
983
  if (reader.isEndGroup()) {
2311
984
  break;
2312
985
  }
2313
986
  var field = reader.getFieldNumber();
2314
987
  switch (field) {
988
+ case 1:
989
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
990
+ msg.setReservationToken(value);
991
+ break;
2315
992
  default:
2316
993
  reader.skipField();
2317
994
  break;
@@ -2325,9 +1002,9 @@ proto.gateway.web.v1.ListInviteCodesRequest.deserializeBinaryFromReader = functi
2325
1002
  * Serializes the message to binary data (in protobuf wire format).
2326
1003
  * @return {!Uint8Array}
2327
1004
  */
2328
- proto.gateway.web.v1.ListInviteCodesRequest.prototype.serializeBinary = function() {
1005
+ proto.gateway.web.v1.RedeemInviteCodeRequest.prototype.serializeBinary = function() {
2329
1006
  var writer = new jspb.BinaryWriter();
2330
- proto.gateway.web.v1.ListInviteCodesRequest.serializeBinaryToWriter(this, writer);
1007
+ proto.gateway.web.v1.RedeemInviteCodeRequest.serializeBinaryToWriter(this, writer);
2331
1008
  return writer.getResultBuffer();
2332
1009
  };
2333
1010
 
@@ -2335,22 +1012,40 @@ proto.gateway.web.v1.ListInviteCodesRequest.prototype.serializeBinary = function
2335
1012
  /**
2336
1013
  * Serializes the given message to binary data (in protobuf wire
2337
1014
  * format), writing to the given BinaryWriter.
2338
- * @param {!proto.gateway.web.v1.ListInviteCodesRequest} message
1015
+ * @param {!proto.gateway.web.v1.RedeemInviteCodeRequest} message
2339
1016
  * @param {!jspb.BinaryWriter} writer
2340
1017
  * @suppress {unusedLocalVariables} f is only used for nested messages
2341
1018
  */
2342
- proto.gateway.web.v1.ListInviteCodesRequest.serializeBinaryToWriter = function(message, writer) {
1019
+ proto.gateway.web.v1.RedeemInviteCodeRequest.serializeBinaryToWriter = function(message, writer) {
2343
1020
  var f = undefined;
1021
+ f = message.getReservationToken();
1022
+ if (f.length > 0) {
1023
+ writer.writeString(
1024
+ 1,
1025
+ f
1026
+ );
1027
+ }
2344
1028
  };
2345
1029
 
2346
1030
 
1031
+ /**
1032
+ * optional string reservation_token = 1;
1033
+ * @return {string}
1034
+ */
1035
+ proto.gateway.web.v1.RedeemInviteCodeRequest.prototype.getReservationToken = function() {
1036
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1037
+ };
1038
+
2347
1039
 
2348
1040
  /**
2349
- * List of repeated fields within this message type.
2350
- * @private {!Array<number>}
2351
- * @const
1041
+ * @param {string} value
1042
+ * @return {!proto.gateway.web.v1.RedeemInviteCodeRequest} returns this
2352
1043
  */
2353
- proto.gateway.web.v1.ListInviteCodesResponse.repeatedFields_ = [2];
1044
+ proto.gateway.web.v1.RedeemInviteCodeRequest.prototype.setReservationToken = function(value) {
1045
+ return jspb.Message.setProto3StringField(this, 1, value);
1046
+ };
1047
+
1048
+
2354
1049
 
2355
1050
 
2356
1051
 
@@ -2367,8 +1062,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
2367
1062
  * http://goto/soy-param-migration
2368
1063
  * @return {!Object}
2369
1064
  */
2370
- proto.gateway.web.v1.ListInviteCodesResponse.prototype.toObject = function(opt_includeInstance) {
2371
- return proto.gateway.web.v1.ListInviteCodesResponse.toObject(opt_includeInstance, this);
1065
+ proto.gateway.web.v1.RedeemInviteCodeResponse.prototype.toObject = function(opt_includeInstance) {
1066
+ return proto.gateway.web.v1.RedeemInviteCodeResponse.toObject(opt_includeInstance, this);
2372
1067
  };
2373
1068
 
2374
1069
 
@@ -2377,15 +1072,15 @@ proto.gateway.web.v1.ListInviteCodesResponse.prototype.toObject = function(opt_i
2377
1072
  * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2378
1073
  * the JSPB instance for transitional soy proto support:
2379
1074
  * http://goto/soy-param-migration
2380
- * @param {!proto.gateway.web.v1.ListInviteCodesResponse} msg The msg instance to transform.
1075
+ * @param {!proto.gateway.web.v1.RedeemInviteCodeResponse} msg The msg instance to transform.
2381
1076
  * @return {!Object}
2382
1077
  * @suppress {unusedLocalVariables} f is only used for nested messages
2383
1078
  */
2384
- proto.gateway.web.v1.ListInviteCodesResponse.toObject = function(includeInstance, msg) {
1079
+ proto.gateway.web.v1.RedeemInviteCodeResponse.toObject = function(includeInstance, msg) {
2385
1080
  var f, obj = {
2386
1081
  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)
1082
+ redeemed: jspb.Message.getBooleanFieldWithDefault(msg, 2, false),
1083
+ state: jspb.Message.getFieldWithDefault(msg, 3, 0)
2389
1084
  };
2390
1085
 
2391
1086
  if (includeInstance) {
@@ -2399,23 +1094,23 @@ codesList: jspb.Message.toObjectList(msg.getCodesList(),
2399
1094
  /**
2400
1095
  * Deserializes binary data (in protobuf wire format).
2401
1096
  * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.
2402
- * @return {!proto.gateway.web.v1.ListInviteCodesResponse}
1097
+ * @return {!proto.gateway.web.v1.RedeemInviteCodeResponse}
2403
1098
  */
2404
- proto.gateway.web.v1.ListInviteCodesResponse.deserializeBinary = function(bytes) {
1099
+ proto.gateway.web.v1.RedeemInviteCodeResponse.deserializeBinary = function(bytes) {
2405
1100
  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);
1101
+ var msg = new proto.gateway.web.v1.RedeemInviteCodeResponse;
1102
+ return proto.gateway.web.v1.RedeemInviteCodeResponse.deserializeBinaryFromReader(msg, reader);
2408
1103
  };
2409
1104
 
2410
1105
 
2411
1106
  /**
2412
1107
  * Deserializes binary data (in protobuf wire format) from the
2413
1108
  * given reader into the given message object.
2414
- * @param {!proto.gateway.web.v1.ListInviteCodesResponse} msg The message object to deserialize into.
1109
+ * @param {!proto.gateway.web.v1.RedeemInviteCodeResponse} msg The message object to deserialize into.
2415
1110
  * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2416
- * @return {!proto.gateway.web.v1.ListInviteCodesResponse}
1111
+ * @return {!proto.gateway.web.v1.RedeemInviteCodeResponse}
2417
1112
  */
2418
- proto.gateway.web.v1.ListInviteCodesResponse.deserializeBinaryFromReader = function(msg, reader) {
1113
+ proto.gateway.web.v1.RedeemInviteCodeResponse.deserializeBinaryFromReader = function(msg, reader) {
2419
1114
  while (reader.nextField()) {
2420
1115
  if (reader.isEndGroup()) {
2421
1116
  break;
@@ -2428,9 +1123,12 @@ proto.gateway.web.v1.ListInviteCodesResponse.deserializeBinaryFromReader = funct
2428
1123
  msg.setStatus(value);
2429
1124
  break;
2430
1125
  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);
1126
+ var value = /** @type {boolean} */ (reader.readBool());
1127
+ msg.setRedeemed(value);
1128
+ break;
1129
+ case 3:
1130
+ var value = /** @type {!proto.gateway.web.v1.InviteCodeState} */ (reader.readEnum());
1131
+ msg.setState(value);
2434
1132
  break;
2435
1133
  default:
2436
1134
  reader.skipField();
@@ -2445,9 +1143,9 @@ proto.gateway.web.v1.ListInviteCodesResponse.deserializeBinaryFromReader = funct
2445
1143
  * Serializes the message to binary data (in protobuf wire format).
2446
1144
  * @return {!Uint8Array}
2447
1145
  */
2448
- proto.gateway.web.v1.ListInviteCodesResponse.prototype.serializeBinary = function() {
1146
+ proto.gateway.web.v1.RedeemInviteCodeResponse.prototype.serializeBinary = function() {
2449
1147
  var writer = new jspb.BinaryWriter();
2450
- proto.gateway.web.v1.ListInviteCodesResponse.serializeBinaryToWriter(this, writer);
1148
+ proto.gateway.web.v1.RedeemInviteCodeResponse.serializeBinaryToWriter(this, writer);
2451
1149
  return writer.getResultBuffer();
2452
1150
  };
2453
1151
 
@@ -2455,11 +1153,11 @@ proto.gateway.web.v1.ListInviteCodesResponse.prototype.serializeBinary = functio
2455
1153
  /**
2456
1154
  * Serializes the given message to binary data (in protobuf wire
2457
1155
  * format), writing to the given BinaryWriter.
2458
- * @param {!proto.gateway.web.v1.ListInviteCodesResponse} message
1156
+ * @param {!proto.gateway.web.v1.RedeemInviteCodeResponse} message
2459
1157
  * @param {!jspb.BinaryWriter} writer
2460
1158
  * @suppress {unusedLocalVariables} f is only used for nested messages
2461
1159
  */
2462
- proto.gateway.web.v1.ListInviteCodesResponse.serializeBinaryToWriter = function(message, writer) {
1160
+ proto.gateway.web.v1.RedeemInviteCodeResponse.serializeBinaryToWriter = function(message, writer) {
2463
1161
  var f = undefined;
2464
1162
  f = message.getStatus();
2465
1163
  if (f != null) {
@@ -2469,12 +1167,18 @@ proto.gateway.web.v1.ListInviteCodesResponse.serializeBinaryToWriter = function(
2469
1167
  proto_gateway_common_v1_status_pb.ResponseStatus.serializeBinaryToWriter
2470
1168
  );
2471
1169
  }
2472
- f = message.getCodesList();
2473
- if (f.length > 0) {
2474
- writer.writeRepeatedMessage(
1170
+ f = message.getRedeemed();
1171
+ if (f) {
1172
+ writer.writeBool(
2475
1173
  2,
2476
- f,
2477
- proto.gateway.web.v1.InviteCode.serializeBinaryToWriter
1174
+ f
1175
+ );
1176
+ }
1177
+ f = message.getState();
1178
+ if (f !== 0.0) {
1179
+ writer.writeEnum(
1180
+ 3,
1181
+ f
2478
1182
  );
2479
1183
  }
2480
1184
  };
@@ -2484,7 +1188,7 @@ proto.gateway.web.v1.ListInviteCodesResponse.serializeBinaryToWriter = function(
2484
1188
  * optional gateway.common.v1.ResponseStatus status = 1;
2485
1189
  * @return {?proto.gateway.common.v1.ResponseStatus}
2486
1190
  */
2487
- proto.gateway.web.v1.ListInviteCodesResponse.prototype.getStatus = function() {
1191
+ proto.gateway.web.v1.RedeemInviteCodeResponse.prototype.getStatus = function() {
2488
1192
  return /** @type{?proto.gateway.common.v1.ResponseStatus} */ (
2489
1193
  jspb.Message.getWrapperField(this, proto_gateway_common_v1_status_pb.ResponseStatus, 1));
2490
1194
  };
@@ -2492,18 +1196,18 @@ proto.gateway.web.v1.ListInviteCodesResponse.prototype.getStatus = function() {
2492
1196
 
2493
1197
  /**
2494
1198
  * @param {?proto.gateway.common.v1.ResponseStatus|undefined} value
2495
- * @return {!proto.gateway.web.v1.ListInviteCodesResponse} returns this
1199
+ * @return {!proto.gateway.web.v1.RedeemInviteCodeResponse} returns this
2496
1200
  */
2497
- proto.gateway.web.v1.ListInviteCodesResponse.prototype.setStatus = function(value) {
1201
+ proto.gateway.web.v1.RedeemInviteCodeResponse.prototype.setStatus = function(value) {
2498
1202
  return jspb.Message.setWrapperField(this, 1, value);
2499
1203
  };
2500
1204
 
2501
1205
 
2502
1206
  /**
2503
1207
  * Clears the message field making it undefined.
2504
- * @return {!proto.gateway.web.v1.ListInviteCodesResponse} returns this
1208
+ * @return {!proto.gateway.web.v1.RedeemInviteCodeResponse} returns this
2505
1209
  */
2506
- proto.gateway.web.v1.ListInviteCodesResponse.prototype.clearStatus = function() {
1210
+ proto.gateway.web.v1.RedeemInviteCodeResponse.prototype.clearStatus = function() {
2507
1211
  return this.setStatus(undefined);
2508
1212
  };
2509
1213
 
@@ -2512,46 +1216,44 @@ proto.gateway.web.v1.ListInviteCodesResponse.prototype.clearStatus = function()
2512
1216
  * Returns whether this field is set.
2513
1217
  * @return {boolean}
2514
1218
  */
2515
- proto.gateway.web.v1.ListInviteCodesResponse.prototype.hasStatus = function() {
1219
+ proto.gateway.web.v1.RedeemInviteCodeResponse.prototype.hasStatus = function() {
2516
1220
  return jspb.Message.getField(this, 1) != null;
2517
1221
  };
2518
1222
 
2519
1223
 
2520
1224
  /**
2521
- * repeated InviteCode codes = 2;
2522
- * @return {!Array<!proto.gateway.web.v1.InviteCode>}
1225
+ * optional bool redeemed = 2;
1226
+ * @return {boolean}
2523
1227
  */
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));
1228
+ proto.gateway.web.v1.RedeemInviteCodeResponse.prototype.getRedeemed = function() {
1229
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));
2527
1230
  };
2528
1231
 
2529
1232
 
2530
1233
  /**
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);
1234
+ * @param {boolean} value
1235
+ * @return {!proto.gateway.web.v1.RedeemInviteCodeResponse} returns this
1236
+ */
1237
+ proto.gateway.web.v1.RedeemInviteCodeResponse.prototype.setRedeemed = function(value) {
1238
+ return jspb.Message.setProto3BooleanField(this, 2, value);
2536
1239
  };
2537
1240
 
2538
1241
 
2539
1242
  /**
2540
- * @param {!proto.gateway.web.v1.InviteCode=} opt_value
2541
- * @param {number=} opt_index
2542
- * @return {!proto.gateway.web.v1.InviteCode}
1243
+ * optional InviteCodeState state = 3;
1244
+ * @return {!proto.gateway.web.v1.InviteCodeState}
2543
1245
  */
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);
1246
+ proto.gateway.web.v1.RedeemInviteCodeResponse.prototype.getState = function() {
1247
+ return /** @type {!proto.gateway.web.v1.InviteCodeState} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
2546
1248
  };
2547
1249
 
2548
1250
 
2549
1251
  /**
2550
- * Clears the list making it empty but non-null.
2551
- * @return {!proto.gateway.web.v1.ListInviteCodesResponse} returns this
1252
+ * @param {!proto.gateway.web.v1.InviteCodeState} value
1253
+ * @return {!proto.gateway.web.v1.RedeemInviteCodeResponse} returns this
2552
1254
  */
2553
- proto.gateway.web.v1.ListInviteCodesResponse.prototype.clearCodesList = function() {
2554
- return this.setCodesList([]);
1255
+ proto.gateway.web.v1.RedeemInviteCodeResponse.prototype.setState = function(value) {
1256
+ return jspb.Message.setProto3EnumField(this, 3, value);
2555
1257
  };
2556
1258
 
2557
1259