@gitpod/supervisor-api-grpc 0.1.5-se-init.1 → 0.1.5-se-better-ts-api.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/status_pb.js CHANGED
@@ -13,13 +13,7 @@
13
13
 
14
14
  var jspb = require('google-protobuf');
15
15
  var goog = jspb;
16
- var global = (function() {
17
- if (this) { return this; }
18
- if (typeof window !== 'undefined') { return window; }
19
- if (typeof global !== 'undefined') { return global; }
20
- if (typeof self !== 'undefined') { return self; }
21
- return Function('return this')();
22
- }.call(null));
16
+ var global = (function() { return this || window || global || self || Function('return this')(); }).call(null);
23
17
 
24
18
  var port_pb = require('./port_pb.js');
25
19
  goog.object.extend(proto, port_pb);
@@ -38,6 +32,10 @@ goog.exportSymbol('proto.supervisor.PortVisibility', null, global);
38
32
  goog.exportSymbol('proto.supervisor.PortsStatus', null, global);
39
33
  goog.exportSymbol('proto.supervisor.PortsStatusRequest', null, global);
40
34
  goog.exportSymbol('proto.supervisor.PortsStatusResponse', null, global);
35
+ goog.exportSymbol('proto.supervisor.ResourceStatus', null, global);
36
+ goog.exportSymbol('proto.supervisor.ResourceStatusSeverity', null, global);
37
+ goog.exportSymbol('proto.supervisor.ResourcesStatuRequest', null, global);
38
+ goog.exportSymbol('proto.supervisor.ResourcesStatusResponse', null, global);
41
39
  goog.exportSymbol('proto.supervisor.SupervisorStatusRequest', null, global);
42
40
  goog.exportSymbol('proto.supervisor.SupervisorStatusResponse', null, global);
43
41
  goog.exportSymbol('proto.supervisor.TaskPresentation', null, global);
@@ -424,6 +422,69 @@ if (goog.DEBUG && !COMPILED) {
424
422
  */
425
423
  proto.supervisor.TaskPresentation.displayName = 'proto.supervisor.TaskPresentation';
426
424
  }
425
+ /**
426
+ * Generated by JsPbCodeGenerator.
427
+ * @param {Array=} opt_data Optional initial data array, typically from a
428
+ * server response, or constructed directly in Javascript. The array is used
429
+ * in place and becomes part of the constructed object. It is not cloned.
430
+ * If no data is provided, the constructed object will be empty, but still
431
+ * valid.
432
+ * @extends {jspb.Message}
433
+ * @constructor
434
+ */
435
+ proto.supervisor.ResourcesStatuRequest = function(opt_data) {
436
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
437
+ };
438
+ goog.inherits(proto.supervisor.ResourcesStatuRequest, jspb.Message);
439
+ if (goog.DEBUG && !COMPILED) {
440
+ /**
441
+ * @public
442
+ * @override
443
+ */
444
+ proto.supervisor.ResourcesStatuRequest.displayName = 'proto.supervisor.ResourcesStatuRequest';
445
+ }
446
+ /**
447
+ * Generated by JsPbCodeGenerator.
448
+ * @param {Array=} opt_data Optional initial data array, typically from a
449
+ * server response, or constructed directly in Javascript. The array is used
450
+ * in place and becomes part of the constructed object. It is not cloned.
451
+ * If no data is provided, the constructed object will be empty, but still
452
+ * valid.
453
+ * @extends {jspb.Message}
454
+ * @constructor
455
+ */
456
+ proto.supervisor.ResourcesStatusResponse = function(opt_data) {
457
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
458
+ };
459
+ goog.inherits(proto.supervisor.ResourcesStatusResponse, jspb.Message);
460
+ if (goog.DEBUG && !COMPILED) {
461
+ /**
462
+ * @public
463
+ * @override
464
+ */
465
+ proto.supervisor.ResourcesStatusResponse.displayName = 'proto.supervisor.ResourcesStatusResponse';
466
+ }
467
+ /**
468
+ * Generated by JsPbCodeGenerator.
469
+ * @param {Array=} opt_data Optional initial data array, typically from a
470
+ * server response, or constructed directly in Javascript. The array is used
471
+ * in place and becomes part of the constructed object. It is not cloned.
472
+ * If no data is provided, the constructed object will be empty, but still
473
+ * valid.
474
+ * @extends {jspb.Message}
475
+ * @constructor
476
+ */
477
+ proto.supervisor.ResourceStatus = function(opt_data) {
478
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
479
+ };
480
+ goog.inherits(proto.supervisor.ResourceStatus, jspb.Message);
481
+ if (goog.DEBUG && !COMPILED) {
482
+ /**
483
+ * @public
484
+ * @override
485
+ */
486
+ proto.supervisor.ResourceStatus.displayName = 'proto.supervisor.ResourceStatus';
487
+ }
427
488
 
