From aa75ee79e5a72e890429922b47808e1ff6400641 Mon Sep 17 00:00:00 2001 From: Anton Kosyakov Date: Thu, 12 May 2022 13:44:58 +0000 Subject: [PATCH] [supervisor] fix #9521: add resources endpoint respecting cgroup v1 --- components/supervisor-api/go.mod | 2 + components/supervisor-api/go.sum | 6 + components/supervisor-api/go/status.pb.go | 422 ++- components/supervisor-api/go/status.pb.gw.go | 67 + .../supervisor-api/go/status_grpc.pb.go | 38 + .../java/io/gitpod/supervisor/api/Status.java | 2683 ++++++++++++++--- .../supervisor/api/StatusServiceGrpc.java | 86 + components/supervisor-api/status.proto | 21 + components/supervisor/cmd/top.go | 69 + components/supervisor/go.mod | 1 + components/supervisor/go.sum | 8 + .../supervisor/pkg/supervisor/services.go | 5 + .../pkg/supervisor/services_test.go | 13 + components/supervisor/pkg/supervisor/top.go | 173 ++ dev/ide/profile-workspace.js | 91 + 15 files changed, 3224 insertions(+), 461 deletions(-) create mode 100644 components/supervisor/cmd/top.go create mode 100644 components/supervisor/pkg/supervisor/top.go create mode 100644 dev/ide/profile-workspace.js diff --git a/components/supervisor-api/go.mod b/components/supervisor-api/go.mod index 6d290344d12b55..86b69e9026bd2e 100644 --- a/components/supervisor-api/go.mod +++ b/components/supervisor-api/go.mod @@ -1,3 +1,5 @@ module github.com/gitpod-io/generated_code_dependencies go 1.18 + +require google.golang.org/protobuf v1.28.0 // indirect diff --git a/components/supervisor-api/go.sum b/components/supervisor-api/go.sum index e69de29bb2d1d6..e38d2e36121ca0 100644 --- a/components/supervisor-api/go.sum +++ b/components/supervisor-api/go.sum @@ -0,0 +1,6 @@ +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= diff --git a/components/supervisor-api/go/status.pb.go b/components/supervisor-api/go/status.pb.go index c2e6d83325c26d..4c9e3e37795ac8 100644 --- a/components/supervisor-api/go/status.pb.go +++ b/components/supervisor-api/go/status.pb.go @@ -1220,6 +1220,156 @@ func (x *TaskPresentation) GetOpenMode() string { return "" } +type ResourcesStatuRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ResourcesStatuRequest) Reset() { + *x = ResourcesStatuRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_status_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResourcesStatuRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResourcesStatuRequest) ProtoMessage() {} + +func (x *ResourcesStatuRequest) ProtoReflect() protoreflect.Message { + mi := &file_status_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResourcesStatuRequest.ProtoReflect.Descriptor instead. +func (*ResourcesStatuRequest) Descriptor() ([]byte, []int) { + return file_status_proto_rawDescGZIP(), []int{17} +} + +type ResourcesStatusResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Used memory and limit in bytes + Memory *ResourceStatus `protobuf:"bytes,1,opt,name=memory,proto3" json:"memory,omitempty"` + // Used CPU and limit in millicores. + Cpu *ResourceStatus `protobuf:"bytes,2,opt,name=cpu,proto3" json:"cpu,omitempty"` +} + +func (x *ResourcesStatusResponse) Reset() { + *x = ResourcesStatusResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_status_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResourcesStatusResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResourcesStatusResponse) ProtoMessage() {} + +func (x *ResourcesStatusResponse) ProtoReflect() protoreflect.Message { + mi := &file_status_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResourcesStatusResponse.ProtoReflect.Descriptor instead. +func (*ResourcesStatusResponse) Descriptor() ([]byte, []int) { + return file_status_proto_rawDescGZIP(), []int{18} +} + +func (x *ResourcesStatusResponse) GetMemory() *ResourceStatus { + if x != nil { + return x.Memory + } + return nil +} + +func (x *ResourcesStatusResponse) GetCpu() *ResourceStatus { + if x != nil { + return x.Cpu + } + return nil +} + +type ResourceStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Used int64 `protobuf:"varint,1,opt,name=used,proto3" json:"used,omitempty"` + Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` +} + +func (x *ResourceStatus) Reset() { + *x = ResourceStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_status_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResourceStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResourceStatus) ProtoMessage() {} + +func (x *ResourceStatus) ProtoReflect() protoreflect.Message { + mi := &file_status_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResourceStatus.ProtoReflect.Descriptor instead. +func (*ResourceStatus) Descriptor() ([]byte, []int) { + return file_status_proto_rawDescGZIP(), []int{19} +} + +func (x *ResourceStatus) GetUsed() int64 { + if x != nil { + return x.Used + } + return 0 +} + +func (x *ResourceStatus) GetLimit() int64 { + if x != nil { + return x.Limit + } + return 0 +} + type IDEStatusResponse_DesktopStatus struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1234,7 +1384,7 @@ type IDEStatusResponse_DesktopStatus struct { func (x *IDEStatusResponse_DesktopStatus) Reset() { *x = IDEStatusResponse_DesktopStatus{} if protoimpl.UnsafeEnabled { - mi := &file_status_proto_msgTypes[17] + mi := &file_status_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1247,7 +1397,7 @@ func (x *IDEStatusResponse_DesktopStatus) String() string { func (*IDEStatusResponse_DesktopStatus) ProtoMessage() {} func (x *IDEStatusResponse_DesktopStatus) ProtoReflect() protoreflect.Message { - mi := &file_status_proto_msgTypes[17] + mi := &file_status_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1409,85 +1559,106 @@ var file_status_proto_rawDesc = []byte{ 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x70, 0x65, 0x6e, 0x49, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x6f, 0x70, 0x65, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x2a, 0x43, 0x0a, 0x0d, 0x43, - 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x0a, - 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, - 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x10, 0x01, 0x12, 0x11, 0x0a, - 0x0d, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x70, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x10, 0x02, - 0x2a, 0x29, 0x0a, 0x0e, 0x50, 0x6f, 0x72, 0x74, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, - 0x74, 0x79, 0x12, 0x0b, 0x0a, 0x07, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x10, 0x00, 0x12, - 0x0a, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x10, 0x01, 0x2a, 0x65, 0x0a, 0x13, 0x4f, - 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x45, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x41, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x0a, 0x0a, 0x06, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x10, 0x00, 0x12, 0x10, - 0x0a, 0x0c, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x10, 0x01, - 0x12, 0x10, 0x0a, 0x0c, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, - 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x10, 0x03, 0x12, 0x12, - 0x0a, 0x0e, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, - 0x10, 0x04, 0x2a, 0x39, 0x0a, 0x10, 0x50, 0x6f, 0x72, 0x74, 0x41, 0x75, 0x74, 0x6f, 0x45, 0x78, - 0x70, 0x6f, 0x73, 0x75, 0x72, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x74, 0x72, 0x79, 0x69, 0x6e, 0x67, - 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x73, 0x75, 0x63, 0x63, 0x65, 0x65, 0x64, 0x65, 0x64, 0x10, - 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0x02, 0x2a, 0x31, 0x0a, - 0x09, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x6f, 0x70, - 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x72, 0x75, 0x6e, 0x6e, 0x69, - 0x6e, 0x67, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x10, 0x02, - 0x32, 0xcb, 0x06, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x7c, 0x0a, 0x10, 0x53, 0x75, 0x70, 0x65, 0x72, 0x76, 0x69, 0x73, 0x6f, 0x72, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x23, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, 0x76, 0x69, - 0x73, 0x6f, 0x72, 0x2e, 0x53, 0x75, 0x70, 0x65, 0x72, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x73, 0x75, - 0x70, 0x65, 0x72, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x2e, 0x53, 0x75, 0x70, 0x65, 0x72, 0x76, 0x69, - 0x73, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x2f, 0x73, 0x75, 0x70, 0x65, 0x72, 0x76, 0x69, 0x73, 0x6f, 0x72, - 0x12, 0x83, 0x01, 0x0a, 0x09, 0x49, 0x44, 0x45, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c, + 0x09, 0x52, 0x08, 0x6f, 0x70, 0x65, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x22, 0x17, 0x0a, 0x15, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x22, 0x7b, 0x0a, 0x17, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x32, 0x0a, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x2e, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x6d, 0x65, 0x6d, + 0x6f, 0x72, 0x79, 0x12, 0x2c, 0x0a, 0x03, 0x63, 0x70, 0x75, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x2e, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x03, 0x63, 0x70, + 0x75, 0x22, 0x3a, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x04, 0x75, 0x73, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2a, 0x43, 0x0a, + 0x0d, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x0e, + 0x0a, 0x0a, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x10, 0x00, 0x12, 0x0f, + 0x0a, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x10, 0x01, 0x12, + 0x11, 0x0a, 0x0d, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x70, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, + 0x10, 0x02, 0x2a, 0x29, 0x0a, 0x0e, 0x50, 0x6f, 0x72, 0x74, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, + 0x6c, 0x69, 0x74, 0x79, 0x12, 0x0b, 0x0a, 0x07, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x10, + 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x10, 0x01, 0x2a, 0x65, 0x0a, + 0x13, 0x4f, 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x45, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x41, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0a, 0x0a, 0x06, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x10, 0x00, + 0x12, 0x10, 0x0a, 0x0c, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, + 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x76, 0x69, + 0x65, 0x77, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x10, 0x03, + 0x12, 0x12, 0x0a, 0x0e, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61, + 0x74, 0x65, 0x10, 0x04, 0x2a, 0x39, 0x0a, 0x10, 0x50, 0x6f, 0x72, 0x74, 0x41, 0x75, 0x74, 0x6f, + 0x45, 0x78, 0x70, 0x6f, 0x73, 0x75, 0x72, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x74, 0x72, 0x79, 0x69, + 0x6e, 0x67, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x73, 0x75, 0x63, 0x63, 0x65, 0x65, 0x64, 0x65, + 0x64, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0x02, 0x2a, + 0x31, 0x0a, 0x09, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0b, 0x0a, 0x07, + 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x72, 0x75, 0x6e, + 0x6e, 0x69, 0x6e, 0x67, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, + 0x10, 0x02, 0x32, 0xc4, 0x07, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x7c, 0x0a, 0x10, 0x53, 0x75, 0x70, 0x65, 0x72, 0x76, 0x69, 0x73, + 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x23, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, + 0x76, 0x69, 0x73, 0x6f, 0x72, 0x2e, 0x53, 0x75, 0x70, 0x65, 0x72, 0x76, 0x69, 0x73, 0x6f, 0x72, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, + 0x73, 0x75, 0x70, 0x65, 0x72, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x2e, 0x53, 0x75, 0x70, 0x65, 0x72, + 0x76, 0x69, 0x73, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x76, 0x31, + 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2f, 0x73, 0x75, 0x70, 0x65, 0x72, 0x76, 0x69, 0x73, + 0x6f, 0x72, 0x12, 0x83, 0x01, 0x0a, 0x09, 0x49, 0x44, 0x45, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x1c, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x2e, 0x49, 0x44, + 0x45, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x2e, 0x49, 0x44, 0x45, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x73, - 0x75, 0x70, 0x65, 0x72, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x2e, 0x49, 0x44, 0x45, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x33, 0x12, 0x0e, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2f, - 0x69, 0x64, 0x65, 0x5a, 0x21, 0x12, 0x1f, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x2f, 0x69, 0x64, 0x65, 0x2f, 0x77, 0x61, 0x69, 0x74, 0x2f, 0x7b, 0x77, 0x61, 0x69, 0x74, - 0x3d, 0x74, 0x72, 0x75, 0x65, 0x7d, 0x12, 0x97, 0x01, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x74, 0x65, - 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, - 0x76, 0x69, 0x73, 0x6f, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x73, 0x75, 0x70, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x12, 0x0e, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x2f, 0x69, 0x64, 0x65, 0x5a, 0x21, 0x12, 0x1f, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x2f, 0x69, 0x64, 0x65, 0x2f, 0x77, 0x61, 0x69, 0x74, 0x2f, 0x7b, 0x77, 0x61, + 0x69, 0x74, 0x3d, 0x74, 0x72, 0x75, 0x65, 0x7d, 0x12, 0x97, 0x01, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x41, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x12, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5a, 0x25, 0x12, 0x23, 0x2f, 0x76, 0x31, - 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2f, - 0x77, 0x61, 0x69, 0x74, 0x2f, 0x7b, 0x77, 0x61, 0x69, 0x74, 0x3d, 0x74, 0x72, 0x75, 0x65, 0x7d, - 0x12, 0x6c, 0x0a, 0x0c, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x12, 0x1f, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x2e, 0x42, 0x61, - 0x63, 0x6b, 0x75, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x20, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x2e, 0x42, - 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x76, 0x31, - 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x12, 0x95, - 0x01, 0x0a, 0x0b, 0x50, 0x6f, 0x72, 0x74, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, - 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x2e, 0x50, 0x6f, 0x72, 0x74, - 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, - 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x2e, 0x50, 0x6f, 0x72, 0x74, - 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x43, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3d, 0x12, 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x2f, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x5a, 0x29, 0x12, 0x27, 0x2f, 0x76, 0x31, - 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2f, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x2f, 0x6f, 0x62, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x2f, 0x7b, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x3d, 0x74, - 0x72, 0x75, 0x65, 0x7d, 0x30, 0x01, 0x12, 0x95, 0x01, 0x0a, 0x0b, 0x54, 0x61, 0x73, 0x6b, 0x73, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, 0x76, 0x69, - 0x73, 0x6f, 0x72, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, 0x76, 0x69, - 0x73, 0x6f, 0x72, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x43, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3d, 0x12, - 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2f, 0x74, 0x61, 0x73, 0x6b, - 0x73, 0x5a, 0x29, 0x12, 0x27, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2f, - 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2f, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x2f, 0x7b, 0x6f, - 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x3d, 0x74, 0x72, 0x75, 0x65, 0x7d, 0x30, 0x01, 0x42, 0x46, - 0x0a, 0x18, 0x69, 0x6f, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x73, 0x75, 0x70, 0x65, - 0x72, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2d, 0x69, 0x6f, - 0x2f, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2f, 0x73, 0x75, 0x70, 0x65, 0x72, 0x76, 0x69, 0x73, - 0x6f, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x73, + 0x75, 0x70, 0x65, 0x72, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x41, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x12, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5a, 0x25, 0x12, 0x23, 0x2f, + 0x76, 0x31, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x2f, 0x77, 0x61, 0x69, 0x74, 0x2f, 0x7b, 0x77, 0x61, 0x69, 0x74, 0x3d, 0x74, 0x72, 0x75, + 0x65, 0x7d, 0x12, 0x6c, 0x0a, 0x0c, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x1f, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x2e, + 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, 0x76, 0x69, 0x73, 0x6f, 0x72, + 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, + 0x76, 0x31, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, + 0x12, 0x95, 0x01, 0x0a, 0x0b, 0x50, 0x6f, 0x72, 0x74, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x1e, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x2e, 0x50, 0x6f, + 0x72, 0x74, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1f, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x2e, 0x50, 0x6f, + 0x72, 0x74, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x43, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3d, 0x12, 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x2f, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x5a, 0x29, 0x12, 0x27, 0x2f, + 0x76, 0x31, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2f, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x2f, + 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x2f, 0x7b, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x3d, 0x74, 0x72, 0x75, 0x65, 0x7d, 0x30, 0x01, 0x12, 0x95, 0x01, 0x0a, 0x0b, 0x54, 0x61, 0x73, + 0x6b, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, + 0x76, 0x69, 0x73, 0x6f, 0x72, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, + 0x76, 0x69, 0x73, 0x6f, 0x72, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x43, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x3d, 0x12, 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2f, 0x74, 0x61, + 0x73, 0x6b, 0x73, 0x5a, 0x29, 0x12, 0x27, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x2f, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x2f, + 0x7b, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x3d, 0x74, 0x72, 0x75, 0x65, 0x7d, 0x30, 0x01, + 0x12, 0x77, 0x0a, 0x0f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x21, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, 0x76, 0x69, 0x73, 0x6f, 0x72, + 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, 0x76, 0x69, + 0x73, 0x6f, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2f, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x42, 0x46, 0x0a, 0x18, 0x69, 0x6f, 0x2e, + 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, 0x76, 0x69, 0x73, 0x6f, + 0x72, 0x2e, 0x61, 0x70, 0x69, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2d, 0x69, 0x6f, 0x2f, 0x67, 0x69, 0x74, 0x70, + 0x6f, 0x64, 0x2f, 0x73, 0x75, 0x70, 0x65, 0x72, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x2f, 0x61, 0x70, + 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1503,7 +1674,7 @@ func file_status_proto_rawDescGZIP() []byte { } var file_status_proto_enumTypes = make([]protoimpl.EnumInfo, 5) -var file_status_proto_msgTypes = make([]protoimpl.MessageInfo, 19) +var file_status_proto_msgTypes = make([]protoimpl.MessageInfo, 22) var file_status_proto_goTypes = []interface{}{ (ContentSource)(0), // 0: supervisor.ContentSource (PortVisibility)(0), // 1: supervisor.PortVisibility @@ -1527,41 +1698,48 @@ var file_status_proto_goTypes = []interface{}{ (*TasksStatusResponse)(nil), // 19: supervisor.TasksStatusResponse (*TaskStatus)(nil), // 20: supervisor.TaskStatus (*TaskPresentation)(nil), // 21: supervisor.TaskPresentation - (*IDEStatusResponse_DesktopStatus)(nil), // 22: supervisor.IDEStatusResponse.DesktopStatus - nil, // 23: supervisor.TunneledPortInfo.ClientsEntry - (TunnelVisiblity)(0), // 24: supervisor.TunnelVisiblity + (*ResourcesStatuRequest)(nil), // 22: supervisor.ResourcesStatuRequest + (*ResourcesStatusResponse)(nil), // 23: supervisor.ResourcesStatusResponse + (*ResourceStatus)(nil), // 24: supervisor.ResourceStatus + (*IDEStatusResponse_DesktopStatus)(nil), // 25: supervisor.IDEStatusResponse.DesktopStatus + nil, // 26: supervisor.TunneledPortInfo.ClientsEntry + (TunnelVisiblity)(0), // 27: supervisor.TunnelVisiblity } var file_status_proto_depIdxs = []int32{ - 22, // 0: supervisor.IDEStatusResponse.desktop:type_name -> supervisor.IDEStatusResponse.DesktopStatus + 25, // 0: supervisor.IDEStatusResponse.desktop:type_name -> supervisor.IDEStatusResponse.DesktopStatus 0, // 1: supervisor.ContentStatusResponse.source:type_name -> supervisor.ContentSource 17, // 2: supervisor.PortsStatusResponse.ports:type_name -> supervisor.PortsStatus 1, // 3: supervisor.ExposedPortInfo.visibility:type_name -> supervisor.PortVisibility 2, // 4: supervisor.ExposedPortInfo.on_exposed:type_name -> supervisor.OnPortExposedAction - 24, // 5: supervisor.TunneledPortInfo.visibility:type_name -> supervisor.TunnelVisiblity - 23, // 6: supervisor.TunneledPortInfo.clients:type_name -> supervisor.TunneledPortInfo.ClientsEntry + 27, // 5: supervisor.TunneledPortInfo.visibility:type_name -> supervisor.TunnelVisiblity + 26, // 6: supervisor.TunneledPortInfo.clients:type_name -> supervisor.TunneledPortInfo.ClientsEntry 15, // 7: supervisor.PortsStatus.exposed:type_name -> supervisor.ExposedPortInfo 3, // 8: supervisor.PortsStatus.auto_exposure:type_name -> supervisor.PortAutoExposure 16, // 9: supervisor.PortsStatus.tunneled:type_name -> supervisor.TunneledPortInfo 20, // 10: supervisor.TasksStatusResponse.tasks:type_name -> supervisor.TaskStatus 4, // 11: supervisor.TaskStatus.state:type_name -> supervisor.TaskState 21, // 12: supervisor.TaskStatus.presentation:type_name -> supervisor.TaskPresentation - 5, // 13: supervisor.StatusService.SupervisorStatus:input_type -> supervisor.SupervisorStatusRequest - 7, // 14: supervisor.StatusService.IDEStatus:input_type -> supervisor.IDEStatusRequest - 9, // 15: supervisor.StatusService.ContentStatus:input_type -> supervisor.ContentStatusRequest - 11, // 16: supervisor.StatusService.BackupStatus:input_type -> supervisor.BackupStatusRequest - 13, // 17: supervisor.StatusService.PortsStatus:input_type -> supervisor.PortsStatusRequest - 18, // 18: supervisor.StatusService.TasksStatus:input_type -> supervisor.TasksStatusRequest - 6, // 19: supervisor.StatusService.SupervisorStatus:output_type -> supervisor.SupervisorStatusResponse - 8, // 20: supervisor.StatusService.IDEStatus:output_type -> supervisor.IDEStatusResponse - 10, // 21: supervisor.StatusService.ContentStatus:output_type -> supervisor.ContentStatusResponse - 12, // 22: supervisor.StatusService.BackupStatus:output_type -> supervisor.BackupStatusResponse - 14, // 23: supervisor.StatusService.PortsStatus:output_type -> supervisor.PortsStatusResponse - 19, // 24: supervisor.StatusService.TasksStatus:output_type -> supervisor.TasksStatusResponse - 19, // [19:25] is the sub-list for method output_type - 13, // [13:19] is the sub-list for method input_type - 13, // [13:13] is the sub-list for extension type_name - 13, // [13:13] is the sub-list for extension extendee - 0, // [0:13] is the sub-list for field type_name + 24, // 13: supervisor.ResourcesStatusResponse.memory:type_name -> supervisor.ResourceStatus + 24, // 14: supervisor.ResourcesStatusResponse.cpu:type_name -> supervisor.ResourceStatus + 5, // 15: supervisor.StatusService.SupervisorStatus:input_type -> supervisor.SupervisorStatusRequest + 7, // 16: supervisor.StatusService.IDEStatus:input_type -> supervisor.IDEStatusRequest + 9, // 17: supervisor.StatusService.ContentStatus:input_type -> supervisor.ContentStatusRequest + 11, // 18: supervisor.StatusService.BackupStatus:input_type -> supervisor.BackupStatusRequest + 13, // 19: supervisor.StatusService.PortsStatus:input_type -> supervisor.PortsStatusRequest + 18, // 20: supervisor.StatusService.TasksStatus:input_type -> supervisor.TasksStatusRequest + 22, // 21: supervisor.StatusService.ResourcesStatus:input_type -> supervisor.ResourcesStatuRequest + 6, // 22: supervisor.StatusService.SupervisorStatus:output_type -> supervisor.SupervisorStatusResponse + 8, // 23: supervisor.StatusService.IDEStatus:output_type -> supervisor.IDEStatusResponse + 10, // 24: supervisor.StatusService.ContentStatus:output_type -> supervisor.ContentStatusResponse + 12, // 25: supervisor.StatusService.BackupStatus:output_type -> supervisor.BackupStatusResponse + 14, // 26: supervisor.StatusService.PortsStatus:output_type -> supervisor.PortsStatusResponse + 19, // 27: supervisor.StatusService.TasksStatus:output_type -> supervisor.TasksStatusResponse + 23, // 28: supervisor.StatusService.ResourcesStatus:output_type -> supervisor.ResourcesStatusResponse + 22, // [22:29] is the sub-list for method output_type + 15, // [15:22] is the sub-list for method input_type + 15, // [15:15] is the sub-list for extension type_name + 15, // [15:15] is the sub-list for extension extendee + 0, // [0:15] is the sub-list for field type_name } func init() { file_status_proto_init() } @@ -1776,6 +1954,42 @@ func file_status_proto_init() { } } file_status_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResourcesStatuRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_status_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResourcesStatusResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_status_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResourceStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_status_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*IDEStatusResponse_DesktopStatus); i { case 0: return &v.state @@ -1794,7 +2008,7 @@ func file_status_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_status_proto_rawDesc, NumEnums: 5, - NumMessages: 19, + NumMessages: 22, NumExtensions: 0, NumServices: 1, }, diff --git a/components/supervisor-api/go/status.pb.gw.go b/components/supervisor-api/go/status.pb.gw.go index f45abab435f82b..01c639112ec450 100644 --- a/components/supervisor-api/go/status.pb.gw.go +++ b/components/supervisor-api/go/status.pb.gw.go @@ -371,6 +371,24 @@ func request_StatusService_TasksStatus_1(ctx context.Context, marshaler runtime. } +func request_StatusService_ResourcesStatus_0(ctx context.Context, marshaler runtime.Marshaler, client StatusServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ResourcesStatuRequest + var metadata runtime.ServerMetadata + + msg, err := client.ResourcesStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_StatusService_ResourcesStatus_0(ctx context.Context, marshaler runtime.Marshaler, server StatusServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ResourcesStatuRequest + var metadata runtime.ServerMetadata + + msg, err := server.ResourcesStatus(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterStatusServiceHandlerServer registers the http handlers for service StatusService to "mux". // UnaryRPC :call StatusServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -549,6 +567,30 @@ func RegisterStatusServiceHandlerServer(ctx context.Context, mux *runtime.ServeM return }) + mux.Handle("GET", pattern_StatusService_ResourcesStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/supervisor.StatusService/ResourcesStatus", runtime.WithHTTPPathPattern("/v1/status/resources")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_StatusService_ResourcesStatus_0(ctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_StatusService_ResourcesStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -800,6 +842,27 @@ func RegisterStatusServiceHandlerClient(ctx context.Context, mux *runtime.ServeM }) + mux.Handle("GET", pattern_StatusService_ResourcesStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + ctx, err = runtime.AnnotateContext(ctx, mux, req, "/supervisor.StatusService/ResourcesStatus", runtime.WithHTTPPathPattern("/v1/status/resources")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_StatusService_ResourcesStatus_0(ctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_StatusService_ResourcesStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -823,6 +886,8 @@ var ( pattern_StatusService_TasksStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "status", "tasks"}, "")) pattern_StatusService_TasksStatus_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 4, 1, 5, 3}, []string{"v1", "status", "tasks", "observe", "true"}, "")) + + pattern_StatusService_ResourcesStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "status", "resources"}, "")) ) var ( @@ -845,4 +910,6 @@ var ( forward_StatusService_TasksStatus_0 = runtime.ForwardResponseStream forward_StatusService_TasksStatus_1 = runtime.ForwardResponseStream + + forward_StatusService_ResourcesStatus_0 = runtime.ForwardResponseMessage ) diff --git a/components/supervisor-api/go/status_grpc.pb.go b/components/supervisor-api/go/status_grpc.pb.go index 2cb943e68f28a1..c00dc594002915 100644 --- a/components/supervisor-api/go/status_grpc.pb.go +++ b/components/supervisor-api/go/status_grpc.pb.go @@ -41,6 +41,8 @@ type StatusServiceClient interface { PortsStatus(ctx context.Context, in *PortsStatusRequest, opts ...grpc.CallOption) (StatusService_PortsStatusClient, error) // TasksStatus provides tasks status information. TasksStatus(ctx context.Context, in *TasksStatusRequest, opts ...grpc.CallOption) (StatusService_TasksStatusClient, error) + // ResourcesStatus provides workspace resources status information. + ResourcesStatus(ctx context.Context, in *ResourcesStatuRequest, opts ...grpc.CallOption) (*ResourcesStatusResponse, error) } type statusServiceClient struct { @@ -151,6 +153,15 @@ func (x *statusServiceTasksStatusClient) Recv() (*TasksStatusResponse, error) { return m, nil } +func (c *statusServiceClient) ResourcesStatus(ctx context.Context, in *ResourcesStatuRequest, opts ...grpc.CallOption) (*ResourcesStatusResponse, error) { + out := new(ResourcesStatusResponse) + err := c.cc.Invoke(ctx, "/supervisor.StatusService/ResourcesStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // StatusServiceServer is the server API for StatusService service. // All implementations must embed UnimplementedStatusServiceServer // for forward compatibility @@ -170,6 +181,8 @@ type StatusServiceServer interface { PortsStatus(*PortsStatusRequest, StatusService_PortsStatusServer) error // TasksStatus provides tasks status information. TasksStatus(*TasksStatusRequest, StatusService_TasksStatusServer) error + // ResourcesStatus provides workspace resources status information. + ResourcesStatus(context.Context, *ResourcesStatuRequest) (*ResourcesStatusResponse, error) mustEmbedUnimplementedStatusServiceServer() } @@ -195,6 +208,9 @@ func (UnimplementedStatusServiceServer) PortsStatus(*PortsStatusRequest, StatusS func (UnimplementedStatusServiceServer) TasksStatus(*TasksStatusRequest, StatusService_TasksStatusServer) error { return status.Errorf(codes.Unimplemented, "method TasksStatus not implemented") } +func (UnimplementedStatusServiceServer) ResourcesStatus(context.Context, *ResourcesStatuRequest) (*ResourcesStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ResourcesStatus not implemented") +} func (UnimplementedStatusServiceServer) mustEmbedUnimplementedStatusServiceServer() {} // UnsafeStatusServiceServer may be embedded to opt out of forward compatibility for this service. @@ -322,6 +338,24 @@ func (x *statusServiceTasksStatusServer) Send(m *TasksStatusResponse) error { return x.ServerStream.SendMsg(m) } +func _StatusService_ResourcesStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ResourcesStatuRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StatusServiceServer).ResourcesStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/supervisor.StatusService/ResourcesStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StatusServiceServer).ResourcesStatus(ctx, req.(*ResourcesStatuRequest)) + } + return interceptor(ctx, in, info, handler) +} + // StatusService_ServiceDesc is the grpc.ServiceDesc for StatusService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -345,6 +379,10 @@ var StatusService_ServiceDesc = grpc.ServiceDesc{ MethodName: "BackupStatus", Handler: _StatusService_BackupStatus_Handler, }, + { + MethodName: "ResourcesStatus", + Handler: _StatusService_ResourcesStatus_Handler, + }, }, Streams: []grpc.StreamDesc{ { diff --git a/components/supervisor-api/java/src/main/java/io/gitpod/supervisor/api/Status.java b/components/supervisor-api/java/src/main/java/io/gitpod/supervisor/api/Status.java index cdcc5e63f42fa8..ccbaf641655ddc 100644 --- a/components/supervisor-api/java/src/main/java/io/gitpod/supervisor/api/Status.java +++ b/components/supervisor-api/java/src/main/java/io/gitpod/supervisor/api/Status.java @@ -1455,7 +1455,7 @@ public boolean getOk() { * @return This builder for chaining. */ public Builder setOk(boolean value) { - + ok_ = value; onChanged(); return this; @@ -1465,7 +1465,7 @@ public Builder setOk(boolean value) { * @return This builder for chaining. */ public Builder clearOk() { - + ok_ = false; onChanged(); return this; @@ -1966,7 +1966,7 @@ public boolean getWait() { * @return This builder for chaining. */ public Builder setWait(boolean value) { - + wait_ = value; onChanged(); return this; @@ -1981,7 +1981,7 @@ public Builder setWait(boolean value) { * @return This builder for chaining. */ public Builder clearWait() { - + wait_ = false; onChanged(); return this; @@ -2332,7 +2332,7 @@ public java.lang.String getLink() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); link_ = s; @@ -2348,7 +2348,7 @@ public java.lang.String getLink() { getLinkBytes() { java.lang.Object ref = link_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); link_ = b; @@ -2370,7 +2370,7 @@ public java.lang.String getLabel() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); label_ = s; @@ -2386,7 +2386,7 @@ public java.lang.String getLabel() { getLabelBytes() { java.lang.Object ref = label_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); label_ = b; @@ -2408,7 +2408,7 @@ public java.lang.String getClientID() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); clientID_ = s; @@ -2424,7 +2424,7 @@ public java.lang.String getClientID() { getClientIDBytes() { java.lang.Object ref = clientID_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); clientID_ = b; @@ -2446,7 +2446,7 @@ public java.lang.String getKind() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); kind_ = s; @@ -2462,7 +2462,7 @@ public java.lang.String getKind() { getKindBytes() { java.lang.Object ref = kind_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); kind_ = b; @@ -2850,7 +2850,7 @@ public java.lang.String getLink() { getLinkBytes() { java.lang.Object ref = link_; if (ref instanceof String) { - com.google.protobuf.ByteString b = + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); link_ = b; @@ -2869,7 +2869,7 @@ public Builder setLink( if (value == null) { throw new NullPointerException(); } - + link_ = value; onChanged(); return this; @@ -2879,7 +2879,7 @@ public Builder setLink( * @return This builder for chaining. */ public Builder clearLink() { - + link_ = getDefaultInstance().getLink(); onChanged(); return this; @@ -2895,7 +2895,7 @@ public Builder setLinkBytes( throw new NullPointerException(); } checkByteStringIsUtf8(value); - + link_ = value; onChanged(); return this; @@ -2926,7 +2926,7 @@ public java.lang.String getLabel() { getLabelBytes() { java.lang.Object ref = label_; if (ref instanceof String) { - com.google.protobuf.ByteString b = + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); label_ = b; @@ -2945,7 +2945,7 @@ public Builder setLabel( if (value == null) { throw new NullPointerException(); } - + label_ = value; onChanged(); return this; @@ -2955,7 +2955,7 @@ public Builder setLabel( * @return This builder for chaining. */ public Builder clearLabel() { - + label_ = getDefaultInstance().getLabel(); onChanged(); return this; @@ -2971,7 +2971,7 @@ public Builder setLabelBytes( throw new NullPointerException(); } checkByteStringIsUtf8(value); - + label_ = value; onChanged(); return this; @@ -3002,7 +3002,7 @@ public java.lang.String getClientID() { getClientIDBytes() { java.lang.Object ref = clientID_; if (ref instanceof String) { - com.google.protobuf.ByteString b = + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); clientID_ = b; @@ -3021,7 +3021,7 @@ public Builder setClientID( if (value == null) { throw new NullPointerException(); } - + clientID_ = value; onChanged(); return this; @@ -3031,7 +3031,7 @@ public Builder setClientID( * @return This builder for chaining. */ public Builder clearClientID() { - + clientID_ = getDefaultInstance().getClientID(); onChanged(); return this; @@ -3047,7 +3047,7 @@ public Builder setClientIDBytes( throw new NullPointerException(); } checkByteStringIsUtf8(value); - + clientID_ = value; onChanged(); return this; @@ -3078,7 +3078,7 @@ public java.lang.String getKind() { getKindBytes() { java.lang.Object ref = kind_; if (ref instanceof String) { - com.google.protobuf.ByteString b = + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); kind_ = b; @@ -3097,7 +3097,7 @@ public Builder setKind( if (value == null) { throw new NullPointerException(); } - + kind_ = value; onChanged(); return this; @@ -3107,7 +3107,7 @@ public Builder setKind( * @return This builder for chaining. */ public Builder clearKind() { - + kind_ = getDefaultInstance().getKind(); onChanged(); return this; @@ -3123,7 +3123,7 @@ public Builder setKindBytes( throw new NullPointerException(); } checkByteStringIsUtf8(value); - + kind_ = value; onChanged(); return this; @@ -3566,7 +3566,7 @@ public boolean getOk() { * @return This builder for chaining. */ public Builder setOk(boolean value) { - + ok_ = value; onChanged(); return this; @@ -3576,7 +3576,7 @@ public Builder setOk(boolean value) { * @return This builder for chaining. */ public Builder clearOk() { - + ok_ = false; onChanged(); return this; @@ -3669,7 +3669,7 @@ public Builder clearDesktop() { * .supervisor.IDEStatusResponse.DesktopStatus desktop = 2; */ public io.gitpod.supervisor.api.Status.IDEStatusResponse.DesktopStatus.Builder getDesktopBuilder() { - + onChanged(); return getDesktopFieldBuilder().getBuilder(); } @@ -3688,7 +3688,7 @@ public io.gitpod.supervisor.api.Status.IDEStatusResponse.DesktopStatusOrBuilder * .supervisor.IDEStatusResponse.DesktopStatus desktop = 2; */ private com.google.protobuf.SingleFieldBuilderV3< - io.gitpod.supervisor.api.Status.IDEStatusResponse.DesktopStatus, io.gitpod.supervisor.api.Status.IDEStatusResponse.DesktopStatus.Builder, io.gitpod.supervisor.api.Status.IDEStatusResponse.DesktopStatusOrBuilder> + io.gitpod.supervisor.api.Status.IDEStatusResponse.DesktopStatus, io.gitpod.supervisor.api.Status.IDEStatusResponse.DesktopStatus.Builder, io.gitpod.supervisor.api.Status.IDEStatusResponse.DesktopStatusOrBuilder> getDesktopFieldBuilder() { if (desktopBuilder_ == null) { desktopBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< @@ -4196,7 +4196,7 @@ public boolean getWait() { * @return This builder for chaining. */ public Builder setWait(boolean value) { - + wait_ = value; onChanged(); return this; @@ -4211,7 +4211,7 @@ public Builder setWait(boolean value) { * @return This builder for chaining. */ public Builder clearWait() { - + wait_ = false; onChanged(); return this; @@ -4777,7 +4777,7 @@ public boolean getAvailable() { * @return This builder for chaining. */ public Builder setAvailable(boolean value) { - + available_ = value; onChanged(); return this; @@ -4791,7 +4791,7 @@ public Builder setAvailable(boolean value) { * @return This builder for chaining. */ public Builder clearAvailable() { - + available_ = false; onChanged(); return this; @@ -4819,7 +4819,7 @@ public Builder clearAvailable() { * @return This builder for chaining. */ public Builder setSourceValue(int value) { - + source_ = value; onChanged(); return this; @@ -4851,7 +4851,7 @@ public Builder setSource(io.gitpod.supervisor.api.Status.ContentSource value) { if (value == null) { throw new NullPointerException(); } - + source_ = value.getNumber(); onChanged(); return this; @@ -4865,7 +4865,7 @@ public Builder setSource(io.gitpod.supervisor.api.Status.ContentSource value) { * @return This builder for chaining. */ public Builder clearSource() { - + source_ = 0; onChanged(); return this; @@ -5766,7 +5766,7 @@ public boolean getCanaryAvailable() { * @return This builder for chaining. */ public Builder setCanaryAvailable(boolean value) { - + canaryAvailable_ = value; onChanged(); return this; @@ -5776,7 +5776,7 @@ public Builder setCanaryAvailable(boolean value) { * @return This builder for chaining. */ public Builder clearCanaryAvailable() { - + canaryAvailable_ = false; onChanged(); return this; @@ -6277,7 +6277,7 @@ public boolean getObserve() { * @return This builder for chaining. */ public Builder setObserve(boolean value) { - + observe_ = value; onChanged(); return this; @@ -6292,7 +6292,7 @@ public Builder setObserve(boolean value) { * @return This builder for chaining. */ public Builder clearObserve() { - + observe_ = false; onChanged(); return this; @@ -6357,7 +6357,7 @@ public interface PortsStatusResponseOrBuilder extends /** * repeated .supervisor.PortsStatus ports = 1; */ - java.util.List + java.util.List getPortsList(); /** * repeated .supervisor.PortsStatus ports = 1; @@ -6370,7 +6370,7 @@ public interface PortsStatusResponseOrBuilder extends /** * repeated .supervisor.PortsStatus ports = 1; */ - java.util.List + java.util.List getPortsOrBuilderList(); /** * repeated .supervisor.PortsStatus ports = 1; @@ -6484,7 +6484,7 @@ public java.util.List getPortsList( * repeated .supervisor.PortsStatus ports = 1; */ @java.lang.Override - public java.util.List + public java.util.List getPortsOrBuilderList() { return ports_; } @@ -6815,7 +6815,7 @@ public Builder mergeFrom(io.gitpod.supervisor.api.Status.PortsStatusResponse oth portsBuilder_ = null; ports_ = other.ports_; bitField0_ = (bitField0_ & ~0x00000001); - portsBuilder_ = + portsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getPortsFieldBuilder() : null; } else { @@ -7048,7 +7048,7 @@ public io.gitpod.supervisor.api.Status.PortsStatusOrBuilder getPortsOrBuilder( /** * repeated .supervisor.PortsStatus ports = 1; */ - public java.util.List + public java.util.List getPortsOrBuilderList() { if (portsBuilder_ != null) { return portsBuilder_.getMessageOrBuilderList(); @@ -7074,12 +7074,12 @@ public io.gitpod.supervisor.api.Status.PortsStatus.Builder addPortsBuilder( /** * repeated .supervisor.PortsStatus ports = 1; */ - public java.util.List + public java.util.List getPortsBuilderList() { return getPortsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< - io.gitpod.supervisor.api.Status.PortsStatus, io.gitpod.supervisor.api.Status.PortsStatus.Builder, io.gitpod.supervisor.api.Status.PortsStatusOrBuilder> + io.gitpod.supervisor.api.Status.PortsStatus, io.gitpod.supervisor.api.Status.PortsStatus.Builder, io.gitpod.supervisor.api.Status.PortsStatusOrBuilder> getPortsFieldBuilder() { if (portsBuilder_ == null) { portsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< @@ -7350,7 +7350,7 @@ public java.lang.String getUrl() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); url_ = s; @@ -7370,7 +7370,7 @@ public java.lang.String getUrl() { getUrlBytes() { java.lang.Object ref = url_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); url_ = b; @@ -7763,7 +7763,7 @@ public Builder mergeFrom( * @return This builder for chaining. */ public Builder setVisibilityValue(int value) { - + visibility_ = value; onChanged(); return this; @@ -7795,7 +7795,7 @@ public Builder setVisibility(io.gitpod.supervisor.api.Status.PortVisibility valu if (value == null) { throw new NullPointerException(); } - + visibility_ = value.getNumber(); onChanged(); return this; @@ -7809,7 +7809,7 @@ public Builder setVisibility(io.gitpod.supervisor.api.Status.PortVisibility valu * @return This builder for chaining. */ public Builder clearVisibility() { - + visibility_ = 0; onChanged(); return this; @@ -7848,7 +7848,7 @@ public java.lang.String getUrl() { getUrlBytes() { java.lang.Object ref = url_; if (ref instanceof String) { - com.google.protobuf.ByteString b = + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); url_ = b; @@ -7871,7 +7871,7 @@ public Builder setUrl( if (value == null) { throw new NullPointerException(); } - + url_ = value; onChanged(); return this; @@ -7885,7 +7885,7 @@ public Builder setUrl( * @return This builder for chaining. */ public Builder clearUrl() { - + url_ = getDefaultInstance().getUrl(); onChanged(); return this; @@ -7905,7 +7905,7 @@ public Builder setUrlBytes( throw new NullPointerException(); } checkByteStringIsUtf8(value); - + url_ = value; onChanged(); return this; @@ -7933,7 +7933,7 @@ public Builder setUrlBytes( * @return This builder for chaining. */ public Builder setOnExposedValue(int value) { - + onExposed_ = value; onChanged(); return this; @@ -7965,7 +7965,7 @@ public Builder setOnExposed(io.gitpod.supervisor.api.Status.OnPortExposedAction if (value == null) { throw new NullPointerException(); } - + onExposed_ = value.getNumber(); onChanged(); return this; @@ -7979,7 +7979,7 @@ public Builder setOnExposed(io.gitpod.supervisor.api.Status.OnPortExposedAction * @return This builder for chaining. */ public Builder clearOnExposed() { - + onExposed_ = 0; onChanged(); return this; @@ -8293,7 +8293,7 @@ private static final class ClientsDefaultEntryHolder { java.lang.String, java.lang.Integer> defaultEntry = com.google.protobuf.MapEntry .newDefaultInstance( - io.gitpod.supervisor.api.Status.internal_static_supervisor_TunneledPortInfo_ClientsEntry_descriptor, + io.gitpod.supervisor.api.Status.internal_static_supervisor_TunneledPortInfo_ClientsEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.UINT32, @@ -8776,7 +8776,7 @@ public int getTargetPort() { * @return This builder for chaining. */ public Builder setTargetPort(int value) { - + targetPort_ = value; onChanged(); return this; @@ -8790,7 +8790,7 @@ public Builder setTargetPort(int value) { * @return This builder for chaining. */ public Builder clearTargetPort() { - + targetPort_ = 0; onChanged(); return this; @@ -8820,7 +8820,7 @@ public Builder clearTargetPort() { * @return This builder for chaining. */ public Builder setVisibilityValue(int value) { - + visibility_ = value; onChanged(); return this; @@ -8854,7 +8854,7 @@ public Builder setVisibility(io.gitpod.supervisor.api.Port.TunnelVisiblity value if (value == null) { throw new NullPointerException(); } - + visibility_ = value.getNumber(); onChanged(); return this; @@ -8869,7 +8869,7 @@ public Builder setVisibility(io.gitpod.supervisor.api.Port.TunnelVisiblity value * @return This builder for chaining. */ public Builder clearVisibility() { - + visibility_ = 0; onChanged(); return this; @@ -9011,7 +9011,7 @@ public Builder putClients( java.lang.String key, int value) { if (key == null) { throw new NullPointerException("map key"); } - + internalGetMutableClients().getMutableMap() .put(key, value); return this; @@ -9525,7 +9525,7 @@ public java.lang.String getDescription() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); description_ = s; @@ -9545,7 +9545,7 @@ public java.lang.String getDescription() { getDescriptionBytes() { java.lang.Object ref = description_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); description_ = b; @@ -9571,7 +9571,7 @@ public java.lang.String getName() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; @@ -9591,7 +9591,7 @@ public java.lang.String getName() { getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; @@ -10062,7 +10062,7 @@ public int getLocalPort() { * @return This builder for chaining. */ public Builder setLocalPort(int value) { - + localPort_ = value; onChanged(); return this; @@ -10080,7 +10080,7 @@ public Builder setLocalPort(int value) { * @return This builder for chaining. */ public Builder clearLocalPort() { - + localPort_ = 0; onChanged(); return this; @@ -10109,7 +10109,7 @@ public boolean getServed() { * @return This builder for chaining. */ public Builder setServed(boolean value) { - + served_ = value; onChanged(); return this; @@ -10123,7 +10123,7 @@ public Builder setServed(boolean value) { * @return This builder for chaining. */ public Builder clearServed() { - + served_ = false; onChanged(); return this; @@ -10251,7 +10251,7 @@ public Builder clearExposed() { * .supervisor.ExposedPortInfo exposed = 5; */ public io.gitpod.supervisor.api.Status.ExposedPortInfo.Builder getExposedBuilder() { - + onChanged(); return getExposedFieldBuilder().getBuilder(); } @@ -10280,7 +10280,7 @@ public io.gitpod.supervisor.api.Status.ExposedPortInfoOrBuilder getExposedOrBuil * .supervisor.ExposedPortInfo exposed = 5; */ private com.google.protobuf.SingleFieldBuilderV3< - io.gitpod.supervisor.api.Status.ExposedPortInfo, io.gitpod.supervisor.api.Status.ExposedPortInfo.Builder, io.gitpod.supervisor.api.Status.ExposedPortInfoOrBuilder> + io.gitpod.supervisor.api.Status.ExposedPortInfo, io.gitpod.supervisor.api.Status.ExposedPortInfo.Builder, io.gitpod.supervisor.api.Status.ExposedPortInfoOrBuilder> getExposedFieldBuilder() { if (exposedBuilder_ == null) { exposedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< @@ -10315,7 +10315,7 @@ public io.gitpod.supervisor.api.Status.ExposedPortInfoOrBuilder getExposedOrBuil * @return This builder for chaining. */ public Builder setAutoExposureValue(int value) { - + autoExposure_ = value; onChanged(); return this; @@ -10347,7 +10347,7 @@ public Builder setAutoExposure(io.gitpod.supervisor.api.Status.PortAutoExposure if (value == null) { throw new NullPointerException(); } - + autoExposure_ = value.getNumber(); onChanged(); return this; @@ -10361,7 +10361,7 @@ public Builder setAutoExposure(io.gitpod.supervisor.api.Status.PortAutoExposure * @return This builder for chaining. */ public Builder clearAutoExposure() { - + autoExposure_ = 0; onChanged(); return this; @@ -10489,7 +10489,7 @@ public Builder clearTunneled() { * .supervisor.TunneledPortInfo tunneled = 6; */ public io.gitpod.supervisor.api.Status.TunneledPortInfo.Builder getTunneledBuilder() { - + onChanged(); return getTunneledFieldBuilder().getBuilder(); } @@ -10518,7 +10518,7 @@ public io.gitpod.supervisor.api.Status.TunneledPortInfoOrBuilder getTunneledOrBu * .supervisor.TunneledPortInfo tunneled = 6; */ private com.google.protobuf.SingleFieldBuilderV3< - io.gitpod.supervisor.api.Status.TunneledPortInfo, io.gitpod.supervisor.api.Status.TunneledPortInfo.Builder, io.gitpod.supervisor.api.Status.TunneledPortInfoOrBuilder> + io.gitpod.supervisor.api.Status.TunneledPortInfo, io.gitpod.supervisor.api.Status.TunneledPortInfo.Builder, io.gitpod.supervisor.api.Status.TunneledPortInfoOrBuilder> getTunneledFieldBuilder() { if (tunneledBuilder_ == null) { tunneledBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< @@ -10564,7 +10564,7 @@ public java.lang.String getDescription() { getDescriptionBytes() { java.lang.Object ref = description_; if (ref instanceof String) { - com.google.protobuf.ByteString b = + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); description_ = b; @@ -10587,7 +10587,7 @@ public Builder setDescription( if (value == null) { throw new NullPointerException(); } - + description_ = value; onChanged(); return this; @@ -10601,7 +10601,7 @@ public Builder setDescription( * @return This builder for chaining. */ public Builder clearDescription() { - + description_ = getDefaultInstance().getDescription(); onChanged(); return this; @@ -10621,7 +10621,7 @@ public Builder setDescriptionBytes( throw new NullPointerException(); } checkByteStringIsUtf8(value); - + description_ = value; onChanged(); return this; @@ -10660,7 +10660,7 @@ public java.lang.String getName() { getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { - com.google.protobuf.ByteString b = + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; @@ -10683,7 +10683,7 @@ public Builder setName( if (value == null) { throw new NullPointerException(); } - + name_ = value; onChanged(); return this; @@ -10697,7 +10697,7 @@ public Builder setName( * @return This builder for chaining. */ public Builder clearName() { - + name_ = getDefaultInstance().getName(); onChanged(); return this; @@ -10717,7 +10717,7 @@ public Builder setNameBytes( throw new NullPointerException(); } checkByteStringIsUtf8(value); - + name_ = value; onChanged(); return this; @@ -11218,7 +11218,7 @@ public boolean getObserve() { * @return This builder for chaining. */ public Builder setObserve(boolean value) { - + observe_ = value; onChanged(); return this; @@ -11233,7 +11233,7 @@ public Builder setObserve(boolean value) { * @return This builder for chaining. */ public Builder clearObserve() { - + observe_ = false; onChanged(); return this; @@ -11298,7 +11298,7 @@ public interface TasksStatusResponseOrBuilder extends /** * repeated .supervisor.TaskStatus tasks = 1; */ - java.util.List + java.util.List getTasksList(); /** * repeated .supervisor.TaskStatus tasks = 1; @@ -11311,7 +11311,7 @@ public interface TasksStatusResponseOrBuilder extends /** * repeated .supervisor.TaskStatus tasks = 1; */ - java.util.List + java.util.List getTasksOrBuilderList(); /** * repeated .supervisor.TaskStatus tasks = 1; @@ -11425,7 +11425,7 @@ public java.util.List getTasksList() * repeated .supervisor.TaskStatus tasks = 1; */ @java.lang.Override - public java.util.List + public java.util.List getTasksOrBuilderList() { return tasks_; } @@ -11756,7 +11756,7 @@ public Builder mergeFrom(io.gitpod.supervisor.api.Status.TasksStatusResponse oth tasksBuilder_ = null; tasks_ = other.tasks_; bitField0_ = (bitField0_ & ~0x00000001); - tasksBuilder_ = + tasksBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getTasksFieldBuilder() : null; } else { @@ -11989,7 +11989,7 @@ public io.gitpod.supervisor.api.Status.TaskStatusOrBuilder getTasksOrBuilder( /** * repeated .supervisor.TaskStatus tasks = 1; */ - public java.util.List + public java.util.List getTasksOrBuilderList() { if (tasksBuilder_ != null) { return tasksBuilder_.getMessageOrBuilderList(); @@ -12015,12 +12015,12 @@ public io.gitpod.supervisor.api.Status.TaskStatus.Builder addTasksBuilder( /** * repeated .supervisor.TaskStatus tasks = 1; */ - public java.util.List + public java.util.List getTasksBuilderList() { return getTasksFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< - io.gitpod.supervisor.api.Status.TaskStatus, io.gitpod.supervisor.api.Status.TaskStatus.Builder, io.gitpod.supervisor.api.Status.TaskStatusOrBuilder> + io.gitpod.supervisor.api.Status.TaskStatus, io.gitpod.supervisor.api.Status.TaskStatus.Builder, io.gitpod.supervisor.api.Status.TaskStatusOrBuilder> getTasksFieldBuilder() { if (tasksBuilder_ == null) { tasksBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< @@ -12265,7 +12265,7 @@ public java.lang.String getId() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); id_ = s; @@ -12281,7 +12281,7 @@ public java.lang.String getId() { getIdBytes() { java.lang.Object ref = id_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); id_ = b; @@ -12322,7 +12322,7 @@ public java.lang.String getTerminal() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); terminal_ = s; @@ -12338,7 +12338,7 @@ public java.lang.String getTerminal() { getTerminalBytes() { java.lang.Object ref = terminal_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); terminal_ = b; @@ -12764,7 +12764,7 @@ public java.lang.String getId() { getIdBytes() { java.lang.Object ref = id_; if (ref instanceof String) { - com.google.protobuf.ByteString b = + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); id_ = b; @@ -12783,7 +12783,7 @@ public Builder setId( if (value == null) { throw new NullPointerException(); } - + id_ = value; onChanged(); return this; @@ -12793,7 +12793,7 @@ public Builder setId( * @return This builder for chaining. */ public Builder clearId() { - + id_ = getDefaultInstance().getId(); onChanged(); return this; @@ -12809,7 +12809,7 @@ public Builder setIdBytes( throw new NullPointerException(); } checkByteStringIsUtf8(value); - + id_ = value; onChanged(); return this; @@ -12829,7 +12829,7 @@ public Builder setIdBytes( * @return This builder for chaining. */ public Builder setStateValue(int value) { - + state_ = value; onChanged(); return this; @@ -12853,7 +12853,7 @@ public Builder setState(io.gitpod.supervisor.api.Status.TaskState value) { if (value == null) { throw new NullPointerException(); } - + state_ = value.getNumber(); onChanged(); return this; @@ -12863,7 +12863,7 @@ public Builder setState(io.gitpod.supervisor.api.Status.TaskState value) { * @return This builder for chaining. */ public Builder clearState() { - + state_ = 0; onChanged(); return this; @@ -12894,7 +12894,7 @@ public java.lang.String getTerminal() { getTerminalBytes() { java.lang.Object ref = terminal_; if (ref instanceof String) { - com.google.protobuf.ByteString b = + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); terminal_ = b; @@ -12913,7 +12913,7 @@ public Builder setTerminal( if (value == null) { throw new NullPointerException(); } - + terminal_ = value; onChanged(); return this; @@ -12923,7 +12923,7 @@ public Builder setTerminal( * @return This builder for chaining. */ public Builder clearTerminal() { - + terminal_ = getDefaultInstance().getTerminal(); onChanged(); return this; @@ -12939,7 +12939,7 @@ public Builder setTerminalBytes( throw new NullPointerException(); } checkByteStringIsUtf8(value); - + terminal_ = value; onChanged(); return this; @@ -13032,7 +13032,7 @@ public Builder clearPresentation() { * .supervisor.TaskPresentation presentation = 4; */ public io.gitpod.supervisor.api.Status.TaskPresentation.Builder getPresentationBuilder() { - + onChanged(); return getPresentationFieldBuilder().getBuilder(); } @@ -13051,7 +13051,7 @@ public io.gitpod.supervisor.api.Status.TaskPresentationOrBuilder getPresentation * .supervisor.TaskPresentation presentation = 4; */ private com.google.protobuf.SingleFieldBuilderV3< - io.gitpod.supervisor.api.Status.TaskPresentation, io.gitpod.supervisor.api.Status.TaskPresentation.Builder, io.gitpod.supervisor.api.Status.TaskPresentationOrBuilder> + io.gitpod.supervisor.api.Status.TaskPresentation, io.gitpod.supervisor.api.Status.TaskPresentation.Builder, io.gitpod.supervisor.api.Status.TaskPresentationOrBuilder> getPresentationFieldBuilder() { if (presentationBuilder_ == null) { presentationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< @@ -13268,7 +13268,7 @@ public java.lang.String getName() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; @@ -13284,7 +13284,7 @@ public java.lang.String getName() { getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; @@ -13306,7 +13306,7 @@ public java.lang.String getOpenIn() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); openIn_ = s; @@ -13322,7 +13322,7 @@ public java.lang.String getOpenIn() { getOpenInBytes() { java.lang.Object ref = openIn_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); openIn_ = b; @@ -13344,7 +13344,7 @@ public java.lang.String getOpenMode() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); openMode_ = s; @@ -13360,7 +13360,7 @@ public java.lang.String getOpenMode() { getOpenModeBytes() { java.lang.Object ref = openMode_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); openMode_ = b; @@ -13731,7 +13731,7 @@ public java.lang.String getName() { getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { - com.google.protobuf.ByteString b = + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; @@ -13750,7 +13750,7 @@ public Builder setName( if (value == null) { throw new NullPointerException(); } - + name_ = value; onChanged(); return this; @@ -13760,7 +13760,7 @@ public Builder setName( * @return This builder for chaining. */ public Builder clearName() { - + name_ = getDefaultInstance().getName(); onChanged(); return this; @@ -13776,7 +13776,7 @@ public Builder setNameBytes( throw new NullPointerException(); } checkByteStringIsUtf8(value); - + name_ = value; onChanged(); return this; @@ -13807,7 +13807,7 @@ public java.lang.String getOpenIn() { getOpenInBytes() { java.lang.Object ref = openIn_; if (ref instanceof String) { - com.google.protobuf.ByteString b = + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); openIn_ = b; @@ -13826,7 +13826,7 @@ public Builder setOpenIn( if (value == null) { throw new NullPointerException(); } - + openIn_ = value; onChanged(); return this; @@ -13836,7 +13836,7 @@ public Builder setOpenIn( * @return This builder for chaining. */ public Builder clearOpenIn() { - + openIn_ = getDefaultInstance().getOpenIn(); onChanged(); return this; @@ -13852,7 +13852,7 @@ public Builder setOpenInBytes( throw new NullPointerException(); } checkByteStringIsUtf8(value); - + openIn_ = value; onChanged(); return this; @@ -13883,7 +13883,7 @@ public java.lang.String getOpenMode() { getOpenModeBytes() { java.lang.Object ref = openMode_; if (ref instanceof String) { - com.google.protobuf.ByteString b = + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); openMode_ = b; @@ -13902,7 +13902,7 @@ public Builder setOpenMode( if (value == null) { throw new NullPointerException(); } - + openMode_ = value; onChanged(); return this; @@ -13912,7 +13912,7 @@ public Builder setOpenMode( * @return This builder for chaining. */ public Builder clearOpenMode() { - + openMode_ = getDefaultInstance().getOpenMode(); onChanged(); return this; @@ -13928,7 +13928,7 @@ public Builder setOpenModeBytes( throw new NullPointerException(); } checkByteStringIsUtf8(value); - + openMode_ = value; onChanged(); return this; @@ -13986,228 +13986,2179 @@ public io.gitpod.supervisor.api.Status.TaskPresentation getDefaultInstanceForTyp } - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_supervisor_SupervisorStatusRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_supervisor_SupervisorStatusRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_supervisor_SupervisorStatusResponse_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_supervisor_SupervisorStatusResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_supervisor_IDEStatusRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_supervisor_IDEStatusRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_supervisor_IDEStatusResponse_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_supervisor_IDEStatusResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_supervisor_IDEStatusResponse_DesktopStatus_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_supervisor_IDEStatusResponse_DesktopStatus_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_supervisor_ContentStatusRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_supervisor_ContentStatusRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_supervisor_ContentStatusResponse_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_supervisor_ContentStatusResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_supervisor_BackupStatusRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_supervisor_BackupStatusRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_supervisor_BackupStatusResponse_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_supervisor_BackupStatusResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_supervisor_PortsStatusRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_supervisor_PortsStatusRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_supervisor_PortsStatusResponse_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_supervisor_PortsStatusResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_supervisor_ExposedPortInfo_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_supervisor_ExposedPortInfo_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_supervisor_TunneledPortInfo_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_supervisor_TunneledPortInfo_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_supervisor_TunneledPortInfo_ClientsEntry_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_supervisor_TunneledPortInfo_ClientsEntry_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_supervisor_PortsStatus_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_supervisor_PortsStatus_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_supervisor_TasksStatusRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_supervisor_TasksStatusRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_supervisor_TasksStatusResponse_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_supervisor_TasksStatusResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_supervisor_TaskStatus_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_supervisor_TaskStatus_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_supervisor_TaskPresentation_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_supervisor_TaskPresentation_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; + public interface ResourcesStatuRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:supervisor.ResourcesStatuRequest) + com.google.protobuf.MessageOrBuilder { } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\014status.proto\022\nsupervisor\032\034google/api/a" + - "nnotations.proto\032\nport.proto\"\031\n\027Supervis" + - "orStatusRequest\"&\n\030SupervisorStatusRespo" + - "nse\022\n\n\002ok\030\001 \001(\010\" \n\020IDEStatusRequest\022\014\n\004w" + - "ait\030\001 \001(\010\"\253\001\n\021IDEStatusResponse\022\n\n\002ok\030\001 " + - "\001(\010\022<\n\007desktop\030\002 \001(\0132+.supervisor.IDESta" + - "tusResponse.DesktopStatus\032L\n\rDesktopStat" + - "us\022\014\n\004link\030\001 \001(\t\022\r\n\005label\030\002 \001(\t\022\020\n\010clien" + - "tID\030\003 \001(\t\022\014\n\004kind\030\004 \001(\t\"$\n\024ContentStatus" + - "Request\022\014\n\004wait\030\001 \001(\010\"U\n\025ContentStatusRe" + - "sponse\022\021\n\tavailable\030\001 \001(\010\022)\n\006source\030\002 \001(" + - "\0162\031.supervisor.ContentSource\"\025\n\023BackupSt" + - "atusRequest\"0\n\024BackupStatusResponse\022\030\n\020c" + - "anary_available\030\001 \001(\010\"%\n\022PortsStatusRequ" + - "est\022\017\n\007observe\030\001 \001(\010\"=\n\023PortsStatusRespo" + - "nse\022&\n\005ports\030\001 \003(\0132\027.supervisor.PortsSta" + - "tus\"\203\001\n\017ExposedPortInfo\022.\n\nvisibility\030\001 " + - "\001(\0162\032.supervisor.PortVisibility\022\013\n\003url\030\002" + - " \001(\t\0223\n\non_exposed\030\003 \001(\0162\037.supervisor.On" + - "PortExposedAction\"\304\001\n\020TunneledPortInfo\022\023" + - "\n\013target_port\030\001 \001(\r\022/\n\nvisibility\030\002 \001(\0162" + - "\033.supervisor.TunnelVisiblity\022:\n\007clients\030" + - "\003 \003(\0132).supervisor.TunneledPortInfo.Clie" + - "ntsEntry\032.\n\014ClientsEntry\022\013\n\003key\030\001 \001(\t\022\r\n" + - "\005value\030\002 \001(\r:\0028\001\"\355\001\n\013PortsStatus\022\022\n\nloca" + - "l_port\030\001 \001(\r\022\016\n\006served\030\004 \001(\010\022,\n\007exposed\030" + - "\005 \001(\0132\033.supervisor.ExposedPortInfo\0223\n\rau" + - "to_exposure\030\007 \001(\0162\034.supervisor.PortAutoE" + - "xposure\022.\n\010tunneled\030\006 \001(\0132\034.supervisor.T" + - "unneledPortInfo\022\023\n\013description\030\010 \001(\t\022\014\n\004" + - "name\030\t \001(\tJ\004\010\002\020\003\"%\n\022TasksStatusRequest\022\017" + - "\n\007observe\030\001 \001(\010\"<\n\023TasksStatusResponse\022%" + - "\n\005tasks\030\001 \003(\0132\026.supervisor.TaskStatus\"\204\001" + - "\n\nTaskStatus\022\n\n\002id\030\001 \001(\t\022$\n\005state\030\002 \001(\0162" + - "\025.supervisor.TaskState\022\020\n\010terminal\030\003 \001(\t" + - "\0222\n\014presentation\030\004 \001(\0132\034.supervisor.Task" + - "Presentation\"D\n\020TaskPresentation\022\014\n\004name" + - "\030\001 \001(\t\022\017\n\007open_in\030\002 \001(\t\022\021\n\topen_mode\030\003 \001" + - "(\t*C\n\rContentSource\022\016\n\nfrom_other\020\000\022\017\n\013f" + - "rom_backup\020\001\022\021\n\rfrom_prebuild\020\002*?\n\016PortV" + - "isibility\022\026\n\022private_visibility\020\000\022\025\n\021pub" + - "lic_visibility\020\001*e\n\023OnPortExposedAction\022" + - "\n\n\006ignore\020\000\022\020\n\014open_browser\020\001\022\020\n\014open_pr" + - "eview\020\002\022\n\n\006notify\020\003\022\022\n\016notify_private\020\004*" + - "9\n\020PortAutoExposure\022\n\n\006trying\020\000\022\r\n\tsucce" + - "eded\020\001\022\n\n\006failed\020\002*1\n\tTaskState\022\013\n\007openi" + - "ng\020\000\022\013\n\007running\020\001\022\n\n\006closed\020\0022\313\006\n\rStatus" + - "Service\022|\n\020SupervisorStatus\022#.supervisor" + - ".SupervisorStatusRequest\032$.supervisor.Su" + - "pervisorStatusResponse\"\035\202\323\344\223\002\027\022\025/v1/stat" + - "us/supervisor\022\203\001\n\tIDEStatus\022\034.supervisor" + - ".IDEStatusRequest\032\035.supervisor.IDEStatus" + - "Response\"9\202\323\344\223\0023\022\016/v1/status/ideZ!\022\037/v1/" + - "status/ide/wait/{wait=true}\022\227\001\n\rContentS" + - "tatus\022 .supervisor.ContentStatusRequest\032" + - "!.supervisor.ContentStatusResponse\"A\202\323\344\223" + - "\002;\022\022/v1/status/contentZ%\022#/v1/status/con" + - "tent/wait/{wait=true}\022l\n\014BackupStatus\022\037." + - "supervisor.BackupStatusRequest\032 .supervi" + - "sor.BackupStatusResponse\"\031\202\323\344\223\002\023\022\021/v1/st" + - "atus/backup\022\225\001\n\013PortsStatus\022\036.supervisor" + - ".PortsStatusRequest\032\037.supervisor.PortsSt" + - "atusResponse\"C\202\323\344\223\002=\022\020/v1/status/portsZ)" + - "\022\'/v1/status/ports/observe/{observe=true" + - "}0\001\022\225\001\n\013TasksStatus\022\036.supervisor.TasksSt" + - "atusRequest\032\037.supervisor.TasksStatusResp" + - "onse\"C\202\323\344\223\002=\022\020/v1/status/tasksZ)\022\'/v1/st" + - "atus/tasks/observe/{observe=true}0\001BF\n\030i" + - "o.gitpod.supervisor.apiZ*github.com/gitp" + - "od-io/gitpod/supervisor/apib\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - io.gitpod.supervisor.api.Port.getDescriptor(), - }); - internal_static_supervisor_SupervisorStatusRequest_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_supervisor_SupervisorStatusRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_supervisor_SupervisorStatusRequest_descriptor, - new java.lang.String[] { }); - internal_static_supervisor_SupervisorStatusResponse_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_supervisor_SupervisorStatusResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_supervisor_SupervisorStatusResponse_descriptor, - new java.lang.String[] { "Ok", }); - internal_static_supervisor_IDEStatusRequest_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_supervisor_IDEStatusRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_supervisor_IDEStatusRequest_descriptor, - new java.lang.String[] { "Wait", }); - internal_static_supervisor_IDEStatusResponse_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_supervisor_IDEStatusResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_supervisor_IDEStatusResponse_descriptor, - new java.lang.String[] { "Ok", "Desktop", }); - internal_static_supervisor_IDEStatusResponse_DesktopStatus_descriptor = - internal_static_supervisor_IDEStatusResponse_descriptor.getNestedTypes().get(0); - internal_static_supervisor_IDEStatusResponse_DesktopStatus_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_supervisor_IDEStatusResponse_DesktopStatus_descriptor, - new java.lang.String[] { "Link", "Label", "ClientID", "Kind", }); - internal_static_supervisor_ContentStatusRequest_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_supervisor_ContentStatusRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_supervisor_ContentStatusRequest_descriptor, - new java.lang.String[] { "Wait", }); - internal_static_supervisor_ContentStatusResponse_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_supervisor_ContentStatusResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_supervisor_ContentStatusResponse_descriptor, + /** + * Protobuf type {@code supervisor.ResourcesStatuRequest} + */ + public static final class ResourcesStatuRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:supervisor.ResourcesStatuRequest) + ResourcesStatuRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ResourcesStatuRequest.newBuilder() to construct. + private ResourcesStatuRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ResourcesStatuRequest() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ResourcesStatuRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ResourcesStatuRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.gitpod.supervisor.api.Status.internal_static_supervisor_ResourcesStatuRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.gitpod.supervisor.api.Status.internal_static_supervisor_ResourcesStatuRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.gitpod.supervisor.api.Status.ResourcesStatuRequest.class, io.gitpod.supervisor.api.Status.ResourcesStatuRequest.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.gitpod.supervisor.api.Status.ResourcesStatuRequest)) { + return super.equals(obj); + } + io.gitpod.supervisor.api.Status.ResourcesStatuRequest other = (io.gitpod.supervisor.api.Status.ResourcesStatuRequest) obj; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.gitpod.supervisor.api.Status.ResourcesStatuRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.gitpod.supervisor.api.Status.ResourcesStatuRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.gitpod.supervisor.api.Status.ResourcesStatuRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.gitpod.supervisor.api.Status.ResourcesStatuRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.gitpod.supervisor.api.Status.ResourcesStatuRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.gitpod.supervisor.api.Status.ResourcesStatuRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.gitpod.supervisor.api.Status.ResourcesStatuRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.gitpod.supervisor.api.Status.ResourcesStatuRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.gitpod.supervisor.api.Status.ResourcesStatuRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.gitpod.supervisor.api.Status.ResourcesStatuRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.gitpod.supervisor.api.Status.ResourcesStatuRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.gitpod.supervisor.api.Status.ResourcesStatuRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.gitpod.supervisor.api.Status.ResourcesStatuRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code supervisor.ResourcesStatuRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:supervisor.ResourcesStatuRequest) + io.gitpod.supervisor.api.Status.ResourcesStatuRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.gitpod.supervisor.api.Status.internal_static_supervisor_ResourcesStatuRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.gitpod.supervisor.api.Status.internal_static_supervisor_ResourcesStatuRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.gitpod.supervisor.api.Status.ResourcesStatuRequest.class, io.gitpod.supervisor.api.Status.ResourcesStatuRequest.Builder.class); + } + + // Construct using io.gitpod.supervisor.api.Status.ResourcesStatuRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.gitpod.supervisor.api.Status.internal_static_supervisor_ResourcesStatuRequest_descriptor; + } + + @java.lang.Override + public io.gitpod.supervisor.api.Status.ResourcesStatuRequest getDefaultInstanceForType() { + return io.gitpod.supervisor.api.Status.ResourcesStatuRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.gitpod.supervisor.api.Status.ResourcesStatuRequest build() { + io.gitpod.supervisor.api.Status.ResourcesStatuRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.gitpod.supervisor.api.Status.ResourcesStatuRequest buildPartial() { + io.gitpod.supervisor.api.Status.ResourcesStatuRequest result = new io.gitpod.supervisor.api.Status.ResourcesStatuRequest(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.gitpod.supervisor.api.Status.ResourcesStatuRequest) { + return mergeFrom((io.gitpod.supervisor.api.Status.ResourcesStatuRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.gitpod.supervisor.api.Status.ResourcesStatuRequest other) { + if (other == io.gitpod.supervisor.api.Status.ResourcesStatuRequest.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + io.gitpod.supervisor.api.Status.ResourcesStatuRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.gitpod.supervisor.api.Status.ResourcesStatuRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:supervisor.ResourcesStatuRequest) + } + + // @@protoc_insertion_point(class_scope:supervisor.ResourcesStatuRequest) + private static final io.gitpod.supervisor.api.Status.ResourcesStatuRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.gitpod.supervisor.api.Status.ResourcesStatuRequest(); + } + + public static io.gitpod.supervisor.api.Status.ResourcesStatuRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ResourcesStatuRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ResourcesStatuRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.gitpod.supervisor.api.Status.ResourcesStatuRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ResourcesStatusResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:supervisor.ResourcesStatusResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Used memory and limit in bytes
+     * 
+ * + * .supervisor.ResourceStatus memory = 1; + * @return Whether the memory field is set. + */ + boolean hasMemory(); + /** + *
+     * Used memory and limit in bytes
+     * 
+ * + * .supervisor.ResourceStatus memory = 1; + * @return The memory. + */ + io.gitpod.supervisor.api.Status.ResourceStatus getMemory(); + /** + *
+     * Used memory and limit in bytes
+     * 
+ * + * .supervisor.ResourceStatus memory = 1; + */ + io.gitpod.supervisor.api.Status.ResourceStatusOrBuilder getMemoryOrBuilder(); + + /** + *
+     * Used CPU and limit in millicores.
+     * 
+ * + * .supervisor.ResourceStatus cpu = 2; + * @return Whether the cpu field is set. + */ + boolean hasCpu(); + /** + *
+     * Used CPU and limit in millicores.
+     * 
+ * + * .supervisor.ResourceStatus cpu = 2; + * @return The cpu. + */ + io.gitpod.supervisor.api.Status.ResourceStatus getCpu(); + /** + *
+     * Used CPU and limit in millicores.
+     * 
+ * + * .supervisor.ResourceStatus cpu = 2; + */ + io.gitpod.supervisor.api.Status.ResourceStatusOrBuilder getCpuOrBuilder(); + } + /** + * Protobuf type {@code supervisor.ResourcesStatusResponse} + */ + public static final class ResourcesStatusResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:supervisor.ResourcesStatusResponse) + ResourcesStatusResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ResourcesStatusResponse.newBuilder() to construct. + private ResourcesStatusResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ResourcesStatusResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ResourcesStatusResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ResourcesStatusResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + io.gitpod.supervisor.api.Status.ResourceStatus.Builder subBuilder = null; + if (memory_ != null) { + subBuilder = memory_.toBuilder(); + } + memory_ = input.readMessage(io.gitpod.supervisor.api.Status.ResourceStatus.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(memory_); + memory_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + io.gitpod.supervisor.api.Status.ResourceStatus.Builder subBuilder = null; + if (cpu_ != null) { + subBuilder = cpu_.toBuilder(); + } + cpu_ = input.readMessage(io.gitpod.supervisor.api.Status.ResourceStatus.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(cpu_); + cpu_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.gitpod.supervisor.api.Status.internal_static_supervisor_ResourcesStatusResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.gitpod.supervisor.api.Status.internal_static_supervisor_ResourcesStatusResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.gitpod.supervisor.api.Status.ResourcesStatusResponse.class, io.gitpod.supervisor.api.Status.ResourcesStatusResponse.Builder.class); + } + + public static final int MEMORY_FIELD_NUMBER = 1; + private io.gitpod.supervisor.api.Status.ResourceStatus memory_; + /** + *
+     * Used memory and limit in bytes
+     * 
+ * + * .supervisor.ResourceStatus memory = 1; + * @return Whether the memory field is set. + */ + @java.lang.Override + public boolean hasMemory() { + return memory_ != null; + } + /** + *
+     * Used memory and limit in bytes
+     * 
+ * + * .supervisor.ResourceStatus memory = 1; + * @return The memory. + */ + @java.lang.Override + public io.gitpod.supervisor.api.Status.ResourceStatus getMemory() { + return memory_ == null ? io.gitpod.supervisor.api.Status.ResourceStatus.getDefaultInstance() : memory_; + } + /** + *
+     * Used memory and limit in bytes
+     * 
+ * + * .supervisor.ResourceStatus memory = 1; + */ + @java.lang.Override + public io.gitpod.supervisor.api.Status.ResourceStatusOrBuilder getMemoryOrBuilder() { + return getMemory(); + } + + public static final int CPU_FIELD_NUMBER = 2; + private io.gitpod.supervisor.api.Status.ResourceStatus cpu_; + /** + *
+     * Used CPU and limit in millicores.
+     * 
+ * + * .supervisor.ResourceStatus cpu = 2; + * @return Whether the cpu field is set. + */ + @java.lang.Override + public boolean hasCpu() { + return cpu_ != null; + } + /** + *
+     * Used CPU and limit in millicores.
+     * 
+ * + * .supervisor.ResourceStatus cpu = 2; + * @return The cpu. + */ + @java.lang.Override + public io.gitpod.supervisor.api.Status.ResourceStatus getCpu() { + return cpu_ == null ? io.gitpod.supervisor.api.Status.ResourceStatus.getDefaultInstance() : cpu_; + } + /** + *
+     * Used CPU and limit in millicores.
+     * 
+ * + * .supervisor.ResourceStatus cpu = 2; + */ + @java.lang.Override + public io.gitpod.supervisor.api.Status.ResourceStatusOrBuilder getCpuOrBuilder() { + return getCpu(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (memory_ != null) { + output.writeMessage(1, getMemory()); + } + if (cpu_ != null) { + output.writeMessage(2, getCpu()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (memory_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getMemory()); + } + if (cpu_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getCpu()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.gitpod.supervisor.api.Status.ResourcesStatusResponse)) { + return super.equals(obj); + } + io.gitpod.supervisor.api.Status.ResourcesStatusResponse other = (io.gitpod.supervisor.api.Status.ResourcesStatusResponse) obj; + + if (hasMemory() != other.hasMemory()) return false; + if (hasMemory()) { + if (!getMemory() + .equals(other.getMemory())) return false; + } + if (hasCpu() != other.hasCpu()) return false; + if (hasCpu()) { + if (!getCpu() + .equals(other.getCpu())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasMemory()) { + hash = (37 * hash) + MEMORY_FIELD_NUMBER; + hash = (53 * hash) + getMemory().hashCode(); + } + if (hasCpu()) { + hash = (37 * hash) + CPU_FIELD_NUMBER; + hash = (53 * hash) + getCpu().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.gitpod.supervisor.api.Status.ResourcesStatusResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.gitpod.supervisor.api.Status.ResourcesStatusResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.gitpod.supervisor.api.Status.ResourcesStatusResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.gitpod.supervisor.api.Status.ResourcesStatusResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.gitpod.supervisor.api.Status.ResourcesStatusResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.gitpod.supervisor.api.Status.ResourcesStatusResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.gitpod.supervisor.api.Status.ResourcesStatusResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.gitpod.supervisor.api.Status.ResourcesStatusResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.gitpod.supervisor.api.Status.ResourcesStatusResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.gitpod.supervisor.api.Status.ResourcesStatusResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.gitpod.supervisor.api.Status.ResourcesStatusResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.gitpod.supervisor.api.Status.ResourcesStatusResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.gitpod.supervisor.api.Status.ResourcesStatusResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code supervisor.ResourcesStatusResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:supervisor.ResourcesStatusResponse) + io.gitpod.supervisor.api.Status.ResourcesStatusResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.gitpod.supervisor.api.Status.internal_static_supervisor_ResourcesStatusResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.gitpod.supervisor.api.Status.internal_static_supervisor_ResourcesStatusResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.gitpod.supervisor.api.Status.ResourcesStatusResponse.class, io.gitpod.supervisor.api.Status.ResourcesStatusResponse.Builder.class); + } + + // Construct using io.gitpod.supervisor.api.Status.ResourcesStatusResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (memoryBuilder_ == null) { + memory_ = null; + } else { + memory_ = null; + memoryBuilder_ = null; + } + if (cpuBuilder_ == null) { + cpu_ = null; + } else { + cpu_ = null; + cpuBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.gitpod.supervisor.api.Status.internal_static_supervisor_ResourcesStatusResponse_descriptor; + } + + @java.lang.Override + public io.gitpod.supervisor.api.Status.ResourcesStatusResponse getDefaultInstanceForType() { + return io.gitpod.supervisor.api.Status.ResourcesStatusResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.gitpod.supervisor.api.Status.ResourcesStatusResponse build() { + io.gitpod.supervisor.api.Status.ResourcesStatusResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.gitpod.supervisor.api.Status.ResourcesStatusResponse buildPartial() { + io.gitpod.supervisor.api.Status.ResourcesStatusResponse result = new io.gitpod.supervisor.api.Status.ResourcesStatusResponse(this); + if (memoryBuilder_ == null) { + result.memory_ = memory_; + } else { + result.memory_ = memoryBuilder_.build(); + } + if (cpuBuilder_ == null) { + result.cpu_ = cpu_; + } else { + result.cpu_ = cpuBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.gitpod.supervisor.api.Status.ResourcesStatusResponse) { + return mergeFrom((io.gitpod.supervisor.api.Status.ResourcesStatusResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.gitpod.supervisor.api.Status.ResourcesStatusResponse other) { + if (other == io.gitpod.supervisor.api.Status.ResourcesStatusResponse.getDefaultInstance()) return this; + if (other.hasMemory()) { + mergeMemory(other.getMemory()); + } + if (other.hasCpu()) { + mergeCpu(other.getCpu()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + io.gitpod.supervisor.api.Status.ResourcesStatusResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.gitpod.supervisor.api.Status.ResourcesStatusResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private io.gitpod.supervisor.api.Status.ResourceStatus memory_; + private com.google.protobuf.SingleFieldBuilderV3< + io.gitpod.supervisor.api.Status.ResourceStatus, io.gitpod.supervisor.api.Status.ResourceStatus.Builder, io.gitpod.supervisor.api.Status.ResourceStatusOrBuilder> memoryBuilder_; + /** + *
+       * Used memory and limit in bytes
+       * 
+ * + * .supervisor.ResourceStatus memory = 1; + * @return Whether the memory field is set. + */ + public boolean hasMemory() { + return memoryBuilder_ != null || memory_ != null; + } + /** + *
+       * Used memory and limit in bytes
+       * 
+ * + * .supervisor.ResourceStatus memory = 1; + * @return The memory. + */ + public io.gitpod.supervisor.api.Status.ResourceStatus getMemory() { + if (memoryBuilder_ == null) { + return memory_ == null ? io.gitpod.supervisor.api.Status.ResourceStatus.getDefaultInstance() : memory_; + } else { + return memoryBuilder_.getMessage(); + } + } + /** + *
+       * Used memory and limit in bytes
+       * 
+ * + * .supervisor.ResourceStatus memory = 1; + */ + public Builder setMemory(io.gitpod.supervisor.api.Status.ResourceStatus value) { + if (memoryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + memory_ = value; + onChanged(); + } else { + memoryBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Used memory and limit in bytes
+       * 
+ * + * .supervisor.ResourceStatus memory = 1; + */ + public Builder setMemory( + io.gitpod.supervisor.api.Status.ResourceStatus.Builder builderForValue) { + if (memoryBuilder_ == null) { + memory_ = builderForValue.build(); + onChanged(); + } else { + memoryBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Used memory and limit in bytes
+       * 
+ * + * .supervisor.ResourceStatus memory = 1; + */ + public Builder mergeMemory(io.gitpod.supervisor.api.Status.ResourceStatus value) { + if (memoryBuilder_ == null) { + if (memory_ != null) { + memory_ = + io.gitpod.supervisor.api.Status.ResourceStatus.newBuilder(memory_).mergeFrom(value).buildPartial(); + } else { + memory_ = value; + } + onChanged(); + } else { + memoryBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Used memory and limit in bytes
+       * 
+ * + * .supervisor.ResourceStatus memory = 1; + */ + public Builder clearMemory() { + if (memoryBuilder_ == null) { + memory_ = null; + onChanged(); + } else { + memory_ = null; + memoryBuilder_ = null; + } + + return this; + } + /** + *
+       * Used memory and limit in bytes
+       * 
+ * + * .supervisor.ResourceStatus memory = 1; + */ + public io.gitpod.supervisor.api.Status.ResourceStatus.Builder getMemoryBuilder() { + + onChanged(); + return getMemoryFieldBuilder().getBuilder(); + } + /** + *
+       * Used memory and limit in bytes
+       * 
+ * + * .supervisor.ResourceStatus memory = 1; + */ + public io.gitpod.supervisor.api.Status.ResourceStatusOrBuilder getMemoryOrBuilder() { + if (memoryBuilder_ != null) { + return memoryBuilder_.getMessageOrBuilder(); + } else { + return memory_ == null ? + io.gitpod.supervisor.api.Status.ResourceStatus.getDefaultInstance() : memory_; + } + } + /** + *
+       * Used memory and limit in bytes
+       * 
+ * + * .supervisor.ResourceStatus memory = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.gitpod.supervisor.api.Status.ResourceStatus, io.gitpod.supervisor.api.Status.ResourceStatus.Builder, io.gitpod.supervisor.api.Status.ResourceStatusOrBuilder> + getMemoryFieldBuilder() { + if (memoryBuilder_ == null) { + memoryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.gitpod.supervisor.api.Status.ResourceStatus, io.gitpod.supervisor.api.Status.ResourceStatus.Builder, io.gitpod.supervisor.api.Status.ResourceStatusOrBuilder>( + getMemory(), + getParentForChildren(), + isClean()); + memory_ = null; + } + return memoryBuilder_; + } + + private io.gitpod.supervisor.api.Status.ResourceStatus cpu_; + private com.google.protobuf.SingleFieldBuilderV3< + io.gitpod.supervisor.api.Status.ResourceStatus, io.gitpod.supervisor.api.Status.ResourceStatus.Builder, io.gitpod.supervisor.api.Status.ResourceStatusOrBuilder> cpuBuilder_; + /** + *
+       * Used CPU and limit in millicores.
+       * 
+ * + * .supervisor.ResourceStatus cpu = 2; + * @return Whether the cpu field is set. + */ + public boolean hasCpu() { + return cpuBuilder_ != null || cpu_ != null; + } + /** + *
+       * Used CPU and limit in millicores.
+       * 
+ * + * .supervisor.ResourceStatus cpu = 2; + * @return The cpu. + */ + public io.gitpod.supervisor.api.Status.ResourceStatus getCpu() { + if (cpuBuilder_ == null) { + return cpu_ == null ? io.gitpod.supervisor.api.Status.ResourceStatus.getDefaultInstance() : cpu_; + } else { + return cpuBuilder_.getMessage(); + } + } + /** + *
+       * Used CPU and limit in millicores.
+       * 
+ * + * .supervisor.ResourceStatus cpu = 2; + */ + public Builder setCpu(io.gitpod.supervisor.api.Status.ResourceStatus value) { + if (cpuBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cpu_ = value; + onChanged(); + } else { + cpuBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Used CPU and limit in millicores.
+       * 
+ * + * .supervisor.ResourceStatus cpu = 2; + */ + public Builder setCpu( + io.gitpod.supervisor.api.Status.ResourceStatus.Builder builderForValue) { + if (cpuBuilder_ == null) { + cpu_ = builderForValue.build(); + onChanged(); + } else { + cpuBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Used CPU and limit in millicores.
+       * 
+ * + * .supervisor.ResourceStatus cpu = 2; + */ + public Builder mergeCpu(io.gitpod.supervisor.api.Status.ResourceStatus value) { + if (cpuBuilder_ == null) { + if (cpu_ != null) { + cpu_ = + io.gitpod.supervisor.api.Status.ResourceStatus.newBuilder(cpu_).mergeFrom(value).buildPartial(); + } else { + cpu_ = value; + } + onChanged(); + } else { + cpuBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Used CPU and limit in millicores.
+       * 
+ * + * .supervisor.ResourceStatus cpu = 2; + */ + public Builder clearCpu() { + if (cpuBuilder_ == null) { + cpu_ = null; + onChanged(); + } else { + cpu_ = null; + cpuBuilder_ = null; + } + + return this; + } + /** + *
+       * Used CPU and limit in millicores.
+       * 
+ * + * .supervisor.ResourceStatus cpu = 2; + */ + public io.gitpod.supervisor.api.Status.ResourceStatus.Builder getCpuBuilder() { + + onChanged(); + return getCpuFieldBuilder().getBuilder(); + } + /** + *
+       * Used CPU and limit in millicores.
+       * 
+ * + * .supervisor.ResourceStatus cpu = 2; + */ + public io.gitpod.supervisor.api.Status.ResourceStatusOrBuilder getCpuOrBuilder() { + if (cpuBuilder_ != null) { + return cpuBuilder_.getMessageOrBuilder(); + } else { + return cpu_ == null ? + io.gitpod.supervisor.api.Status.ResourceStatus.getDefaultInstance() : cpu_; + } + } + /** + *
+       * Used CPU and limit in millicores.
+       * 
+ * + * .supervisor.ResourceStatus cpu = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.gitpod.supervisor.api.Status.ResourceStatus, io.gitpod.supervisor.api.Status.ResourceStatus.Builder, io.gitpod.supervisor.api.Status.ResourceStatusOrBuilder> + getCpuFieldBuilder() { + if (cpuBuilder_ == null) { + cpuBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.gitpod.supervisor.api.Status.ResourceStatus, io.gitpod.supervisor.api.Status.ResourceStatus.Builder, io.gitpod.supervisor.api.Status.ResourceStatusOrBuilder>( + getCpu(), + getParentForChildren(), + isClean()); + cpu_ = null; + } + return cpuBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:supervisor.ResourcesStatusResponse) + } + + // @@protoc_insertion_point(class_scope:supervisor.ResourcesStatusResponse) + private static final io.gitpod.supervisor.api.Status.ResourcesStatusResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.gitpod.supervisor.api.Status.ResourcesStatusResponse(); + } + + public static io.gitpod.supervisor.api.Status.ResourcesStatusResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ResourcesStatusResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ResourcesStatusResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.gitpod.supervisor.api.Status.ResourcesStatusResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ResourceStatusOrBuilder extends + // @@protoc_insertion_point(interface_extends:supervisor.ResourceStatus) + com.google.protobuf.MessageOrBuilder { + + /** + * int64 used = 1; + * @return The used. + */ + long getUsed(); + + /** + * int64 limit = 2; + * @return The limit. + */ + long getLimit(); + } + /** + * Protobuf type {@code supervisor.ResourceStatus} + */ + public static final class ResourceStatus extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:supervisor.ResourceStatus) + ResourceStatusOrBuilder { + private static final long serialVersionUID = 0L; + // Use ResourceStatus.newBuilder() to construct. + private ResourceStatus(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ResourceStatus() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ResourceStatus(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ResourceStatus( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + used_ = input.readInt64(); + break; + } + case 16: { + + limit_ = input.readInt64(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.gitpod.supervisor.api.Status.internal_static_supervisor_ResourceStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.gitpod.supervisor.api.Status.internal_static_supervisor_ResourceStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.gitpod.supervisor.api.Status.ResourceStatus.class, io.gitpod.supervisor.api.Status.ResourceStatus.Builder.class); + } + + public static final int USED_FIELD_NUMBER = 1; + private long used_; + /** + * int64 used = 1; + * @return The used. + */ + @java.lang.Override + public long getUsed() { + return used_; + } + + public static final int LIMIT_FIELD_NUMBER = 2; + private long limit_; + /** + * int64 limit = 2; + * @return The limit. + */ + @java.lang.Override + public long getLimit() { + return limit_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (used_ != 0L) { + output.writeInt64(1, used_); + } + if (limit_ != 0L) { + output.writeInt64(2, limit_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (used_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, used_); + } + if (limit_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, limit_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.gitpod.supervisor.api.Status.ResourceStatus)) { + return super.equals(obj); + } + io.gitpod.supervisor.api.Status.ResourceStatus other = (io.gitpod.supervisor.api.Status.ResourceStatus) obj; + + if (getUsed() + != other.getUsed()) return false; + if (getLimit() + != other.getLimit()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + USED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getUsed()); + hash = (37 * hash) + LIMIT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getLimit()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.gitpod.supervisor.api.Status.ResourceStatus parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.gitpod.supervisor.api.Status.ResourceStatus parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.gitpod.supervisor.api.Status.ResourceStatus parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.gitpod.supervisor.api.Status.ResourceStatus parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.gitpod.supervisor.api.Status.ResourceStatus parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.gitpod.supervisor.api.Status.ResourceStatus parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.gitpod.supervisor.api.Status.ResourceStatus parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.gitpod.supervisor.api.Status.ResourceStatus parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.gitpod.supervisor.api.Status.ResourceStatus parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.gitpod.supervisor.api.Status.ResourceStatus parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.gitpod.supervisor.api.Status.ResourceStatus parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.gitpod.supervisor.api.Status.ResourceStatus parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.gitpod.supervisor.api.Status.ResourceStatus prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code supervisor.ResourceStatus} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:supervisor.ResourceStatus) + io.gitpod.supervisor.api.Status.ResourceStatusOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.gitpod.supervisor.api.Status.internal_static_supervisor_ResourceStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.gitpod.supervisor.api.Status.internal_static_supervisor_ResourceStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.gitpod.supervisor.api.Status.ResourceStatus.class, io.gitpod.supervisor.api.Status.ResourceStatus.Builder.class); + } + + // Construct using io.gitpod.supervisor.api.Status.ResourceStatus.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + used_ = 0L; + + limit_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.gitpod.supervisor.api.Status.internal_static_supervisor_ResourceStatus_descriptor; + } + + @java.lang.Override + public io.gitpod.supervisor.api.Status.ResourceStatus getDefaultInstanceForType() { + return io.gitpod.supervisor.api.Status.ResourceStatus.getDefaultInstance(); + } + + @java.lang.Override + public io.gitpod.supervisor.api.Status.ResourceStatus build() { + io.gitpod.supervisor.api.Status.ResourceStatus result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.gitpod.supervisor.api.Status.ResourceStatus buildPartial() { + io.gitpod.supervisor.api.Status.ResourceStatus result = new io.gitpod.supervisor.api.Status.ResourceStatus(this); + result.used_ = used_; + result.limit_ = limit_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.gitpod.supervisor.api.Status.ResourceStatus) { + return mergeFrom((io.gitpod.supervisor.api.Status.ResourceStatus)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.gitpod.supervisor.api.Status.ResourceStatus other) { + if (other == io.gitpod.supervisor.api.Status.ResourceStatus.getDefaultInstance()) return this; + if (other.getUsed() != 0L) { + setUsed(other.getUsed()); + } + if (other.getLimit() != 0L) { + setLimit(other.getLimit()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + io.gitpod.supervisor.api.Status.ResourceStatus parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.gitpod.supervisor.api.Status.ResourceStatus) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long used_ ; + /** + * int64 used = 1; + * @return The used. + */ + @java.lang.Override + public long getUsed() { + return used_; + } + /** + * int64 used = 1; + * @param value The used to set. + * @return This builder for chaining. + */ + public Builder setUsed(long value) { + + used_ = value; + onChanged(); + return this; + } + /** + * int64 used = 1; + * @return This builder for chaining. + */ + public Builder clearUsed() { + + used_ = 0L; + onChanged(); + return this; + } + + private long limit_ ; + /** + * int64 limit = 2; + * @return The limit. + */ + @java.lang.Override + public long getLimit() { + return limit_; + } + /** + * int64 limit = 2; + * @param value The limit to set. + * @return This builder for chaining. + */ + public Builder setLimit(long value) { + + limit_ = value; + onChanged(); + return this; + } + /** + * int64 limit = 2; + * @return This builder for chaining. + */ + public Builder clearLimit() { + + limit_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:supervisor.ResourceStatus) + } + + // @@protoc_insertion_point(class_scope:supervisor.ResourceStatus) + private static final io.gitpod.supervisor.api.Status.ResourceStatus DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.gitpod.supervisor.api.Status.ResourceStatus(); + } + + public static io.gitpod.supervisor.api.Status.ResourceStatus getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ResourceStatus parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ResourceStatus(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.gitpod.supervisor.api.Status.ResourceStatus getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_supervisor_SupervisorStatusRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_supervisor_SupervisorStatusRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_supervisor_SupervisorStatusResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_supervisor_SupervisorStatusResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_supervisor_IDEStatusRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_supervisor_IDEStatusRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_supervisor_IDEStatusResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_supervisor_IDEStatusResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_supervisor_IDEStatusResponse_DesktopStatus_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_supervisor_IDEStatusResponse_DesktopStatus_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_supervisor_ContentStatusRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_supervisor_ContentStatusRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_supervisor_ContentStatusResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_supervisor_ContentStatusResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_supervisor_BackupStatusRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_supervisor_BackupStatusRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_supervisor_BackupStatusResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_supervisor_BackupStatusResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_supervisor_PortsStatusRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_supervisor_PortsStatusRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_supervisor_PortsStatusResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_supervisor_PortsStatusResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_supervisor_ExposedPortInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_supervisor_ExposedPortInfo_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_supervisor_TunneledPortInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_supervisor_TunneledPortInfo_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_supervisor_TunneledPortInfo_ClientsEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_supervisor_TunneledPortInfo_ClientsEntry_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_supervisor_PortsStatus_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_supervisor_PortsStatus_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_supervisor_TasksStatusRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_supervisor_TasksStatusRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_supervisor_TasksStatusResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_supervisor_TasksStatusResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_supervisor_TaskStatus_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_supervisor_TaskStatus_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_supervisor_TaskPresentation_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_supervisor_TaskPresentation_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_supervisor_ResourcesStatuRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_supervisor_ResourcesStatuRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_supervisor_ResourcesStatusResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_supervisor_ResourcesStatusResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_supervisor_ResourceStatus_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_supervisor_ResourceStatus_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\014status.proto\022\nsupervisor\032\034google/api/a" + + "nnotations.proto\032\nport.proto\"\031\n\027Supervis" + + "orStatusRequest\"&\n\030SupervisorStatusRespo" + + "nse\022\n\n\002ok\030\001 \001(\010\" \n\020IDEStatusRequest\022\014\n\004w" + + "ait\030\001 \001(\010\"\253\001\n\021IDEStatusResponse\022\n\n\002ok\030\001 " + + "\001(\010\022<\n\007desktop\030\002 \001(\0132+.supervisor.IDESta" + + "tusResponse.DesktopStatus\032L\n\rDesktopStat" + + "us\022\014\n\004link\030\001 \001(\t\022\r\n\005label\030\002 \001(\t\022\020\n\010clien" + + "tID\030\003 \001(\t\022\014\n\004kind\030\004 \001(\t\"$\n\024ContentStatus" + + "Request\022\014\n\004wait\030\001 \001(\010\"U\n\025ContentStatusRe" + + "sponse\022\021\n\tavailable\030\001 \001(\010\022)\n\006source\030\002 \001(" + + "\0162\031.supervisor.ContentSource\"\025\n\023BackupSt" + + "atusRequest\"0\n\024BackupStatusResponse\022\030\n\020c" + + "anary_available\030\001 \001(\010\"%\n\022PortsStatusRequ" + + "est\022\017\n\007observe\030\001 \001(\010\"=\n\023PortsStatusRespo" + + "nse\022&\n\005ports\030\001 \003(\0132\027.supervisor.PortsSta" + + "tus\"\203\001\n\017ExposedPortInfo\022.\n\nvisibility\030\001 " + + "\001(\0162\032.supervisor.PortVisibility\022\013\n\003url\030\002" + + " \001(\t\0223\n\non_exposed\030\003 \001(\0162\037.supervisor.On" + + "PortExposedAction\"\304\001\n\020TunneledPortInfo\022\023" + + "\n\013target_port\030\001 \001(\r\022/\n\nvisibility\030\002 \001(\0162" + + "\033.supervisor.TunnelVisiblity\022:\n\007clients\030" + + "\003 \003(\0132).supervisor.TunneledPortInfo.Clie" + + "ntsEntry\032.\n\014ClientsEntry\022\013\n\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\r:\0028\001\"\355\001\n\013PortsStatus\022\022\n\nloca" + + "l_port\030\001 \001(\r\022\016\n\006served\030\004 \001(\010\022,\n\007exposed\030" + + "\005 \001(\0132\033.supervisor.ExposedPortInfo\0223\n\rau" + + "to_exposure\030\007 \001(\0162\034.supervisor.PortAutoE" + + "xposure\022.\n\010tunneled\030\006 \001(\0132\034.supervisor.T" + + "unneledPortInfo\022\023\n\013description\030\010 \001(\t\022\014\n\004" + + "name\030\t \001(\tJ\004\010\002\020\003\"%\n\022TasksStatusRequest\022\017" + + "\n\007observe\030\001 \001(\010\"<\n\023TasksStatusResponse\022%" + + "\n\005tasks\030\001 \003(\0132\026.supervisor.TaskStatus\"\204\001" + + "\n\nTaskStatus\022\n\n\002id\030\001 \001(\t\022$\n\005state\030\002 \001(\0162" + + "\025.supervisor.TaskState\022\020\n\010terminal\030\003 \001(\t" + + "\0222\n\014presentation\030\004 \001(\0132\034.supervisor.Task" + + "Presentation\"D\n\020TaskPresentation\022\014\n\004name" + + "\030\001 \001(\t\022\017\n\007open_in\030\002 \001(\t\022\021\n\topen_mode\030\003 \001" + + "(\t\"\027\n\025ResourcesStatuRequest\"n\n\027Resources" + + "StatusResponse\022*\n\006memory\030\001 \001(\0132\032.supervi" + + "sor.ResourceStatus\022\'\n\003cpu\030\002 \001(\0132\032.superv" + + "isor.ResourceStatus\"-\n\016ResourceStatus\022\014\n" + + "\004used\030\001 \001(\003\022\r\n\005limit\030\002 \001(\003*C\n\rContentSou" + + "rce\022\016\n\nfrom_other\020\000\022\017\n\013from_backup\020\001\022\021\n\r" + + "from_prebuild\020\002*?\n\016PortVisibility\022\026\n\022pri" + + "vate_visibility\020\000\022\025\n\021public_visibility\020\001" + + "*e\n\023OnPortExposedAction\022\n\n\006ignore\020\000\022\020\n\014o" + + "pen_browser\020\001\022\020\n\014open_preview\020\002\022\n\n\006notif" + + "y\020\003\022\022\n\016notify_private\020\004*9\n\020PortAutoExpos" + + "ure\022\n\n\006trying\020\000\022\r\n\tsucceeded\020\001\022\n\n\006failed" + + "\020\002*1\n\tTaskState\022\013\n\007opening\020\000\022\013\n\007running\020" + + "\001\022\n\n\006closed\020\0022\304\007\n\rStatusService\022|\n\020Super" + + "visorStatus\022#.supervisor.SupervisorStatu" + + "sRequest\032$.supervisor.SupervisorStatusRe" + + "sponse\"\035\202\323\344\223\002\027\022\025/v1/status/supervisor\022\203\001" + + "\n\tIDEStatus\022\034.supervisor.IDEStatusReques" + + "t\032\035.supervisor.IDEStatusResponse\"9\202\323\344\223\0023" + + "\022\016/v1/status/ideZ!\022\037/v1/status/ide/wait/" + + "{wait=true}\022\227\001\n\rContentStatus\022 .supervis" + + "or.ContentStatusRequest\032!.supervisor.Con" + + "tentStatusResponse\"A\202\323\344\223\002;\022\022/v1/status/c" + + "ontentZ%\022#/v1/status/content/wait/{wait=" + + "true}\022l\n\014BackupStatus\022\037.supervisor.Backu" + + "pStatusRequest\032 .supervisor.BackupStatus" + + "Response\"\031\202\323\344\223\002\023\022\021/v1/status/backup\022\225\001\n\013" + + "PortsStatus\022\036.supervisor.PortsStatusRequ" + + "est\032\037.supervisor.PortsStatusResponse\"C\202\323" + + "\344\223\002=\022\020/v1/status/portsZ)\022\'/v1/status/por" + + "ts/observe/{observe=true}0\001\022\225\001\n\013TasksSta" + + "tus\022\036.supervisor.TasksStatusRequest\032\037.su" + + "pervisor.TasksStatusResponse\"C\202\323\344\223\002=\022\020/v" + + "1/status/tasksZ)\022\'/v1/status/tasks/obser" + + "ve/{observe=true}0\001\022w\n\017ResourcesStatus\022!" + + ".supervisor.ResourcesStatuRequest\032#.supe" + + "rvisor.ResourcesStatusResponse\"\034\202\323\344\223\002\026\022\024" + + "/v1/status/resourcesBF\n\030io.gitpod.superv" + + "isor.apiZ*github.com/gitpod-io/gitpod/su" + + "pervisor/apib\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + io.gitpod.supervisor.api.Port.getDescriptor(), + }); + internal_static_supervisor_SupervisorStatusRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_supervisor_SupervisorStatusRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_supervisor_SupervisorStatusRequest_descriptor, + new java.lang.String[] { }); + internal_static_supervisor_SupervisorStatusResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_supervisor_SupervisorStatusResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_supervisor_SupervisorStatusResponse_descriptor, + new java.lang.String[] { "Ok", }); + internal_static_supervisor_IDEStatusRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_supervisor_IDEStatusRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_supervisor_IDEStatusRequest_descriptor, + new java.lang.String[] { "Wait", }); + internal_static_supervisor_IDEStatusResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_supervisor_IDEStatusResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_supervisor_IDEStatusResponse_descriptor, + new java.lang.String[] { "Ok", "Desktop", }); + internal_static_supervisor_IDEStatusResponse_DesktopStatus_descriptor = + internal_static_supervisor_IDEStatusResponse_descriptor.getNestedTypes().get(0); + internal_static_supervisor_IDEStatusResponse_DesktopStatus_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_supervisor_IDEStatusResponse_DesktopStatus_descriptor, + new java.lang.String[] { "Link", "Label", "ClientID", "Kind", }); + internal_static_supervisor_ContentStatusRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_supervisor_ContentStatusRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_supervisor_ContentStatusRequest_descriptor, + new java.lang.String[] { "Wait", }); + internal_static_supervisor_ContentStatusResponse_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_supervisor_ContentStatusResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_supervisor_ContentStatusResponse_descriptor, new java.lang.String[] { "Available", "Source", }); internal_static_supervisor_BackupStatusRequest_descriptor = getDescriptor().getMessageTypes().get(6); @@ -14281,6 +16232,24 @@ public io.gitpod.supervisor.api.Status.TaskPresentation getDefaultInstanceForTyp com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_supervisor_TaskPresentation_descriptor, new java.lang.String[] { "Name", "OpenIn", "OpenMode", }); + internal_static_supervisor_ResourcesStatuRequest_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_supervisor_ResourcesStatuRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_supervisor_ResourcesStatuRequest_descriptor, + new java.lang.String[] { }); + internal_static_supervisor_ResourcesStatusResponse_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_supervisor_ResourcesStatusResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_supervisor_ResourcesStatusResponse_descriptor, + new java.lang.String[] { "Memory", "Cpu", }); + internal_static_supervisor_ResourceStatus_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_supervisor_ResourceStatus_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_supervisor_ResourceStatus_descriptor, + new java.lang.String[] { "Used", "Limit", }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.AnnotationsProto.http); diff --git a/components/supervisor-api/java/src/main/java/io/gitpod/supervisor/api/StatusServiceGrpc.java b/components/supervisor-api/java/src/main/java/io/gitpod/supervisor/api/StatusServiceGrpc.java index bd34cc0ae8601d..721c7ab13f2bd6 100644 --- a/components/supervisor-api/java/src/main/java/io/gitpod/supervisor/api/StatusServiceGrpc.java +++ b/components/supervisor-api/java/src/main/java/io/gitpod/supervisor/api/StatusServiceGrpc.java @@ -208,6 +208,37 @@ io.gitpod.supervisor.api.Status.TasksStatusResponse> getTasksStatusMethod() { return getTasksStatusMethod; } + private static volatile io.grpc.MethodDescriptor getResourcesStatusMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ResourcesStatus", + requestType = io.gitpod.supervisor.api.Status.ResourcesStatuRequest.class, + responseType = io.gitpod.supervisor.api.Status.ResourcesStatusResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getResourcesStatusMethod() { + io.grpc.MethodDescriptor getResourcesStatusMethod; + if ((getResourcesStatusMethod = StatusServiceGrpc.getResourcesStatusMethod) == null) { + synchronized (StatusServiceGrpc.class) { + if ((getResourcesStatusMethod = StatusServiceGrpc.getResourcesStatusMethod) == null) { + StatusServiceGrpc.getResourcesStatusMethod = getResourcesStatusMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ResourcesStatus")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.gitpod.supervisor.api.Status.ResourcesStatuRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.gitpod.supervisor.api.Status.ResourcesStatusResponse.getDefaultInstance())) + .setSchemaDescriptor(new StatusServiceMethodDescriptorSupplier("ResourcesStatus")) + .build(); + } + } + } + return getResourcesStatusMethod; + } + /** * Creates a new async stub that supports all call types for the service */ @@ -322,6 +353,16 @@ public void tasksStatus(io.gitpod.supervisor.api.Status.TasksStatusRequest reque io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getTasksStatusMethod(), responseObserver); } + /** + *
+     * ResourcesStatus provides workspace resources status information.
+     * 
+ */ + public void resourcesStatus(io.gitpod.supervisor.api.Status.ResourcesStatuRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getResourcesStatusMethod(), responseObserver); + } + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( @@ -366,6 +407,13 @@ public void tasksStatus(io.gitpod.supervisor.api.Status.TasksStatusRequest reque io.gitpod.supervisor.api.Status.TasksStatusRequest, io.gitpod.supervisor.api.Status.TasksStatusResponse>( this, METHODID_TASKS_STATUS))) + .addMethod( + getResourcesStatusMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.gitpod.supervisor.api.Status.ResourcesStatuRequest, + io.gitpod.supervisor.api.Status.ResourcesStatusResponse>( + this, METHODID_RESOURCES_STATUS))) .build(); } } @@ -455,6 +503,17 @@ public void tasksStatus(io.gitpod.supervisor.api.Status.TasksStatusRequest reque io.grpc.stub.ClientCalls.asyncServerStreamingCall( getChannel().newCall(getTasksStatusMethod(), getCallOptions()), request, responseObserver); } + + /** + *
+     * ResourcesStatus provides workspace resources status information.
+     * 
+ */ + public void resourcesStatus(io.gitpod.supervisor.api.Status.ResourcesStatuRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getResourcesStatusMethod(), getCallOptions()), request, responseObserver); + } } /** @@ -538,6 +597,16 @@ public java.util.Iterator t return io.grpc.stub.ClientCalls.blockingServerStreamingCall( getChannel(), getTasksStatusMethod(), getCallOptions(), request); } + + /** + *
+     * ResourcesStatus provides workspace resources status information.
+     * 
+ */ + public io.gitpod.supervisor.api.Status.ResourcesStatusResponse resourcesStatus(io.gitpod.supervisor.api.Status.ResourcesStatuRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getResourcesStatusMethod(), getCallOptions(), request); + } } /** @@ -603,6 +672,17 @@ public com.google.common.util.concurrent.ListenableFuture + * ResourcesStatus provides workspace resources status information. + * + */ + public com.google.common.util.concurrent.ListenableFuture resourcesStatus( + io.gitpod.supervisor.api.Status.ResourcesStatuRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getResourcesStatusMethod(), getCallOptions()), request); + } } private static final int METHODID_SUPERVISOR_STATUS = 0; @@ -611,6 +691,7 @@ public com.google.common.util.concurrent.ListenableFuture implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -653,6 +734,10 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv serviceImpl.tasksStatus((io.gitpod.supervisor.api.Status.TasksStatusRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_RESOURCES_STATUS: + serviceImpl.resourcesStatus((io.gitpod.supervisor.api.Status.ResourcesStatuRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; default: throw new AssertionError(); } @@ -720,6 +805,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getBackupStatusMethod()) .addMethod(getPortsStatusMethod()) .addMethod(getTasksStatusMethod()) + .addMethod(getResourcesStatusMethod()) .build(); } } diff --git a/components/supervisor-api/status.proto b/components/supervisor-api/status.proto index 5e44c09d1b3ad0..89d95a17488ef5 100644 --- a/components/supervisor-api/status.proto +++ b/components/supervisor-api/status.proto @@ -72,6 +72,13 @@ service StatusService { }; } + // ResourcesStatus provides workspace resources status information. + rpc ResourcesStatus(ResourcesStatuRequest) returns (ResourcesStatusResponse) { + option (google.api.http) = { + get: "/v1/status/resources" + }; + } + } message SupervisorStatusRequest {} @@ -220,3 +227,17 @@ message TaskPresentation { string open_in = 2; string open_mode = 3; } + +message ResourcesStatuRequest { + +} +message ResourcesStatusResponse { + // Used memory and limit in bytes + ResourceStatus memory = 1; + // Used CPU and limit in millicores. + ResourceStatus cpu = 2; +} +message ResourceStatus { + int64 used = 1; + int64 limit = 2; +} diff --git a/components/supervisor/cmd/top.go b/components/supervisor/cmd/top.go new file mode 100644 index 00000000000000..89dc8bab6b8e7a --- /dev/null +++ b/components/supervisor/cmd/top.go @@ -0,0 +1,69 @@ +// Copyright (c) 2022 Gitpod GmbH. All rights reserved. +// Licensed under the GNU Affero General Public License (AGPL). +// See License-AGPL.txt in the project root for license information. + +package cmd + +import ( + "context" + "encoding/json" + "fmt" + "os" + "text/tabwriter" + "time" + + "github.com/spf13/cobra" + + "github.com/gitpod-io/gitpod/common-go/log" + "github.com/gitpod-io/gitpod/supervisor/api" + "github.com/gitpod-io/gitpod/supervisor/pkg/supervisor" +) + +var topOpts struct { + Json bool + Standalone bool +} + +var topCmd = &cobra.Command{ + Use: "top", + Short: "Display resource (CPU/memory) usage of the workspace", + Run: func(cmd *cobra.Command, args []string) { + ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) + defer cancel() + + var ( + status *api.ResourcesStatusResponse + err error + ) + if topOpts.Standalone { + status, err = supervisor.Top(ctx) + } else { + client := api.NewStatusServiceClient(dialSupervisor()) + status, err = client.ResourcesStatus(ctx, &api.ResourcesStatuRequest{}) + } + if err != nil { + log.WithError(err).Fatal("failed to resolve") + } + + if topOpts.Json { + content, _ := json.Marshal(status) + fmt.Println(string(content)) + } else { + tw := tabwriter.NewWriter(os.Stdout, 6, 4, 3, ' ', 0) + defer tw.Flush() + + fmt.Fprintf(tw, "CPU(millicores)\tMEMORY(bytes)\n") + + cpuFraction := int64((float64(status.Cpu.Used) / float64(status.Cpu.Limit)) * 100) + memFraction := int64((float64(status.Memory.Used) / float64(status.Memory.Limit)) * 100) + + fmt.Fprintf(tw, "%dm/%dm (%d%%)\t%dMi/%dMi (%d%%)\n", status.Cpu.Used, status.Cpu.Limit, cpuFraction, status.Memory.Used/(1024*1024), status.Memory.Limit/(1024*1024), memFraction) + } + }, +} + +func init() { + rootCmd.AddCommand(topCmd) + topCmd.Flags().BoolVarP(&topOpts.Json, "json", "j", false, "print like json") + topCmd.Flags().BoolVarP(&topOpts.Standalone, "standalone", "s", false, "standalone mode") +} diff --git a/components/supervisor/go.mod b/components/supervisor/go.mod index e84dcf491130aa..d70c05871199e6 100644 --- a/components/supervisor/go.mod +++ b/components/supervisor/go.mod @@ -52,6 +52,7 @@ require ( cloud.google.com/go/storage v1.22.0 // indirect github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect github.com/beorn7/perks v1.0.1 // indirect + github.com/c9s/goprocinfo v0.0.0-20210130143923-c95fcf8c64a8 github.com/cenkalti/backoff v2.2.1+incompatible // indirect github.com/cespare/xxhash/v2 v2.1.2 // indirect github.com/dustin/go-humanize v1.0.0 // indirect diff --git a/components/supervisor/go.sum b/components/supervisor/go.sum index 3cd4a8adca0464..8d1a2f4f825fed 100644 --- a/components/supervisor/go.sum +++ b/components/supervisor/go.sum @@ -84,6 +84,14 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY= +github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= +github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= +github.com/buger/jsonparser v0.0.0-20180808090653-f4dd9f5a6b44/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= +github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= +github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50= +github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= +github.com/c9s/goprocinfo v0.0.0-20210130143923-c95fcf8c64a8 h1:SjZ2GvvOononHOpK84APFuMvxqsk3tEIaKH/z4Rpu3g= +github.com/c9s/goprocinfo v0.0.0-20210130143923-c95fcf8c64a8/go.mod h1:uEyr4WpAH4hio6LFriaPkL938XnrvLpNPmQHBdrmbIE= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v4 v4.1.2 h1:6Yo7N8UP2K6LWZnW94DLVSSrbobcWdVzAYOisuDPIFo= diff --git a/components/supervisor/pkg/supervisor/services.go b/components/supervisor/pkg/supervisor/services.go index 4ac7b331911501..898614ec012fe0 100644 --- a/components/supervisor/pkg/supervisor/services.go +++ b/components/supervisor/pkg/supervisor/services.go @@ -929,3 +929,8 @@ func (s *portService) RetryAutoExpose(ctx context.Context, req *api.RetryAutoExp s.portsManager.RetryAutoExpose(ctx, req.Port) return &api.RetryAutoExposeResponse{}, nil } + +// ResourcesStatus provides workspace resources status information. +func (s *statusService) ResourcesStatus(ctx context.Context, in *api.ResourcesStatuRequest) (*api.ResourcesStatusResponse, error) { + return Top(ctx) +} diff --git a/components/supervisor/pkg/supervisor/services_test.go b/components/supervisor/pkg/supervisor/services_test.go index 0c589966a29459..0dcf20e0f8e897 100644 --- a/components/supervisor/pkg/supervisor/services_test.go +++ b/components/supervisor/pkg/supervisor/services_test.go @@ -18,6 +18,19 @@ import ( "github.com/gitpod-io/gitpod/supervisor/api" ) +func TestResourcesStatus(t *testing.T) { + memory, err := resolveMemoryStatus() + if err != nil { + t.Fatal(err) + } + t.Log(memory) + cpu, err := resolveCPUStatus() + if err != nil { + t.Fatal(err) + } + t.Log(cpu) +} + func TestInMemoryTokenServiceGetToken(t *testing.T) { type Expectation struct { Resp *api.GetTokenResponse diff --git a/components/supervisor/pkg/supervisor/top.go b/components/supervisor/pkg/supervisor/top.go new file mode 100644 index 00000000000000..f87bc3464b48d7 --- /dev/null +++ b/components/supervisor/pkg/supervisor/top.go @@ -0,0 +1,173 @@ +// Copyright (c) 2022 Gitpod GmbH. All rights reserved. +// Licensed under the GNU Affero General Public License (AGPL). +// See License-AGPL.txt in the project root for license information. + +package supervisor + +import ( + "context" + "io/ioutil" + "strconv" + "strings" + "time" + + "golang.org/x/xerrors" + + linuxproc "github.com/c9s/goprocinfo/linux" + "github.com/gitpod-io/gitpod/supervisor/api" +) + +// Top provides workspace resources status information. +func Top(ctx context.Context) (*api.ResourcesStatusResponse, error) { + memory, err := resolveMemoryStatus() + if err != nil { + return nil, err + } + cpu, err := resolveCPUStatus() + if err != nil { + return nil, err + } + return &api.ResourcesStatusResponse{ + Memory: memory, + Cpu: cpu, + }, nil +} + +func resolveMemoryStatus() (*api.ResourceStatus, error) { + content, err := ioutil.ReadFile("/sys/fs/cgroup/memory/memory.limit_in_bytes") + if err != nil { + return nil, xerrors.Errorf("failed to read memory.limit_in_bytes: %w", err) + } + limit, err := strconv.Atoi(strings.TrimSpace(string(content))) + if err != nil { + return nil, xerrors.Errorf("failed to parse memory.limit_in_bytes: %w", err) + } + memInfo, err := linuxproc.ReadMemInfo("/proc/meminfo") + if err != nil { + return nil, xerrors.Errorf("failed to read meminfo: %w", err) + } + memTotal := int(memInfo.MemTotal) * 1024 + if limit > memTotal && memTotal > 0 { + limit = memTotal + } + + content, err = ioutil.ReadFile("/sys/fs/cgroup/memory/memory.usage_in_bytes") + if err != nil { + return nil, xerrors.Errorf("failed to read memory.usage_in_bytes: %w", err) + } + used, err := strconv.Atoi(strings.TrimSpace(string(content))) + if err != nil { + return nil, xerrors.Errorf("failed to parse memory.usage_in_bytes: %w", err) + } + + content, err = ioutil.ReadFile("/sys/fs/cgroup/memory/memory.stat") + if err != nil { + return nil, xerrors.Errorf("failed to read memory.stat: %w", err) + } + statLines := strings.Split(strings.TrimSpace(string(content)), "\n") + stat := make(map[string]string, len(statLines)) + for _, line := range statLines { + tokens := strings.Split(line, " ") + stat[tokens[0]] = tokens[1] + } + // substract evictable memory + value, ok := stat["total_inactive_file"] + if ok { + totalInactiveFile, err := strconv.Atoi(value) + if err != nil { + return nil, xerrors.Errorf("failed to parse total_inactive_file: %w", err) + } + if used < totalInactiveFile { + used = 0 + } else { + used -= totalInactiveFile + } + } + return &api.ResourceStatus{ + Limit: int64(limit), + Used: int64(used), + }, nil +} + +func resolveCPUStatus() (*api.ResourceStatus, error) { + t, err := resolveCPUStat() + if err != nil { + return nil, err + } + + time.Sleep(time.Second) + + t2, err := resolveCPUStat() + if err != nil { + return nil, err + } + + cpuUsage := t2.usage - t.usage + totalTime := t2.uptime - t.uptime + used := cpuUsage / totalTime * 1000 + + content, err := ioutil.ReadFile("/sys/fs/cgroup/cpu/cpu.cfs_quota_us") + if err != nil { + return nil, xerrors.Errorf("failed to read cpu.cfs_quota_us: %w", err) + } + quota, err := strconv.Atoi(strings.TrimSpace(string(content))) + if err != nil { + return nil, xerrors.Errorf("failed to parse cpu.cfs_quota_us: %w", err) + } + + var limit int + if quota > 0 { + content, err = ioutil.ReadFile("/sys/fs/cgroup/cpu/cpu.cfs_period_us") + if err != nil { + return nil, xerrors.Errorf("failed to read cpu.cfs_period_us: %w", err) + } + period, err := strconv.Atoi(strings.TrimSpace(string(content))) + if err != nil { + return nil, xerrors.Errorf("failed to parse cpu.cfs_period_us: %w", err) + } + + limit = quota / period * 1000 + } else { + content, err = ioutil.ReadFile("/sys/fs/cgroup/cpu/cpuacct.usage_percpu") + if err != nil { + return nil, xerrors.Errorf("failed to read cpuacct.usage_percpu: %w", err) + } + limit = len(strings.Split(strings.TrimSpace(string(content)), " ")) * 1000 + } + + return &api.ResourceStatus{ + Limit: int64(limit), + Used: int64(used), + }, nil +} + +type cpuStat struct { + usage float64 + uptime float64 +} + +func resolveCPUStat() (*cpuStat, error) { + content, err := ioutil.ReadFile("/sys/fs/cgroup/cpu/cpuacct.usage") + if err != nil { + return nil, xerrors.Errorf("failed to read cpuacct.usage: %w", err) + } + usage, err := strconv.ParseFloat(strings.TrimSpace(string(content)), 64) + if err != nil { + return nil, xerrors.Errorf("failed to parse cpuacct.usage: %w", err) + } + // convert from nanoseconds to seconds + usage *= 1e-9 + content, err = ioutil.ReadFile("/proc/uptime") + if err != nil { + return nil, xerrors.Errorf("failed to read uptime: %w", err) + } + values := strings.Split(strings.TrimSpace(string(content)), " ") + uptime, err := strconv.ParseFloat(values[0], 64) + if err != nil { + return nil, xerrors.Errorf("failed to parse uptime: %w", err) + } + return &cpuStat{ + usage: usage, + uptime: uptime, + }, nil +} diff --git a/dev/ide/profile-workspace.js b/dev/ide/profile-workspace.js new file mode 100644 index 00000000000000..20413ecfc7626a --- /dev/null +++ b/dev/ide/profile-workspace.js @@ -0,0 +1,91 @@ +/** + * Run node ./dev/ide/capture-ws-top.js to profile cpu and memory usage of the workspace. + * + */ +//@ts-check + +const { execSync } = require("child_process"); +const { promises } = require("fs"); +const path = require("path"); + +/** + * @param {number[]} arr + * @returns {number} + */ +const q90 = (arr) => { + const sorted = arr.sort((a, b) => a - b); + const pos = (sorted.length - 1) * 0.9; + const base = Math.floor(pos); + const rest = pos - base; + if (sorted[base + 1] !== undefined) { + return sorted[base] + rest * (sorted[base + 1] - sorted[base]); + } else { + return sorted[base]; + } +}; + +(async () => { + let wsPodName; + while (!wsPodName) { + wsPodName = execSync("kubectl get pod -l component=workspace -o=custom-columns=:metadata.name", { + encoding: "utf8", + }).trim(); + await new Promise((r) => setTimeout(r, 1000)); + } + console.log(wsPodName); + + const perfLogPath = path.resolve(__dirname, "perf.log"); + console.log(perfLogPath); + const start = new Date().getTime(); + await promises.writeFile(perfLogPath, wsPodName + "\n", { encoding: "utf8" }); + let measurements = 0; + const cores = []; + const mems = []; + let avgCores = 0; + let maxCores = 0; + let sumCores = 0; + let avgMemory = 0; + let maxMemory = 0; + let sumMemory = 0; + while (true) { + measurements++; + + /** + * @type {{memory: {used: number, limit: number}, cpu: {used: number, limit: number}} | undefined} + */ + let top; + try { + const content = execSync(`kubectl exec -t ${wsPodName} -- /.supervisor/supervisor top -sj`, { + encoding: "utf8", + }).trim(); + const value = JSON.parse(content); + if ("memory" in value && "cpu" in value) { + top = value; + } + } catch (e) { + console.error(e); + } + if (top) { + cores.push(top.cpu.used); + sumCores += top.cpu.used; + avgCores = sumCores / measurements; + maxCores = Math.max(maxCores, top.cpu.used); + + const mem = top.memory.used / (1024 * 1024); + mems.push(mem); + sumMemory += mem; + avgMemory = sumMemory / measurements; + maxMemory = Math.max(maxMemory, mem); + + await promises.appendFile( + perfLogPath, + `${((new Date().getTime() - start) / 1000).toFixed(2)}s, cpu(m) ${top.cpu.used.toFixed( + 2, + )}/${avgCores.toFixed(2)}/${maxCores.toFixed(2)}/${q90(cores).toFixed(2)}, memory(Mi) ${mem.toFixed( + 2, + )}/${avgMemory.toFixed(2)}/${maxMemory.toFixed(2)}/${q90(mems).toFixed(2)}\n`, + ); + } + await new Promise((r) => setTimeout(r, 1000)); + } +})();