@jibb-open/jssdk 3.18.1 → 3.18.3

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.
package/types/jibb.pb.js CHANGED
@@ -59,20 +59,14 @@ export const types = $root.types = (() => {
59
59
  var t = r.uint32();
60
60
  switch (t >>> 3) {
61
61
  case 1:
62
- {
63
- m.level = r.int32();
64
- break;
65
- }
62
+ m.level = r.int32();
63
+ break;
66
64
  case 2:
67
- {
68
- m.code = r.int32();
69
- break;
70
- }
65
+ m.code = r.int32();
66
+ break;
71
67
  case 3:
72
- {
73
- m.reason = r.string();
74
- break;
75
- }
68
+ m.reason = r.string();
69
+ break;
76
70
  default:
77
71
  r.skipType(t & 7);
78
72
  break;
@@ -123,12 +117,6 @@ export const types = $root.types = (() => {
123
117
  if (d instanceof $root.types.Error) return d;
124
118
  var m = new $root.types.Error();
125
119
  switch (d.level) {
126
- default:
127
- if (typeof d.level === "number") {
128
- m.level = d.level;
129
- break;
130
- }
131
- break;
132
120
  case "DEBUG":
133
121
  case 0:
134
122
  m.level = 0;
@@ -151,12 +139,6 @@ export const types = $root.types = (() => {
151
139
  break;
152
140
  }
153
141
  switch (d.code) {
154
- default:
155
- if (typeof d.code === "number") {
156
- m.code = d.code;
157
- break;
158
- }
159
- break;
160
142
  case "SUCCESS":
161
143
  case 0:
162
144
  m.code = 0;
@@ -208,10 +190,10 @@ export const types = $root.types = (() => {
208
190
  d.reason = "";
209
191
  }
210
192
  if (m.level != null && m.hasOwnProperty("level")) {
211
- d.level = o.enums === String ? $root.types.ErrorLevel[m.level] === undefined ? m.level : $root.types.ErrorLevel[m.level] : m.level;
193
+ d.level = o.enums === String ? $root.types.ErrorLevel[m.level] : m.level;
212
194
  }
213
195
  if (m.code != null && m.hasOwnProperty("code")) {
214
- d.code = o.enums === String ? $root.types.Code[m.code] === undefined ? m.code : $root.types.Code[m.code] : m.code;
196
+ d.code = o.enums === String ? $root.types.Code[m.code] : m.code;
215
197
  }
216
198
  if (m.reason != null && m.hasOwnProperty("reason")) {
217
199
  d.reason = m.reason;
@@ -221,12 +203,6 @@ export const types = $root.types = (() => {
221
203
  Error.prototype.toJSON = function toJSON() {
222
204
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
223
205
  };
224
- Error.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
225
- if (typeUrlPrefix === undefined) {
226
- typeUrlPrefix = "type.googleapis.com";
227
- }
228
- return typeUrlPrefix + "/types.Error";
229
- };
230
206
  return Error;
231
207
  }();
232
208
  types.TriState = function () {
@@ -288,20 +264,14 @@ export const types = $root.types = (() => {
288
264
  var t = r.uint32();
289
265
  switch (t >>> 3) {
290
266
  case 1:
291
- {
292
- m.clientType = r.int32();
293
- break;
294
- }
267
+ m.clientType = r.int32();
268
+ break;
295
269
  case 2:
296
- {
297
- m.id = r.string();
298
- break;
299
- }
270
+ m.id = r.string();
271
+ break;
300
272
  case 3:
301
- {
302
- m.name = r.string();
303
- break;
304
- }
273
+ m.name = r.string();
274
+ break;
305
275
  default:
306
276
  r.skipType(t & 7);
307
277
  break;
@@ -344,12 +314,6 @@ export const types = $root.types = (() => {
344
314
  if (d instanceof $root.types.ClientDetails) return d;
345
315
  var m = new $root.types.ClientDetails();
346
316
  switch (d.clientType) {
347
- default:
348
- if (typeof d.clientType === "number") {
349
- m.clientType = d.clientType;
350
- break;
351
- }
352
- break;
353
317
  case "UNKNOWN_CLIENT_TYPE":
354
318
  case 0:
355
319
  m.clientType = 0;
@@ -408,7 +372,7 @@ export const types = $root.types = (() => {
408
372
  d.name = "";
409
373
  }
410
374
  if (m.clientType != null && m.hasOwnProperty("clientType")) {
411
- d.clientType = o.enums === String ? $root.types.ClientType[m.clientType] === undefined ? m.clientType : $root.types.ClientType[m.clientType] : m.clientType;
375
+ d.clientType = o.enums === String ? $root.types.ClientType[m.clientType] : m.clientType;
412
376
  }
413
377
  if (m.id != null && m.hasOwnProperty("id")) {
414
378
  d.id = m.id;
@@ -421,12 +385,6 @@ export const types = $root.types = (() => {
421
385
  ClientDetails.prototype.toJSON = function toJSON() {
422
386
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
423
387
  };
424
- ClientDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
425
- if (typeUrlPrefix === undefined) {
426
- typeUrlPrefix = "type.googleapis.com";
427
- }
428
- return typeUrlPrefix + "/types.ClientDetails";
429
- };
430
388
  return ClientDetails;
431
389
  }();
432
390
  types.ContentType = function () {
@@ -518,40 +476,26 @@ export const jibb = $root.jibb = (() => {
518
476
  var t = r.uint32();
519
477
  switch (t >>> 3) {
520
478
  case 1:
521
- {
522
- m.surfaceType = r.int32();
523
- break;
524
- }
479
+ m.surfaceType = r.int32();
480
+ break;
525
481
  case 3:
526
- {
527
- m.enableStabilization = r.int32();
528
- break;
529
- }
482
+ m.enableStabilization = r.int32();
483
+ break;
530
484
  case 4:
531
- {
532
- m.enableTransformation = r.int32();
533
- break;
534
- }
485
+ m.enableTransformation = r.int32();
486
+ break;
535
487
  case 5:
536
- {
537
- m.userId = r.string();
538
- break;
539
- }
488
+ m.userId = r.string();
489
+ break;
540
490
  case 7:
541
- {
542
- m.mbusTopicStatus = r.string();
543
- break;
544
- }
491
+ m.mbusTopicStatus = r.string();
492
+ break;
545
493
  case 8:
546
- {
547
- m.mbusTopicImage = r.string();
548
- break;
549
- }
494
+ m.mbusTopicImage = r.string();
495
+ break;
550
496
  case 10:
551
- {
552
- m.encoding = r.int32();
553
- break;
554
- }
497
+ m.encoding = r.int32();
498
+ break;
555
499
  default:
556
500
  r.skipType(t & 7);
557
501
  break;
@@ -621,12 +565,6 @@ export const jibb = $root.jibb = (() => {
621
565
  if (d instanceof $root.jibb.ipsa.v1.Config) return d;
622
566
  var m = new $root.jibb.ipsa.v1.Config();
623
567
  switch (d.surfaceType) {
624
- default:
625
- if (typeof d.surfaceType === "number") {
626
- m.surfaceType = d.surfaceType;
627
- break;
628
- }
629
- break;
630
568
  case "UNKNOWN":
631
569
  case 0:
632
570
  m.surfaceType = 0;
@@ -641,12 +579,6 @@ export const jibb = $root.jibb = (() => {
641
579
  break;
642
580
  }
643
581
  switch (d.enableStabilization) {
644
- default:
645
- if (typeof d.enableStabilization === "number") {
646
- m.enableStabilization = d.enableStabilization;
647
- break;
648
- }
649
- break;
650
582
  case "DEFAULT":
651
583
  case 0:
652
584
  m.enableStabilization = 0;
@@ -661,12 +593,6 @@ export const jibb = $root.jibb = (() => {
661
593
  break;
662
594
  }
663
595
  switch (d.enableTransformation) {
664
- default:
665
- if (typeof d.enableTransformation === "number") {
666
- m.enableTransformation = d.enableTransformation;
667
- break;
668
- }
669
- break;
670
596
  case "DEFAULT":
671
597
  case 0:
672
598
  m.enableTransformation = 0;
@@ -690,12 +616,6 @@ export const jibb = $root.jibb = (() => {
690
616
  m.mbusTopicImage = String(d.mbusTopicImage);
691
617
  }
692
618
  switch (d.encoding) {
693
- default:
694
- if (typeof d.encoding === "number") {
695
- m.encoding = d.encoding;
696
- break;
697
- }
698
- break;
699
619
  case "JPEG":
700
620
  case 0:
701
621
  m.encoding = 0;
@@ -728,13 +648,13 @@ export const jibb = $root.jibb = (() => {
728
648
  d.encoding = o.enums === String ? "JPEG" : 0;
729
649
  }
730
650
  if (m.surfaceType != null && m.hasOwnProperty("surfaceType")) {
731
- d.surfaceType = o.enums === String ? $root.types.SurfaceType[m.surfaceType] === undefined ? m.surfaceType : $root.types.SurfaceType[m.surfaceType] : m.surfaceType;
651
+ d.surfaceType = o.enums === String ? $root.types.SurfaceType[m.surfaceType] : m.surfaceType;
732
652
  }
733
653
  if (m.enableStabilization != null && m.hasOwnProperty("enableStabilization")) {
734
- d.enableStabilization = o.enums === String ? $root.types.TriState[m.enableStabilization] === undefined ? m.enableStabilization : $root.types.TriState[m.enableStabilization] : m.enableStabilization;
654
+ d.enableStabilization = o.enums === String ? $root.types.TriState[m.enableStabilization] : m.enableStabilization;
735
655
  }
736
656
  if (m.enableTransformation != null && m.hasOwnProperty("enableTransformation")) {
737
- d.enableTransformation = o.enums === String ? $root.types.TriState[m.enableTransformation] === undefined ? m.enableTransformation : $root.types.TriState[m.enableTransformation] : m.enableTransformation;
657
+ d.enableTransformation = o.enums === String ? $root.types.TriState[m.enableTransformation] : m.enableTransformation;
738
658
  }
739
659
  if (m.userId != null && m.hasOwnProperty("userId")) {
740
660
  d.userId = m.userId;
@@ -746,19 +666,13 @@ export const jibb = $root.jibb = (() => {
746
666
  d.mbusTopicImage = m.mbusTopicImage;
747
667
  }
748
668
  if (m.encoding != null && m.hasOwnProperty("encoding")) {
749
- d.encoding = o.enums === String ? $root.jibb.ipsa.v1.Encoding[m.encoding] === undefined ? m.encoding : $root.jibb.ipsa.v1.Encoding[m.encoding] : m.encoding;
669
+ d.encoding = o.enums === String ? $root.jibb.ipsa.v1.Encoding[m.encoding] : m.encoding;
750
670
  }
751
671
  return d;
752
672
  };
753
673
  Config.prototype.toJSON = function toJSON() {
754
674
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
755
675
  };
756
- Config.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
757
- if (typeUrlPrefix === undefined) {
758
- typeUrlPrefix = "type.googleapis.com";
759
- }
760
- return typeUrlPrefix + "/jibb.ipsa.v1.Config";
761
- };
762
676
  return Config;
763
677
  }();
764
678
  v1.RuntimeConfig = function () {
@@ -774,6 +688,7 @@ export const jibb = $root.jibb = (() => {
774
688
  RuntimeConfig.prototype.flipLeftRight = false;
775
689
  RuntimeConfig.prototype.enableEstimation = false;
776
690
  RuntimeConfig.prototype.inputRotation = 0;
691
+ RuntimeConfig.prototype.enableCeTorch = false;
777
692
  RuntimeConfig.create = function create(properties) {
778
693
  return new RuntimeConfig(properties);
779
694
  };
@@ -791,6 +706,7 @@ export const jibb = $root.jibb = (() => {
791
706
  if (m.flipLeftRight != null && Object.hasOwnProperty.call(m, "flipLeftRight")) w.uint32(48).bool(m.flipLeftRight);
792
707
  if (m.enableEstimation != null && Object.hasOwnProperty.call(m, "enableEstimation")) w.uint32(56).bool(m.enableEstimation);
793
708
  if (m.inputRotation != null && Object.hasOwnProperty.call(m, "inputRotation")) w.uint32(64).int32(m.inputRotation);
709
+ if (m.enableCeTorch != null && Object.hasOwnProperty.call(m, "enableCeTorch")) w.uint32(72).bool(m.enableCeTorch);
794
710
  return w;
795
711
  };
796
712
  RuntimeConfig.encodeDelimited = function encodeDelimited(message, writer) {
@@ -804,49 +720,36 @@ export const jibb = $root.jibb = (() => {
804
720
  var t = r.uint32();
805
721
  switch (t >>> 3) {
806
722
  case 1:
807
- {
808
- if (!(m.customCorners && m.customCorners.length)) m.customCorners = [];
809
- if ((t & 7) === 2) {
810
- var c2 = r.uint32() + r.pos;
811
- while (r.pos < c2) m.customCorners.push(r.sint32());
812
- } else m.customCorners.push(r.sint32());
813
- break;
814
- }
723
+ if (!(m.customCorners && m.customCorners.length)) m.customCorners = [];
724
+ if ((t & 7) === 2) {
725
+ var c2 = r.uint32() + r.pos;
726
+ while (r.pos < c2) m.customCorners.push(r.sint32());
727
+ } else m.customCorners.push(r.sint32());
728
+ break;
815
729
  case 2:
816
- {
817
- m.fixedCorners = r.bool();
818
- break;
819
- }
730
+ m.fixedCorners = r.bool();
731
+ break;
820
732
  case 3:
821
- {
822
- m.enableColor = r.bool();
823
- break;
824
- }
733
+ m.enableColor = r.bool();
734
+ break;
825
735
  case 4:
826
- {
827
- m.rotation = r.int32();
828
- break;
829
- }
736
+ m.rotation = r.int32();
737
+ break;
830
738
  case 5:
831
- {
832
- m.flipUpDown = r.bool();
833
- break;
834
- }
739
+ m.flipUpDown = r.bool();
740
+ break;
835
741
  case 6:
836
- {
837
- m.flipLeftRight = r.bool();
838
- break;
839
- }
742
+ m.flipLeftRight = r.bool();
743
+ break;
840
744
  case 7:
841
- {
842
- m.enableEstimation = r.bool();
843
- break;
844
- }
745
+ m.enableEstimation = r.bool();
746
+ break;
845
747
  case 8:
846
- {
847
- m.inputRotation = r.int32();
848
- break;
849
- }
748
+ m.inputRotation = r.int32();
749
+ break;
750
+ case 9:
751
+ m.enableCeTorch = r.bool();
752
+ break;
850
753
  default:
851
754
  r.skipType(t & 7);
852
755
  break;
@@ -903,6 +806,9 @@ export const jibb = $root.jibb = (() => {
903
806
  break;
904
807
  }
905
808
  }
809
+ if (m.enableCeTorch != null && m.hasOwnProperty("enableCeTorch")) {
810
+ if (typeof m.enableCeTorch !== "boolean") return "enableCeTorch: boolean expected";
811
+ }
906
812
  return null;
907
813
  };
908
814
  RuntimeConfig.fromObject = function fromObject(d) {
@@ -922,12 +828,6 @@ export const jibb = $root.jibb = (() => {
922
828
  m.enableColor = Boolean(d.enableColor);
923
829
  }
924
830
  switch (d.rotation) {
925
- default:
926
- if (typeof d.rotation === "number") {
927
- m.rotation = d.rotation;
928
- break;
929
- }
930
- break;
931
831
  case "ROTATE_0":
932
832
  case 0:
933
833
  m.rotation = 0;
@@ -955,12 +855,6 @@ export const jibb = $root.jibb = (() => {
955
855
  m.enableEstimation = Boolean(d.enableEstimation);
956
856
  }
957
857
  switch (d.inputRotation) {
958
- default:
959
- if (typeof d.inputRotation === "number") {
960
- m.inputRotation = d.inputRotation;
961
- break;
962
- }
963
- break;
964
858
  case "ROTATE_0":
965
859
  case 0:
966
860
  m.inputRotation = 0;
@@ -978,6 +872,9 @@ export const jibb = $root.jibb = (() => {
978
872
  m.inputRotation = 3;
979
873
  break;
980
874
  }
875
+ if (d.enableCeTorch != null) {
876
+ m.enableCeTorch = Boolean(d.enableCeTorch);
877
+ }
981
878
  return m;
982
879
  };
983
880
  RuntimeConfig.toObject = function toObject(m, o) {
@@ -994,6 +891,7 @@ export const jibb = $root.jibb = (() => {
994
891
  d.flipLeftRight = false;
995
892
  d.enableEstimation = false;
996
893
  d.inputRotation = o.enums === String ? "ROTATE_0" : 0;
894
+ d.enableCeTorch = false;
997
895
  }
998
896
  if (m.customCorners && m.customCorners.length) {
999
897
  d.customCorners = [];
@@ -1008,7 +906,7 @@ export const jibb = $root.jibb = (() => {
1008
906
  d.enableColor = m.enableColor;
1009
907
  }
1010
908
  if (m.rotation != null && m.hasOwnProperty("rotation")) {
1011
- d.rotation = o.enums === String ? $root.jibb.ipsa.v1.Rotation[m.rotation] === undefined ? m.rotation : $root.jibb.ipsa.v1.Rotation[m.rotation] : m.rotation;
909
+ d.rotation = o.enums === String ? $root.jibb.ipsa.v1.Rotation[m.rotation] : m.rotation;
1012
910
  }
1013
911
  if (m.flipUpDown != null && m.hasOwnProperty("flipUpDown")) {
1014
912
  d.flipUpDown = m.flipUpDown;
@@ -1020,19 +918,16 @@ export const jibb = $root.jibb = (() => {
1020
918
  d.enableEstimation = m.enableEstimation;
1021
919
  }
1022
920
  if (m.inputRotation != null && m.hasOwnProperty("inputRotation")) {
1023
- d.inputRotation = o.enums === String ? $root.jibb.ipsa.v1.Rotation[m.inputRotation] === undefined ? m.inputRotation : $root.jibb.ipsa.v1.Rotation[m.inputRotation] : m.inputRotation;
921
+ d.inputRotation = o.enums === String ? $root.jibb.ipsa.v1.Rotation[m.inputRotation] : m.inputRotation;
922
+ }
923
+ if (m.enableCeTorch != null && m.hasOwnProperty("enableCeTorch")) {
924
+ d.enableCeTorch = m.enableCeTorch;
1024
925
  }
1025
926
  return d;
1026
927
  };
1027
928
  RuntimeConfig.prototype.toJSON = function toJSON() {
1028
929
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1029
930
  };
1030
- RuntimeConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
1031
- if (typeUrlPrefix === undefined) {
1032
- typeUrlPrefix = "type.googleapis.com";
1033
- }
1034
- return typeUrlPrefix + "/jibb.ipsa.v1.RuntimeConfig";
1035
- };
1036
931
  return RuntimeConfig;
1037
932
  }();
1038
933
  v1.VersionResponse = function () {
@@ -1059,10 +954,8 @@ export const jibb = $root.jibb = (() => {
1059
954
  var t = r.uint32();
1060
955
  switch (t >>> 3) {
1061
956
  case 1:
1062
- {
1063
- m.version = r.string();
1064
- break;
1065
- }
957
+ m.version = r.string();
958
+ break;
1066
959
  default:
1067
960
  r.skipType(t & 7);
1068
961
  break;
@@ -1103,12 +996,6 @@ export const jibb = $root.jibb = (() => {
1103
996
  VersionResponse.prototype.toJSON = function toJSON() {
1104
997
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1105
998
  };
1106
- VersionResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
1107
- if (typeUrlPrefix === undefined) {
1108
- typeUrlPrefix = "type.googleapis.com";
1109
- }
1110
- return typeUrlPrefix + "/jibb.ipsa.v1.VersionResponse";
1111
- };
1112
999
  return VersionResponse;
1113
1000
  }();
1114
1001
  v1.SurfaceTransformationRequest = function () {
@@ -1137,15 +1024,11 @@ export const jibb = $root.jibb = (() => {
1137
1024
  var t = r.uint32();
1138
1025
  switch (t >>> 3) {
1139
1026
  case 1:
1140
- {
1141
- m.surfaceType = r.int32();
1142
- break;
1143
- }
1027
+ m.surfaceType = r.int32();
1028
+ break;
1144
1029
  case 2:
1145
- {
1146
- m.img = r.bytes();
1147
- break;
1148
- }
1030
+ m.img = r.bytes();
1031
+ break;
1149
1032
  default:
1150
1033
  r.skipType(t & 7);
1151
1034
  break;
@@ -1178,12 +1061,6 @@ export const jibb = $root.jibb = (() => {
1178
1061
  if (d instanceof $root.jibb.ipsa.v1.SurfaceTransformationRequest) return d;
1179
1062
  var m = new $root.jibb.ipsa.v1.SurfaceTransformationRequest();
1180
1063
  switch (d.surfaceType) {
1181
- default:
1182
- if (typeof d.surfaceType === "number") {
1183
- m.surfaceType = d.surfaceType;
1184
- break;
1185
- }
1186
- break;
1187
1064
  case "UNKNOWN":
1188
1065
  case 0:
1189
1066
  m.surfaceType = 0;
@@ -1198,7 +1075,7 @@ export const jibb = $root.jibb = (() => {
1198
1075
  break;
1199
1076
  }
1200
1077
  if (d.img != null) {
1201
- if (typeof d.img === "string") $util.base64.decode(d.img, m.img = $util.newBuffer($util.base64.length(d.img)), 0);else if (d.img.length >= 0) m.img = d.img;
1078
+ if (typeof d.img === "string") $util.base64.decode(d.img, m.img = $util.newBuffer($util.base64.length(d.img)), 0);else if (d.img.length) m.img = d.img;
1202
1079
  }
1203
1080
  return m;
1204
1081
  };
@@ -1213,7 +1090,7 @@ export const jibb = $root.jibb = (() => {
1213
1090
  }
1214
1091
  }
1215
1092
  if (m.surfaceType != null && m.hasOwnProperty("surfaceType")) {
1216
- d.surfaceType = o.enums === String ? $root.types.SurfaceType[m.surfaceType] === undefined ? m.surfaceType : $root.types.SurfaceType[m.surfaceType] : m.surfaceType;
1093
+ d.surfaceType = o.enums === String ? $root.types.SurfaceType[m.surfaceType] : m.surfaceType;
1217
1094
  }
1218
1095
  if (m.img != null && m.hasOwnProperty("img")) {
1219
1096
  d.img = o.bytes === String ? $util.base64.encode(m.img, 0, m.img.length) : o.bytes === Array ? Array.prototype.slice.call(m.img) : m.img;
@@ -1223,12 +1100,6 @@ export const jibb = $root.jibb = (() => {
1223
1100
  SurfaceTransformationRequest.prototype.toJSON = function toJSON() {
1224
1101
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1225
1102
  };
1226
- SurfaceTransformationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
1227
- if (typeUrlPrefix === undefined) {
1228
- typeUrlPrefix = "type.googleapis.com";
1229
- }
1230
- return typeUrlPrefix + "/jibb.ipsa.v1.SurfaceTransformationRequest";
1231
- };
1232
1103
  return SurfaceTransformationRequest;
1233
1104
  }();
1234
1105
  v1.SurfaceTransformationResponse = function () {
@@ -1255,10 +1126,8 @@ export const jibb = $root.jibb = (() => {
1255
1126
  var t = r.uint32();
1256
1127
  switch (t >>> 3) {
1257
1128
  case 1:
1258
- {
1259
- m.img = r.bytes();
1260
- break;
1261
- }
1129
+ m.img = r.bytes();
1130
+ break;
1262
1131
  default:
1263
1132
  r.skipType(t & 7);
1264
1133
  break;
@@ -1281,7 +1150,7 @@ export const jibb = $root.jibb = (() => {
1281
1150
  if (d instanceof $root.jibb.ipsa.v1.SurfaceTransformationResponse) return d;
1282
1151
  var m = new $root.jibb.ipsa.v1.SurfaceTransformationResponse();
1283
1152
  if (d.img != null) {
1284
- if (typeof d.img === "string") $util.base64.decode(d.img, m.img = $util.newBuffer($util.base64.length(d.img)), 0);else if (d.img.length >= 0) m.img = d.img;
1153
+ if (typeof d.img === "string") $util.base64.decode(d.img, m.img = $util.newBuffer($util.base64.length(d.img)), 0);else if (d.img.length) m.img = d.img;
1285
1154
  }
1286
1155
  return m;
1287
1156
  };
@@ -1302,12 +1171,6 @@ export const jibb = $root.jibb = (() => {
1302
1171
  SurfaceTransformationResponse.prototype.toJSON = function toJSON() {
1303
1172
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1304
1173
  };
1305
- SurfaceTransformationResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
1306
- if (typeUrlPrefix === undefined) {
1307
- typeUrlPrefix = "type.googleapis.com";
1308
- }
1309
- return typeUrlPrefix + "/jibb.ipsa.v1.SurfaceTransformationResponse";
1310
- };
1311
1174
  return SurfaceTransformationResponse;
1312
1175
  }();
1313
1176
  v1.SurfaceSegmentationRequest = function () {
@@ -1338,20 +1201,14 @@ export const jibb = $root.jibb = (() => {
1338
1201
  var t = r.uint32();
1339
1202
  switch (t >>> 3) {
1340
1203
  case 1:
1341
- {
1342
- m.surfaceType = r.int32();
1343
- break;
1344
- }
1204
+ m.surfaceType = r.int32();
1205
+ break;
1345
1206
  case 2:
1346
- {
1347
- m.overlay = r.bool();
1348
- break;
1349
- }
1207
+ m.overlay = r.bool();
1208
+ break;
1350
1209
  case 3:
1351
- {
1352
- m.img = r.bytes();
1353
- break;
1354
- }
1210
+ m.img = r.bytes();
1211
+ break;
1355
1212
  default:
1356
1213
  r.skipType(t & 7);
1357
1214
  break;
@@ -1387,12 +1244,6 @@ export const jibb = $root.jibb = (() => {
1387
1244
  if (d instanceof $root.jibb.ipsa.v1.SurfaceSegmentationRequest) return d;
1388
1245
  var m = new $root.jibb.ipsa.v1.SurfaceSegmentationRequest();
1389
1246
  switch (d.surfaceType) {
1390
- default:
1391
- if (typeof d.surfaceType === "number") {
1392
- m.surfaceType = d.surfaceType;
1393
- break;
1394
- }
1395
- break;
1396
1247
  case "UNKNOWN":
1397
1248
  case 0:
1398
1249
  m.surfaceType = 0;
@@ -1410,7 +1261,7 @@ export const jibb = $root.jibb = (() => {
1410
1261
  m.overlay = Boolean(d.overlay);
1411
1262
  }
1412
1263
  if (d.img != null) {
1413
- if (typeof d.img === "string") $util.base64.decode(d.img, m.img = $util.newBuffer($util.base64.length(d.img)), 0);else if (d.img.length >= 0) m.img = d.img;
1264
+ if (typeof d.img === "string") $util.base64.decode(d.img, m.img = $util.newBuffer($util.base64.length(d.img)), 0);else if (d.img.length) m.img = d.img;
1414
1265
  }
1415
1266
  return m;
1416
1267
  };
@@ -1426,7 +1277,7 @@ export const jibb = $root.jibb = (() => {
1426
1277
  }
1427
1278
  }
1428
1279
  if (m.surfaceType != null && m.hasOwnProperty("surfaceType")) {
1429
- d.surfaceType = o.enums === String ? $root.types.SurfaceType[m.surfaceType] === undefined ? m.surfaceType : $root.types.SurfaceType[m.surfaceType] : m.surfaceType;
1280
+ d.surfaceType = o.enums === String ? $root.types.SurfaceType[m.surfaceType] : m.surfaceType;
1430
1281
  }
1431
1282
  if (m.overlay != null && m.hasOwnProperty("overlay")) {
1432
1283
  d.overlay = m.overlay;
@@ -1439,12 +1290,6 @@ export const jibb = $root.jibb = (() => {
1439
1290
  SurfaceSegmentationRequest.prototype.toJSON = function toJSON() {
1440
1291
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1441
1292
  };
1442
- SurfaceSegmentationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
1443
- if (typeUrlPrefix === undefined) {
1444
- typeUrlPrefix = "type.googleapis.com";
1445
- }
1446
- return typeUrlPrefix + "/jibb.ipsa.v1.SurfaceSegmentationRequest";
1447
- };
1448
1293
  return SurfaceSegmentationRequest;
1449
1294
  }();
1450
1295
  v1.SurfaceSegmentationResponse = function () {
@@ -1471,10 +1316,8 @@ export const jibb = $root.jibb = (() => {
1471
1316
  var t = r.uint32();
1472
1317
  switch (t >>> 3) {
1473
1318
  case 1:
1474
- {
1475
- m.img = r.bytes();
1476
- break;
1477
- }
1319
+ m.img = r.bytes();
1320
+ break;
1478
1321
  default:
1479
1322
  r.skipType(t & 7);
1480
1323
  break;
@@ -1497,7 +1340,7 @@ export const jibb = $root.jibb = (() => {
1497
1340
  if (d instanceof $root.jibb.ipsa.v1.SurfaceSegmentationResponse) return d;
1498
1341
  var m = new $root.jibb.ipsa.v1.SurfaceSegmentationResponse();
1499
1342
  if (d.img != null) {
1500
- if (typeof d.img === "string") $util.base64.decode(d.img, m.img = $util.newBuffer($util.base64.length(d.img)), 0);else if (d.img.length >= 0) m.img = d.img;
1343
+ if (typeof d.img === "string") $util.base64.decode(d.img, m.img = $util.newBuffer($util.base64.length(d.img)), 0);else if (d.img.length) m.img = d.img;
1501
1344
  }
1502
1345
  return m;
1503
1346
  };
@@ -1518,12 +1361,6 @@ export const jibb = $root.jibb = (() => {
1518
1361
  SurfaceSegmentationResponse.prototype.toJSON = function toJSON() {
1519
1362
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1520
1363
  };
1521
- SurfaceSegmentationResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
1522
- if (typeUrlPrefix === undefined) {
1523
- typeUrlPrefix = "type.googleapis.com";
1524
- }
1525
- return typeUrlPrefix + "/jibb.ipsa.v1.SurfaceSegmentationResponse";
1526
- };
1527
1364
  return SurfaceSegmentationResponse;
1528
1365
  }();
1529
1366
  v1.SurfaceDetectionRequest = function () {
@@ -1554,20 +1391,14 @@ export const jibb = $root.jibb = (() => {
1554
1391
  var t = r.uint32();
1555
1392
  switch (t >>> 3) {
1556
1393
  case 1:
1557
- {
1558
- m.surfaceType = r.int32();
1559
- break;
1560
- }
1394
+ m.surfaceType = r.int32();
1395
+ break;
1561
1396
  case 2:
1562
- {
1563
- m.img = r.bytes();
1564
- break;
1565
- }
1397
+ m.img = r.bytes();
1398
+ break;
1566
1399
  case 3:
1567
- {
1568
- m.overlay = r.bool();
1569
- break;
1570
- }
1400
+ m.overlay = r.bool();
1401
+ break;
1571
1402
  default:
1572
1403
  r.skipType(t & 7);
1573
1404
  break;
@@ -1603,12 +1434,6 @@ export const jibb = $root.jibb = (() => {
1603
1434
  if (d instanceof $root.jibb.ipsa.v1.SurfaceDetectionRequest) return d;
1604
1435
  var m = new $root.jibb.ipsa.v1.SurfaceDetectionRequest();
1605
1436
  switch (d.surfaceType) {
1606
- default:
1607
- if (typeof d.surfaceType === "number") {
1608
- m.surfaceType = d.surfaceType;
1609
- break;
1610
- }
1611
- break;
1612
1437
  case "UNKNOWN":
1613
1438
  case 0:
1614
1439
  m.surfaceType = 0;
@@ -1623,7 +1448,7 @@ export const jibb = $root.jibb = (() => {
1623
1448
  break;
1624
1449
  }
1625
1450
  if (d.img != null) {
1626
- if (typeof d.img === "string") $util.base64.decode(d.img, m.img = $util.newBuffer($util.base64.length(d.img)), 0);else if (d.img.length >= 0) m.img = d.img;
1451
+ if (typeof d.img === "string") $util.base64.decode(d.img, m.img = $util.newBuffer($util.base64.length(d.img)), 0);else if (d.img.length) m.img = d.img;
1627
1452
  }
1628
1453
  if (d.overlay != null) {
1629
1454
  m.overlay = Boolean(d.overlay);
@@ -1642,7 +1467,7 @@ export const jibb = $root.jibb = (() => {
1642
1467
  d.overlay = false;
1643
1468
  }
1644
1469
  if (m.surfaceType != null && m.hasOwnProperty("surfaceType")) {
1645
- d.surfaceType = o.enums === String ? $root.types.SurfaceType[m.surfaceType] === undefined ? m.surfaceType : $root.types.SurfaceType[m.surfaceType] : m.surfaceType;
1470
+ d.surfaceType = o.enums === String ? $root.types.SurfaceType[m.surfaceType] : m.surfaceType;
1646
1471
  }
1647
1472
  if (m.img != null && m.hasOwnProperty("img")) {
1648
1473
  d.img = o.bytes === String ? $util.base64.encode(m.img, 0, m.img.length) : o.bytes === Array ? Array.prototype.slice.call(m.img) : m.img;
@@ -1655,12 +1480,6 @@ export const jibb = $root.jibb = (() => {
1655
1480
  SurfaceDetectionRequest.prototype.toJSON = function toJSON() {
1656
1481
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1657
1482
  };
1658
- SurfaceDetectionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
1659
- if (typeUrlPrefix === undefined) {
1660
- typeUrlPrefix = "type.googleapis.com";
1661
- }
1662
- return typeUrlPrefix + "/jibb.ipsa.v1.SurfaceDetectionRequest";
1663
- };
1664
1483
  return SurfaceDetectionRequest;
1665
1484
  }();
1666
1485
  v1.SurfaceDetectionResponse = function () {
@@ -1694,19 +1513,15 @@ export const jibb = $root.jibb = (() => {
1694
1513
  var t = r.uint32();
1695
1514
  switch (t >>> 3) {
1696
1515
  case 1:
1697
- {
1698
- m.img = r.bytes();
1699
- break;
1700
- }
1516
+ m.img = r.bytes();
1517
+ break;
1701
1518
  case 2:
1702
- {
1703
- if (!(m.corners && m.corners.length)) m.corners = [];
1704
- if ((t & 7) === 2) {
1705
- var c2 = r.uint32() + r.pos;
1706
- while (r.pos < c2) m.corners.push(r.sint32());
1707
- } else m.corners.push(r.sint32());
1708
- break;
1709
- }
1519
+ if (!(m.corners && m.corners.length)) m.corners = [];
1520
+ if ((t & 7) === 2) {
1521
+ var c2 = r.uint32() + r.pos;
1522
+ while (r.pos < c2) m.corners.push(r.sint32());
1523
+ } else m.corners.push(r.sint32());
1524
+ break;
1710
1525
  default:
1711
1526
  r.skipType(t & 7);
1712
1527
  break;
@@ -1735,7 +1550,7 @@ export const jibb = $root.jibb = (() => {
1735
1550
  if (d instanceof $root.jibb.ipsa.v1.SurfaceDetectionResponse) return d;
1736
1551
  var m = new $root.jibb.ipsa.v1.SurfaceDetectionResponse();
1737
1552
  if (d.img != null) {
1738
- if (typeof d.img === "string") $util.base64.decode(d.img, m.img = $util.newBuffer($util.base64.length(d.img)), 0);else if (d.img.length >= 0) m.img = d.img;
1553
+ if (typeof d.img === "string") $util.base64.decode(d.img, m.img = $util.newBuffer($util.base64.length(d.img)), 0);else if (d.img.length) m.img = d.img;
1739
1554
  }
1740
1555
  if (d.corners) {
1741
1556
  if (!Array.isArray(d.corners)) throw TypeError(".jibb.ipsa.v1.SurfaceDetectionResponse.corners: array expected");
@@ -1772,12 +1587,6 @@ export const jibb = $root.jibb = (() => {
1772
1587
  SurfaceDetectionResponse.prototype.toJSON = function toJSON() {
1773
1588
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1774
1589
  };
1775
- SurfaceDetectionResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
1776
- if (typeUrlPrefix === undefined) {
1777
- typeUrlPrefix = "type.googleapis.com";
1778
- }
1779
- return typeUrlPrefix + "/jibb.ipsa.v1.SurfaceDetectionResponse";
1780
- };
1781
1590
  return SurfaceDetectionResponse;
1782
1591
  }();
1783
1592
  v1.ObjectRemovalRequest = function () {
@@ -1810,25 +1619,17 @@ export const jibb = $root.jibb = (() => {
1810
1619
  var t = r.uint32();
1811
1620
  switch (t >>> 3) {
1812
1621
  case 1:
1813
- {
1814
- m.surfaceType = r.int32();
1815
- break;
1816
- }
1622
+ m.surfaceType = r.int32();
1623
+ break;
1817
1624
  case 2:
1818
- {
1819
- m.overlay = r.bool();
1820
- break;
1821
- }
1625
+ m.overlay = r.bool();
1626
+ break;
1822
1627
  case 3:
1823
- {
1824
- m.enableTransformation = r.bool();
1825
- break;
1826
- }
1628
+ m.enableTransformation = r.bool();
1629
+ break;
1827
1630
  case 4:
1828
- {
1829
- m.img = r.bytes();
1830
- break;
1831
- }
1631
+ m.img = r.bytes();
1632
+ break;
1832
1633
  default:
1833
1634
  r.skipType(t & 7);
1834
1635
  break;
@@ -1867,12 +1668,6 @@ export const jibb = $root.jibb = (() => {
1867
1668
  if (d instanceof $root.jibb.ipsa.v1.ObjectRemovalRequest) return d;
1868
1669
  var m = new $root.jibb.ipsa.v1.ObjectRemovalRequest();
1869
1670
  switch (d.surfaceType) {
1870
- default:
1871
- if (typeof d.surfaceType === "number") {
1872
- m.surfaceType = d.surfaceType;
1873
- break;
1874
- }
1875
- break;
1876
1671
  case "UNKNOWN":
1877
1672
  case 0:
1878
1673
  m.surfaceType = 0;
@@ -1893,7 +1688,7 @@ export const jibb = $root.jibb = (() => {
1893
1688
  m.enableTransformation = Boolean(d.enableTransformation);
1894
1689
  }
1895
1690
  if (d.img != null) {
1896
- if (typeof d.img === "string") $util.base64.decode(d.img, m.img = $util.newBuffer($util.base64.length(d.img)), 0);else if (d.img.length >= 0) m.img = d.img;
1691
+ if (typeof d.img === "string") $util.base64.decode(d.img, m.img = $util.newBuffer($util.base64.length(d.img)), 0);else if (d.img.length) m.img = d.img;
1897
1692
  }
1898
1693
  return m;
1899
1694
  };
@@ -1910,7 +1705,7 @@ export const jibb = $root.jibb = (() => {
1910
1705
  }
1911
1706
  }
1912
1707
  if (m.surfaceType != null && m.hasOwnProperty("surfaceType")) {
1913
- d.surfaceType = o.enums === String ? $root.types.SurfaceType[m.surfaceType] === undefined ? m.surfaceType : $root.types.SurfaceType[m.surfaceType] : m.surfaceType;
1708
+ d.surfaceType = o.enums === String ? $root.types.SurfaceType[m.surfaceType] : m.surfaceType;
1914
1709
  }
1915
1710
  if (m.overlay != null && m.hasOwnProperty("overlay")) {
1916
1711
  d.overlay = m.overlay;
@@ -1926,12 +1721,6 @@ export const jibb = $root.jibb = (() => {
1926
1721
  ObjectRemovalRequest.prototype.toJSON = function toJSON() {
1927
1722
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1928
1723
  };
1929
- ObjectRemovalRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
1930
- if (typeUrlPrefix === undefined) {
1931
- typeUrlPrefix = "type.googleapis.com";
1932
- }
1933
- return typeUrlPrefix + "/jibb.ipsa.v1.ObjectRemovalRequest";
1934
- };
1935
1724
  return ObjectRemovalRequest;
1936
1725
  }();
1937
1726
  v1.ObjectRemovalResponse = function () {
@@ -1958,10 +1747,8 @@ export const jibb = $root.jibb = (() => {
1958
1747
  var t = r.uint32();
1959
1748
  switch (t >>> 3) {
1960
1749
  case 1:
1961
- {
1962
- m.img = r.bytes();
1963
- break;
1964
- }
1750
+ m.img = r.bytes();
1751
+ break;
1965
1752
  default:
1966
1753
  r.skipType(t & 7);
1967
1754
  break;
@@ -1984,7 +1771,7 @@ export const jibb = $root.jibb = (() => {
1984
1771
  if (d instanceof $root.jibb.ipsa.v1.ObjectRemovalResponse) return d;
1985
1772
  var m = new $root.jibb.ipsa.v1.ObjectRemovalResponse();
1986
1773
  if (d.img != null) {
1987
- if (typeof d.img === "string") $util.base64.decode(d.img, m.img = $util.newBuffer($util.base64.length(d.img)), 0);else if (d.img.length >= 0) m.img = d.img;
1774
+ if (typeof d.img === "string") $util.base64.decode(d.img, m.img = $util.newBuffer($util.base64.length(d.img)), 0);else if (d.img.length) m.img = d.img;
1988
1775
  }
1989
1776
  return m;
1990
1777
  };
@@ -2005,12 +1792,6 @@ export const jibb = $root.jibb = (() => {
2005
1792
  ObjectRemovalResponse.prototype.toJSON = function toJSON() {
2006
1793
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
2007
1794
  };
2008
- ObjectRemovalResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
2009
- if (typeUrlPrefix === undefined) {
2010
- typeUrlPrefix = "type.googleapis.com";
2011
- }
2012
- return typeUrlPrefix + "/jibb.ipsa.v1.ObjectRemovalResponse";
2013
- };
2014
1795
  return ObjectRemovalResponse;
2015
1796
  }();
2016
1797
  v1.ContentExtractionRequest = function () {
@@ -2043,25 +1824,17 @@ export const jibb = $root.jibb = (() => {
2043
1824
  var t = r.uint32();
2044
1825
  switch (t >>> 3) {
2045
1826
  case 1:
2046
- {
2047
- m.surfaceType = r.int32();
2048
- break;
2049
- }
1827
+ m.surfaceType = r.int32();
1828
+ break;
2050
1829
  case 2:
2051
- {
2052
- m.enableTransformation = r.bool();
2053
- break;
2054
- }
1830
+ m.enableTransformation = r.bool();
1831
+ break;
2055
1832
  case 4:
2056
- {
2057
- m.enableColor = r.bool();
2058
- break;
2059
- }
1833
+ m.enableColor = r.bool();
1834
+ break;
2060
1835
  case 3:
2061
- {
2062
- m.img = r.bytes();
2063
- break;
2064
- }
1836
+ m.img = r.bytes();
1837
+ break;
2065
1838
  default:
2066
1839
  r.skipType(t & 7);
2067
1840
  break;
@@ -2100,12 +1873,6 @@ export const jibb = $root.jibb = (() => {
2100
1873
  if (d instanceof $root.jibb.ipsa.v1.ContentExtractionRequest) return d;
2101
1874
  var m = new $root.jibb.ipsa.v1.ContentExtractionRequest();
2102
1875
  switch (d.surfaceType) {
2103
- default:
2104
- if (typeof d.surfaceType === "number") {
2105
- m.surfaceType = d.surfaceType;
2106
- break;
2107
- }
2108
- break;
2109
1876
  case "UNKNOWN":
2110
1877
  case 0:
2111
1878
  m.surfaceType = 0;
@@ -2126,7 +1893,7 @@ export const jibb = $root.jibb = (() => {
2126
1893
  m.enableColor = Boolean(d.enableColor);
2127
1894
  }
2128
1895
  if (d.img != null) {
2129
- if (typeof d.img === "string") $util.base64.decode(d.img, m.img = $util.newBuffer($util.base64.length(d.img)), 0);else if (d.img.length >= 0) m.img = d.img;
1896
+ if (typeof d.img === "string") $util.base64.decode(d.img, m.img = $util.newBuffer($util.base64.length(d.img)), 0);else if (d.img.length) m.img = d.img;
2130
1897
  }
2131
1898
  return m;
2132
1899
  };
@@ -2143,7 +1910,7 @@ export const jibb = $root.jibb = (() => {
2143
1910
  d.enableColor = false;
2144
1911
  }
2145
1912
  if (m.surfaceType != null && m.hasOwnProperty("surfaceType")) {
2146
- d.surfaceType = o.enums === String ? $root.types.SurfaceType[m.surfaceType] === undefined ? m.surfaceType : $root.types.SurfaceType[m.surfaceType] : m.surfaceType;
1913
+ d.surfaceType = o.enums === String ? $root.types.SurfaceType[m.surfaceType] : m.surfaceType;
2147
1914
  }
2148
1915
  if (m.enableTransformation != null && m.hasOwnProperty("enableTransformation")) {
2149
1916
  d.enableTransformation = m.enableTransformation;
@@ -2159,12 +1926,6 @@ export const jibb = $root.jibb = (() => {
2159
1926
  ContentExtractionRequest.prototype.toJSON = function toJSON() {
2160
1927
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
2161
1928
  };
2162
- ContentExtractionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
2163
- if (typeUrlPrefix === undefined) {
2164
- typeUrlPrefix = "type.googleapis.com";
2165
- }
2166
- return typeUrlPrefix + "/jibb.ipsa.v1.ContentExtractionRequest";
2167
- };
2168
1929
  return ContentExtractionRequest;
2169
1930
  }();
2170
1931
  v1.ContentExtractionResponse = function () {
@@ -2193,15 +1954,11 @@ export const jibb = $root.jibb = (() => {
2193
1954
  var t = r.uint32();
2194
1955
  switch (t >>> 3) {
2195
1956
  case 1:
2196
- {
2197
- m.img = r.bytes();
2198
- break;
2199
- }
1957
+ m.img = r.bytes();
1958
+ break;
2200
1959
  case 2:
2201
- {
2202
- m.transformedImg = r.bytes();
2203
- break;
2204
- }
1960
+ m.transformedImg = r.bytes();
1961
+ break;
2205
1962
  default:
2206
1963
  r.skipType(t & 7);
2207
1964
  break;
@@ -2227,10 +1984,10 @@ export const jibb = $root.jibb = (() => {
2227
1984
  if (d instanceof $root.jibb.ipsa.v1.ContentExtractionResponse) return d;
2228
1985
  var m = new $root.jibb.ipsa.v1.ContentExtractionResponse();
2229
1986
  if (d.img != null) {
2230
- if (typeof d.img === "string") $util.base64.decode(d.img, m.img = $util.newBuffer($util.base64.length(d.img)), 0);else if (d.img.length >= 0) m.img = d.img;
1987
+ if (typeof d.img === "string") $util.base64.decode(d.img, m.img = $util.newBuffer($util.base64.length(d.img)), 0);else if (d.img.length) m.img = d.img;
2231
1988
  }
2232
1989
  if (d.transformedImg != null) {
2233
- if (typeof d.transformedImg === "string") $util.base64.decode(d.transformedImg, m.transformedImg = $util.newBuffer($util.base64.length(d.transformedImg)), 0);else if (d.transformedImg.length >= 0) m.transformedImg = d.transformedImg;
1990
+ if (typeof d.transformedImg === "string") $util.base64.decode(d.transformedImg, m.transformedImg = $util.newBuffer($util.base64.length(d.transformedImg)), 0);else if (d.transformedImg.length) m.transformedImg = d.transformedImg;
2234
1991
  }
2235
1992
  return m;
2236
1993
  };
@@ -2258,12 +2015,6 @@ export const jibb = $root.jibb = (() => {
2258
2015
  ContentExtractionResponse.prototype.toJSON = function toJSON() {
2259
2016
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
2260
2017
  };
2261
- ContentExtractionResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
2262
- if (typeUrlPrefix === undefined) {
2263
- typeUrlPrefix = "type.googleapis.com";
2264
- }
2265
- return typeUrlPrefix + "/jibb.ipsa.v1.ContentExtractionResponse";
2266
- };
2267
2018
  return ContentExtractionResponse;
2268
2019
  }();
2269
2020
  v1.GetSimilarityRequest = function () {
@@ -2294,20 +2045,14 @@ export const jibb = $root.jibb = (() => {
2294
2045
  var t = r.uint32();
2295
2046
  switch (t >>> 3) {
2296
2047
  case 1:
2297
- {
2298
- m.newImage = r.bytes();
2299
- break;
2300
- }
2048
+ m.newImage = r.bytes();
2049
+ break;
2301
2050
  case 2:
2302
- {
2303
- m.prevImage = r.bytes();
2304
- break;
2305
- }
2051
+ m.prevImage = r.bytes();
2052
+ break;
2306
2053
  case 3:
2307
- {
2308
- m.level = r.int32();
2309
- break;
2310
- }
2054
+ m.level = r.int32();
2055
+ break;
2311
2056
  default:
2312
2057
  r.skipType(t & 7);
2313
2058
  break;
@@ -2343,18 +2088,12 @@ export const jibb = $root.jibb = (() => {
2343
2088
  if (d instanceof $root.jibb.ipsa.v1.GetSimilarityRequest) return d;
2344
2089
  var m = new $root.jibb.ipsa.v1.GetSimilarityRequest();
2345
2090
  if (d.newImage != null) {
2346
- if (typeof d.newImage === "string") $util.base64.decode(d.newImage, m.newImage = $util.newBuffer($util.base64.length(d.newImage)), 0);else if (d.newImage.length >= 0) m.newImage = d.newImage;
2091
+ if (typeof d.newImage === "string") $util.base64.decode(d.newImage, m.newImage = $util.newBuffer($util.base64.length(d.newImage)), 0);else if (d.newImage.length) m.newImage = d.newImage;
2347
2092
  }
2348
2093
  if (d.prevImage != null) {
2349
- if (typeof d.prevImage === "string") $util.base64.decode(d.prevImage, m.prevImage = $util.newBuffer($util.base64.length(d.prevImage)), 0);else if (d.prevImage.length >= 0) m.prevImage = d.prevImage;
2094
+ if (typeof d.prevImage === "string") $util.base64.decode(d.prevImage, m.prevImage = $util.newBuffer($util.base64.length(d.prevImage)), 0);else if (d.prevImage.length) m.prevImage = d.prevImage;
2350
2095
  }
2351
2096
  switch (d.level) {
2352
- default:
2353
- if (typeof d.level === "number") {
2354
- m.level = d.level;
2355
- break;
2356
- }
2357
- break;
2358
2097
  case "NORMAL":
2359
2098
  case 0:
2360
2099
  m.level = 0;
@@ -2391,19 +2130,13 @@ export const jibb = $root.jibb = (() => {
2391
2130
  d.prevImage = o.bytes === String ? $util.base64.encode(m.prevImage, 0, m.prevImage.length) : o.bytes === Array ? Array.prototype.slice.call(m.prevImage) : m.prevImage;
2392
2131
  }
2393
2132
  if (m.level != null && m.hasOwnProperty("level")) {
2394
- d.level = o.enums === String ? $root.jibb.ipsa.v1.GetSimilarityRequest.SensivityLevel[m.level] === undefined ? m.level : $root.jibb.ipsa.v1.GetSimilarityRequest.SensivityLevel[m.level] : m.level;
2133
+ d.level = o.enums === String ? $root.jibb.ipsa.v1.GetSimilarityRequest.SensivityLevel[m.level] : m.level;
2395
2134
  }
2396
2135
  return d;
2397
2136
  };
2398
2137
  GetSimilarityRequest.prototype.toJSON = function toJSON() {
2399
2138
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
2400
2139
  };
2401
- GetSimilarityRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
2402
- if (typeUrlPrefix === undefined) {
2403
- typeUrlPrefix = "type.googleapis.com";
2404
- }
2405
- return typeUrlPrefix + "/jibb.ipsa.v1.GetSimilarityRequest";
2406
- };
2407
2140
  GetSimilarityRequest.SensivityLevel = function () {
2408
2141
  const valuesById = {},
2409
2142
  values = Object.create(valuesById);
@@ -2440,15 +2173,11 @@ export const jibb = $root.jibb = (() => {
2440
2173
  var t = r.uint32();
2441
2174
  switch (t >>> 3) {
2442
2175
  case 1:
2443
- {
2444
- m.isSimilar = r.bool();
2445
- break;
2446
- }
2176
+ m.isSimilar = r.bool();
2177
+ break;
2447
2178
  case 2:
2448
- {
2449
- m.addedContentCount = r.int32();
2450
- break;
2451
- }
2179
+ m.addedContentCount = r.int32();
2180
+ break;
2452
2181
  default:
2453
2182
  r.skipType(t & 7);
2454
2183
  break;
@@ -2499,12 +2228,6 @@ export const jibb = $root.jibb = (() => {
2499
2228
  GetSimilarityResponse.prototype.toJSON = function toJSON() {
2500
2229
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
2501
2230
  };
2502
- GetSimilarityResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
2503
- if (typeUrlPrefix === undefined) {
2504
- typeUrlPrefix = "type.googleapis.com";
2505
- }
2506
- return typeUrlPrefix + "/jibb.ipsa.v1.GetSimilarityResponse";
2507
- };
2508
2231
  return GetSimilarityResponse;
2509
2232
  }();
2510
2233
  v1.Ipsa = function () {
@@ -2531,10 +2254,8 @@ export const jibb = $root.jibb = (() => {
2531
2254
  var t = r.uint32();
2532
2255
  switch (t >>> 3) {
2533
2256
  case 1:
2534
- {
2535
- m.data = r.bytes();
2536
- break;
2537
- }
2257
+ m.data = r.bytes();
2258
+ break;
2538
2259
  default:
2539
2260
  r.skipType(t & 7);
2540
2261
  break;
@@ -2557,7 +2278,7 @@ export const jibb = $root.jibb = (() => {
2557
2278
  if (d instanceof $root.jibb.ipsa.v1.Ipsa) return d;
2558
2279
  var m = new $root.jibb.ipsa.v1.Ipsa();
2559
2280
  if (d.data != null) {
2560
- if (typeof d.data === "string") $util.base64.decode(d.data, m.data = $util.newBuffer($util.base64.length(d.data)), 0);else if (d.data.length >= 0) m.data = d.data;
2281
+ if (typeof d.data === "string") $util.base64.decode(d.data, m.data = $util.newBuffer($util.base64.length(d.data)), 0);else if (d.data.length) m.data = d.data;
2561
2282
  }
2562
2283
  return m;
2563
2284
  };
@@ -2578,12 +2299,6 @@ export const jibb = $root.jibb = (() => {
2578
2299
  Ipsa.prototype.toJSON = function toJSON() {
2579
2300
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
2580
2301
  };
2581
- Ipsa.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
2582
- if (typeUrlPrefix === undefined) {
2583
- typeUrlPrefix = "type.googleapis.com";
2584
- }
2585
- return typeUrlPrefix + "/jibb.ipsa.v1.Ipsa";
2586
- };
2587
2302
  return Ipsa;
2588
2303
  }();
2589
2304
  v1.Request = function () {
@@ -2627,40 +2342,26 @@ export const jibb = $root.jibb = (() => {
2627
2342
  var t = r.uint32();
2628
2343
  switch (t >>> 3) {
2629
2344
  case 1:
2630
- {
2631
- m.id = r.int32();
2632
- break;
2633
- }
2345
+ m.id = r.int32();
2346
+ break;
2634
2347
  case 2:
2635
- {
2636
- m.config = $root.jibb.ipsa.v1.Config.decode(r, r.uint32());
2637
- break;
2638
- }
2348
+ m.config = $root.jibb.ipsa.v1.Config.decode(r, r.uint32());
2349
+ break;
2639
2350
  case 3:
2640
- {
2641
- m.ipsa = $root.jibb.ipsa.v1.Ipsa.decode(r, r.uint32());
2642
- break;
2643
- }
2351
+ m.ipsa = $root.jibb.ipsa.v1.Ipsa.decode(r, r.uint32());
2352
+ break;
2644
2353
  case 4:
2645
- {
2646
- m.resetSession = $root.google.protobuf.Empty.decode(r, r.uint32());
2647
- break;
2648
- }
2354
+ m.resetSession = $root.google.protobuf.Empty.decode(r, r.uint32());
2355
+ break;
2649
2356
  case 5:
2650
- {
2651
- m.recalibrate = $root.google.protobuf.Empty.decode(r, r.uint32());
2652
- break;
2653
- }
2357
+ m.recalibrate = $root.google.protobuf.Empty.decode(r, r.uint32());
2358
+ break;
2654
2359
  case 6:
2655
- {
2656
- m.runtimeConfig = $root.jibb.ipsa.v1.RuntimeConfig.decode(r, r.uint32());
2657
- break;
2658
- }
2360
+ m.runtimeConfig = $root.jibb.ipsa.v1.RuntimeConfig.decode(r, r.uint32());
2361
+ break;
2659
2362
  case 7:
2660
- {
2661
- m.dummy = $root.google.protobuf.Empty.decode(r, r.uint32());
2662
- break;
2663
- }
2363
+ m.dummy = $root.google.protobuf.Empty.decode(r, r.uint32());
2364
+ break;
2664
2365
  default:
2665
2366
  r.skipType(t & 7);
2666
2367
  break;
@@ -2797,12 +2498,6 @@ export const jibb = $root.jibb = (() => {
2797
2498
  Request.prototype.toJSON = function toJSON() {
2798
2499
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
2799
2500
  };
2800
- Request.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
2801
- if (typeUrlPrefix === undefined) {
2802
- typeUrlPrefix = "type.googleapis.com";
2803
- }
2804
- return typeUrlPrefix + "/jibb.ipsa.v1.Request";
2805
- };
2806
2501
  return Request;
2807
2502
  }();
2808
2503
  v1.Status = function () {
@@ -2849,43 +2544,31 @@ export const jibb = $root.jibb = (() => {
2849
2544
  var t = r.uint32();
2850
2545
  switch (t >>> 3) {
2851
2546
  case 1:
2852
- {
2853
- m.userId = r.string();
2854
- break;
2855
- }
2547
+ m.userId = r.string();
2548
+ break;
2856
2549
  case 2:
2857
- {
2858
- if (!(m.corners && m.corners.length)) m.corners = [];
2859
- if ((t & 7) === 2) {
2860
- var c2 = r.uint32() + r.pos;
2861
- while (r.pos < c2) m.corners.push(r.float());
2862
- } else m.corners.push(r.float());
2863
- break;
2864
- }
2550
+ if (!(m.corners && m.corners.length)) m.corners = [];
2551
+ if ((t & 7) === 2) {
2552
+ var c2 = r.uint32() + r.pos;
2553
+ while (r.pos < c2) m.corners.push(r.float());
2554
+ } else m.corners.push(r.float());
2555
+ break;
2865
2556
  case 3:
2866
- {
2867
- if (!(m.codes && m.codes.length)) m.codes = [];
2868
- if ((t & 7) === 2) {
2869
- var c2 = r.uint32() + r.pos;
2870
- while (r.pos < c2) m.codes.push(r.int32());
2871
- } else m.codes.push(r.int32());
2872
- break;
2873
- }
2557
+ if (!(m.codes && m.codes.length)) m.codes = [];
2558
+ if ((t & 7) === 2) {
2559
+ var c2 = r.uint32() + r.pos;
2560
+ while (r.pos < c2) m.codes.push(r.int32());
2561
+ } else m.codes.push(r.int32());
2562
+ break;
2874
2563
  case 4:
2875
- {
2876
- m.processingTime = r.int32();
2877
- break;
2878
- }
2564
+ m.processingTime = r.int32();
2565
+ break;
2879
2566
  case 5:
2880
- {
2881
- m.upsampling = r.float();
2882
- break;
2883
- }
2567
+ m.upsampling = r.float();
2568
+ break;
2884
2569
  case 6:
2885
- {
2886
- m.paperDetectionConfidence = r.int32();
2887
- break;
2888
- }
2570
+ m.paperDetectionConfidence = r.int32();
2571
+ break;
2889
2572
  default:
2890
2573
  r.skipType(t & 7);
2891
2574
  break;
@@ -2962,10 +2645,6 @@ export const jibb = $root.jibb = (() => {
2962
2645
  for (var i = 0; i < d.codes.length; ++i) {
2963
2646
  switch (d.codes[i]) {
2964
2647
  default:
2965
- if (typeof d.codes[i] === "number") {
2966
- m.codes[i] = d.codes[i];
2967
- break;
2968
- }
2969
2648
  case "SUCCESS":
2970
2649
  case 0:
2971
2650
  m.codes[i] = 0;
@@ -3061,7 +2740,7 @@ export const jibb = $root.jibb = (() => {
3061
2740
  if (m.codes && m.codes.length) {
3062
2741
  d.codes = [];
3063
2742
  for (var j = 0; j < m.codes.length; ++j) {
3064
- d.codes[j] = o.enums === String ? $root.jibb.ipsa.v1.StatusCode[m.codes[j]] === undefined ? m.codes[j] : $root.jibb.ipsa.v1.StatusCode[m.codes[j]] : m.codes[j];
2743
+ d.codes[j] = o.enums === String ? $root.jibb.ipsa.v1.StatusCode[m.codes[j]] : m.codes[j];
3065
2744
  }
3066
2745
  }
3067
2746
  if (m.processingTime != null && m.hasOwnProperty("processingTime")) {
@@ -3078,12 +2757,6 @@ export const jibb = $root.jibb = (() => {
3078
2757
  Status.prototype.toJSON = function toJSON() {
3079
2758
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
3080
2759
  };
3081
- Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
3082
- if (typeUrlPrefix === undefined) {
3083
- typeUrlPrefix = "type.googleapis.com";
3084
- }
3085
- return typeUrlPrefix + "/jibb.ipsa.v1.Status";
3086
- };
3087
2760
  return Status;
3088
2761
  }();
3089
2762
  v1.Image = function () {
@@ -3112,15 +2785,11 @@ export const jibb = $root.jibb = (() => {
3112
2785
  var t = r.uint32();
3113
2786
  switch (t >>> 3) {
3114
2787
  case 1:
3115
- {
3116
- m.userId = r.string();
3117
- break;
3118
- }
2788
+ m.userId = r.string();
2789
+ break;
3119
2790
  case 2:
3120
- {
3121
- m.data = r.bytes();
3122
- break;
3123
- }
2791
+ m.data = r.bytes();
2792
+ break;
3124
2793
  default:
3125
2794
  r.skipType(t & 7);
3126
2795
  break;
@@ -3149,7 +2818,7 @@ export const jibb = $root.jibb = (() => {
3149
2818
  m.userId = String(d.userId);
3150
2819
  }
3151
2820
  if (d.data != null) {
3152
- if (typeof d.data === "string") $util.base64.decode(d.data, m.data = $util.newBuffer($util.base64.length(d.data)), 0);else if (d.data.length >= 0) m.data = d.data;
2821
+ if (typeof d.data === "string") $util.base64.decode(d.data, m.data = $util.newBuffer($util.base64.length(d.data)), 0);else if (d.data.length) m.data = d.data;
3153
2822
  }
3154
2823
  return m;
3155
2824
  };
@@ -3174,12 +2843,6 @@ export const jibb = $root.jibb = (() => {
3174
2843
  Image.prototype.toJSON = function toJSON() {
3175
2844
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
3176
2845
  };
3177
- Image.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
3178
- if (typeUrlPrefix === undefined) {
3179
- typeUrlPrefix = "type.googleapis.com";
3180
- }
3181
- return typeUrlPrefix + "/jibb.ipsa.v1.Image";
3182
- };
3183
2846
  return Image;
3184
2847
  }();
3185
2848
  v1.Response = function () {
@@ -3210,20 +2873,14 @@ export const jibb = $root.jibb = (() => {
3210
2873
  var t = r.uint32();
3211
2874
  switch (t >>> 3) {
3212
2875
  case 1:
3213
- {
3214
- m.id = r.int32();
3215
- break;
3216
- }
2876
+ m.id = r.int32();
2877
+ break;
3217
2878
  case 5:
3218
- {
3219
- m.image = r.bytes();
3220
- break;
3221
- }
2879
+ m.image = r.bytes();
2880
+ break;
3222
2881
  case 8:
3223
- {
3224
- m.status = $root.jibb.ipsa.v1.Status.decode(r, r.uint32());
3225
- break;
3226
- }
2882
+ m.status = $root.jibb.ipsa.v1.Status.decode(r, r.uint32());
2883
+ break;
3227
2884
  default:
3228
2885
  r.skipType(t & 7);
3229
2886
  break;
@@ -3258,7 +2915,7 @@ export const jibb = $root.jibb = (() => {
3258
2915
  m.id = d.id | 0;
3259
2916
  }
3260
2917
  if (d.image != null) {
3261
- if (typeof d.image === "string") $util.base64.decode(d.image, m.image = $util.newBuffer($util.base64.length(d.image)), 0);else if (d.image.length >= 0) m.image = d.image;
2918
+ if (typeof d.image === "string") $util.base64.decode(d.image, m.image = $util.newBuffer($util.base64.length(d.image)), 0);else if (d.image.length) m.image = d.image;
3262
2919
  }
3263
2920
  if (d.status != null) {
3264
2921
  if (typeof d.status !== "object") throw TypeError(".jibb.ipsa.v1.Response.status: object expected");
@@ -3291,12 +2948,6 @@ export const jibb = $root.jibb = (() => {
3291
2948
  Response.prototype.toJSON = function toJSON() {
3292
2949
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
3293
2950
  };
3294
- Response.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
3295
- if (typeUrlPrefix === undefined) {
3296
- typeUrlPrefix = "type.googleapis.com";
3297
- }
3298
- return typeUrlPrefix + "/jibb.ipsa.v1.Response";
3299
- };
3300
2951
  return Response;
3301
2952
  }();
3302
2953
  v1.Started = function () {
@@ -3345,12 +2996,6 @@ export const jibb = $root.jibb = (() => {
3345
2996
  Started.prototype.toJSON = function toJSON() {
3346
2997
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
3347
2998
  };
3348
- Started.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
3349
- if (typeUrlPrefix === undefined) {
3350
- typeUrlPrefix = "type.googleapis.com";
3351
- }
3352
- return typeUrlPrefix + "/jibb.ipsa.v1.Started";
3353
- };
3354
2999
  return Started;
3355
3000
  }();
3356
3001
  v1.Stopped = function () {
@@ -3399,13 +3044,149 @@ export const jibb = $root.jibb = (() => {
3399
3044
  Stopped.prototype.toJSON = function toJSON() {
3400
3045
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
3401
3046
  };
3402
- Stopped.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
3403
- if (typeUrlPrefix === undefined) {
3404
- typeUrlPrefix = "type.googleapis.com";
3047
+ return Stopped;
3048
+ }();
3049
+ v1.ConvertHeicToJpegRequest = function () {
3050
+ function ConvertHeicToJpegRequest(p) {
3051
+ if (p) for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]];
3052
+ }
3053
+ ConvertHeicToJpegRequest.prototype.heic = $util.newBuffer([]);
3054
+ ConvertHeicToJpegRequest.create = function create(properties) {
3055
+ return new ConvertHeicToJpegRequest(properties);
3056
+ };
3057
+ ConvertHeicToJpegRequest.encode = function encode(m, w) {
3058
+ if (!w) w = $Writer.create();
3059
+ if (m.heic != null && Object.hasOwnProperty.call(m, "heic")) w.uint32(10).bytes(m.heic);
3060
+ return w;
3061
+ };
3062
+ ConvertHeicToJpegRequest.encodeDelimited = function encodeDelimited(message, writer) {
3063
+ return this.encode(message, writer).ldelim();
3064
+ };
3065
+ ConvertHeicToJpegRequest.decode = function decode(r, l) {
3066
+ if (!(r instanceof $Reader)) r = $Reader.create(r);
3067
+ var c = l === undefined ? r.len : r.pos + l,
3068
+ m = new $root.jibb.ipsa.v1.ConvertHeicToJpegRequest();
3069
+ while (r.pos < c) {
3070
+ var t = r.uint32();
3071
+ switch (t >>> 3) {
3072
+ case 1:
3073
+ m.heic = r.bytes();
3074
+ break;
3075
+ default:
3076
+ r.skipType(t & 7);
3077
+ break;
3078
+ }
3079
+ }
3080
+ return m;
3081
+ };
3082
+ ConvertHeicToJpegRequest.decodeDelimited = function decodeDelimited(reader) {
3083
+ if (!(reader instanceof $Reader)) reader = new $Reader(reader);
3084
+ return this.decode(reader, reader.uint32());
3085
+ };
3086
+ ConvertHeicToJpegRequest.verify = function verify(m) {
3087
+ if (typeof m !== "object" || m === null) return "object expected";
3088
+ if (m.heic != null && m.hasOwnProperty("heic")) {
3089
+ if (!(m.heic && typeof m.heic.length === "number" || $util.isString(m.heic))) return "heic: buffer expected";
3405
3090
  }
3406
- return typeUrlPrefix + "/jibb.ipsa.v1.Stopped";
3091
+ return null;
3407
3092
  };
3408
- return Stopped;
3093
+ ConvertHeicToJpegRequest.fromObject = function fromObject(d) {
3094
+ if (d instanceof $root.jibb.ipsa.v1.ConvertHeicToJpegRequest) return d;
3095
+ var m = new $root.jibb.ipsa.v1.ConvertHeicToJpegRequest();
3096
+ if (d.heic != null) {
3097
+ if (typeof d.heic === "string") $util.base64.decode(d.heic, m.heic = $util.newBuffer($util.base64.length(d.heic)), 0);else if (d.heic.length) m.heic = d.heic;
3098
+ }
3099
+ return m;
3100
+ };
3101
+ ConvertHeicToJpegRequest.toObject = function toObject(m, o) {
3102
+ if (!o) o = {};
3103
+ var d = {};
3104
+ if (o.defaults) {
3105
+ if (o.bytes === String) d.heic = "";else {
3106
+ d.heic = [];
3107
+ if (o.bytes !== Array) d.heic = $util.newBuffer(d.heic);
3108
+ }
3109
+ }
3110
+ if (m.heic != null && m.hasOwnProperty("heic")) {
3111
+ d.heic = o.bytes === String ? $util.base64.encode(m.heic, 0, m.heic.length) : o.bytes === Array ? Array.prototype.slice.call(m.heic) : m.heic;
3112
+ }
3113
+ return d;
3114
+ };
3115
+ ConvertHeicToJpegRequest.prototype.toJSON = function toJSON() {
3116
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
3117
+ };
3118
+ return ConvertHeicToJpegRequest;
3119
+ }();
3120
+ v1.ConvertHeicToJpegResponse = function () {
3121
+ function ConvertHeicToJpegResponse(p) {
3122
+ if (p) for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]];
3123
+ }
3124
+ ConvertHeicToJpegResponse.prototype.jpeg = $util.newBuffer([]);
3125
+ ConvertHeicToJpegResponse.create = function create(properties) {
3126
+ return new ConvertHeicToJpegResponse(properties);
3127
+ };
3128
+ ConvertHeicToJpegResponse.encode = function encode(m, w) {
3129
+ if (!w) w = $Writer.create();
3130
+ if (m.jpeg != null && Object.hasOwnProperty.call(m, "jpeg")) w.uint32(10).bytes(m.jpeg);
3131
+ return w;
3132
+ };
3133
+ ConvertHeicToJpegResponse.encodeDelimited = function encodeDelimited(message, writer) {
3134
+ return this.encode(message, writer).ldelim();
3135
+ };
3136
+ ConvertHeicToJpegResponse.decode = function decode(r, l) {
3137
+ if (!(r instanceof $Reader)) r = $Reader.create(r);
3138
+ var c = l === undefined ? r.len : r.pos + l,
3139
+ m = new $root.jibb.ipsa.v1.ConvertHeicToJpegResponse();
3140
+ while (r.pos < c) {
3141
+ var t = r.uint32();
3142
+ switch (t >>> 3) {
3143
+ case 1:
3144
+ m.jpeg = r.bytes();
3145
+ break;
3146
+ default:
3147
+ r.skipType(t & 7);
3148
+ break;
3149
+ }
3150
+ }
3151
+ return m;
3152
+ };
3153
+ ConvertHeicToJpegResponse.decodeDelimited = function decodeDelimited(reader) {
3154
+ if (!(reader instanceof $Reader)) reader = new $Reader(reader);
3155
+ return this.decode(reader, reader.uint32());
3156
+ };
3157
+ ConvertHeicToJpegResponse.verify = function verify(m) {
3158
+ if (typeof m !== "object" || m === null) return "object expected";
3159
+ if (m.jpeg != null && m.hasOwnProperty("jpeg")) {
3160
+ if (!(m.jpeg && typeof m.jpeg.length === "number" || $util.isString(m.jpeg))) return "jpeg: buffer expected";
3161
+ }
3162
+ return null;
3163
+ };
3164
+ ConvertHeicToJpegResponse.fromObject = function fromObject(d) {
3165
+ if (d instanceof $root.jibb.ipsa.v1.ConvertHeicToJpegResponse) return d;
3166
+ var m = new $root.jibb.ipsa.v1.ConvertHeicToJpegResponse();
3167
+ if (d.jpeg != null) {
3168
+ if (typeof d.jpeg === "string") $util.base64.decode(d.jpeg, m.jpeg = $util.newBuffer($util.base64.length(d.jpeg)), 0);else if (d.jpeg.length) m.jpeg = d.jpeg;
3169
+ }
3170
+ return m;
3171
+ };
3172
+ ConvertHeicToJpegResponse.toObject = function toObject(m, o) {
3173
+ if (!o) o = {};
3174
+ var d = {};
3175
+ if (o.defaults) {
3176
+ if (o.bytes === String) d.jpeg = "";else {
3177
+ d.jpeg = [];
3178
+ if (o.bytes !== Array) d.jpeg = $util.newBuffer(d.jpeg);
3179
+ }
3180
+ }
3181
+ if (m.jpeg != null && m.hasOwnProperty("jpeg")) {
3182
+ d.jpeg = o.bytes === String ? $util.base64.encode(m.jpeg, 0, m.jpeg.length) : o.bytes === Array ? Array.prototype.slice.call(m.jpeg) : m.jpeg;
3183
+ }
3184
+ return d;
3185
+ };
3186
+ ConvertHeicToJpegResponse.prototype.toJSON = function toJSON() {
3187
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
3188
+ };
3189
+ return ConvertHeicToJpegResponse;
3409
3190
  }();
3410
3191
  return v1;
3411
3192
  }();
@@ -3418,10 +3199,9 @@ export const user = $root.user = (() => {
3418
3199
  user.Level = function () {
3419
3200
  const valuesById = {},
3420
3201
  values = Object.create(valuesById);
3421
- values[valuesById[0] = "FREE"] = 0;
3422
- values[valuesById[1] = "BASIC"] = 1;
3423
- values[valuesById[3] = "PRO"] = 3;
3424
- values[valuesById[4] = "BUSINESS"] = 4;
3202
+ values[valuesById[0] = "UNKNOWN_USER"] = 0;
3203
+ values[valuesById[1] = "PRO"] = 1;
3204
+ values[valuesById[2] = "BUSINESS"] = 2;
3425
3205
  values[valuesById[5] = "ENTERPRISE"] = 5;
3426
3206
  return values;
3427
3207
  }();
@@ -3442,6 +3222,20 @@ export const user = $root.user = (() => {
3442
3222
  values[valuesById[2] = "CLOUD"] = 2;
3443
3223
  return values;
3444
3224
  }();
3225
+ user.SubscriptionStatus = function () {
3226
+ const valuesById = {},
3227
+ values = Object.create(valuesById);
3228
+ values[valuesById[0] = "UNKNOWN_STATUS"] = 0;
3229
+ values[valuesById[1] = "TRIALING"] = 1;
3230
+ values[valuesById[2] = "ACTIVE"] = 2;
3231
+ values[valuesById[3] = "INCOMPLETE"] = 3;
3232
+ values[valuesById[4] = "INCOMPLETE_EXPIRED"] = 4;
3233
+ values[valuesById[5] = "PAST_DUE"] = 5;
3234
+ values[valuesById[6] = "CANCELED"] = 6;
3235
+ values[valuesById[7] = "UNPAID"] = 7;
3236
+ values[valuesById[8] = "PAUSED"] = 8;
3237
+ return values;
3238
+ }();
3445
3239
  user.UserDetails = function () {
3446
3240
  function UserDetails(p) {
3447
3241
  if (p) for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]];
@@ -3456,6 +3250,7 @@ export const user = $root.user = (() => {
3456
3250
  UserDetails.prototype.userId = "";
3457
3251
  UserDetails.prototype.email = "";
3458
3252
  UserDetails.prototype.lastLogin = null;
3253
+ UserDetails.prototype.fileManagerEnabled = false;
3459
3254
  UserDetails.create = function create(properties) {
3460
3255
  return new UserDetails(properties);
3461
3256
  };
@@ -3471,6 +3266,7 @@ export const user = $root.user = (() => {
3471
3266
  if (m.userId != null && Object.hasOwnProperty.call(m, "userId")) w.uint32(74).string(m.userId);
3472
3267
  if (m.email != null && Object.hasOwnProperty.call(m, "email")) w.uint32(82).string(m.email);
3473
3268
  if (m.lastLogin != null && Object.hasOwnProperty.call(m, "lastLogin")) $root.google.protobuf.Timestamp.encode(m.lastLogin, w.uint32(90).fork()).ldelim();
3269
+ if (m.fileManagerEnabled != null && Object.hasOwnProperty.call(m, "fileManagerEnabled")) w.uint32(96).bool(m.fileManagerEnabled);
3474
3270
  return w;
3475
3271
  };
3476
3272
  UserDetails.encodeDelimited = function encodeDelimited(message, writer) {
@@ -3484,55 +3280,38 @@ export const user = $root.user = (() => {
3484
3280
  var t = r.uint32();
3485
3281
  switch (t >>> 3) {
3486
3282
  case 2:
3487
- {
3488
- m.organizationName = r.string();
3489
- break;
3490
- }
3283
+ m.organizationName = r.string();
3284
+ break;
3491
3285
  case 3:
3492
- {
3493
- m.level = r.int32();
3494
- break;
3495
- }
3286
+ m.level = r.int32();
3287
+ break;
3496
3288
  case 4:
3497
- {
3498
- m.firstName = r.string();
3499
- break;
3500
- }
3289
+ m.firstName = r.string();
3290
+ break;
3501
3291
  case 5:
3502
- {
3503
- m.lastName = r.string();
3504
- break;
3505
- }
3292
+ m.lastName = r.string();
3293
+ break;
3506
3294
  case 6:
3507
- {
3508
- m.organizationId = r.int32();
3509
- break;
3510
- }
3295
+ m.organizationId = r.int32();
3296
+ break;
3511
3297
  case 7:
3512
- {
3513
- m.userType = r.int32();
3514
- break;
3515
- }
3298
+ m.userType = r.int32();
3299
+ break;
3516
3300
  case 8:
3517
- {
3518
- m.activated = r.bool();
3519
- break;
3520
- }
3301
+ m.activated = r.bool();
3302
+ break;
3521
3303
  case 9:
3522
- {
3523
- m.userId = r.string();
3524
- break;
3525
- }
3304
+ m.userId = r.string();
3305
+ break;
3526
3306
  case 10:
3527
- {
3528
- m.email = r.string();
3529
- break;
3530
- }
3307
+ m.email = r.string();
3308
+ break;
3531
3309
  case 11:
3532
- {
3533
- m.lastLogin = $root.google.protobuf.Timestamp.decode(r, r.uint32());
3534
- break;
3535
- }
3310
+ m.lastLogin = $root.google.protobuf.Timestamp.decode(r, r.uint32());
3311
+ break;
3312
+ case 12:
3313
+ m.fileManagerEnabled = r.bool();
3314
+ break;
3536
3315
  default:
3537
3316
  r.skipType(t & 7);
3538
3317
  break;
@@ -3555,8 +3334,7 @@ export const user = $root.user = (() => {
3555
3334
  return "level: enum value expected";
3556
3335
  case 0:
3557
3336
  case 1:
3558
- case 3:
3559
- case 4:
3337
+ case 2:
3560
3338
  case 5:
3561
3339
  break;
3562
3340
  }
@@ -3596,6 +3374,9 @@ export const user = $root.user = (() => {
3596
3374
  if (e) return "lastLogin." + e;
3597
3375
  }
3598
3376
  }
3377
+ if (m.fileManagerEnabled != null && m.hasOwnProperty("fileManagerEnabled")) {
3378
+ if (typeof m.fileManagerEnabled !== "boolean") return "fileManagerEnabled: boolean expected";
3379
+ }
3599
3380
  return null;
3600
3381
  };
3601
3382
  UserDetails.fromObject = function fromObject(d) {
@@ -3605,27 +3386,17 @@ export const user = $root.user = (() => {
3605
3386
  m.organizationName = String(d.organizationName);
3606
3387
  }
3607
3388
  switch (d.level) {
3608
- default:
3609
- if (typeof d.level === "number") {
3610
- m.level = d.level;
3611
- break;
3612
- }
3613
- break;
3614
- case "FREE":
3389
+ case "UNKNOWN_USER":
3615
3390
  case 0:
3616
3391
  m.level = 0;
3617
3392
  break;
3618
- case "BASIC":
3393
+ case "PRO":
3619
3394
  case 1:
3620
3395
  m.level = 1;
3621
3396
  break;
3622
- case "PRO":
3623
- case 3:
3624
- m.level = 3;
3625
- break;
3626
3397
  case "BUSINESS":
3627
- case 4:
3628
- m.level = 4;
3398
+ case 2:
3399
+ m.level = 2;
3629
3400
  break;
3630
3401
  case "ENTERPRISE":
3631
3402
  case 5:
@@ -3642,12 +3413,6 @@ export const user = $root.user = (() => {
3642
3413
  m.organizationId = d.organizationId | 0;
3643
3414
  }
3644
3415
  switch (d.userType) {
3645
- default:
3646
- if (typeof d.userType === "number") {
3647
- m.userType = d.userType;
3648
- break;
3649
- }
3650
- break;
3651
3416
  case "UNKNOWN":
3652
3417
  case 0:
3653
3418
  m.userType = 0;
@@ -3678,6 +3443,9 @@ export const user = $root.user = (() => {
3678
3443
  if (typeof d.lastLogin !== "object") throw TypeError(".user.UserDetails.lastLogin: object expected");
3679
3444
  m.lastLogin = $root.google.protobuf.Timestamp.fromObject(d.lastLogin);
3680
3445
  }
3446
+ if (d.fileManagerEnabled != null) {
3447
+ m.fileManagerEnabled = Boolean(d.fileManagerEnabled);
3448
+ }
3681
3449
  return m;
3682
3450
  };
3683
3451
  UserDetails.toObject = function toObject(m, o) {
@@ -3685,7 +3453,7 @@ export const user = $root.user = (() => {
3685
3453
  var d = {};
3686
3454
  if (o.defaults) {
3687
3455
  d.organizationName = "";
3688
- d.level = o.enums === String ? "FREE" : 0;
3456
+ d.level = o.enums === String ? "UNKNOWN_USER" : 0;
3689
3457
  d.firstName = "";
3690
3458
  d.lastName = "";
3691
3459
  d.organizationId = 0;
@@ -3694,12 +3462,13 @@ export const user = $root.user = (() => {
3694
3462
  d.userId = "";
3695
3463
  d.email = "";
3696
3464
  d.lastLogin = null;
3465
+ d.fileManagerEnabled = false;
3697
3466
  }
3698
3467
  if (m.organizationName != null && m.hasOwnProperty("organizationName")) {
3699
3468
  d.organizationName = m.organizationName;
3700
3469
  }
3701
3470
  if (m.level != null && m.hasOwnProperty("level")) {
3702
- d.level = o.enums === String ? $root.user.Level[m.level] === undefined ? m.level : $root.user.Level[m.level] : m.level;
3471
+ d.level = o.enums === String ? $root.user.Level[m.level] : m.level;
3703
3472
  }
3704
3473
  if (m.firstName != null && m.hasOwnProperty("firstName")) {
3705
3474
  d.firstName = m.firstName;
@@ -3711,7 +3480,7 @@ export const user = $root.user = (() => {
3711
3480
  d.organizationId = m.organizationId;
3712
3481
  }
3713
3482
  if (m.userType != null && m.hasOwnProperty("userType")) {
3714
- d.userType = o.enums === String ? $root.user.UserType[m.userType] === undefined ? m.userType : $root.user.UserType[m.userType] : m.userType;
3483
+ d.userType = o.enums === String ? $root.user.UserType[m.userType] : m.userType;
3715
3484
  }
3716
3485
  if (m.activated != null && m.hasOwnProperty("activated")) {
3717
3486
  d.activated = m.activated;
@@ -3725,82 +3494,107 @@ export const user = $root.user = (() => {
3725
3494
  if (m.lastLogin != null && m.hasOwnProperty("lastLogin")) {
3726
3495
  d.lastLogin = $root.google.protobuf.Timestamp.toObject(m.lastLogin, o);
3727
3496
  }
3497
+ if (m.fileManagerEnabled != null && m.hasOwnProperty("fileManagerEnabled")) {
3498
+ d.fileManagerEnabled = m.fileManagerEnabled;
3499
+ }
3728
3500
  return d;
3729
3501
  };
3730
3502
  UserDetails.prototype.toJSON = function toJSON() {
3731
3503
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
3732
3504
  };
3733
- UserDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
3734
- if (typeUrlPrefix === undefined) {
3735
- typeUrlPrefix = "type.googleapis.com";
3736
- }
3737
- return typeUrlPrefix + "/user.UserDetails";
3738
- };
3739
3505
  return UserDetails;
3740
3506
  }();
3741
- user.UserClaims = function () {
3742
- function UserClaims(p) {
3507
+ user.OrganizationDetails = function () {
3508
+ function OrganizationDetails(p) {
3743
3509
  if (p) for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]];
3744
3510
  }
3745
- UserClaims.prototype.level = 0;
3746
- UserClaims.prototype.organizationId = 0;
3747
- UserClaims.prototype.email = "";
3748
- UserClaims.prototype.organizationName = "";
3749
- UserClaims.prototype.userId = "";
3750
- UserClaims.prototype.isDevice = false;
3751
- UserClaims.create = function create(properties) {
3752
- return new UserClaims(properties);
3753
- };
3754
- UserClaims.encode = function encode(m, w) {
3511
+ OrganizationDetails.prototype.name = "";
3512
+ OrganizationDetails.prototype.ownerEmail = "";
3513
+ OrganizationDetails.prototype.level = 0;
3514
+ OrganizationDetails.prototype.licenseCount = 0;
3515
+ OrganizationDetails.prototype.usersCount = 0;
3516
+ OrganizationDetails.prototype.creationDate = null;
3517
+ OrganizationDetails.prototype.startDate = null;
3518
+ OrganizationDetails.prototype.expiryDate = null;
3519
+ OrganizationDetails.prototype.organizationId = 0;
3520
+ OrganizationDetails.prototype.subdomainName = "";
3521
+ OrganizationDetails.prototype.deviceLicenseCount = 0;
3522
+ OrganizationDetails.prototype.devicesCount = 0;
3523
+ OrganizationDetails.prototype.imageCollection = false;
3524
+ OrganizationDetails.prototype.fileManagerEnabled = false;
3525
+ OrganizationDetails.create = function create(properties) {
3526
+ return new OrganizationDetails(properties);
3527
+ };
3528
+ OrganizationDetails.encode = function encode(m, w) {
3755
3529
  if (!w) w = $Writer.create();
3756
- if (m.level != null && Object.hasOwnProperty.call(m, "level")) w.uint32(16).int32(m.level);
3757
- if (m.organizationId != null && Object.hasOwnProperty.call(m, "organizationId")) w.uint32(24).int32(m.organizationId);
3758
- if (m.email != null && Object.hasOwnProperty.call(m, "email")) w.uint32(34).string(m.email);
3759
- if (m.organizationName != null && Object.hasOwnProperty.call(m, "organizationName")) w.uint32(42).string(m.organizationName);
3760
- if (m.userId != null && Object.hasOwnProperty.call(m, "userId")) w.uint32(50).string(m.userId);
3761
- if (m.isDevice != null && Object.hasOwnProperty.call(m, "isDevice")) w.uint32(56).bool(m.isDevice);
3530
+ if (m.name != null && Object.hasOwnProperty.call(m, "name")) w.uint32(10).string(m.name);
3531
+ if (m.ownerEmail != null && Object.hasOwnProperty.call(m, "ownerEmail")) w.uint32(18).string(m.ownerEmail);
3532
+ if (m.level != null && Object.hasOwnProperty.call(m, "level")) w.uint32(24).int32(m.level);
3533
+ if (m.licenseCount != null && Object.hasOwnProperty.call(m, "licenseCount")) w.uint32(32).int32(m.licenseCount);
3534
+ if (m.usersCount != null && Object.hasOwnProperty.call(m, "usersCount")) w.uint32(40).int32(m.usersCount);
3535
+ if (m.creationDate != null && Object.hasOwnProperty.call(m, "creationDate")) $root.google.protobuf.Timestamp.encode(m.creationDate, w.uint32(50).fork()).ldelim();
3536
+ if (m.expiryDate != null && Object.hasOwnProperty.call(m, "expiryDate")) $root.google.protobuf.Timestamp.encode(m.expiryDate, w.uint32(58).fork()).ldelim();
3537
+ if (m.organizationId != null && Object.hasOwnProperty.call(m, "organizationId")) w.uint32(64).int32(m.organizationId);
3538
+ if (m.subdomainName != null && Object.hasOwnProperty.call(m, "subdomainName")) w.uint32(74).string(m.subdomainName);
3539
+ if (m.deviceLicenseCount != null && Object.hasOwnProperty.call(m, "deviceLicenseCount")) w.uint32(80).int32(m.deviceLicenseCount);
3540
+ if (m.devicesCount != null && Object.hasOwnProperty.call(m, "devicesCount")) w.uint32(88).int32(m.devicesCount);
3541
+ if (m.startDate != null && Object.hasOwnProperty.call(m, "startDate")) $root.google.protobuf.Timestamp.encode(m.startDate, w.uint32(98).fork()).ldelim();
3542
+ if (m.imageCollection != null && Object.hasOwnProperty.call(m, "imageCollection")) w.uint32(112).bool(m.imageCollection);
3543
+ if (m.fileManagerEnabled != null && Object.hasOwnProperty.call(m, "fileManagerEnabled")) w.uint32(120).bool(m.fileManagerEnabled);
3762
3544
  return w;
3763
3545
  };
3764
- UserClaims.encodeDelimited = function encodeDelimited(message, writer) {
3546
+ OrganizationDetails.encodeDelimited = function encodeDelimited(message, writer) {
3765
3547
  return this.encode(message, writer).ldelim();
3766
3548
  };
3767
- UserClaims.decode = function decode(r, l) {
3549
+ OrganizationDetails.decode = function decode(r, l) {
3768
3550
  if (!(r instanceof $Reader)) r = $Reader.create(r);
3769
3551
  var c = l === undefined ? r.len : r.pos + l,
3770
- m = new $root.user.UserClaims();
3552
+ m = new $root.user.OrganizationDetails();
3771
3553
  while (r.pos < c) {
3772
3554
  var t = r.uint32();
3773
3555
  switch (t >>> 3) {
3556
+ case 1:
3557
+ m.name = r.string();
3558
+ break;
3774
3559
  case 2:
3775
- {
3776
- m.level = r.int32();
3777
- break;
3778
- }
3560
+ m.ownerEmail = r.string();
3561
+ break;
3779
3562
  case 3:
3780
- {
3781
- m.organizationId = r.int32();
3782
- break;
3783
- }
3563
+ m.level = r.int32();
3564
+ break;
3784
3565
  case 4:
3785
- {
3786
- m.email = r.string();
3787
- break;
3788
- }
3566
+ m.licenseCount = r.int32();
3567
+ break;
3789
3568
  case 5:
3790
- {
3791
- m.organizationName = r.string();
3792
- break;
3793
- }
3569
+ m.usersCount = r.int32();
3570
+ break;
3794
3571
  case 6:
3795
- {
3796
- m.userId = r.string();
3797
- break;
3798
- }
3572
+ m.creationDate = $root.google.protobuf.Timestamp.decode(r, r.uint32());
3573
+ break;
3574
+ case 12:
3575
+ m.startDate = $root.google.protobuf.Timestamp.decode(r, r.uint32());
3576
+ break;
3799
3577
  case 7:
3800
- {
3801
- m.isDevice = r.bool();
3802
- break;
3803
- }
3578
+ m.expiryDate = $root.google.protobuf.Timestamp.decode(r, r.uint32());
3579
+ break;
3580
+ case 8:
3581
+ m.organizationId = r.int32();
3582
+ break;
3583
+ case 9:
3584
+ m.subdomainName = r.string();
3585
+ break;
3586
+ case 10:
3587
+ m.deviceLicenseCount = r.int32();
3588
+ break;
3589
+ case 11:
3590
+ m.devicesCount = r.int32();
3591
+ break;
3592
+ case 14:
3593
+ m.imageCollection = r.bool();
3594
+ break;
3595
+ case 15:
3596
+ m.fileManagerEnabled = r.bool();
3597
+ break;
3804
3598
  default:
3805
3599
  r.skipType(t & 7);
3806
3600
  break;
@@ -3808,243 +3602,546 @@ export const user = $root.user = (() => {
3808
3602
  }
3809
3603
  return m;
3810
3604
  };
3811
- UserClaims.decodeDelimited = function decodeDelimited(reader) {
3605
+ OrganizationDetails.decodeDelimited = function decodeDelimited(reader) {
3812
3606
  if (!(reader instanceof $Reader)) reader = new $Reader(reader);
3813
3607
  return this.decode(reader, reader.uint32());
3814
3608
  };
3815
- UserClaims.verify = function verify(m) {
3609
+ OrganizationDetails.verify = function verify(m) {
3816
3610
  if (typeof m !== "object" || m === null) return "object expected";
3611
+ if (m.name != null && m.hasOwnProperty("name")) {
3612
+ if (!$util.isString(m.name)) return "name: string expected";
3613
+ }
3614
+ if (m.ownerEmail != null && m.hasOwnProperty("ownerEmail")) {
3615
+ if (!$util.isString(m.ownerEmail)) return "ownerEmail: string expected";
3616
+ }
3817
3617
  if (m.level != null && m.hasOwnProperty("level")) {
3818
3618
  switch (m.level) {
3819
3619
  default:
3820
3620
  return "level: enum value expected";
3821
3621
  case 0:
3822
3622
  case 1:
3823
- case 3:
3824
- case 4:
3623
+ case 2:
3825
3624
  case 5:
3826
3625
  break;
3827
3626
  }
3828
3627
  }
3829
- if (m.organizationId != null && m.hasOwnProperty("organizationId")) {
3830
- if (!$util.isInteger(m.organizationId)) return "organizationId: integer expected";
3831
- }
3832
- if (m.email != null && m.hasOwnProperty("email")) {
3833
- if (!$util.isString(m.email)) return "email: string expected";
3834
- }
3835
- if (m.organizationName != null && m.hasOwnProperty("organizationName")) {
3836
- if (!$util.isString(m.organizationName)) return "organizationName: string expected";
3628
+ if (m.licenseCount != null && m.hasOwnProperty("licenseCount")) {
3629
+ if (!$util.isInteger(m.licenseCount)) return "licenseCount: integer expected";
3837
3630
  }
3838
- if (m.userId != null && m.hasOwnProperty("userId")) {
3839
- if (!$util.isString(m.userId)) return "userId: string expected";
3631
+ if (m.usersCount != null && m.hasOwnProperty("usersCount")) {
3632
+ if (!$util.isInteger(m.usersCount)) return "usersCount: integer expected";
3840
3633
  }
3841
- if (m.isDevice != null && m.hasOwnProperty("isDevice")) {
3842
- if (typeof m.isDevice !== "boolean") return "isDevice: boolean expected";
3634
+ if (m.creationDate != null && m.hasOwnProperty("creationDate")) {
3635
+ {
3636
+ var e = $root.google.protobuf.Timestamp.verify(m.creationDate);
3637
+ if (e) return "creationDate." + e;
3638
+ }
3639
+ }
3640
+ if (m.startDate != null && m.hasOwnProperty("startDate")) {
3641
+ {
3642
+ var e = $root.google.protobuf.Timestamp.verify(m.startDate);
3643
+ if (e) return "startDate." + e;
3644
+ }
3645
+ }
3646
+ if (m.expiryDate != null && m.hasOwnProperty("expiryDate")) {
3647
+ {
3648
+ var e = $root.google.protobuf.Timestamp.verify(m.expiryDate);
3649
+ if (e) return "expiryDate." + e;
3650
+ }
3651
+ }
3652
+ if (m.organizationId != null && m.hasOwnProperty("organizationId")) {
3653
+ if (!$util.isInteger(m.organizationId)) return "organizationId: integer expected";
3654
+ }
3655
+ if (m.subdomainName != null && m.hasOwnProperty("subdomainName")) {
3656
+ if (!$util.isString(m.subdomainName)) return "subdomainName: string expected";
3657
+ }
3658
+ if (m.deviceLicenseCount != null && m.hasOwnProperty("deviceLicenseCount")) {
3659
+ if (!$util.isInteger(m.deviceLicenseCount)) return "deviceLicenseCount: integer expected";
3660
+ }
3661
+ if (m.devicesCount != null && m.hasOwnProperty("devicesCount")) {
3662
+ if (!$util.isInteger(m.devicesCount)) return "devicesCount: integer expected";
3663
+ }
3664
+ if (m.imageCollection != null && m.hasOwnProperty("imageCollection")) {
3665
+ if (typeof m.imageCollection !== "boolean") return "imageCollection: boolean expected";
3666
+ }
3667
+ if (m.fileManagerEnabled != null && m.hasOwnProperty("fileManagerEnabled")) {
3668
+ if (typeof m.fileManagerEnabled !== "boolean") return "fileManagerEnabled: boolean expected";
3843
3669
  }
3844
3670
  return null;
3845
3671
  };
3846
- UserClaims.fromObject = function fromObject(d) {
3847
- if (d instanceof $root.user.UserClaims) return d;
3848
- var m = new $root.user.UserClaims();
3672
+ OrganizationDetails.fromObject = function fromObject(d) {
3673
+ if (d instanceof $root.user.OrganizationDetails) return d;
3674
+ var m = new $root.user.OrganizationDetails();
3675
+ if (d.name != null) {
3676
+ m.name = String(d.name);
3677
+ }
3678
+ if (d.ownerEmail != null) {
3679
+ m.ownerEmail = String(d.ownerEmail);
3680
+ }
3849
3681
  switch (d.level) {
3850
- default:
3851
- if (typeof d.level === "number") {
3852
- m.level = d.level;
3853
- break;
3854
- }
3855
- break;
3856
- case "FREE":
3682
+ case "UNKNOWN_USER":
3857
3683
  case 0:
3858
3684
  m.level = 0;
3859
3685
  break;
3860
- case "BASIC":
3686
+ case "PRO":
3861
3687
  case 1:
3862
3688
  m.level = 1;
3863
3689
  break;
3864
- case "PRO":
3865
- case 3:
3866
- m.level = 3;
3867
- break;
3868
3690
  case "BUSINESS":
3869
- case 4:
3870
- m.level = 4;
3691
+ case 2:
3692
+ m.level = 2;
3871
3693
  break;
3872
3694
  case "ENTERPRISE":
3873
3695
  case 5:
3874
3696
  m.level = 5;
3875
3697
  break;
3876
3698
  }
3699
+ if (d.licenseCount != null) {
3700
+ m.licenseCount = d.licenseCount | 0;
3701
+ }
3702
+ if (d.usersCount != null) {
3703
+ m.usersCount = d.usersCount | 0;
3704
+ }
3705
+ if (d.creationDate != null) {
3706
+ if (typeof d.creationDate !== "object") throw TypeError(".user.OrganizationDetails.creationDate: object expected");
3707
+ m.creationDate = $root.google.protobuf.Timestamp.fromObject(d.creationDate);
3708
+ }
3709
+ if (d.startDate != null) {
3710
+ if (typeof d.startDate !== "object") throw TypeError(".user.OrganizationDetails.startDate: object expected");
3711
+ m.startDate = $root.google.protobuf.Timestamp.fromObject(d.startDate);
3712
+ }
3713
+ if (d.expiryDate != null) {
3714
+ if (typeof d.expiryDate !== "object") throw TypeError(".user.OrganizationDetails.expiryDate: object expected");
3715
+ m.expiryDate = $root.google.protobuf.Timestamp.fromObject(d.expiryDate);
3716
+ }
3877
3717
  if (d.organizationId != null) {
3878
3718
  m.organizationId = d.organizationId | 0;
3879
3719
  }
3880
- if (d.email != null) {
3881
- m.email = String(d.email);
3720
+ if (d.subdomainName != null) {
3721
+ m.subdomainName = String(d.subdomainName);
3882
3722
  }
3883
- if (d.organizationName != null) {
3884
- m.organizationName = String(d.organizationName);
3723
+ if (d.deviceLicenseCount != null) {
3724
+ m.deviceLicenseCount = d.deviceLicenseCount | 0;
3885
3725
  }
3886
- if (d.userId != null) {
3887
- m.userId = String(d.userId);
3726
+ if (d.devicesCount != null) {
3727
+ m.devicesCount = d.devicesCount | 0;
3888
3728
  }
3889
- if (d.isDevice != null) {
3890
- m.isDevice = Boolean(d.isDevice);
3729
+ if (d.imageCollection != null) {
3730
+ m.imageCollection = Boolean(d.imageCollection);
3731
+ }
3732
+ if (d.fileManagerEnabled != null) {
3733
+ m.fileManagerEnabled = Boolean(d.fileManagerEnabled);
3891
3734
  }
3892
3735
  return m;
3893
3736
  };
3894
- UserClaims.toObject = function toObject(m, o) {
3737
+ OrganizationDetails.toObject = function toObject(m, o) {
3895
3738
  if (!o) o = {};
3896
3739
  var d = {};
3897
3740
  if (o.defaults) {
3898
- d.level = o.enums === String ? "FREE" : 0;
3741
+ d.name = "";
3742
+ d.ownerEmail = "";
3743
+ d.level = o.enums === String ? "UNKNOWN_USER" : 0;
3744
+ d.licenseCount = 0;
3745
+ d.usersCount = 0;
3746
+ d.creationDate = null;
3747
+ d.expiryDate = null;
3899
3748
  d.organizationId = 0;
3900
- d.email = "";
3901
- d.organizationName = "";
3902
- d.userId = "";
3903
- d.isDevice = false;
3749
+ d.subdomainName = "";
3750
+ d.deviceLicenseCount = 0;
3751
+ d.devicesCount = 0;
3752
+ d.startDate = null;
3753
+ d.imageCollection = false;
3754
+ d.fileManagerEnabled = false;
3755
+ }
3756
+ if (m.name != null && m.hasOwnProperty("name")) {
3757
+ d.name = m.name;
3758
+ }
3759
+ if (m.ownerEmail != null && m.hasOwnProperty("ownerEmail")) {
3760
+ d.ownerEmail = m.ownerEmail;
3904
3761
  }
3905
3762
  if (m.level != null && m.hasOwnProperty("level")) {
3906
- d.level = o.enums === String ? $root.user.Level[m.level] === undefined ? m.level : $root.user.Level[m.level] : m.level;
3763
+ d.level = o.enums === String ? $root.user.Level[m.level] : m.level;
3764
+ }
3765
+ if (m.licenseCount != null && m.hasOwnProperty("licenseCount")) {
3766
+ d.licenseCount = m.licenseCount;
3767
+ }
3768
+ if (m.usersCount != null && m.hasOwnProperty("usersCount")) {
3769
+ d.usersCount = m.usersCount;
3770
+ }
3771
+ if (m.creationDate != null && m.hasOwnProperty("creationDate")) {
3772
+ d.creationDate = $root.google.protobuf.Timestamp.toObject(m.creationDate, o);
3773
+ }
3774
+ if (m.expiryDate != null && m.hasOwnProperty("expiryDate")) {
3775
+ d.expiryDate = $root.google.protobuf.Timestamp.toObject(m.expiryDate, o);
3907
3776
  }
3908
3777
  if (m.organizationId != null && m.hasOwnProperty("organizationId")) {
3909
3778
  d.organizationId = m.organizationId;
3910
3779
  }
3911
- if (m.email != null && m.hasOwnProperty("email")) {
3912
- d.email = m.email;
3780
+ if (m.subdomainName != null && m.hasOwnProperty("subdomainName")) {
3781
+ d.subdomainName = m.subdomainName;
3913
3782
  }
3914
- if (m.organizationName != null && m.hasOwnProperty("organizationName")) {
3915
- d.organizationName = m.organizationName;
3783
+ if (m.deviceLicenseCount != null && m.hasOwnProperty("deviceLicenseCount")) {
3784
+ d.deviceLicenseCount = m.deviceLicenseCount;
3916
3785
  }
3917
- if (m.userId != null && m.hasOwnProperty("userId")) {
3918
- d.userId = m.userId;
3786
+ if (m.devicesCount != null && m.hasOwnProperty("devicesCount")) {
3787
+ d.devicesCount = m.devicesCount;
3788
+ }
3789
+ if (m.startDate != null && m.hasOwnProperty("startDate")) {
3790
+ d.startDate = $root.google.protobuf.Timestamp.toObject(m.startDate, o);
3791
+ }
3792
+ if (m.imageCollection != null && m.hasOwnProperty("imageCollection")) {
3793
+ d.imageCollection = m.imageCollection;
3794
+ }
3795
+ if (m.fileManagerEnabled != null && m.hasOwnProperty("fileManagerEnabled")) {
3796
+ d.fileManagerEnabled = m.fileManagerEnabled;
3797
+ }
3798
+ return d;
3799
+ };
3800
+ OrganizationDetails.prototype.toJSON = function toJSON() {
3801
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
3802
+ };
3803
+ return OrganizationDetails;
3804
+ }();
3805
+ user.Plan = function () {
3806
+ function Plan(p) {
3807
+ this.prices = [];
3808
+ if (p) for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]];
3809
+ }
3810
+ Plan.prototype.id = "";
3811
+ Plan.prototype.name = "";
3812
+ Plan.prototype.prices = $util.emptyArray;
3813
+ Plan.create = function create(properties) {
3814
+ return new Plan(properties);
3815
+ };
3816
+ Plan.encode = function encode(m, w) {
3817
+ if (!w) w = $Writer.create();
3818
+ if (m.id != null && Object.hasOwnProperty.call(m, "id")) w.uint32(10).string(m.id);
3819
+ if (m.name != null && Object.hasOwnProperty.call(m, "name")) w.uint32(18).string(m.name);
3820
+ if (m.prices != null && m.prices.length) {
3821
+ for (var i = 0; i < m.prices.length; ++i) $root.user.PriceItem.encode(m.prices[i], w.uint32(26).fork()).ldelim();
3822
+ }
3823
+ return w;
3824
+ };
3825
+ Plan.encodeDelimited = function encodeDelimited(message, writer) {
3826
+ return this.encode(message, writer).ldelim();
3827
+ };
3828
+ Plan.decode = function decode(r, l) {
3829
+ if (!(r instanceof $Reader)) r = $Reader.create(r);
3830
+ var c = l === undefined ? r.len : r.pos + l,
3831
+ m = new $root.user.Plan();
3832
+ while (r.pos < c) {
3833
+ var t = r.uint32();
3834
+ switch (t >>> 3) {
3835
+ case 1:
3836
+ m.id = r.string();
3837
+ break;
3838
+ case 2:
3839
+ m.name = r.string();
3840
+ break;
3841
+ case 3:
3842
+ if (!(m.prices && m.prices.length)) m.prices = [];
3843
+ m.prices.push($root.user.PriceItem.decode(r, r.uint32()));
3844
+ break;
3845
+ default:
3846
+ r.skipType(t & 7);
3847
+ break;
3848
+ }
3849
+ }
3850
+ return m;
3851
+ };
3852
+ Plan.decodeDelimited = function decodeDelimited(reader) {
3853
+ if (!(reader instanceof $Reader)) reader = new $Reader(reader);
3854
+ return this.decode(reader, reader.uint32());
3855
+ };
3856
+ Plan.verify = function verify(m) {
3857
+ if (typeof m !== "object" || m === null) return "object expected";
3858
+ if (m.id != null && m.hasOwnProperty("id")) {
3859
+ if (!$util.isString(m.id)) return "id: string expected";
3860
+ }
3861
+ if (m.name != null && m.hasOwnProperty("name")) {
3862
+ if (!$util.isString(m.name)) return "name: string expected";
3863
+ }
3864
+ if (m.prices != null && m.hasOwnProperty("prices")) {
3865
+ if (!Array.isArray(m.prices)) return "prices: array expected";
3866
+ for (var i = 0; i < m.prices.length; ++i) {
3867
+ {
3868
+ var e = $root.user.PriceItem.verify(m.prices[i]);
3869
+ if (e) return "prices." + e;
3870
+ }
3871
+ }
3872
+ }
3873
+ return null;
3874
+ };
3875
+ Plan.fromObject = function fromObject(d) {
3876
+ if (d instanceof $root.user.Plan) return d;
3877
+ var m = new $root.user.Plan();
3878
+ if (d.id != null) {
3879
+ m.id = String(d.id);
3880
+ }
3881
+ if (d.name != null) {
3882
+ m.name = String(d.name);
3883
+ }
3884
+ if (d.prices) {
3885
+ if (!Array.isArray(d.prices)) throw TypeError(".user.Plan.prices: array expected");
3886
+ m.prices = [];
3887
+ for (var i = 0; i < d.prices.length; ++i) {
3888
+ if (typeof d.prices[i] !== "object") throw TypeError(".user.Plan.prices: object expected");
3889
+ m.prices[i] = $root.user.PriceItem.fromObject(d.prices[i]);
3890
+ }
3891
+ }
3892
+ return m;
3893
+ };
3894
+ Plan.toObject = function toObject(m, o) {
3895
+ if (!o) o = {};
3896
+ var d = {};
3897
+ if (o.arrays || o.defaults) {
3898
+ d.prices = [];
3899
+ }
3900
+ if (o.defaults) {
3901
+ d.id = "";
3902
+ d.name = "";
3919
3903
  }
3920
- if (m.isDevice != null && m.hasOwnProperty("isDevice")) {
3921
- d.isDevice = m.isDevice;
3904
+ if (m.id != null && m.hasOwnProperty("id")) {
3905
+ d.id = m.id;
3906
+ }
3907
+ if (m.name != null && m.hasOwnProperty("name")) {
3908
+ d.name = m.name;
3909
+ }
3910
+ if (m.prices && m.prices.length) {
3911
+ d.prices = [];
3912
+ for (var j = 0; j < m.prices.length; ++j) {
3913
+ d.prices[j] = $root.user.PriceItem.toObject(m.prices[j], o);
3914
+ }
3922
3915
  }
3923
3916
  return d;
3924
3917
  };
3925
- UserClaims.prototype.toJSON = function toJSON() {
3918
+ Plan.prototype.toJSON = function toJSON() {
3926
3919
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
3927
3920
  };
3928
- UserClaims.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
3929
- if (typeUrlPrefix === undefined) {
3930
- typeUrlPrefix = "type.googleapis.com";
3921
+ return Plan;
3922
+ }();
3923
+ user.PriceItem = function () {
3924
+ function PriceItem(p) {
3925
+ if (p) for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]];
3926
+ }
3927
+ PriceItem.prototype.id = "";
3928
+ PriceItem.prototype.amount = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
3929
+ PriceItem.prototype.interval = "";
3930
+ PriceItem.prototype.intervalCount = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
3931
+ PriceItem.prototype.trialPeriodDays = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
3932
+ PriceItem.create = function create(properties) {
3933
+ return new PriceItem(properties);
3934
+ };
3935
+ PriceItem.encode = function encode(m, w) {
3936
+ if (!w) w = $Writer.create();
3937
+ if (m.id != null && Object.hasOwnProperty.call(m, "id")) w.uint32(10).string(m.id);
3938
+ if (m.amount != null && Object.hasOwnProperty.call(m, "amount")) w.uint32(16).int64(m.amount);
3939
+ if (m.interval != null && Object.hasOwnProperty.call(m, "interval")) w.uint32(26).string(m.interval);
3940
+ if (m.intervalCount != null && Object.hasOwnProperty.call(m, "intervalCount")) w.uint32(32).int64(m.intervalCount);
3941
+ if (m.trialPeriodDays != null && Object.hasOwnProperty.call(m, "trialPeriodDays")) w.uint32(40).int64(m.trialPeriodDays);
3942
+ return w;
3943
+ };
3944
+ PriceItem.encodeDelimited = function encodeDelimited(message, writer) {
3945
+ return this.encode(message, writer).ldelim();
3946
+ };
3947
+ PriceItem.decode = function decode(r, l) {
3948
+ if (!(r instanceof $Reader)) r = $Reader.create(r);
3949
+ var c = l === undefined ? r.len : r.pos + l,
3950
+ m = new $root.user.PriceItem();
3951
+ while (r.pos < c) {
3952
+ var t = r.uint32();
3953
+ switch (t >>> 3) {
3954
+ case 1:
3955
+ m.id = r.string();
3956
+ break;
3957
+ case 2:
3958
+ m.amount = r.int64();
3959
+ break;
3960
+ case 3:
3961
+ m.interval = r.string();
3962
+ break;
3963
+ case 4:
3964
+ m.intervalCount = r.int64();
3965
+ break;
3966
+ case 5:
3967
+ m.trialPeriodDays = r.int64();
3968
+ break;
3969
+ default:
3970
+ r.skipType(t & 7);
3971
+ break;
3972
+ }
3973
+ }
3974
+ return m;
3975
+ };
3976
+ PriceItem.decodeDelimited = function decodeDelimited(reader) {
3977
+ if (!(reader instanceof $Reader)) reader = new $Reader(reader);
3978
+ return this.decode(reader, reader.uint32());
3979
+ };
3980
+ PriceItem.verify = function verify(m) {
3981
+ if (typeof m !== "object" || m === null) return "object expected";
3982
+ if (m.id != null && m.hasOwnProperty("id")) {
3983
+ if (!$util.isString(m.id)) return "id: string expected";
3984
+ }
3985
+ if (m.amount != null && m.hasOwnProperty("amount")) {
3986
+ if (!$util.isInteger(m.amount) && !(m.amount && $util.isInteger(m.amount.low) && $util.isInteger(m.amount.high))) return "amount: integer|Long expected";
3987
+ }
3988
+ if (m.interval != null && m.hasOwnProperty("interval")) {
3989
+ if (!$util.isString(m.interval)) return "interval: string expected";
3931
3990
  }
3932
- return typeUrlPrefix + "/user.UserClaims";
3991
+ if (m.intervalCount != null && m.hasOwnProperty("intervalCount")) {
3992
+ if (!$util.isInteger(m.intervalCount) && !(m.intervalCount && $util.isInteger(m.intervalCount.low) && $util.isInteger(m.intervalCount.high))) return "intervalCount: integer|Long expected";
3993
+ }
3994
+ if (m.trialPeriodDays != null && m.hasOwnProperty("trialPeriodDays")) {
3995
+ if (!$util.isInteger(m.trialPeriodDays) && !(m.trialPeriodDays && $util.isInteger(m.trialPeriodDays.low) && $util.isInteger(m.trialPeriodDays.high))) return "trialPeriodDays: integer|Long expected";
3996
+ }
3997
+ return null;
3933
3998
  };
3934
- return UserClaims;
3999
+ PriceItem.fromObject = function fromObject(d) {
4000
+ if (d instanceof $root.user.PriceItem) return d;
4001
+ var m = new $root.user.PriceItem();
4002
+ if (d.id != null) {
4003
+ m.id = String(d.id);
4004
+ }
4005
+ if (d.amount != null) {
4006
+ if ($util.Long) (m.amount = $util.Long.fromValue(d.amount)).unsigned = false;else if (typeof d.amount === "string") m.amount = parseInt(d.amount, 10);else if (typeof d.amount === "number") m.amount = d.amount;else if (typeof d.amount === "object") m.amount = new $util.LongBits(d.amount.low >>> 0, d.amount.high >>> 0).toNumber();
4007
+ }
4008
+ if (d.interval != null) {
4009
+ m.interval = String(d.interval);
4010
+ }
4011
+ if (d.intervalCount != null) {
4012
+ if ($util.Long) (m.intervalCount = $util.Long.fromValue(d.intervalCount)).unsigned = false;else if (typeof d.intervalCount === "string") m.intervalCount = parseInt(d.intervalCount, 10);else if (typeof d.intervalCount === "number") m.intervalCount = d.intervalCount;else if (typeof d.intervalCount === "object") m.intervalCount = new $util.LongBits(d.intervalCount.low >>> 0, d.intervalCount.high >>> 0).toNumber();
4013
+ }
4014
+ if (d.trialPeriodDays != null) {
4015
+ if ($util.Long) (m.trialPeriodDays = $util.Long.fromValue(d.trialPeriodDays)).unsigned = false;else if (typeof d.trialPeriodDays === "string") m.trialPeriodDays = parseInt(d.trialPeriodDays, 10);else if (typeof d.trialPeriodDays === "number") m.trialPeriodDays = d.trialPeriodDays;else if (typeof d.trialPeriodDays === "object") m.trialPeriodDays = new $util.LongBits(d.trialPeriodDays.low >>> 0, d.trialPeriodDays.high >>> 0).toNumber();
4016
+ }
4017
+ return m;
4018
+ };
4019
+ PriceItem.toObject = function toObject(m, o) {
4020
+ if (!o) o = {};
4021
+ var d = {};
4022
+ if (o.defaults) {
4023
+ d.id = "";
4024
+ if ($util.Long) {
4025
+ var n = new $util.Long(0, 0, false);
4026
+ d.amount = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
4027
+ } else d.amount = o.longs === String ? "0" : 0;
4028
+ d.interval = "";
4029
+ if ($util.Long) {
4030
+ var n = new $util.Long(0, 0, false);
4031
+ d.intervalCount = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
4032
+ } else d.intervalCount = o.longs === String ? "0" : 0;
4033
+ if ($util.Long) {
4034
+ var n = new $util.Long(0, 0, false);
4035
+ d.trialPeriodDays = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
4036
+ } else d.trialPeriodDays = o.longs === String ? "0" : 0;
4037
+ }
4038
+ if (m.id != null && m.hasOwnProperty("id")) {
4039
+ d.id = m.id;
4040
+ }
4041
+ if (m.amount != null && m.hasOwnProperty("amount")) {
4042
+ if (typeof m.amount === "number") d.amount = o.longs === String ? String(m.amount) : m.amount;else d.amount = o.longs === String ? $util.Long.prototype.toString.call(m.amount) : o.longs === Number ? new $util.LongBits(m.amount.low >>> 0, m.amount.high >>> 0).toNumber() : m.amount;
4043
+ }
4044
+ if (m.interval != null && m.hasOwnProperty("interval")) {
4045
+ d.interval = m.interval;
4046
+ }
4047
+ if (m.intervalCount != null && m.hasOwnProperty("intervalCount")) {
4048
+ if (typeof m.intervalCount === "number") d.intervalCount = o.longs === String ? String(m.intervalCount) : m.intervalCount;else d.intervalCount = o.longs === String ? $util.Long.prototype.toString.call(m.intervalCount) : o.longs === Number ? new $util.LongBits(m.intervalCount.low >>> 0, m.intervalCount.high >>> 0).toNumber() : m.intervalCount;
4049
+ }
4050
+ if (m.trialPeriodDays != null && m.hasOwnProperty("trialPeriodDays")) {
4051
+ if (typeof m.trialPeriodDays === "number") d.trialPeriodDays = o.longs === String ? String(m.trialPeriodDays) : m.trialPeriodDays;else d.trialPeriodDays = o.longs === String ? $util.Long.prototype.toString.call(m.trialPeriodDays) : o.longs === Number ? new $util.LongBits(m.trialPeriodDays.low >>> 0, m.trialPeriodDays.high >>> 0).toNumber() : m.trialPeriodDays;
4052
+ }
4053
+ return d;
4054
+ };
4055
+ PriceItem.prototype.toJSON = function toJSON() {
4056
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
4057
+ };
4058
+ return PriceItem;
3935
4059
  }();
3936
- user.OrganizationDetails = function () {
3937
- function OrganizationDetails(p) {
4060
+ user.Subscription = function () {
4061
+ function Subscription(p) {
4062
+ this.items = [];
3938
4063
  if (p) for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]];
3939
4064
  }
3940
- OrganizationDetails.prototype.name = "";
3941
- OrganizationDetails.prototype.ownerEmail = "";
3942
- OrganizationDetails.prototype.level = 0;
3943
- OrganizationDetails.prototype.licenseCount = 0;
3944
- OrganizationDetails.prototype.usersCount = 0;
3945
- OrganizationDetails.prototype.creationDate = null;
3946
- OrganizationDetails.prototype.startDate = null;
3947
- OrganizationDetails.prototype.expiryDate = null;
3948
- OrganizationDetails.prototype.organizationId = 0;
3949
- OrganizationDetails.prototype.subdomainName = "";
3950
- OrganizationDetails.prototype.deviceLicenseCount = 0;
3951
- OrganizationDetails.prototype.devicesCount = 0;
3952
- OrganizationDetails.prototype.imageCollection = false;
3953
- OrganizationDetails.create = function create(properties) {
3954
- return new OrganizationDetails(properties);
4065
+ Subscription.prototype.stripeCustomerId = "";
4066
+ Subscription.prototype.stripeSubscriptionId = "";
4067
+ Subscription.prototype.planName = "";
4068
+ Subscription.prototype.status = 0;
4069
+ Subscription.prototype.currentPeriodStart = null;
4070
+ Subscription.prototype.currentPeriodEnd = null;
4071
+ Subscription.prototype.trialEnd = null;
4072
+ Subscription.prototype.cancelAtPeriodEnd = false;
4073
+ Subscription.prototype.items = $util.emptyArray;
4074
+ Subscription.prototype.interval = "";
4075
+ Subscription.prototype.intervalCount = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
4076
+ let $oneOfFields;
4077
+ Object.defineProperty(Subscription.prototype, "_trialEnd", {
4078
+ get: $util.oneOfGetter($oneOfFields = ["trialEnd"]),
4079
+ set: $util.oneOfSetter($oneOfFields)
4080
+ });
4081
+ Subscription.create = function create(properties) {
4082
+ return new Subscription(properties);
3955
4083
  };
3956
- OrganizationDetails.encode = function encode(m, w) {
4084
+ Subscription.encode = function encode(m, w) {
3957
4085
  if (!w) w = $Writer.create();
3958
- if (m.name != null && Object.hasOwnProperty.call(m, "name")) w.uint32(10).string(m.name);
3959
- if (m.ownerEmail != null && Object.hasOwnProperty.call(m, "ownerEmail")) w.uint32(18).string(m.ownerEmail);
3960
- if (m.level != null && Object.hasOwnProperty.call(m, "level")) w.uint32(24).int32(m.level);
3961
- if (m.licenseCount != null && Object.hasOwnProperty.call(m, "licenseCount")) w.uint32(32).int32(m.licenseCount);
3962
- if (m.usersCount != null && Object.hasOwnProperty.call(m, "usersCount")) w.uint32(40).int32(m.usersCount);
3963
- if (m.creationDate != null && Object.hasOwnProperty.call(m, "creationDate")) $root.google.protobuf.Timestamp.encode(m.creationDate, w.uint32(50).fork()).ldelim();
3964
- if (m.expiryDate != null && Object.hasOwnProperty.call(m, "expiryDate")) $root.google.protobuf.Timestamp.encode(m.expiryDate, w.uint32(58).fork()).ldelim();
3965
- if (m.organizationId != null && Object.hasOwnProperty.call(m, "organizationId")) w.uint32(64).int32(m.organizationId);
3966
- if (m.subdomainName != null && Object.hasOwnProperty.call(m, "subdomainName")) w.uint32(74).string(m.subdomainName);
3967
- if (m.deviceLicenseCount != null && Object.hasOwnProperty.call(m, "deviceLicenseCount")) w.uint32(80).int32(m.deviceLicenseCount);
3968
- if (m.devicesCount != null && Object.hasOwnProperty.call(m, "devicesCount")) w.uint32(88).int32(m.devicesCount);
3969
- if (m.startDate != null && Object.hasOwnProperty.call(m, "startDate")) $root.google.protobuf.Timestamp.encode(m.startDate, w.uint32(98).fork()).ldelim();
3970
- if (m.imageCollection != null && Object.hasOwnProperty.call(m, "imageCollection")) w.uint32(112).bool(m.imageCollection);
4086
+ if (m.stripeCustomerId != null && Object.hasOwnProperty.call(m, "stripeCustomerId")) w.uint32(10).string(m.stripeCustomerId);
4087
+ if (m.stripeSubscriptionId != null && Object.hasOwnProperty.call(m, "stripeSubscriptionId")) w.uint32(18).string(m.stripeSubscriptionId);
4088
+ if (m.planName != null && Object.hasOwnProperty.call(m, "planName")) w.uint32(26).string(m.planName);
4089
+ if (m.status != null && Object.hasOwnProperty.call(m, "status")) w.uint32(32).int32(m.status);
4090
+ if (m.currentPeriodStart != null && Object.hasOwnProperty.call(m, "currentPeriodStart")) $root.google.protobuf.Timestamp.encode(m.currentPeriodStart, w.uint32(42).fork()).ldelim();
4091
+ if (m.currentPeriodEnd != null && Object.hasOwnProperty.call(m, "currentPeriodEnd")) $root.google.protobuf.Timestamp.encode(m.currentPeriodEnd, w.uint32(50).fork()).ldelim();
4092
+ if (m.trialEnd != null && Object.hasOwnProperty.call(m, "trialEnd")) $root.google.protobuf.Timestamp.encode(m.trialEnd, w.uint32(58).fork()).ldelim();
4093
+ if (m.cancelAtPeriodEnd != null && Object.hasOwnProperty.call(m, "cancelAtPeriodEnd")) w.uint32(64).bool(m.cancelAtPeriodEnd);
4094
+ if (m.items != null && m.items.length) {
4095
+ for (var i = 0; i < m.items.length; ++i) $root.user.SubscriptionItem.encode(m.items[i], w.uint32(74).fork()).ldelim();
4096
+ }
4097
+ if (m.interval != null && Object.hasOwnProperty.call(m, "interval")) w.uint32(82).string(m.interval);
4098
+ if (m.intervalCount != null && Object.hasOwnProperty.call(m, "intervalCount")) w.uint32(88).int64(m.intervalCount);
3971
4099
  return w;
3972
4100
  };
3973
- OrganizationDetails.encodeDelimited = function encodeDelimited(message, writer) {
4101
+ Subscription.encodeDelimited = function encodeDelimited(message, writer) {
3974
4102
  return this.encode(message, writer).ldelim();
3975
4103
  };
3976
- OrganizationDetails.decode = function decode(r, l) {
4104
+ Subscription.decode = function decode(r, l) {
3977
4105
  if (!(r instanceof $Reader)) r = $Reader.create(r);
3978
4106
  var c = l === undefined ? r.len : r.pos + l,
3979
- m = new $root.user.OrganizationDetails();
4107
+ m = new $root.user.Subscription();
3980
4108
  while (r.pos < c) {
3981
4109
  var t = r.uint32();
3982
4110
  switch (t >>> 3) {
3983
4111
  case 1:
3984
- {
3985
- m.name = r.string();
3986
- break;
3987
- }
4112
+ m.stripeCustomerId = r.string();
4113
+ break;
3988
4114
  case 2:
3989
- {
3990
- m.ownerEmail = r.string();
3991
- break;
3992
- }
4115
+ m.stripeSubscriptionId = r.string();
4116
+ break;
3993
4117
  case 3:
3994
- {
3995
- m.level = r.int32();
3996
- break;
3997
- }
4118
+ m.planName = r.string();
4119
+ break;
3998
4120
  case 4:
3999
- {
4000
- m.licenseCount = r.int32();
4001
- break;
4002
- }
4121
+ m.status = r.int32();
4122
+ break;
4003
4123
  case 5:
4004
- {
4005
- m.usersCount = r.int32();
4006
- break;
4007
- }
4124
+ m.currentPeriodStart = $root.google.protobuf.Timestamp.decode(r, r.uint32());
4125
+ break;
4008
4126
  case 6:
4009
- {
4010
- m.creationDate = $root.google.protobuf.Timestamp.decode(r, r.uint32());
4011
- break;
4012
- }
4013
- case 12:
4014
- {
4015
- m.startDate = $root.google.protobuf.Timestamp.decode(r, r.uint32());
4016
- break;
4017
- }
4127
+ m.currentPeriodEnd = $root.google.protobuf.Timestamp.decode(r, r.uint32());
4128
+ break;
4018
4129
  case 7:
4019
- {
4020
- m.expiryDate = $root.google.protobuf.Timestamp.decode(r, r.uint32());
4021
- break;
4022
- }
4130
+ m.trialEnd = $root.google.protobuf.Timestamp.decode(r, r.uint32());
4131
+ break;
4023
4132
  case 8:
4024
- {
4025
- m.organizationId = r.int32();
4026
- break;
4027
- }
4133
+ m.cancelAtPeriodEnd = r.bool();
4134
+ break;
4028
4135
  case 9:
4029
- {
4030
- m.subdomainName = r.string();
4031
- break;
4032
- }
4136
+ if (!(m.items && m.items.length)) m.items = [];
4137
+ m.items.push($root.user.SubscriptionItem.decode(r, r.uint32()));
4138
+ break;
4033
4139
  case 10:
4034
- {
4035
- m.deviceLicenseCount = r.int32();
4036
- break;
4037
- }
4140
+ m.interval = r.string();
4141
+ break;
4038
4142
  case 11:
4039
- {
4040
- m.devicesCount = r.int32();
4041
- break;
4042
- }
4043
- case 14:
4044
- {
4045
- m.imageCollection = r.bool();
4046
- break;
4047
- }
4143
+ m.intervalCount = r.int64();
4144
+ break;
4048
4145
  default:
4049
4146
  r.skipType(t & 7);
4050
4147
  break;
@@ -4052,212 +4149,357 @@ export const user = $root.user = (() => {
4052
4149
  }
4053
4150
  return m;
4054
4151
  };
4055
- OrganizationDetails.decodeDelimited = function decodeDelimited(reader) {
4152
+ Subscription.decodeDelimited = function decodeDelimited(reader) {
4056
4153
  if (!(reader instanceof $Reader)) reader = new $Reader(reader);
4057
4154
  return this.decode(reader, reader.uint32());
4058
4155
  };
4059
- OrganizationDetails.verify = function verify(m) {
4156
+ Subscription.verify = function verify(m) {
4060
4157
  if (typeof m !== "object" || m === null) return "object expected";
4061
- if (m.name != null && m.hasOwnProperty("name")) {
4062
- if (!$util.isString(m.name)) return "name: string expected";
4158
+ var p = {};
4159
+ if (m.stripeCustomerId != null && m.hasOwnProperty("stripeCustomerId")) {
4160
+ if (!$util.isString(m.stripeCustomerId)) return "stripeCustomerId: string expected";
4063
4161
  }
4064
- if (m.ownerEmail != null && m.hasOwnProperty("ownerEmail")) {
4065
- if (!$util.isString(m.ownerEmail)) return "ownerEmail: string expected";
4162
+ if (m.stripeSubscriptionId != null && m.hasOwnProperty("stripeSubscriptionId")) {
4163
+ if (!$util.isString(m.stripeSubscriptionId)) return "stripeSubscriptionId: string expected";
4066
4164
  }
4067
- if (m.level != null && m.hasOwnProperty("level")) {
4068
- switch (m.level) {
4165
+ if (m.planName != null && m.hasOwnProperty("planName")) {
4166
+ if (!$util.isString(m.planName)) return "planName: string expected";
4167
+ }
4168
+ if (m.status != null && m.hasOwnProperty("status")) {
4169
+ switch (m.status) {
4069
4170
  default:
4070
- return "level: enum value expected";
4171
+ return "status: enum value expected";
4071
4172
  case 0:
4072
4173
  case 1:
4174
+ case 2:
4073
4175
  case 3:
4074
4176
  case 4:
4075
4177
  case 5:
4178
+ case 6:
4179
+ case 7:
4180
+ case 8:
4076
4181
  break;
4077
4182
  }
4078
4183
  }
4079
- if (m.licenseCount != null && m.hasOwnProperty("licenseCount")) {
4080
- if (!$util.isInteger(m.licenseCount)) return "licenseCount: integer expected";
4081
- }
4082
- if (m.usersCount != null && m.hasOwnProperty("usersCount")) {
4083
- if (!$util.isInteger(m.usersCount)) return "usersCount: integer expected";
4084
- }
4085
- if (m.creationDate != null && m.hasOwnProperty("creationDate")) {
4086
- {
4087
- var e = $root.google.protobuf.Timestamp.verify(m.creationDate);
4088
- if (e) return "creationDate." + e;
4089
- }
4090
- }
4091
- if (m.startDate != null && m.hasOwnProperty("startDate")) {
4092
- {
4093
- var e = $root.google.protobuf.Timestamp.verify(m.startDate);
4094
- if (e) return "startDate." + e;
4184
+ if (m.currentPeriodStart != null && m.hasOwnProperty("currentPeriodStart")) {
4185
+ {
4186
+ var e = $root.google.protobuf.Timestamp.verify(m.currentPeriodStart);
4187
+ if (e) return "currentPeriodStart." + e;
4095
4188
  }
4096
4189
  }
4097
- if (m.expiryDate != null && m.hasOwnProperty("expiryDate")) {
4190
+ if (m.currentPeriodEnd != null && m.hasOwnProperty("currentPeriodEnd")) {
4098
4191
  {
4099
- var e = $root.google.protobuf.Timestamp.verify(m.expiryDate);
4100
- if (e) return "expiryDate." + e;
4192
+ var e = $root.google.protobuf.Timestamp.verify(m.currentPeriodEnd);
4193
+ if (e) return "currentPeriodEnd." + e;
4101
4194
  }
4102
4195
  }
4103
- if (m.organizationId != null && m.hasOwnProperty("organizationId")) {
4104
- if (!$util.isInteger(m.organizationId)) return "organizationId: integer expected";
4196
+ if (m.trialEnd != null && m.hasOwnProperty("trialEnd")) {
4197
+ p._trialEnd = 1;
4198
+ {
4199
+ var e = $root.google.protobuf.Timestamp.verify(m.trialEnd);
4200
+ if (e) return "trialEnd." + e;
4201
+ }
4105
4202
  }
4106
- if (m.subdomainName != null && m.hasOwnProperty("subdomainName")) {
4107
- if (!$util.isString(m.subdomainName)) return "subdomainName: string expected";
4203
+ if (m.cancelAtPeriodEnd != null && m.hasOwnProperty("cancelAtPeriodEnd")) {
4204
+ if (typeof m.cancelAtPeriodEnd !== "boolean") return "cancelAtPeriodEnd: boolean expected";
4108
4205
  }
4109
- if (m.deviceLicenseCount != null && m.hasOwnProperty("deviceLicenseCount")) {
4110
- if (!$util.isInteger(m.deviceLicenseCount)) return "deviceLicenseCount: integer expected";
4206
+ if (m.items != null && m.hasOwnProperty("items")) {
4207
+ if (!Array.isArray(m.items)) return "items: array expected";
4208
+ for (var i = 0; i < m.items.length; ++i) {
4209
+ {
4210
+ var e = $root.user.SubscriptionItem.verify(m.items[i]);
4211
+ if (e) return "items." + e;
4212
+ }
4213
+ }
4111
4214
  }
4112
- if (m.devicesCount != null && m.hasOwnProperty("devicesCount")) {
4113
- if (!$util.isInteger(m.devicesCount)) return "devicesCount: integer expected";
4215
+ if (m.interval != null && m.hasOwnProperty("interval")) {
4216
+ if (!$util.isString(m.interval)) return "interval: string expected";
4114
4217
  }
4115
- if (m.imageCollection != null && m.hasOwnProperty("imageCollection")) {
4116
- if (typeof m.imageCollection !== "boolean") return "imageCollection: boolean expected";
4218
+ if (m.intervalCount != null && m.hasOwnProperty("intervalCount")) {
4219
+ if (!$util.isInteger(m.intervalCount) && !(m.intervalCount && $util.isInteger(m.intervalCount.low) && $util.isInteger(m.intervalCount.high))) return "intervalCount: integer|Long expected";
4117
4220
  }
4118
4221
  return null;
4119
4222
  };
4120
- OrganizationDetails.fromObject = function fromObject(d) {
4121
- if (d instanceof $root.user.OrganizationDetails) return d;
4122
- var m = new $root.user.OrganizationDetails();
4123
- if (d.name != null) {
4124
- m.name = String(d.name);
4223
+ Subscription.fromObject = function fromObject(d) {
4224
+ if (d instanceof $root.user.Subscription) return d;
4225
+ var m = new $root.user.Subscription();
4226
+ if (d.stripeCustomerId != null) {
4227
+ m.stripeCustomerId = String(d.stripeCustomerId);
4125
4228
  }
4126
- if (d.ownerEmail != null) {
4127
- m.ownerEmail = String(d.ownerEmail);
4229
+ if (d.stripeSubscriptionId != null) {
4230
+ m.stripeSubscriptionId = String(d.stripeSubscriptionId);
4128
4231
  }
4129
- switch (d.level) {
4130
- default:
4131
- if (typeof d.level === "number") {
4132
- m.level = d.level;
4133
- break;
4134
- }
4135
- break;
4136
- case "FREE":
4232
+ if (d.planName != null) {
4233
+ m.planName = String(d.planName);
4234
+ }
4235
+ switch (d.status) {
4236
+ case "UNKNOWN_STATUS":
4137
4237
  case 0:
4138
- m.level = 0;
4238
+ m.status = 0;
4139
4239
  break;
4140
- case "BASIC":
4240
+ case "TRIALING":
4141
4241
  case 1:
4142
- m.level = 1;
4242
+ m.status = 1;
4143
4243
  break;
4144
- case "PRO":
4244
+ case "ACTIVE":
4245
+ case 2:
4246
+ m.status = 2;
4247
+ break;
4248
+ case "INCOMPLETE":
4145
4249
  case 3:
4146
- m.level = 3;
4250
+ m.status = 3;
4147
4251
  break;
4148
- case "BUSINESS":
4252
+ case "INCOMPLETE_EXPIRED":
4149
4253
  case 4:
4150
- m.level = 4;
4254
+ m.status = 4;
4151
4255
  break;
4152
- case "ENTERPRISE":
4256
+ case "PAST_DUE":
4153
4257
  case 5:
4154
- m.level = 5;
4258
+ m.status = 5;
4259
+ break;
4260
+ case "CANCELED":
4261
+ case 6:
4262
+ m.status = 6;
4263
+ break;
4264
+ case "UNPAID":
4265
+ case 7:
4266
+ m.status = 7;
4267
+ break;
4268
+ case "PAUSED":
4269
+ case 8:
4270
+ m.status = 8;
4155
4271
  break;
4156
4272
  }
4157
- if (d.licenseCount != null) {
4158
- m.licenseCount = d.licenseCount | 0;
4159
- }
4160
- if (d.usersCount != null) {
4161
- m.usersCount = d.usersCount | 0;
4162
- }
4163
- if (d.creationDate != null) {
4164
- if (typeof d.creationDate !== "object") throw TypeError(".user.OrganizationDetails.creationDate: object expected");
4165
- m.creationDate = $root.google.protobuf.Timestamp.fromObject(d.creationDate);
4166
- }
4167
- if (d.startDate != null) {
4168
- if (typeof d.startDate !== "object") throw TypeError(".user.OrganizationDetails.startDate: object expected");
4169
- m.startDate = $root.google.protobuf.Timestamp.fromObject(d.startDate);
4273
+ if (d.currentPeriodStart != null) {
4274
+ if (typeof d.currentPeriodStart !== "object") throw TypeError(".user.Subscription.currentPeriodStart: object expected");
4275
+ m.currentPeriodStart = $root.google.protobuf.Timestamp.fromObject(d.currentPeriodStart);
4170
4276
  }
4171
- if (d.expiryDate != null) {
4172
- if (typeof d.expiryDate !== "object") throw TypeError(".user.OrganizationDetails.expiryDate: object expected");
4173
- m.expiryDate = $root.google.protobuf.Timestamp.fromObject(d.expiryDate);
4277
+ if (d.currentPeriodEnd != null) {
4278
+ if (typeof d.currentPeriodEnd !== "object") throw TypeError(".user.Subscription.currentPeriodEnd: object expected");
4279
+ m.currentPeriodEnd = $root.google.protobuf.Timestamp.fromObject(d.currentPeriodEnd);
4174
4280
  }
4175
- if (d.organizationId != null) {
4176
- m.organizationId = d.organizationId | 0;
4281
+ if (d.trialEnd != null) {
4282
+ if (typeof d.trialEnd !== "object") throw TypeError(".user.Subscription.trialEnd: object expected");
4283
+ m.trialEnd = $root.google.protobuf.Timestamp.fromObject(d.trialEnd);
4177
4284
  }
4178
- if (d.subdomainName != null) {
4179
- m.subdomainName = String(d.subdomainName);
4285
+ if (d.cancelAtPeriodEnd != null) {
4286
+ m.cancelAtPeriodEnd = Boolean(d.cancelAtPeriodEnd);
4180
4287
  }
4181
- if (d.deviceLicenseCount != null) {
4182
- m.deviceLicenseCount = d.deviceLicenseCount | 0;
4288
+ if (d.items) {
4289
+ if (!Array.isArray(d.items)) throw TypeError(".user.Subscription.items: array expected");
4290
+ m.items = [];
4291
+ for (var i = 0; i < d.items.length; ++i) {
4292
+ if (typeof d.items[i] !== "object") throw TypeError(".user.Subscription.items: object expected");
4293
+ m.items[i] = $root.user.SubscriptionItem.fromObject(d.items[i]);
4294
+ }
4183
4295
  }
4184
- if (d.devicesCount != null) {
4185
- m.devicesCount = d.devicesCount | 0;
4296
+ if (d.interval != null) {
4297
+ m.interval = String(d.interval);
4186
4298
  }
4187
- if (d.imageCollection != null) {
4188
- m.imageCollection = Boolean(d.imageCollection);
4299
+ if (d.intervalCount != null) {
4300
+ if ($util.Long) (m.intervalCount = $util.Long.fromValue(d.intervalCount)).unsigned = false;else if (typeof d.intervalCount === "string") m.intervalCount = parseInt(d.intervalCount, 10);else if (typeof d.intervalCount === "number") m.intervalCount = d.intervalCount;else if (typeof d.intervalCount === "object") m.intervalCount = new $util.LongBits(d.intervalCount.low >>> 0, d.intervalCount.high >>> 0).toNumber();
4189
4301
  }
4190
4302
  return m;
4191
4303
  };
4192
- OrganizationDetails.toObject = function toObject(m, o) {
4304
+ Subscription.toObject = function toObject(m, o) {
4193
4305
  if (!o) o = {};
4194
4306
  var d = {};
4195
- if (o.defaults) {
4196
- d.name = "";
4197
- d.ownerEmail = "";
4198
- d.level = o.enums === String ? "FREE" : 0;
4199
- d.licenseCount = 0;
4200
- d.usersCount = 0;
4201
- d.creationDate = null;
4202
- d.expiryDate = null;
4203
- d.organizationId = 0;
4204
- d.subdomainName = "";
4205
- d.deviceLicenseCount = 0;
4206
- d.devicesCount = 0;
4207
- d.startDate = null;
4208
- d.imageCollection = false;
4209
- }
4210
- if (m.name != null && m.hasOwnProperty("name")) {
4211
- d.name = m.name;
4307
+ if (o.arrays || o.defaults) {
4308
+ d.items = [];
4212
4309
  }
4213
- if (m.ownerEmail != null && m.hasOwnProperty("ownerEmail")) {
4214
- d.ownerEmail = m.ownerEmail;
4310
+ if (o.defaults) {
4311
+ d.stripeCustomerId = "";
4312
+ d.stripeSubscriptionId = "";
4313
+ d.planName = "";
4314
+ d.status = o.enums === String ? "UNKNOWN_STATUS" : 0;
4315
+ d.currentPeriodStart = null;
4316
+ d.currentPeriodEnd = null;
4317
+ d.cancelAtPeriodEnd = false;
4318
+ d.interval = "";
4319
+ if ($util.Long) {
4320
+ var n = new $util.Long(0, 0, false);
4321
+ d.intervalCount = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
4322
+ } else d.intervalCount = o.longs === String ? "0" : 0;
4215
4323
  }
4216
- if (m.level != null && m.hasOwnProperty("level")) {
4217
- d.level = o.enums === String ? $root.user.Level[m.level] === undefined ? m.level : $root.user.Level[m.level] : m.level;
4324
+ if (m.stripeCustomerId != null && m.hasOwnProperty("stripeCustomerId")) {
4325
+ d.stripeCustomerId = m.stripeCustomerId;
4218
4326
  }
4219
- if (m.licenseCount != null && m.hasOwnProperty("licenseCount")) {
4220
- d.licenseCount = m.licenseCount;
4327
+ if (m.stripeSubscriptionId != null && m.hasOwnProperty("stripeSubscriptionId")) {
4328
+ d.stripeSubscriptionId = m.stripeSubscriptionId;
4221
4329
  }
4222
- if (m.usersCount != null && m.hasOwnProperty("usersCount")) {
4223
- d.usersCount = m.usersCount;
4330
+ if (m.planName != null && m.hasOwnProperty("planName")) {
4331
+ d.planName = m.planName;
4224
4332
  }
4225
- if (m.creationDate != null && m.hasOwnProperty("creationDate")) {
4226
- d.creationDate = $root.google.protobuf.Timestamp.toObject(m.creationDate, o);
4333
+ if (m.status != null && m.hasOwnProperty("status")) {
4334
+ d.status = o.enums === String ? $root.user.SubscriptionStatus[m.status] : m.status;
4227
4335
  }
4228
- if (m.expiryDate != null && m.hasOwnProperty("expiryDate")) {
4229
- d.expiryDate = $root.google.protobuf.Timestamp.toObject(m.expiryDate, o);
4336
+ if (m.currentPeriodStart != null && m.hasOwnProperty("currentPeriodStart")) {
4337
+ d.currentPeriodStart = $root.google.protobuf.Timestamp.toObject(m.currentPeriodStart, o);
4230
4338
  }
4231
- if (m.organizationId != null && m.hasOwnProperty("organizationId")) {
4232
- d.organizationId = m.organizationId;
4339
+ if (m.currentPeriodEnd != null && m.hasOwnProperty("currentPeriodEnd")) {
4340
+ d.currentPeriodEnd = $root.google.protobuf.Timestamp.toObject(m.currentPeriodEnd, o);
4233
4341
  }
4234
- if (m.subdomainName != null && m.hasOwnProperty("subdomainName")) {
4235
- d.subdomainName = m.subdomainName;
4342
+ if (m.trialEnd != null && m.hasOwnProperty("trialEnd")) {
4343
+ d.trialEnd = $root.google.protobuf.Timestamp.toObject(m.trialEnd, o);
4344
+ if (o.oneofs) d._trialEnd = "trialEnd";
4236
4345
  }
4237
- if (m.deviceLicenseCount != null && m.hasOwnProperty("deviceLicenseCount")) {
4238
- d.deviceLicenseCount = m.deviceLicenseCount;
4346
+ if (m.cancelAtPeriodEnd != null && m.hasOwnProperty("cancelAtPeriodEnd")) {
4347
+ d.cancelAtPeriodEnd = m.cancelAtPeriodEnd;
4239
4348
  }
4240
- if (m.devicesCount != null && m.hasOwnProperty("devicesCount")) {
4241
- d.devicesCount = m.devicesCount;
4349
+ if (m.items && m.items.length) {
4350
+ d.items = [];
4351
+ for (var j = 0; j < m.items.length; ++j) {
4352
+ d.items[j] = $root.user.SubscriptionItem.toObject(m.items[j], o);
4353
+ }
4242
4354
  }
4243
- if (m.startDate != null && m.hasOwnProperty("startDate")) {
4244
- d.startDate = $root.google.protobuf.Timestamp.toObject(m.startDate, o);
4355
+ if (m.interval != null && m.hasOwnProperty("interval")) {
4356
+ d.interval = m.interval;
4245
4357
  }
4246
- if (m.imageCollection != null && m.hasOwnProperty("imageCollection")) {
4247
- d.imageCollection = m.imageCollection;
4358
+ if (m.intervalCount != null && m.hasOwnProperty("intervalCount")) {
4359
+ if (typeof m.intervalCount === "number") d.intervalCount = o.longs === String ? String(m.intervalCount) : m.intervalCount;else d.intervalCount = o.longs === String ? $util.Long.prototype.toString.call(m.intervalCount) : o.longs === Number ? new $util.LongBits(m.intervalCount.low >>> 0, m.intervalCount.high >>> 0).toNumber() : m.intervalCount;
4248
4360
  }
4249
4361
  return d;
4250
4362
  };
4251
- OrganizationDetails.prototype.toJSON = function toJSON() {
4363
+ Subscription.prototype.toJSON = function toJSON() {
4252
4364
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
4253
4365
  };
4254
- OrganizationDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
4255
- if (typeUrlPrefix === undefined) {
4256
- typeUrlPrefix = "type.googleapis.com";
4366
+ return Subscription;
4367
+ }();
4368
+ user.SubscriptionItem = function () {
4369
+ function SubscriptionItem(p) {
4370
+ if (p) for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]];
4371
+ }
4372
+ SubscriptionItem.prototype.stripeItemId = "";
4373
+ SubscriptionItem.prototype.priceId = "";
4374
+ SubscriptionItem.prototype.quantity = 0;
4375
+ SubscriptionItem.prototype.createdAt = null;
4376
+ SubscriptionItem.prototype.updatedAt = null;
4377
+ SubscriptionItem.create = function create(properties) {
4378
+ return new SubscriptionItem(properties);
4379
+ };
4380
+ SubscriptionItem.encode = function encode(m, w) {
4381
+ if (!w) w = $Writer.create();
4382
+ if (m.stripeItemId != null && Object.hasOwnProperty.call(m, "stripeItemId")) w.uint32(10).string(m.stripeItemId);
4383
+ if (m.priceId != null && Object.hasOwnProperty.call(m, "priceId")) w.uint32(18).string(m.priceId);
4384
+ if (m.quantity != null && Object.hasOwnProperty.call(m, "quantity")) w.uint32(24).int32(m.quantity);
4385
+ if (m.createdAt != null && Object.hasOwnProperty.call(m, "createdAt")) $root.google.protobuf.Timestamp.encode(m.createdAt, w.uint32(34).fork()).ldelim();
4386
+ if (m.updatedAt != null && Object.hasOwnProperty.call(m, "updatedAt")) $root.google.protobuf.Timestamp.encode(m.updatedAt, w.uint32(42).fork()).ldelim();
4387
+ return w;
4388
+ };
4389
+ SubscriptionItem.encodeDelimited = function encodeDelimited(message, writer) {
4390
+ return this.encode(message, writer).ldelim();
4391
+ };
4392
+ SubscriptionItem.decode = function decode(r, l) {
4393
+ if (!(r instanceof $Reader)) r = $Reader.create(r);
4394
+ var c = l === undefined ? r.len : r.pos + l,
4395
+ m = new $root.user.SubscriptionItem();
4396
+ while (r.pos < c) {
4397
+ var t = r.uint32();
4398
+ switch (t >>> 3) {
4399
+ case 1:
4400
+ m.stripeItemId = r.string();
4401
+ break;
4402
+ case 2:
4403
+ m.priceId = r.string();
4404
+ break;
4405
+ case 3:
4406
+ m.quantity = r.int32();
4407
+ break;
4408
+ case 4:
4409
+ m.createdAt = $root.google.protobuf.Timestamp.decode(r, r.uint32());
4410
+ break;
4411
+ case 5:
4412
+ m.updatedAt = $root.google.protobuf.Timestamp.decode(r, r.uint32());
4413
+ break;
4414
+ default:
4415
+ r.skipType(t & 7);
4416
+ break;
4417
+ }
4257
4418
  }
4258
- return typeUrlPrefix + "/user.OrganizationDetails";
4419
+ return m;
4259
4420
  };
4260
- return OrganizationDetails;
4421
+ SubscriptionItem.decodeDelimited = function decodeDelimited(reader) {
4422
+ if (!(reader instanceof $Reader)) reader = new $Reader(reader);
4423
+ return this.decode(reader, reader.uint32());
4424
+ };
4425
+ SubscriptionItem.verify = function verify(m) {
4426
+ if (typeof m !== "object" || m === null) return "object expected";
4427
+ if (m.stripeItemId != null && m.hasOwnProperty("stripeItemId")) {
4428
+ if (!$util.isString(m.stripeItemId)) return "stripeItemId: string expected";
4429
+ }
4430
+ if (m.priceId != null && m.hasOwnProperty("priceId")) {
4431
+ if (!$util.isString(m.priceId)) return "priceId: string expected";
4432
+ }
4433
+ if (m.quantity != null && m.hasOwnProperty("quantity")) {
4434
+ if (!$util.isInteger(m.quantity)) return "quantity: integer expected";
4435
+ }
4436
+ if (m.createdAt != null && m.hasOwnProperty("createdAt")) {
4437
+ {
4438
+ var e = $root.google.protobuf.Timestamp.verify(m.createdAt);
4439
+ if (e) return "createdAt." + e;
4440
+ }
4441
+ }
4442
+ if (m.updatedAt != null && m.hasOwnProperty("updatedAt")) {
4443
+ {
4444
+ var e = $root.google.protobuf.Timestamp.verify(m.updatedAt);
4445
+ if (e) return "updatedAt." + e;
4446
+ }
4447
+ }
4448
+ return null;
4449
+ };
4450
+ SubscriptionItem.fromObject = function fromObject(d) {
4451
+ if (d instanceof $root.user.SubscriptionItem) return d;
4452
+ var m = new $root.user.SubscriptionItem();
4453
+ if (d.stripeItemId != null) {
4454
+ m.stripeItemId = String(d.stripeItemId);
4455
+ }
4456
+ if (d.priceId != null) {
4457
+ m.priceId = String(d.priceId);
4458
+ }
4459
+ if (d.quantity != null) {
4460
+ m.quantity = d.quantity | 0;
4461
+ }
4462
+ if (d.createdAt != null) {
4463
+ if (typeof d.createdAt !== "object") throw TypeError(".user.SubscriptionItem.createdAt: object expected");
4464
+ m.createdAt = $root.google.protobuf.Timestamp.fromObject(d.createdAt);
4465
+ }
4466
+ if (d.updatedAt != null) {
4467
+ if (typeof d.updatedAt !== "object") throw TypeError(".user.SubscriptionItem.updatedAt: object expected");
4468
+ m.updatedAt = $root.google.protobuf.Timestamp.fromObject(d.updatedAt);
4469
+ }
4470
+ return m;
4471
+ };
4472
+ SubscriptionItem.toObject = function toObject(m, o) {
4473
+ if (!o) o = {};
4474
+ var d = {};
4475
+ if (o.defaults) {
4476
+ d.stripeItemId = "";
4477
+ d.priceId = "";
4478
+ d.quantity = 0;
4479
+ d.createdAt = null;
4480
+ d.updatedAt = null;
4481
+ }
4482
+ if (m.stripeItemId != null && m.hasOwnProperty("stripeItemId")) {
4483
+ d.stripeItemId = m.stripeItemId;
4484
+ }
4485
+ if (m.priceId != null && m.hasOwnProperty("priceId")) {
4486
+ d.priceId = m.priceId;
4487
+ }
4488
+ if (m.quantity != null && m.hasOwnProperty("quantity")) {
4489
+ d.quantity = m.quantity;
4490
+ }
4491
+ if (m.createdAt != null && m.hasOwnProperty("createdAt")) {
4492
+ d.createdAt = $root.google.protobuf.Timestamp.toObject(m.createdAt, o);
4493
+ }
4494
+ if (m.updatedAt != null && m.hasOwnProperty("updatedAt")) {
4495
+ d.updatedAt = $root.google.protobuf.Timestamp.toObject(m.updatedAt, o);
4496
+ }
4497
+ return d;
4498
+ };
4499
+ SubscriptionItem.prototype.toJSON = function toJSON() {
4500
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
4501
+ };
4502
+ return SubscriptionItem;
4261
4503
  }();
4262
4504
  return user;
4263
4505
  })();
@@ -4311,12 +4553,6 @@ export const google = $root.google = (() => {
4311
4553
  Empty.prototype.toJSON = function toJSON() {
4312
4554
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
4313
4555
  };
4314
- Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
4315
- if (typeUrlPrefix === undefined) {
4316
- typeUrlPrefix = "type.googleapis.com";
4317
- }
4318
- return typeUrlPrefix + "/google.protobuf.Empty";
4319
- };
4320
4556
  return Empty;
4321
4557
  }();
4322
4558
  protobuf.Timestamp = function () {
@@ -4345,15 +4581,11 @@ export const google = $root.google = (() => {
4345
4581
  var t = r.uint32();
4346
4582
  switch (t >>> 3) {
4347
4583
  case 1:
4348
- {
4349
- m.seconds = r.int64();
4350
- break;
4351
- }
4584
+ m.seconds = r.int64();
4585
+ break;
4352
4586
  case 2:
4353
- {
4354
- m.nanos = r.int32();
4355
- break;
4356
- }
4587
+ m.nanos = r.int32();
4588
+ break;
4357
4589
  default:
4358
4590
  r.skipType(t & 7);
4359
4591
  break;
@@ -4407,12 +4639,6 @@ export const google = $root.google = (() => {
4407
4639
  Timestamp.prototype.toJSON = function toJSON() {
4408
4640
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
4409
4641
  };
4410
- Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
4411
- if (typeUrlPrefix === undefined) {
4412
- typeUrlPrefix = "type.googleapis.com";
4413
- }
4414
- return typeUrlPrefix + "/google.protobuf.Timestamp";
4415
- };
4416
4642
  return Timestamp;
4417
4643
  }();
4418
4644
  return protobuf;
@@ -4451,25 +4677,17 @@ export const meeting = $root.meeting = (() => {
4451
4677
  var t = r.uint32();
4452
4678
  switch (t >>> 3) {
4453
4679
  case 1:
4454
- {
4455
- m.id = r.int32();
4456
- break;
4457
- }
4680
+ m.id = r.int32();
4681
+ break;
4458
4682
  case 2:
4459
- {
4460
- m.userId = r.string();
4461
- break;
4462
- }
4683
+ m.userId = r.string();
4684
+ break;
4463
4685
  case 3:
4464
- {
4465
- m.email = r.string();
4466
- break;
4467
- }
4686
+ m.email = r.string();
4687
+ break;
4468
4688
  case 4:
4469
- {
4470
- m.title = r.string();
4471
- break;
4472
- }
4689
+ m.title = r.string();
4690
+ break;
4473
4691
  default:
4474
4692
  r.skipType(t & 7);
4475
4693
  break;
@@ -4540,12 +4758,6 @@ export const meeting = $root.meeting = (() => {
4540
4758
  Participant.prototype.toJSON = function toJSON() {
4541
4759
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
4542
4760
  };
4543
- Participant.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
4544
- if (typeUrlPrefix === undefined) {
4545
- typeUrlPrefix = "type.googleapis.com";
4546
- }
4547
- return typeUrlPrefix + "/meeting.Participant";
4548
- };
4549
4761
  return Participant;
4550
4762
  }();
4551
4763
  meeting.Update = function () {
@@ -4574,15 +4786,11 @@ export const meeting = $root.meeting = (() => {
4574
4786
  var t = r.uint32();
4575
4787
  switch (t >>> 3) {
4576
4788
  case 2:
4577
- {
4578
- m.userId = r.string();
4579
- break;
4580
- }
4789
+ m.userId = r.string();
4790
+ break;
4581
4791
  case 5:
4582
- {
4583
- m.image = r.bytes();
4584
- break;
4585
- }
4792
+ m.image = r.bytes();
4793
+ break;
4586
4794
  default:
4587
4795
  r.skipType(t & 7);
4588
4796
  break;
@@ -4611,7 +4819,7 @@ export const meeting = $root.meeting = (() => {
4611
4819
  m.userId = String(d.userId);
4612
4820
  }
4613
4821
  if (d.image != null) {
4614
- if (typeof d.image === "string") $util.base64.decode(d.image, m.image = $util.newBuffer($util.base64.length(d.image)), 0);else if (d.image.length >= 0) m.image = d.image;
4822
+ if (typeof d.image === "string") $util.base64.decode(d.image, m.image = $util.newBuffer($util.base64.length(d.image)), 0);else if (d.image.length) m.image = d.image;
4615
4823
  }
4616
4824
  return m;
4617
4825
  };
@@ -4636,12 +4844,6 @@ export const meeting = $root.meeting = (() => {
4636
4844
  Update.prototype.toJSON = function toJSON() {
4637
4845
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
4638
4846
  };
4639
- Update.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
4640
- if (typeUrlPrefix === undefined) {
4641
- typeUrlPrefix = "type.googleapis.com";
4642
- }
4643
- return typeUrlPrefix + "/meeting.Update";
4644
- };
4645
4847
  return Update;
4646
4848
  }();
4647
4849
  meeting.Drawing = function () {
@@ -4670,15 +4872,11 @@ export const meeting = $root.meeting = (() => {
4670
4872
  var t = r.uint32();
4671
4873
  switch (t >>> 3) {
4672
4874
  case 2:
4673
- {
4674
- m.userId = r.string();
4675
- break;
4676
- }
4875
+ m.userId = r.string();
4876
+ break;
4677
4877
  case 4:
4678
- {
4679
- m.data = r.string();
4680
- break;
4681
- }
4878
+ m.data = r.string();
4879
+ break;
4682
4880
  default:
4683
4881
  r.skipType(t & 7);
4684
4882
  break;
@@ -4729,12 +4927,6 @@ export const meeting = $root.meeting = (() => {
4729
4927
  Drawing.prototype.toJSON = function toJSON() {
4730
4928
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
4731
4929
  };
4732
- Drawing.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
4733
- if (typeUrlPrefix === undefined) {
4734
- typeUrlPrefix = "type.googleapis.com";
4735
- }
4736
- return typeUrlPrefix + "/meeting.Drawing";
4737
- };
4738
4930
  return Drawing;
4739
4931
  }();
4740
4932
  meeting.MousePointer = function () {
@@ -4767,25 +4959,17 @@ export const meeting = $root.meeting = (() => {
4767
4959
  var t = r.uint32();
4768
4960
  switch (t >>> 3) {
4769
4961
  case 2:
4770
- {
4771
- m.userId = r.string();
4772
- break;
4773
- }
4962
+ m.userId = r.string();
4963
+ break;
4774
4964
  case 4:
4775
- {
4776
- m.x = r.int32();
4777
- break;
4778
- }
4965
+ m.x = r.int32();
4966
+ break;
4779
4967
  case 5:
4780
- {
4781
- m.y = r.int32();
4782
- break;
4783
- }
4784
- case 6:
4785
- {
4786
- m.email = r.string();
4787
- break;
4788
- }
4968
+ m.y = r.int32();
4969
+ break;
4970
+ case 6:
4971
+ m.email = r.string();
4972
+ break;
4789
4973
  default:
4790
4974
  r.skipType(t & 7);
4791
4975
  break;
@@ -4856,12 +5040,6 @@ export const meeting = $root.meeting = (() => {
4856
5040
  MousePointer.prototype.toJSON = function toJSON() {
4857
5041
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
4858
5042
  };
4859
- MousePointer.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
4860
- if (typeUrlPrefix === undefined) {
4861
- typeUrlPrefix = "type.googleapis.com";
4862
- }
4863
- return typeUrlPrefix + "/meeting.MousePointer";
4864
- };
4865
5043
  return MousePointer;
4866
5044
  }();
4867
5045
  meeting.IndexPointer = function () {
@@ -4894,25 +5072,17 @@ export const meeting = $root.meeting = (() => {
4894
5072
  var t = r.uint32();
4895
5073
  switch (t >>> 3) {
4896
5074
  case 2:
4897
- {
4898
- m.userId = r.string();
4899
- break;
4900
- }
5075
+ m.userId = r.string();
5076
+ break;
4901
5077
  case 4:
4902
- {
4903
- m.x = r.int32();
4904
- break;
4905
- }
5078
+ m.x = r.int32();
5079
+ break;
4906
5080
  case 5:
4907
- {
4908
- m.y = r.int32();
4909
- break;
4910
- }
5081
+ m.y = r.int32();
5082
+ break;
4911
5083
  case 6:
4912
- {
4913
- m.email = r.string();
4914
- break;
4915
- }
5084
+ m.email = r.string();
5085
+ break;
4916
5086
  default:
4917
5087
  r.skipType(t & 7);
4918
5088
  break;
@@ -4983,12 +5153,6 @@ export const meeting = $root.meeting = (() => {
4983
5153
  IndexPointer.prototype.toJSON = function toJSON() {
4984
5154
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
4985
5155
  };
4986
- IndexPointer.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
4987
- if (typeUrlPrefix === undefined) {
4988
- typeUrlPrefix = "type.googleapis.com";
4989
- }
4990
- return typeUrlPrefix + "/meeting.IndexPointer";
4991
- };
4992
5156
  return IndexPointer;
4993
5157
  }();
4994
5158
  meeting.ImageAck = function () {
@@ -5015,10 +5179,8 @@ export const meeting = $root.meeting = (() => {
5015
5179
  var t = r.uint32();
5016
5180
  switch (t >>> 3) {
5017
5181
  case 2:
5018
- {
5019
- m.userId = r.string();
5020
- break;
5021
- }
5182
+ m.userId = r.string();
5183
+ break;
5022
5184
  default:
5023
5185
  r.skipType(t & 7);
5024
5186
  break;
@@ -5059,12 +5221,6 @@ export const meeting = $root.meeting = (() => {
5059
5221
  ImageAck.prototype.toJSON = function toJSON() {
5060
5222
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
5061
5223
  };
5062
- ImageAck.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
5063
- if (typeUrlPrefix === undefined) {
5064
- typeUrlPrefix = "type.googleapis.com";
5065
- }
5066
- return typeUrlPrefix + "/meeting.ImageAck";
5067
- };
5068
5224
  return ImageAck;
5069
5225
  }();
5070
5226
  meeting.Message = function () {
@@ -5108,40 +5264,26 @@ export const meeting = $root.meeting = (() => {
5108
5264
  var t = r.uint32();
5109
5265
  switch (t >>> 3) {
5110
5266
  case 1:
5111
- {
5112
- m.join = $root.meeting.Participant.decode(r, r.uint32());
5113
- break;
5114
- }
5267
+ m.join = $root.meeting.Participant.decode(r, r.uint32());
5268
+ break;
5115
5269
  case 2:
5116
- {
5117
- m.leave = $root.meeting.Participant.decode(r, r.uint32());
5118
- break;
5119
- }
5270
+ m.leave = $root.meeting.Participant.decode(r, r.uint32());
5271
+ break;
5120
5272
  case 3:
5121
- {
5122
- m.update = $root.meeting.Update.decode(r, r.uint32());
5123
- break;
5124
- }
5273
+ m.update = $root.meeting.Update.decode(r, r.uint32());
5274
+ break;
5125
5275
  case 6:
5126
- {
5127
- m.drawing = $root.meeting.Drawing.decode(r, r.uint32());
5128
- break;
5129
- }
5276
+ m.drawing = $root.meeting.Drawing.decode(r, r.uint32());
5277
+ break;
5130
5278
  case 7:
5131
- {
5132
- m.mousePointer = $root.meeting.MousePointer.decode(r, r.uint32());
5133
- break;
5134
- }
5279
+ m.mousePointer = $root.meeting.MousePointer.decode(r, r.uint32());
5280
+ break;
5135
5281
  case 8:
5136
- {
5137
- m.imageAck = $root.meeting.ImageAck.decode(r, r.uint32());
5138
- break;
5139
- }
5282
+ m.imageAck = $root.meeting.ImageAck.decode(r, r.uint32());
5283
+ break;
5140
5284
  case 9:
5141
- {
5142
- m.indexPointer = $root.meeting.IndexPointer.decode(r, r.uint32());
5143
- break;
5144
- }
5285
+ m.indexPointer = $root.meeting.IndexPointer.decode(r, r.uint32());
5286
+ break;
5145
5287
  default:
5146
5288
  r.skipType(t & 7);
5147
5289
  break;
@@ -5282,12 +5424,6 @@ export const meeting = $root.meeting = (() => {
5282
5424
  Message.prototype.toJSON = function toJSON() {
5283
5425
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
5284
5426
  };
5285
- Message.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
5286
- if (typeUrlPrefix === undefined) {
5287
- typeUrlPrefix = "type.googleapis.com";
5288
- }
5289
- return typeUrlPrefix + "/meeting.Message";
5290
- };
5291
5427
  return Message;
5292
5428
  }();
5293
5429
  meeting.SharePermission = function () {
@@ -5347,35 +5483,23 @@ export const meeting = $root.meeting = (() => {
5347
5483
  var t = r.uint32();
5348
5484
  switch (t >>> 3) {
5349
5485
  case 1:
5350
- {
5351
- m.id = r.string();
5352
- break;
5353
- }
5486
+ m.id = r.string();
5487
+ break;
5354
5488
  case 2:
5355
- {
5356
- m.title = r.string();
5357
- break;
5358
- }
5489
+ m.title = r.string();
5490
+ break;
5359
5491
  case 6:
5360
- {
5361
- m.ownerId = r.string();
5362
- break;
5363
- }
5492
+ m.ownerId = r.string();
5493
+ break;
5364
5494
  case 7:
5365
- {
5366
- m.creationTime = r.int64();
5367
- break;
5368
- }
5495
+ m.creationTime = r.int64();
5496
+ break;
5369
5497
  case 8:
5370
- {
5371
- m.capacity = r.int32();
5372
- break;
5373
- }
5498
+ m.capacity = r.int32();
5499
+ break;
5374
5500
  case 9:
5375
- {
5376
- m.isTemporary = r.bool();
5377
- break;
5378
- }
5501
+ m.isTemporary = r.bool();
5502
+ break;
5379
5503
  default:
5380
5504
  r.skipType(t & 7);
5381
5505
  break;
@@ -5469,12 +5593,6 @@ export const meeting = $root.meeting = (() => {
5469
5593
  Meeting.prototype.toJSON = function toJSON() {
5470
5594
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
5471
5595
  };
5472
- Meeting.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
5473
- if (typeUrlPrefix === undefined) {
5474
- typeUrlPrefix = "type.googleapis.com";
5475
- }
5476
- return typeUrlPrefix + "/meeting.Meeting";
5477
- };
5478
5596
  return Meeting;
5479
5597
  }();
5480
5598
  meeting.SharedMeeting = function () {
@@ -5503,243 +5621,26 @@ export const meeting = $root.meeting = (() => {
5503
5621
  };
5504
5622
  SharedMeeting.decode = function decode(r, l) {
5505
5623
  if (!(r instanceof $Reader)) r = $Reader.create(r);
5506
- var c = l === undefined ? r.len : r.pos + l,
5507
- m = new $root.meeting.SharedMeeting();
5508
- while (r.pos < c) {
5509
- var t = r.uint32();
5510
- switch (t >>> 3) {
5511
- case 1:
5512
- {
5513
- m.id = r.int32();
5514
- break;
5515
- }
5516
- case 2:
5517
- {
5518
- m.userId = r.string();
5519
- break;
5520
- }
5521
- case 3:
5522
- {
5523
- m.meetingId = r.int32();
5524
- break;
5525
- }
5526
- case 4:
5527
- {
5528
- m.email = r.string();
5529
- break;
5530
- }
5531
- case 5:
5532
- {
5533
- m.permission = r.int32();
5534
- break;
5535
- }
5536
- default:
5537
- r.skipType(t & 7);
5538
- break;
5539
- }
5540
- }
5541
- return m;
5542
- };
5543
- SharedMeeting.decodeDelimited = function decodeDelimited(reader) {
5544
- if (!(reader instanceof $Reader)) reader = new $Reader(reader);
5545
- return this.decode(reader, reader.uint32());
5546
- };
5547
- SharedMeeting.verify = function verify(m) {
5548
- if (typeof m !== "object" || m === null) return "object expected";
5549
- if (m.id != null && m.hasOwnProperty("id")) {
5550
- if (!$util.isInteger(m.id)) return "id: integer expected";
5551
- }
5552
- if (m.userId != null && m.hasOwnProperty("userId")) {
5553
- if (!$util.isString(m.userId)) return "userId: string expected";
5554
- }
5555
- if (m.meetingId != null && m.hasOwnProperty("meetingId")) {
5556
- if (!$util.isInteger(m.meetingId)) return "meetingId: integer expected";
5557
- }
5558
- if (m.email != null && m.hasOwnProperty("email")) {
5559
- if (!$util.isString(m.email)) return "email: string expected";
5560
- }
5561
- if (m.permission != null && m.hasOwnProperty("permission")) {
5562
- switch (m.permission) {
5563
- default:
5564
- return "permission: enum value expected";
5565
- case 0:
5566
- case 1:
5567
- case 2:
5568
- break;
5569
- }
5570
- }
5571
- return null;
5572
- };
5573
- SharedMeeting.fromObject = function fromObject(d) {
5574
- if (d instanceof $root.meeting.SharedMeeting) return d;
5575
- var m = new $root.meeting.SharedMeeting();
5576
- if (d.id != null) {
5577
- m.id = d.id | 0;
5578
- }
5579
- if (d.userId != null) {
5580
- m.userId = String(d.userId);
5581
- }
5582
- if (d.meetingId != null) {
5583
- m.meetingId = d.meetingId | 0;
5584
- }
5585
- if (d.email != null) {
5586
- m.email = String(d.email);
5587
- }
5588
- switch (d.permission) {
5589
- default:
5590
- if (typeof d.permission === "number") {
5591
- m.permission = d.permission;
5592
- break;
5593
- }
5594
- break;
5595
- case "UNKNOWN_SHARE_TYPE":
5596
- case 0:
5597
- m.permission = 0;
5598
- break;
5599
- case "SHARE_READ":
5600
- case 1:
5601
- m.permission = 1;
5602
- break;
5603
- case "SHARE_WRITE":
5604
- case 2:
5605
- m.permission = 2;
5606
- break;
5607
- }
5608
- return m;
5609
- };
5610
- SharedMeeting.toObject = function toObject(m, o) {
5611
- if (!o) o = {};
5612
- var d = {};
5613
- if (o.defaults) {
5614
- d.id = 0;
5615
- d.userId = "";
5616
- d.meetingId = 0;
5617
- d.email = "";
5618
- d.permission = o.enums === String ? "UNKNOWN_SHARE_TYPE" : 0;
5619
- }
5620
- if (m.id != null && m.hasOwnProperty("id")) {
5621
- d.id = m.id;
5622
- }
5623
- if (m.userId != null && m.hasOwnProperty("userId")) {
5624
- d.userId = m.userId;
5625
- }
5626
- if (m.meetingId != null && m.hasOwnProperty("meetingId")) {
5627
- d.meetingId = m.meetingId;
5628
- }
5629
- if (m.email != null && m.hasOwnProperty("email")) {
5630
- d.email = m.email;
5631
- }
5632
- if (m.permission != null && m.hasOwnProperty("permission")) {
5633
- d.permission = o.enums === String ? $root.meeting.SharePermission[m.permission] === undefined ? m.permission : $root.meeting.SharePermission[m.permission] : m.permission;
5634
- }
5635
- return d;
5636
- };
5637
- SharedMeeting.prototype.toJSON = function toJSON() {
5638
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
5639
- };
5640
- SharedMeeting.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
5641
- if (typeUrlPrefix === undefined) {
5642
- typeUrlPrefix = "type.googleapis.com";
5643
- }
5644
- return typeUrlPrefix + "/meeting.SharedMeeting";
5645
- };
5646
- return SharedMeeting;
5647
- }();
5648
- meeting.MeetingClaims = function () {
5649
- function MeetingClaims(p) {
5650
- this.auxilary = {};
5651
- if (p) for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) if (p[ks[i]] != null) this[ks[i]] = p[ks[i]];
5652
- }
5653
- MeetingClaims.prototype.meetingId = "";
5654
- MeetingClaims.prototype.ownerId = "";
5655
- MeetingClaims.prototype.capacity = 0;
5656
- MeetingClaims.prototype.auxilary = $util.emptyObject;
5657
- MeetingClaims.prototype.title = "";
5658
- MeetingClaims.prototype.isTemporary = false;
5659
- MeetingClaims.prototype.permission = 0;
5660
- MeetingClaims.create = function create(properties) {
5661
- return new MeetingClaims(properties);
5662
- };
5663
- MeetingClaims.encode = function encode(m, w) {
5664
- if (!w) w = $Writer.create();
5665
- if (m.meetingId != null && Object.hasOwnProperty.call(m, "meetingId")) w.uint32(10).string(m.meetingId);
5666
- if (m.ownerId != null && Object.hasOwnProperty.call(m, "ownerId")) w.uint32(26).string(m.ownerId);
5667
- if (m.capacity != null && Object.hasOwnProperty.call(m, "capacity")) w.uint32(32).int32(m.capacity);
5668
- if (m.auxilary != null && Object.hasOwnProperty.call(m, "auxilary")) {
5669
- for (var ks = Object.keys(m.auxilary), i = 0; i < ks.length; ++i) {
5670
- w.uint32(42).fork().uint32(10).string(ks[i]).uint32(18).string(m.auxilary[ks[i]]).ldelim();
5671
- }
5672
- }
5673
- if (m.title != null && Object.hasOwnProperty.call(m, "title")) w.uint32(50).string(m.title);
5674
- if (m.isTemporary != null && Object.hasOwnProperty.call(m, "isTemporary")) w.uint32(56).bool(m.isTemporary);
5675
- if (m.permission != null && Object.hasOwnProperty.call(m, "permission")) w.uint32(72).uint32(m.permission);
5676
- return w;
5677
- };
5678
- MeetingClaims.encodeDelimited = function encodeDelimited(message, writer) {
5679
- return this.encode(message, writer).ldelim();
5680
- };
5681
- MeetingClaims.decode = function decode(r, l) {
5682
- if (!(r instanceof $Reader)) r = $Reader.create(r);
5683
- var c = l === undefined ? r.len : r.pos + l,
5684
- m = new $root.meeting.MeetingClaims(),
5685
- k,
5686
- value;
5687
- while (r.pos < c) {
5688
- var t = r.uint32();
5689
- switch (t >>> 3) {
5690
- case 1:
5691
- {
5692
- m.meetingId = r.string();
5693
- break;
5694
- }
5695
- case 3:
5696
- {
5697
- m.ownerId = r.string();
5698
- break;
5699
- }
5700
- case 4:
5701
- {
5702
- m.capacity = r.int32();
5703
- break;
5704
- }
5705
- case 5:
5706
- {
5707
- if (m.auxilary === $util.emptyObject) m.auxilary = {};
5708
- var c2 = r.uint32() + r.pos;
5709
- k = "";
5710
- value = "";
5711
- while (r.pos < c2) {
5712
- var tag2 = r.uint32();
5713
- switch (tag2 >>> 3) {
5714
- case 1:
5715
- k = r.string();
5716
- break;
5717
- case 2:
5718
- value = r.string();
5719
- break;
5720
- default:
5721
- r.skipType(tag2 & 7);
5722
- break;
5723
- }
5724
- }
5725
- m.auxilary[k] = value;
5726
- break;
5727
- }
5728
- case 6:
5729
- {
5730
- m.title = r.string();
5731
- break;
5732
- }
5733
- case 7:
5734
- {
5735
- m.isTemporary = r.bool();
5736
- break;
5737
- }
5738
- case 9:
5739
- {
5740
- m.permission = r.uint32();
5741
- break;
5742
- }
5624
+ var c = l === undefined ? r.len : r.pos + l,
5625
+ m = new $root.meeting.SharedMeeting();
5626
+ while (r.pos < c) {
5627
+ var t = r.uint32();
5628
+ switch (t >>> 3) {
5629
+ case 1:
5630
+ m.id = r.int32();
5631
+ break;
5632
+ case 2:
5633
+ m.userId = r.string();
5634
+ break;
5635
+ case 3:
5636
+ m.meetingId = r.int32();
5637
+ break;
5638
+ case 4:
5639
+ m.email = r.string();
5640
+ break;
5641
+ case 5:
5642
+ m.permission = r.int32();
5643
+ break;
5743
5644
  default:
5744
5645
  r.skipType(t & 7);
5745
5646
  break;
@@ -5747,120 +5648,98 @@ export const meeting = $root.meeting = (() => {
5747
5648
  }
5748
5649
  return m;
5749
5650
  };
5750
- MeetingClaims.decodeDelimited = function decodeDelimited(reader) {
5651
+ SharedMeeting.decodeDelimited = function decodeDelimited(reader) {
5751
5652
  if (!(reader instanceof $Reader)) reader = new $Reader(reader);
5752
5653
  return this.decode(reader, reader.uint32());
5753
5654
  };
5754
- MeetingClaims.verify = function verify(m) {
5655
+ SharedMeeting.verify = function verify(m) {
5755
5656
  if (typeof m !== "object" || m === null) return "object expected";
5756
- if (m.meetingId != null && m.hasOwnProperty("meetingId")) {
5757
- if (!$util.isString(m.meetingId)) return "meetingId: string expected";
5758
- }
5759
- if (m.ownerId != null && m.hasOwnProperty("ownerId")) {
5760
- if (!$util.isString(m.ownerId)) return "ownerId: string expected";
5761
- }
5762
- if (m.capacity != null && m.hasOwnProperty("capacity")) {
5763
- if (!$util.isInteger(m.capacity)) return "capacity: integer expected";
5657
+ if (m.id != null && m.hasOwnProperty("id")) {
5658
+ if (!$util.isInteger(m.id)) return "id: integer expected";
5764
5659
  }
5765
- if (m.auxilary != null && m.hasOwnProperty("auxilary")) {
5766
- if (!$util.isObject(m.auxilary)) return "auxilary: object expected";
5767
- var k = Object.keys(m.auxilary);
5768
- for (var i = 0; i < k.length; ++i) {
5769
- if (!$util.isString(m.auxilary[k[i]])) return "auxilary: string{k:string} expected";
5770
- }
5660
+ if (m.userId != null && m.hasOwnProperty("userId")) {
5661
+ if (!$util.isString(m.userId)) return "userId: string expected";
5771
5662
  }
5772
- if (m.title != null && m.hasOwnProperty("title")) {
5773
- if (!$util.isString(m.title)) return "title: string expected";
5663
+ if (m.meetingId != null && m.hasOwnProperty("meetingId")) {
5664
+ if (!$util.isInteger(m.meetingId)) return "meetingId: integer expected";
5774
5665
  }
5775
- if (m.isTemporary != null && m.hasOwnProperty("isTemporary")) {
5776
- if (typeof m.isTemporary !== "boolean") return "isTemporary: boolean expected";
5666
+ if (m.email != null && m.hasOwnProperty("email")) {
5667
+ if (!$util.isString(m.email)) return "email: string expected";
5777
5668
  }
5778
5669
  if (m.permission != null && m.hasOwnProperty("permission")) {
5779
- if (!$util.isInteger(m.permission)) return "permission: integer expected";
5670
+ switch (m.permission) {
5671
+ default:
5672
+ return "permission: enum value expected";
5673
+ case 0:
5674
+ case 1:
5675
+ case 2:
5676
+ break;
5677
+ }
5780
5678
  }
5781
5679
  return null;
5782
5680
  };
5783
- MeetingClaims.fromObject = function fromObject(d) {
5784
- if (d instanceof $root.meeting.MeetingClaims) return d;
5785
- var m = new $root.meeting.MeetingClaims();
5786
- if (d.meetingId != null) {
5787
- m.meetingId = String(d.meetingId);
5788
- }
5789
- if (d.ownerId != null) {
5790
- m.ownerId = String(d.ownerId);
5791
- }
5792
- if (d.capacity != null) {
5793
- m.capacity = d.capacity | 0;
5681
+ SharedMeeting.fromObject = function fromObject(d) {
5682
+ if (d instanceof $root.meeting.SharedMeeting) return d;
5683
+ var m = new $root.meeting.SharedMeeting();
5684
+ if (d.id != null) {
5685
+ m.id = d.id | 0;
5794
5686
  }
5795
- if (d.auxilary) {
5796
- if (typeof d.auxilary !== "object") throw TypeError(".meeting.MeetingClaims.auxilary: object expected");
5797
- m.auxilary = {};
5798
- for (var ks = Object.keys(d.auxilary), i = 0; i < ks.length; ++i) {
5799
- m.auxilary[ks[i]] = String(d.auxilary[ks[i]]);
5800
- }
5687
+ if (d.userId != null) {
5688
+ m.userId = String(d.userId);
5801
5689
  }
5802
- if (d.title != null) {
5803
- m.title = String(d.title);
5690
+ if (d.meetingId != null) {
5691
+ m.meetingId = d.meetingId | 0;
5804
5692
  }
5805
- if (d.isTemporary != null) {
5806
- m.isTemporary = Boolean(d.isTemporary);
5693
+ if (d.email != null) {
5694
+ m.email = String(d.email);
5807
5695
  }
5808
- if (d.permission != null) {
5809
- m.permission = d.permission >>> 0;
5696
+ switch (d.permission) {
5697
+ case "UNKNOWN_SHARE_TYPE":
5698
+ case 0:
5699
+ m.permission = 0;
5700
+ break;
5701
+ case "SHARE_READ":
5702
+ case 1:
5703
+ m.permission = 1;
5704
+ break;
5705
+ case "SHARE_WRITE":
5706
+ case 2:
5707
+ m.permission = 2;
5708
+ break;
5810
5709
  }
5811
5710
  return m;
5812
5711
  };
5813
- MeetingClaims.toObject = function toObject(m, o) {
5712
+ SharedMeeting.toObject = function toObject(m, o) {
5814
5713
  if (!o) o = {};
5815
5714
  var d = {};
5816
- if (o.objects || o.defaults) {
5817
- d.auxilary = {};
5818
- }
5819
5715
  if (o.defaults) {
5820
- d.meetingId = "";
5821
- d.ownerId = "";
5822
- d.capacity = 0;
5823
- d.title = "";
5824
- d.isTemporary = false;
5825
- d.permission = 0;
5826
- }
5827
- if (m.meetingId != null && m.hasOwnProperty("meetingId")) {
5828
- d.meetingId = m.meetingId;
5829
- }
5830
- if (m.ownerId != null && m.hasOwnProperty("ownerId")) {
5831
- d.ownerId = m.ownerId;
5716
+ d.id = 0;
5717
+ d.userId = "";
5718
+ d.meetingId = 0;
5719
+ d.email = "";
5720
+ d.permission = o.enums === String ? "UNKNOWN_SHARE_TYPE" : 0;
5832
5721
  }
5833
- if (m.capacity != null && m.hasOwnProperty("capacity")) {
5834
- d.capacity = m.capacity;
5722
+ if (m.id != null && m.hasOwnProperty("id")) {
5723
+ d.id = m.id;
5835
5724
  }
5836
- var ks2;
5837
- if (m.auxilary && (ks2 = Object.keys(m.auxilary)).length) {
5838
- d.auxilary = {};
5839
- for (var j = 0; j < ks2.length; ++j) {
5840
- d.auxilary[ks2[j]] = m.auxilary[ks2[j]];
5841
- }
5725
+ if (m.userId != null && m.hasOwnProperty("userId")) {
5726
+ d.userId = m.userId;
5842
5727
  }
5843
- if (m.title != null && m.hasOwnProperty("title")) {
5844
- d.title = m.title;
5728
+ if (m.meetingId != null && m.hasOwnProperty("meetingId")) {
5729
+ d.meetingId = m.meetingId;
5845
5730
  }
5846
- if (m.isTemporary != null && m.hasOwnProperty("isTemporary")) {
5847
- d.isTemporary = m.isTemporary;
5731
+ if (m.email != null && m.hasOwnProperty("email")) {
5732
+ d.email = m.email;
5848
5733
  }
5849
5734
  if (m.permission != null && m.hasOwnProperty("permission")) {
5850
- d.permission = m.permission;
5735
+ d.permission = o.enums === String ? $root.meeting.SharePermission[m.permission] : m.permission;
5851
5736
  }
5852
5737
  return d;
5853
5738
  };
5854
- MeetingClaims.prototype.toJSON = function toJSON() {
5739
+ SharedMeeting.prototype.toJSON = function toJSON() {
5855
5740
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
5856
5741
  };
5857
- MeetingClaims.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
5858
- if (typeUrlPrefix === undefined) {
5859
- typeUrlPrefix = "type.googleapis.com";
5860
- }
5861
- return typeUrlPrefix + "/meeting.MeetingClaims";
5862
- };
5863
- return MeetingClaims;
5742
+ return SharedMeeting;
5864
5743
  }();
5865
5744
  meeting.ShortUrlDetails = function () {
5866
5745
  function ShortUrlDetails(p) {
@@ -5888,15 +5767,11 @@ export const meeting = $root.meeting = (() => {
5888
5767
  var t = r.uint32();
5889
5768
  switch (t >>> 3) {
5890
5769
  case 1:
5891
- {
5892
- m.fullUrl = r.string();
5893
- break;
5894
- }
5770
+ m.fullUrl = r.string();
5771
+ break;
5895
5772
  case 2:
5896
- {
5897
- m.password = r.string();
5898
- break;
5899
- }
5773
+ m.password = r.string();
5774
+ break;
5900
5775
  default:
5901
5776
  r.skipType(t & 7);
5902
5777
  break;
@@ -5947,12 +5822,6 @@ export const meeting = $root.meeting = (() => {
5947
5822
  ShortUrlDetails.prototype.toJSON = function toJSON() {
5948
5823
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
5949
5824
  };
5950
- ShortUrlDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
5951
- if (typeUrlPrefix === undefined) {
5952
- typeUrlPrefix = "type.googleapis.com";
5953
- }
5954
- return typeUrlPrefix + "/meeting.ShortUrlDetails";
5955
- };
5956
5825
  return ShortUrlDetails;
5957
5826
  }();
5958
5827
  return meeting;
@@ -5985,15 +5854,11 @@ export const cilix = $root.cilix = (() => {
5985
5854
  var t = r.uint32();
5986
5855
  switch (t >>> 3) {
5987
5856
  case 1:
5988
- {
5989
- m.id = r.string();
5990
- break;
5991
- }
5857
+ m.id = r.string();
5858
+ break;
5992
5859
  case 2:
5993
- {
5994
- m.name = r.string();
5995
- break;
5996
- }
5860
+ m.name = r.string();
5861
+ break;
5997
5862
  default:
5998
5863
  r.skipType(t & 7);
5999
5864
  break;
@@ -6044,12 +5909,6 @@ export const cilix = $root.cilix = (() => {
6044
5909
  CameraDescription.prototype.toJSON = function toJSON() {
6045
5910
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
6046
5911
  };
6047
- CameraDescription.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
6048
- if (typeUrlPrefix === undefined) {
6049
- typeUrlPrefix = "type.googleapis.com";
6050
- }
6051
- return typeUrlPrefix + "/cilix.CameraDescription";
6052
- };
6053
5912
  return CameraDescription;
6054
5913
  }();
6055
5914
  cilix.StartRequest = function () {
@@ -6082,25 +5941,17 @@ export const cilix = $root.cilix = (() => {
6082
5941
  var t = r.uint32();
6083
5942
  switch (t >>> 3) {
6084
5943
  case 2:
6085
- {
6086
- m.config = $root.jibb.ipsa.v1.Config.decode(r, r.uint32());
6087
- break;
6088
- }
5944
+ m.config = $root.jibb.ipsa.v1.Config.decode(r, r.uint32());
5945
+ break;
6089
5946
  case 4:
6090
- {
6091
- m.runtimeConfig = $root.jibb.ipsa.v1.RuntimeConfig.decode(r, r.uint32());
6092
- break;
6093
- }
5947
+ m.runtimeConfig = $root.jibb.ipsa.v1.RuntimeConfig.decode(r, r.uint32());
5948
+ break;
6094
5949
  case 5:
6095
- {
6096
- m.camera = $root.cilix.CameraDescription.decode(r, r.uint32());
6097
- break;
6098
- }
5950
+ m.camera = $root.cilix.CameraDescription.decode(r, r.uint32());
5951
+ break;
6099
5952
  case 6:
6100
- {
6101
- m.meetingToken = r.string();
6102
- break;
6103
- }
5953
+ m.meetingToken = r.string();
5954
+ break;
6104
5955
  default:
6105
5956
  r.skipType(t & 7);
6106
5957
  break;
@@ -6183,12 +6034,6 @@ export const cilix = $root.cilix = (() => {
6183
6034
  StartRequest.prototype.toJSON = function toJSON() {
6184
6035
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
6185
6036
  };
6186
- StartRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
6187
- if (typeUrlPrefix === undefined) {
6188
- typeUrlPrefix = "type.googleapis.com";
6189
- }
6190
- return typeUrlPrefix + "/cilix.StartRequest";
6191
- };
6192
6037
  return StartRequest;
6193
6038
  }();
6194
6039
  cilix.PreviewRequest = function () {
@@ -6215,10 +6060,8 @@ export const cilix = $root.cilix = (() => {
6215
6060
  var t = r.uint32();
6216
6061
  switch (t >>> 3) {
6217
6062
  case 2:
6218
- {
6219
- m.source = $root.cilix.CameraDescription.decode(r, r.uint32());
6220
- break;
6221
- }
6063
+ m.source = $root.cilix.CameraDescription.decode(r, r.uint32());
6064
+ break;
6222
6065
  default:
6223
6066
  r.skipType(t & 7);
6224
6067
  break;
@@ -6263,12 +6106,6 @@ export const cilix = $root.cilix = (() => {
6263
6106
  PreviewRequest.prototype.toJSON = function toJSON() {
6264
6107
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
6265
6108
  };
6266
- PreviewRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
6267
- if (typeUrlPrefix === undefined) {
6268
- typeUrlPrefix = "type.googleapis.com";
6269
- }
6270
- return typeUrlPrefix + "/cilix.PreviewRequest";
6271
- };
6272
6109
  return PreviewRequest;
6273
6110
  }();
6274
6111
  cilix.PreviewResponse = function () {
@@ -6295,10 +6132,8 @@ export const cilix = $root.cilix = (() => {
6295
6132
  var t = r.uint32();
6296
6133
  switch (t >>> 3) {
6297
6134
  case 1:
6298
- {
6299
- m.image = r.bytes();
6300
- break;
6301
- }
6135
+ m.image = r.bytes();
6136
+ break;
6302
6137
  default:
6303
6138
  r.skipType(t & 7);
6304
6139
  break;
@@ -6321,7 +6156,7 @@ export const cilix = $root.cilix = (() => {
6321
6156
  if (d instanceof $root.cilix.PreviewResponse) return d;
6322
6157
  var m = new $root.cilix.PreviewResponse();
6323
6158
  if (d.image != null) {
6324
- if (typeof d.image === "string") $util.base64.decode(d.image, m.image = $util.newBuffer($util.base64.length(d.image)), 0);else if (d.image.length >= 0) m.image = d.image;
6159
+ if (typeof d.image === "string") $util.base64.decode(d.image, m.image = $util.newBuffer($util.base64.length(d.image)), 0);else if (d.image.length) m.image = d.image;
6325
6160
  }
6326
6161
  return m;
6327
6162
  };
@@ -6342,12 +6177,6 @@ export const cilix = $root.cilix = (() => {
6342
6177
  PreviewResponse.prototype.toJSON = function toJSON() {
6343
6178
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
6344
6179
  };
6345
- PreviewResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
6346
- if (typeUrlPrefix === undefined) {
6347
- typeUrlPrefix = "type.googleapis.com";
6348
- }
6349
- return typeUrlPrefix + "/cilix.PreviewResponse";
6350
- };
6351
6180
  return PreviewResponse;
6352
6181
  }();
6353
6182
  cilix.GetCameraListResponse = function () {
@@ -6377,11 +6206,9 @@ export const cilix = $root.cilix = (() => {
6377
6206
  var t = r.uint32();
6378
6207
  switch (t >>> 3) {
6379
6208
  case 1:
6380
- {
6381
- if (!(m.items && m.items.length)) m.items = [];
6382
- m.items.push($root.cilix.CameraDescription.decode(r, r.uint32()));
6383
- break;
6384
- }
6209
+ if (!(m.items && m.items.length)) m.items = [];
6210
+ m.items.push($root.cilix.CameraDescription.decode(r, r.uint32()));
6211
+ break;
6385
6212
  default:
6386
6213
  r.skipType(t & 7);
6387
6214
  break;
@@ -6436,12 +6263,6 @@ export const cilix = $root.cilix = (() => {
6436
6263
  GetCameraListResponse.prototype.toJSON = function toJSON() {
6437
6264
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
6438
6265
  };
6439
- GetCameraListResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
6440
- if (typeUrlPrefix === undefined) {
6441
- typeUrlPrefix = "type.googleapis.com";
6442
- }
6443
- return typeUrlPrefix + "/cilix.GetCameraListResponse";
6444
- };
6445
6266
  return GetCameraListResponse;
6446
6267
  }();
6447
6268
  cilix.GetClientStatusListResponse = function () {
@@ -6471,11 +6292,9 @@ export const cilix = $root.cilix = (() => {
6471
6292
  var t = r.uint32();
6472
6293
  switch (t >>> 3) {
6473
6294
  case 1:
6474
- {
6475
- if (!(m.clients && m.clients.length)) m.clients = [];
6476
- m.clients.push($root.types.ClientDetails.decode(r, r.uint32()));
6477
- break;
6478
- }
6295
+ if (!(m.clients && m.clients.length)) m.clients = [];
6296
+ m.clients.push($root.types.ClientDetails.decode(r, r.uint32()));
6297
+ break;
6479
6298
  default:
6480
6299
  r.skipType(t & 7);
6481
6300
  break;
@@ -6530,12 +6349,6 @@ export const cilix = $root.cilix = (() => {
6530
6349
  GetClientStatusListResponse.prototype.toJSON = function toJSON() {
6531
6350
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
6532
6351
  };
6533
- GetClientStatusListResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
6534
- if (typeUrlPrefix === undefined) {
6535
- typeUrlPrefix = "type.googleapis.com";
6536
- }
6537
- return typeUrlPrefix + "/cilix.GetClientStatusListResponse";
6538
- };
6539
6352
  return GetClientStatusListResponse;
6540
6353
  }();
6541
6354
  cilix.BusMessage = function () {
@@ -6601,95 +6414,59 @@ export const cilix = $root.cilix = (() => {
6601
6414
  var t = r.uint32();
6602
6415
  switch (t >>> 3) {
6603
6416
  case 2:
6604
- {
6605
- m.clientConnected = $root.google.protobuf.Empty.decode(r, r.uint32());
6606
- break;
6607
- }
6417
+ m.clientConnected = $root.google.protobuf.Empty.decode(r, r.uint32());
6418
+ break;
6608
6419
  case 3:
6609
- {
6610
- m.clientDisconnected = $root.google.protobuf.Empty.decode(r, r.uint32());
6611
- break;
6612
- }
6420
+ m.clientDisconnected = $root.google.protobuf.Empty.decode(r, r.uint32());
6421
+ break;
6613
6422
  case 4:
6614
- {
6615
- m.tooManyPublishers = $root.google.protobuf.Empty.decode(r, r.uint32());
6616
- break;
6617
- }
6423
+ m.tooManyPublishers = $root.google.protobuf.Empty.decode(r, r.uint32());
6424
+ break;
6618
6425
  case 6:
6619
- {
6620
- m.ipsaResponse = $root.jibb.ipsa.v1.Response.decode(r, r.uint32());
6621
- break;
6622
- }
6426
+ m.ipsaResponse = $root.jibb.ipsa.v1.Response.decode(r, r.uint32());
6427
+ break;
6623
6428
  case 50:
6624
- {
6625
- m.startRequest = $root.cilix.StartRequest.decode(r, r.uint32());
6626
- break;
6627
- }
6429
+ m.startRequest = $root.cilix.StartRequest.decode(r, r.uint32());
6430
+ break;
6628
6431
  case 51:
6629
- {
6630
- m.stopRequest = $root.google.protobuf.Empty.decode(r, r.uint32());
6631
- break;
6632
- }
6432
+ m.stopRequest = $root.google.protobuf.Empty.decode(r, r.uint32());
6433
+ break;
6633
6434
  case 52:
6634
- {
6635
- m.newPageRequest = $root.google.protobuf.Empty.decode(r, r.uint32());
6636
- break;
6637
- }
6435
+ m.newPageRequest = $root.google.protobuf.Empty.decode(r, r.uint32());
6436
+ break;
6638
6437
  case 53:
6639
- {
6640
- m.previewRequest = $root.cilix.PreviewRequest.decode(r, r.uint32());
6641
- break;
6642
- }
6438
+ m.previewRequest = $root.cilix.PreviewRequest.decode(r, r.uint32());
6439
+ break;
6643
6440
  case 54:
6644
- {
6645
- m.previewResponse = $root.cilix.PreviewResponse.decode(r, r.uint32());
6646
- break;
6647
- }
6441
+ m.previewResponse = $root.cilix.PreviewResponse.decode(r, r.uint32());
6442
+ break;
6648
6443
  case 55:
6649
- {
6650
- m.cameraListRequest = $root.google.protobuf.Empty.decode(r, r.uint32());
6651
- break;
6652
- }
6444
+ m.cameraListRequest = $root.google.protobuf.Empty.decode(r, r.uint32());
6445
+ break;
6653
6446
  case 56:
6654
- {
6655
- m.cameraListResponse = $root.cilix.GetCameraListResponse.decode(r, r.uint32());
6656
- break;
6657
- }
6447
+ m.cameraListResponse = $root.cilix.GetCameraListResponse.decode(r, r.uint32());
6448
+ break;
6658
6449
  case 57:
6659
- {
6660
- m.runtimeConfigRequest = $root.jibb.ipsa.v1.RuntimeConfig.decode(r, r.uint32());
6661
- break;
6662
- }
6450
+ m.runtimeConfigRequest = $root.jibb.ipsa.v1.RuntimeConfig.decode(r, r.uint32());
6451
+ break;
6663
6452
  case 58:
6664
- {
6665
- m.clientStatusRequest = $root.google.protobuf.Empty.decode(r, r.uint32());
6666
- break;
6667
- }
6453
+ m.clientStatusRequest = $root.google.protobuf.Empty.decode(r, r.uint32());
6454
+ break;
6668
6455
  case 59:
6669
- {
6670
- m.recordingStarted = $root.google.protobuf.Empty.decode(r, r.uint32());
6671
- break;
6672
- }
6456
+ m.recordingStarted = $root.google.protobuf.Empty.decode(r, r.uint32());
6457
+ break;
6673
6458
  case 60:
6674
- {
6675
- m.recordingStopped = $root.google.protobuf.Empty.decode(r, r.uint32());
6676
- break;
6677
- }
6459
+ m.recordingStopped = $root.google.protobuf.Empty.decode(r, r.uint32());
6460
+ break;
6678
6461
  case 100:
6679
- {
6680
- m.error = r.int32();
6681
- break;
6682
- }
6462
+ m.error = r.int32();
6463
+ break;
6683
6464
  case 30:
6684
- {
6685
- m.src = $root.types.ClientDetails.decode(r, r.uint32());
6686
- break;
6687
- }
6465
+ m.src = $root.types.ClientDetails.decode(r, r.uint32());
6466
+ break;
6688
6467
  case 31:
6689
- {
6690
- m.dst = $root.types.ClientDetails.decode(r, r.uint32());
6691
- break;
6692
- }
6468
+ m.dst = $root.types.ClientDetails.decode(r, r.uint32());
6469
+ break;
6693
6470
  default:
6694
6471
  r.skipType(t & 7);
6695
6472
  break;
@@ -6919,12 +6696,6 @@ export const cilix = $root.cilix = (() => {
6919
6696
  m.recordingStopped = $root.google.protobuf.Empty.fromObject(d.recordingStopped);
6920
6697
  }
6921
6698
  switch (d.error) {
6922
- default:
6923
- if (typeof d.error === "number") {
6924
- m.error = d.error;
6925
- break;
6926
- }
6927
- break;
6928
6699
  case "SUCCESS":
6929
6700
  case 0:
6930
6701
  m.error = 0;
@@ -7046,7 +6817,7 @@ export const cilix = $root.cilix = (() => {
7046
6817
  if (o.oneofs) d.messageType = "recordingStopped";
7047
6818
  }
7048
6819
  if (m.error != null && m.hasOwnProperty("error")) {
7049
- d.error = o.enums === String ? $root.types.Code[m.error] === undefined ? m.error : $root.types.Code[m.error] : m.error;
6820
+ d.error = o.enums === String ? $root.types.Code[m.error] : m.error;
7050
6821
  if (o.oneofs) d.messageType = "error";
7051
6822
  }
7052
6823
  return d;
@@ -7054,12 +6825,6 @@ export const cilix = $root.cilix = (() => {
7054
6825
  BusMessage.prototype.toJSON = function toJSON() {
7055
6826
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
7056
6827
  };
7057
- BusMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
7058
- if (typeUrlPrefix === undefined) {
7059
- typeUrlPrefix = "type.googleapis.com";
7060
- }
7061
- return typeUrlPrefix + "/cilix.BusMessage";
7062
- };
7063
6828
  return BusMessage;
7064
6829
  }();
7065
6830
  return cilix;