428
489
 
429
490
 
@@ -944,7 +1005,9 @@ proto.supervisor.IDEStatusResponse.DesktopStatus.prototype.toObject = function(o
944
1005
  proto.supervisor.IDEStatusResponse.DesktopStatus.toObject = function(includeInstance, msg) {
945
1006
  var f, obj = {
946
1007
  link: jspb.Message.getFieldWithDefault(msg, 1, ""),
947
- label: jspb.Message.getFieldWithDefault(msg, 2, "")
1008
+ label: jspb.Message.getFieldWithDefault(msg, 2, ""),
1009
+ clientid: jspb.Message.getFieldWithDefault(msg, 3, ""),
1010
+ kind: jspb.Message.getFieldWithDefault(msg, 4, "")
948
1011
  };
949
1012
 
950
1013
  if (includeInstance) {
@@ -989,6 +1052,14 @@ proto.supervisor.IDEStatusResponse.DesktopStatus.deserializeBinaryFromReader = f
989
1052
  var value = /** @type {string} */ (reader.readString());
990
1053
  msg.setLabel(value);
991
1054
  break;
1055
+ case 3:
1056
+ var value = /** @type {string} */ (reader.readString());
1057
+ msg.setClientid(value);
1058
+ break;
1059
+ case 4:
1060
+ var value = /** @type {string} */ (reader.readString());
1061
+ msg.setKind(value);
1062
+ break;
992
1063
  default:
993
1064
  reader.skipField();
994
1065
  break;
@@ -1032,6 +1103,20 @@ proto.supervisor.IDEStatusResponse.DesktopStatus.serializeBinaryToWriter = funct
1032
1103
  f
1033
1104
  );
1034
1105
  }
1106
+ f = message.getClientid();
1107
+ if (f.length > 0) {
1108
+ writer.writeString(
1109
+ 3,
1110
+ f
1111
+ );
1112
+ }
1113
+ f = message.getKind();
1114
+ if (f.length > 0) {
1115
+ writer.writeString(
1116
+ 4,
1117
+ f
1118
+ );
1119
+ }
1035
1120
  };
1036
1121
 
1037
1122
 
@@ -1071,6 +1156,42 @@ proto.supervisor.IDEStatusResponse.DesktopStatus.prototype.setLabel = function(v
1071
1156
  };
1072
1157
 
1073
1158
 
1159
+ /**
1160
+ * optional string clientID = 3;
1161
+ * @return {string}
1162
+ */
1163
+ proto.supervisor.IDEStatusResponse.DesktopStatus.prototype.getClientid = function() {
1164
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
1165
+ };
1166
+
1167
+
1168
+ /**
1169
+ * @param {string} value
1170
+ * @return {!proto.supervisor.IDEStatusResponse.DesktopStatus} returns this
1171
+ */
1172
+ proto.supervisor.IDEStatusResponse.DesktopStatus.prototype.setClientid = function(value) {
1173
+ return jspb.Message.setProto3StringField(this, 3, value);
1174
+ };
1175
+
1176
+
1177
+ /**
1178
+ * optional string kind = 4;
1179
+ * @return {string}
1180
+ */
1181
+ proto.supervisor.IDEStatusResponse.DesktopStatus.prototype.getKind = function() {
1182
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
1183
+ };
1184
+
1185
+
1186
+ /**
1187
+ * @param {string} value
1188
+ * @return {!proto.supervisor.IDEStatusResponse.DesktopStatus} returns this
1189
+ */
1190
+ proto.supervisor.IDEStatusResponse.DesktopStatus.prototype.setKind = function(value) {
1191
+ return jspb.Message.setProto3StringField(this, 4, value);
1192
+ };
1193
+
1194
+
1074
1195
  /**
1075
1196
  * optional bool ok = 1;
1076
1197
  * @return {boolean}
@@ -3393,6 +3514,499 @@ proto.supervisor.TaskPresentation.prototype.setOpenMode = function(value) {
3393
3514
  };
3394
3515
 
3395
3516
 
3517
+
3518
+
3519
+
3520
+ if (jspb.Message.GENERATE_TO_OBJECT) {
3521
+ /**
3522
+ * Creates an object representation of this proto.
3523
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
3524
+ * Optional fields that are not set will be set to undefined.
3525
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3526
+ * For the list of reserved names please see:
3527
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3528
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3529
+ * JSPB instance for transitional soy proto support:
3530
+ * http://goto/soy-param-migration
3531
+ * @return {!Object}
3532
+ */
3533
+ proto.supervisor.ResourcesStatuRequest.prototype.toObject = function(opt_includeInstance) {
3534
+ return proto.supervisor.ResourcesStatuRequest.toObject(opt_includeInstance, this);
3535
+ };
3536
+
3537
+
3538
+ /**
3539
+ * Static version of the {@see toObject} method.
3540
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3541
+ * the JSPB instance for transitional soy proto support:
3542
+ * http://goto/soy-param-migration
3543
+ * @param {!proto.supervisor.ResourcesStatuRequest} msg The msg instance to transform.
3544
+ * @return {!Object}
3545
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3546
+ */
3547
+ proto.supervisor.ResourcesStatuRequest.toObject = function(includeInstance, msg) {
3548
+ var f, obj = {
3549
+
3550
+ };
3551
+
3552
+ if (includeInstance) {
3553
+ obj.$jspbMessageInstance = msg;
3554
+ }
3555
+ return obj;
3556
+ };
3557
+ }
3558
+
3559
+
3560
+ /**
3561
+ * Deserializes binary data (in protobuf wire format).
3562
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
3563
+ * @return {!proto.supervisor.ResourcesStatuRequest}
3564
+ */
3565
+ proto.supervisor.ResourcesStatuRequest.deserializeBinary = function(bytes) {
3566
+ var reader = new jspb.BinaryReader(bytes);
3567
+ var msg = new proto.supervisor.ResourcesStatuRequest;
3568
+ return proto.supervisor.ResourcesStatuRequest.deserializeBinaryFromReader(msg, reader);
3569
+ };
3570
+
3571
+
3572
+ /**
3573
+ * Deserializes binary data (in protobuf wire format) from the
3574
+ * given reader into the given message object.
3575
+ * @param {!proto.supervisor.ResourcesStatuRequest} msg The message object to deserialize into.
3576
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3577
+ * @return {!proto.supervisor.ResourcesStatuRequest}
3578
+ */
3579
+ proto.supervisor.ResourcesStatuRequest.deserializeBinaryFromReader = function(msg, reader) {
3580
+ while (reader.nextField()) {
3581
+ if (reader.isEndGroup()) {
3582
+ break;
3583
+ }
3584
+ var field = reader.getFieldNumber();
3585
+ switch (field) {
3586
+ default:
3587
+ reader.skipField();
3588
+ break;
3589
+ }
3590
+ }
3591
+ return msg;
3592
+ };
3593
+
3594
+
3595
+ /**
3596
+ * Serializes the message to binary data (in protobuf wire format).
3597
+ * @return {!Uint8Array}
3598
+ */
3599
+ proto.supervisor.ResourcesStatuRequest.prototype.serializeBinary = function() {
3600
+ var writer = new jspb.BinaryWriter();
3601
+ proto.supervisor.ResourcesStatuRequest.serializeBinaryToWriter(this, writer);
3602
+ return writer.getResultBuffer();
3603
+ };
3604
+
3605
+
3606
+ /**
3607
+ * Serializes the given message to binary data (in protobuf wire
3608
+ * format), writing to the given BinaryWriter.
3609
+ * @param {!proto.supervisor.ResourcesStatuRequest} message
3610
+ * @param {!jspb.BinaryWriter} writer
3611
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3612
+ */
3613
+ proto.supervisor.ResourcesStatuRequest.serializeBinaryToWriter = function(message, writer) {
3614
+ var f = undefined;
3615
+ };
3616
+
3617
+
3618
+
3619
+
3620
+
3621
+ if (jspb.Message.GENERATE_TO_OBJECT) {
3622
+ /**
3623
+ * Creates an object representation of this proto.
3624
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
3625
+ * Optional fields that are not set will be set to undefined.
3626
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3627
+ * For the list of reserved names please see:
3628
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3629
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3630
+ * JSPB instance for transitional soy proto support:
3631
+ * http://goto/soy-param-migration
3632
+ * @return {!Object}
3633
+ */
3634
+ proto.supervisor.ResourcesStatusResponse.prototype.toObject = function(opt_includeInstance) {
3635
+ return proto.supervisor.ResourcesStatusResponse.toObject(opt_includeInstance, this);
3636
+ };
3637
+
3638
+
3639
+ /**
3640
+ * Static version of the {@see toObject} method.
3641
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3642
+ * the JSPB instance for transitional soy proto support:
3643
+ * http://goto/soy-param-migration
3644
+ * @param {!proto.supervisor.ResourcesStatusResponse} msg The msg instance to transform.
3645
+ * @return {!Object}
3646
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3647
+ */
3648
+ proto.supervisor.ResourcesStatusResponse.toObject = function(includeInstance, msg) {
3649
+ var f, obj = {
3650
+ memory: (f = msg.getMemory()) && proto.supervisor.ResourceStatus.toObject(includeInstance, f),
3651
+ cpu: (f = msg.getCpu()) && proto.supervisor.ResourceStatus.toObject(includeInstance, f)
3652
+ };
3653
+
3654
+ if (includeInstance) {
3655
+ obj.$jspbMessageInstance = msg;
3656
+ }
3657
+ return obj;
3658
+ };
3659
+ }
3660
+
3661
+
3662
+ /**
3663
+ * Deserializes binary data (in protobuf wire format).
3664
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
3665
+ * @return {!proto.supervisor.ResourcesStatusResponse}
3666
+ */
3667
+ proto.supervisor.ResourcesStatusResponse.deserializeBinary = function(bytes) {
3668
+ var reader = new jspb.BinaryReader(bytes);
3669
+ var msg = new proto.supervisor.ResourcesStatusResponse;
3670
+ return proto.supervisor.ResourcesStatusResponse.deserializeBinaryFromReader(msg, reader);
3671
+ };
3672
+
3673
+
3674
+ /**
3675
+ * Deserializes binary data (in protobuf wire format) from the
3676
+ * given reader into the given message object.
3677
+ * @param {!proto.supervisor.ResourcesStatusResponse} msg The message object to deserialize into.
3678
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3679
+ * @return {!proto.supervisor.ResourcesStatusResponse}
3680
+ */
3681
+ proto.supervisor.ResourcesStatusResponse.deserializeBinaryFromReader = function(msg, reader) {
3682
+ while (reader.nextField()) {
3683
+ if (reader.isEndGroup()) {
3684
+ break;
3685
+ }
3686
+ var field = reader.getFieldNumber();
3687
+ switch (field) {
3688
+ case 1:
3689
+ var value = new proto.supervisor.ResourceStatus;
3690
+ reader.readMessage(value,proto.supervisor.ResourceStatus.deserializeBinaryFromReader);
3691
+ msg.setMemory(value);
3692
+ break;
3693
+ case 2:
3694
+ var value = new proto.supervisor.ResourceStatus;
3695
+ reader.readMessage(value,proto.supervisor.ResourceStatus.deserializeBinaryFromReader);
3696
+ msg.setCpu(value);
3697
+ break;
3698
+ default:
3699
+ reader.skipField();
3700
+ break;
3701
+ }
3702
+ }
3703
+ return msg;
3704
+ };
3705
+
3706
+
3707
+ /**
3708
+ * Serializes the message to binary data (in protobuf wire format).
3709
+ * @return {!Uint8Array}
3710
+ */
3711
+ proto.supervisor.ResourcesStatusResponse.prototype.serializeBinary = function() {
3712
+ var writer = new jspb.BinaryWriter();
3713
+ proto.supervisor.ResourcesStatusResponse.serializeBinaryToWriter(this, writer);
3714
+ return writer.getResultBuffer();
3715
+ };
3716
+
3717
+
3718
+ /**
3719
+ * Serializes the given message to binary data (in protobuf wire
3720
+ * format), writing to the given BinaryWriter.
3721
+ * @param {!proto.supervisor.ResourcesStatusResponse} message
3722
+ * @param {!jspb.BinaryWriter} writer
3723
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3724
+ */
3725
+ proto.supervisor.ResourcesStatusResponse.serializeBinaryToWriter = function(message, writer) {
3726
+ var f = undefined;
3727
+ f = message.getMemory();
3728
+ if (f != null) {
3729
+ writer.writeMessage(
3730
+ 1,
3731
+ f,
3732
+ proto.supervisor.ResourceStatus.serializeBinaryToWriter
3733
+ );
3734
+ }
3735
+ f = message.getCpu();
3736
+ if (f != null) {
3737
+ writer.writeMessage(
3738
+ 2,
3739
+ f,
3740
+ proto.supervisor.ResourceStatus.serializeBinaryToWriter
3741
+ );
3742
+ }
3743
+ };
3744
+
3745
+
3746
+ /**
3747
+ * optional ResourceStatus memory = 1;
3748
+ * @return {?proto.supervisor.ResourceStatus}
3749
+ */
3750
+ proto.supervisor.ResourcesStatusResponse.prototype.getMemory = function() {
3751
+ return /** @type{?proto.supervisor.ResourceStatus} */ (
3752
+ jspb.Message.getWrapperField(this, proto.supervisor.ResourceStatus, 1));
3753
+ };
3754
+
3755
+
3756
+ /**
3757
+ * @param {?proto.supervisor.ResourceStatus|undefined} value
3758
+ * @return {!proto.supervisor.ResourcesStatusResponse} returns this
3759
+ */
3760
+ proto.supervisor.ResourcesStatusResponse.prototype.setMemory = function(value) {
3761
+ return jspb.Message.setWrapperField(this, 1, value);
3762
+ };
3763
+
3764
+
3765
+ /**
3766
+ * Clears the message field making it undefined.
3767
+ * @return {!proto.supervisor.ResourcesStatusResponse} returns this
3768
+ */
3769
+ proto.supervisor.ResourcesStatusResponse.prototype.clearMemory = function() {
3770
+ return this.setMemory(undefined);
3771
+ };
3772
+
3773
+
3774
+ /**
3775
+ * Returns whether this field is set.
3776
+ * @return {boolean}
3777
+ */
3778
+ proto.supervisor.ResourcesStatusResponse.prototype.hasMemory = function() {
3779
+ return jspb.Message.getField(this, 1) != null;
3780
+ };
3781
+
3782
+
3783
+ /**
3784
+ * optional ResourceStatus cpu = 2;
3785
+ * @return {?proto.supervisor.ResourceStatus}
3786
+ */
3787
+ proto.supervisor.ResourcesStatusResponse.prototype.getCpu = function() {
3788
+ return /** @type{?proto.supervisor.ResourceStatus} */ (
3789
+ jspb.Message.getWrapperField(this, proto.supervisor.ResourceStatus, 2));
3790
+ };
3791
+
3792
+
3793
+ /**
3794
+ * @param {?proto.supervisor.ResourceStatus|undefined} value
3795
+ * @return {!proto.supervisor.ResourcesStatusResponse} returns this
3796
+ */
3797
+ proto.supervisor.ResourcesStatusResponse.prototype.setCpu = function(value) {
3798
+ return jspb.Message.setWrapperField(this, 2, value);
3799
+ };
3800
+
3801
+
3802
+ /**
3803
+ * Clears the message field making it undefined.
3804
+ * @return {!proto.supervisor.ResourcesStatusResponse} returns this
3805
+ */
3806
+ proto.supervisor.ResourcesStatusResponse.prototype.clearCpu = function() {
3807
+ return this.setCpu(undefined);
3808
+ };
3809
+
3810
+
3811
+ /**
3812
+ * Returns whether this field is set.
3813
+ * @return {boolean}
3814
+ */
3815
+ proto.supervisor.ResourcesStatusResponse.prototype.hasCpu = function() {
3816
+ return jspb.Message.getField(this, 2) != null;
3817
+ };
3818
+
3819
+
3820
+
3821
+
3822
+
3823
+ if (jspb.Message.GENERATE_TO_OBJECT) {
3824
+ /**
3825
+ * Creates an object representation of this proto.
3826
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
3827
+ * Optional fields that are not set will be set to undefined.
3828
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3829
+ * For the list of reserved names please see:
3830
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3831
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3832
+ * JSPB instance for transitional soy proto support:
3833
+ * http://goto/soy-param-migration
3834
+ * @return {!Object}
3835
+ */
3836
+ proto.supervisor.ResourceStatus.prototype.toObject = function(opt_includeInstance) {
3837
+ return proto.supervisor.ResourceStatus.toObject(opt_includeInstance, this);
3838
+ };
3839
+
3840
+
3841
+ /**
3842
+ * Static version of the {@see toObject} method.
3843
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3844
+ * the JSPB instance for transitional soy proto support:
3845
+ * http://goto/soy-param-migration
3846
+ * @param {!proto.supervisor.ResourceStatus} msg The msg instance to transform.
3847
+ * @return {!Object}
3848
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3849
+ */
3850
+ proto.supervisor.ResourceStatus.toObject = function(includeInstance, msg) {
3851
+ var f, obj = {
3852
+ used: jspb.Message.getFieldWithDefault(msg, 1, 0),
3853
+ limit: jspb.Message.getFieldWithDefault(msg, 2, 0),
3854
+ severity: jspb.Message.getFieldWithDefault(msg, 3, 0)
3855
+ };
3856
+
3857
+ if (includeInstance) {
3858
+ obj.$jspbMessageInstance = msg;
3859
+ }
3860
+ return obj;
3861
+ };
3862
+ }
3863
+
3864
+
3865
+ /**
3866
+ * Deserializes binary data (in protobuf wire format).
3867
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
3868
+ * @return {!proto.supervisor.ResourceStatus}
3869
+ */
3870
+ proto.supervisor.ResourceStatus.deserializeBinary = function(bytes) {
3871
+ var reader = new jspb.BinaryReader(bytes);
3872
+ var msg = new proto.supervisor.ResourceStatus;
3873
+ return proto.supervisor.ResourceStatus.deserializeBinaryFromReader(msg, reader);
3874
+ };
3875
+
3876
+
3877
+ /**
3878
+ * Deserializes binary data (in protobuf wire format) from the
3879
+ * given reader into the given message object.
3880
+ * @param {!proto.supervisor.ResourceStatus} msg The message object to deserialize into.
3881
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3882
+ * @return {!proto.supervisor.ResourceStatus}
3883
+ */
3884
+ proto.supervisor.ResourceStatus.deserializeBinaryFromReader = function(msg, reader) {
3885
+ while (reader.nextField()) {
3886
+ if (reader.isEndGroup()) {
3887
+ break;
3888
+ }
3889
+ var field = reader.getFieldNumber();
3890
+ switch (field) {
3891
+ case 1:
3892
+ var value = /** @type {number} */ (reader.readInt64());
3893
+ msg.setUsed(value);
3894
+ break;
3895
+ case 2:
3896
+ var value = /** @type {number} */ (reader.readInt64());
3897
+ msg.setLimit(value);
3898
+ break;
3899
+ case 3:
3900
+ var value = /** @type {!proto.supervisor.ResourceStatusSeverity} */ (reader.readEnum());
3901
+ msg.setSeverity(value);
3902
+ break;
3903
+ default:
3904
+ reader.skipField();
3905
+ break;
3906
+ }
3907
+ }
3908
+ return msg;
3909
+ };
3910
+
3911
+
3912
+ /**
3913
+ * Serializes the message to binary data (in protobuf wire format).
3914
+ * @return {!Uint8Array}
3915
+ */
3916
+ proto.supervisor.ResourceStatus.prototype.serializeBinary = function() {
3917
+ var writer = new jspb.BinaryWriter();
3918
+ proto.supervisor.ResourceStatus.serializeBinaryToWriter(this, writer);
3919
+ return writer.getResultBuffer();
3920
+ };
3921
+
3922
+
3923
+ /**
3924
+ * Serializes the given message to binary data (in protobuf wire
3925
+ * format), writing to the given BinaryWriter.
3926
+ * @param {!proto.supervisor.ResourceStatus} message
3927
+ * @param {!jspb.BinaryWriter} writer
3928
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3929
+ */
3930
+ proto.supervisor.ResourceStatus.serializeBinaryToWriter = function(message, writer) {
3931
+ var f = undefined;
3932
+ f = message.getUsed();
3933
+ if (f !== 0) {
3934
+ writer.writeInt64(
3935
+ 1,
3936
+ f
3937
+ );
3938
+ }
3939
+ f = message.getLimit();
3940
+ if (f !== 0) {
3941
+ writer.writeInt64(
3942
+ 2,
3943
+ f
3944
+ );
3945
+ }
3946
+ f = message.getSeverity();
3947
+ if (f !== 0.0) {
3948
+ writer.writeEnum(
3949
+ 3,
3950
+ f
3951
+ );
3952
+ }
3953
+ };
3954
+
3955
+
3956
+ /**
3957
+ * optional int64 used = 1;
3958
+ * @return {number}
3959
+ */
3960
+ proto.supervisor.ResourceStatus.prototype.getUsed = function() {
3961
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
3962
+ };
3963
+
3964
+
3965
+ /**
3966
+ * @param {number} value
3967
+ * @return {!proto.supervisor.ResourceStatus} returns this
3968
+ */
3969
+ proto.supervisor.ResourceStatus.prototype.setUsed = function(value) {
3970
+ return jspb.Message.setProto3IntField(this, 1, value);
3971
+ };
3972
+
3973
+
3974
+ /**
3975
+ * optional int64 limit = 2;
3976
+ * @return {number}
3977
+ */
3978
+ proto.supervisor.ResourceStatus.prototype.getLimit = function() {
3979
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
3980
+ };
3981
+
3982
+
3983
+ /**
3984
+ * @param {number} value
3985
+ * @return {!proto.supervisor.ResourceStatus} returns this
3986
+ */
3987
+ proto.supervisor.ResourceStatus.prototype.setLimit = function(value) {
3988
+ return jspb.Message.setProto3IntField(this, 2, value);
3989
+ };
3990
+
3991
+
3992
+ /**
3993
+ * optional ResourceStatusSeverity severity = 3;
3994
+ * @return {!proto.supervisor.ResourceStatusSeverity}
3995
+ */
3996
+ proto.supervisor.ResourceStatus.prototype.getSeverity = function() {
3997
+ return /** @type {!proto.supervisor.ResourceStatusSeverity} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
3998
+ };
3999
+
4000
+
4001
+ /**
4002
+ * @param {!proto.supervisor.ResourceStatusSeverity} value
4003
+ * @return {!proto.supervisor.ResourceStatus} returns this
4004
+ */
4005
+ proto.supervisor.ResourceStatus.prototype.setSeverity = function(value) {
4006
+ return jspb.Message.setProto3EnumField(this, 3, value);
4007
+ };
4008
+
4009
+
3396
4010
  /**
3397
4011
  * @enum {number}
3398
4012
  */
@@ -3439,4 +4053,13 @@ proto.supervisor.TaskState = {
3439
4053
  CLOSED: 2
3440
4054
  };
3441
4055
 
4056
+ /**
4057
+ * @enum {number}
4058
+ */
4059
+ proto.supervisor.ResourceStatusSeverity = {
4060
+ NORMAL: 0,
4061
+ WARNING: 1,
4062
+ DANGER: 2
4063
+ };
4064
+
3442
4065
  goog.object.extend(exports, proto.supervisor);
@@ -13,13 +13,7 @@
13
13
 
14
14
  var jspb = require('google-protobuf');
15
15
  var goog = jspb;
16
- var global = (function() {
17
- if (this) { return this; }
18
- if (typeof window !== 'undefined') { return window; }
19
- if (typeof global !== 'undefined') { return global; }
20
- if (typeof self !== 'undefined') { return self; }
21
- return Function('return this')();
22
- }.call(null));
16
+ var global = (function() { return this || window || global || self || Function('return this')(); }).call(null);
23
17
 
24
18
  goog.exportSymbol('proto.supervisor.GetTerminalRequest', null, global);
25
19
  goog.exportSymbol('proto.supervisor.ListTerminalsRequest', null, global);