From f963ac03c274100861def8b0de0f869828038d40 Mon Sep 17 00:00:00 2001 From: Thomas Schubart Date: Tue, 28 Jun 2022 12:25:13 +0000 Subject: [PATCH 1/3] [manager-api] Introduce endpoint for cluster info --- components/ws-manager-api/core.proto | 18 + components/ws-manager-api/go/core.pb.go | 503 ++++++++++++------ components/ws-manager-api/go/core_grpc.pb.go | 38 ++ components/ws-manager-api/go/mock/mock.go | 35 ++ .../typescript/src/core_grpc_pb.d.ts | 17 + .../typescript/src/core_grpc_pb.js | 34 ++ .../typescript/src/core_pb.d.ts | 62 +++ .../ws-manager-api/typescript/src/core_pb.js | 487 +++++++++++++++++ 8 files changed, 1044 insertions(+), 150 deletions(-) diff --git a/components/ws-manager-api/core.proto b/components/ws-manager-api/core.proto index b1e534dc5bff16..322721ce0b813c 100644 --- a/components/ws-manager-api/core.proto +++ b/components/ws-manager-api/core.proto @@ -46,6 +46,9 @@ service WorkspaceManager { // UpdateSSHKey update ssh keys rpc UpdateSSHKey(UpdateSSHKeyRequest) returns (UpdateSSHKeyResponse) {} + + // describeCluster provides information about the cluster + rpc DescribeCluster(DescribeClusterRequest) returns (DescribeClusterResponse) {} } // MetadataFilter describes conditions for matching a set of workspaces. @@ -648,3 +651,18 @@ message SSHPublicKeys { // keys is the set of ssh public key repeated string keys = 1; } + +// DescribeClusterRequest requests information about the cluster +message DescribeClusterRequest {} + +// DescribeClusterResponse is the answer to a DescribeClusterRequest +message DescribeClusterResponse { + // workspace classes that are supported by the cluster + repeated WorkspaceClass WorkspaceClasses = 1; +} + +// WorkspaceClass describes a workspace class that is supported by the cluster +message WorkspaceClass { + string Id = 1; + string DisplayName = 2; +} diff --git a/components/ws-manager-api/go/core.pb.go b/components/ws-manager-api/go/core.pb.go index c32a4478c10f6a..72afc614cf9dfe 100644 --- a/components/ws-manager-api/go/core.pb.go +++ b/components/ws-manager-api/go/core.pb.go @@ -3060,6 +3060,150 @@ func (x *SSHPublicKeys) GetKeys() []string { return nil } +// DescribeClusterRequest requests information about the cluster +type DescribeClusterRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DescribeClusterRequest) Reset() { + *x = DescribeClusterRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_core_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DescribeClusterRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DescribeClusterRequest) ProtoMessage() {} + +func (x *DescribeClusterRequest) ProtoReflect() protoreflect.Message { + mi := &file_core_proto_msgTypes[41] + 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 DescribeClusterRequest.ProtoReflect.Descriptor instead. +func (*DescribeClusterRequest) Descriptor() ([]byte, []int) { + return file_core_proto_rawDescGZIP(), []int{41} +} + +// DescribeClusterResponse is the answer to a DescribeClusterRequest +type DescribeClusterResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // workspace classes that are supported by the cluster + WorkspaceClasses []*WorkspaceClass `protobuf:"bytes,1,rep,name=WorkspaceClasses,proto3" json:"WorkspaceClasses,omitempty"` +} + +func (x *DescribeClusterResponse) Reset() { + *x = DescribeClusterResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_core_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DescribeClusterResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DescribeClusterResponse) ProtoMessage() {} + +func (x *DescribeClusterResponse) ProtoReflect() protoreflect.Message { + mi := &file_core_proto_msgTypes[42] + 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 DescribeClusterResponse.ProtoReflect.Descriptor instead. +func (*DescribeClusterResponse) Descriptor() ([]byte, []int) { + return file_core_proto_rawDescGZIP(), []int{42} +} + +func (x *DescribeClusterResponse) GetWorkspaceClasses() []*WorkspaceClass { + if x != nil { + return x.WorkspaceClasses + } + return nil +} + +// WorkspaceClass describes a workspace class that is supported by the cluster +type WorkspaceClass struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=Id,proto3" json:"Id,omitempty"` + DisplayName string `protobuf:"bytes,2,opt,name=DisplayName,proto3" json:"DisplayName,omitempty"` +} + +func (x *WorkspaceClass) Reset() { + *x = WorkspaceClass{} + if protoimpl.UnsafeEnabled { + mi := &file_core_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorkspaceClass) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkspaceClass) ProtoMessage() {} + +func (x *WorkspaceClass) ProtoReflect() protoreflect.Message { + mi := &file_core_proto_msgTypes[43] + 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 WorkspaceClass.ProtoReflect.Descriptor instead. +func (*WorkspaceClass) Descriptor() ([]byte, []int) { + return file_core_proto_rawDescGZIP(), []int{43} +} + +func (x *WorkspaceClass) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *WorkspaceClass) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + type EnvironmentVariable_SecretKeyRef struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -3072,7 +3216,7 @@ type EnvironmentVariable_SecretKeyRef struct { func (x *EnvironmentVariable_SecretKeyRef) Reset() { *x = EnvironmentVariable_SecretKeyRef{} if protoimpl.UnsafeEnabled { - mi := &file_core_proto_msgTypes[44] + mi := &file_core_proto_msgTypes[47] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3085,7 +3229,7 @@ func (x *EnvironmentVariable_SecretKeyRef) String() string { func (*EnvironmentVariable_SecretKeyRef) ProtoMessage() {} func (x *EnvironmentVariable_SecretKeyRef) ProtoReflect() protoreflect.Message { - mi := &file_core_proto_msgTypes[44] + mi := &file_core_proto_msgTypes[47] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3468,108 +3612,125 @@ var file_core_proto_rawDesc = []byte{ 0x74, 0x53, 0x70, 0x65, 0x63, 0x52, 0x05, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x22, 0x23, 0x0a, 0x0d, 0x53, 0x53, 0x48, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x65, 0x79, - 0x73, 0x2a, 0x34, 0x0a, 0x13, 0x53, 0x74, 0x6f, 0x70, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x0c, 0x0a, 0x08, 0x4e, 0x4f, 0x52, 0x4d, - 0x41, 0x4c, 0x4c, 0x59, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x49, 0x4d, 0x4d, 0x45, 0x44, 0x49, - 0x41, 0x54, 0x45, 0x4c, 0x59, 0x10, 0x01, 0x2a, 0x3a, 0x0a, 0x0e, 0x41, 0x64, 0x6d, 0x69, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x14, 0x0a, 0x10, 0x41, 0x44, 0x4d, - 0x49, 0x54, 0x5f, 0x4f, 0x57, 0x4e, 0x45, 0x52, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x00, 0x12, - 0x12, 0x0a, 0x0e, 0x41, 0x44, 0x4d, 0x49, 0x54, 0x5f, 0x45, 0x56, 0x45, 0x52, 0x59, 0x4f, 0x4e, - 0x45, 0x10, 0x01, 0x2a, 0x49, 0x0a, 0x0e, 0x50, 0x6f, 0x72, 0x74, 0x56, 0x69, 0x73, 0x69, 0x62, - 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1b, 0x0a, 0x17, 0x50, 0x4f, 0x52, 0x54, 0x5f, 0x56, 0x49, - 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x50, 0x52, 0x49, 0x56, 0x41, 0x54, 0x45, - 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x4f, 0x52, 0x54, 0x5f, 0x56, 0x49, 0x53, 0x49, 0x42, - 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x10, 0x01, 0x2a, 0x38, - 0x0a, 0x16, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6f, 0x6f, 0x6c, 0x12, 0x09, 0x0a, 0x05, 0x46, 0x41, 0x4c, 0x53, - 0x45, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x52, 0x55, 0x45, 0x10, 0x01, 0x12, 0x09, 0x0a, - 0x05, 0x45, 0x4d, 0x50, 0x54, 0x59, 0x10, 0x02, 0x2a, 0x83, 0x01, 0x0a, 0x0e, 0x57, 0x6f, 0x72, - 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x50, 0x68, 0x61, 0x73, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, - 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x45, 0x4e, 0x44, - 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, 0x4e, - 0x47, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x4c, 0x49, 0x5a, - 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, - 0x10, 0x04, 0x12, 0x0f, 0x0a, 0x0b, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x52, 0x55, 0x50, 0x54, 0x45, - 0x44, 0x10, 0x07, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x49, 0x4e, 0x47, 0x10, - 0x05, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x06, 0x2a, 0x85, - 0x01, 0x0a, 0x14, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x46, 0x65, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4f, 0x50, 0x10, - 0x00, 0x12, 0x19, 0x0a, 0x15, 0x46, 0x55, 0x4c, 0x4c, 0x5f, 0x57, 0x4f, 0x52, 0x4b, 0x53, 0x50, - 0x41, 0x43, 0x45, 0x5f, 0x42, 0x41, 0x43, 0x4b, 0x55, 0x50, 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, - 0x46, 0x49, 0x58, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x53, 0x10, - 0x05, 0x12, 0x1b, 0x0a, 0x17, 0x50, 0x45, 0x52, 0x53, 0x49, 0x53, 0x54, 0x45, 0x4e, 0x54, 0x5f, - 0x56, 0x4f, 0x4c, 0x55, 0x4d, 0x45, 0x5f, 0x43, 0x4c, 0x41, 0x49, 0x4d, 0x10, 0x07, 0x22, 0x04, - 0x08, 0x01, 0x10, 0x01, 0x22, 0x04, 0x08, 0x02, 0x10, 0x02, 0x22, 0x04, 0x08, 0x03, 0x10, 0x03, - 0x22, 0x04, 0x08, 0x06, 0x10, 0x06, 0x2a, 0x4b, 0x0a, 0x0d, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x45, 0x47, 0x55, 0x4c, - 0x41, 0x52, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x52, 0x45, 0x42, 0x55, 0x49, 0x4c, 0x44, - 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x50, 0x52, 0x4f, 0x42, 0x45, 0x10, 0x02, 0x12, 0x0e, 0x0a, - 0x0a, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x10, 0x04, 0x22, 0x04, 0x08, - 0x03, 0x10, 0x03, 0x32, 0x93, 0x08, 0x0a, 0x10, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x12, 0x4c, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x57, - 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x1b, 0x2e, 0x77, 0x73, 0x6d, 0x61, - 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x47, - 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4f, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, - 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1c, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, - 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x53, - 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x0d, 0x53, 0x74, 0x6f, 0x70, 0x57, - 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1b, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, - 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x53, 0x74, - 0x6f, 0x70, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x58, 0x0a, 0x11, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, - 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1f, 0x2e, 0x77, 0x73, 0x6d, - 0x61, 0x6e, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x77, 0x73, - 0x6d, 0x61, 0x6e, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x57, 0x6f, 0x72, 0x6b, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x52, 0x0a, 0x0f, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x12, 0x1d, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75, - 0x70, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1e, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, + 0x73, 0x22, 0x18, 0x0a, 0x16, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x5c, 0x0a, 0x17, 0x44, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x10, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x15, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x52, 0x10, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x65, 0x73, 0x22, 0x42, 0x0a, 0x0e, 0x57, 0x6f, 0x72, + 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x49, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x44, + 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x2a, 0x34, 0x0a, + 0x13, 0x53, 0x74, 0x6f, 0x70, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x12, 0x0c, 0x0a, 0x08, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x4c, 0x59, + 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x49, 0x4d, 0x4d, 0x45, 0x44, 0x49, 0x41, 0x54, 0x45, 0x4c, + 0x59, 0x10, 0x01, 0x2a, 0x3a, 0x0a, 0x0e, 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x14, 0x0a, 0x10, 0x41, 0x44, 0x4d, 0x49, 0x54, 0x5f, 0x4f, + 0x57, 0x4e, 0x45, 0x52, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x41, + 0x44, 0x4d, 0x49, 0x54, 0x5f, 0x45, 0x56, 0x45, 0x52, 0x59, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x2a, + 0x49, 0x0a, 0x0e, 0x50, 0x6f, 0x72, 0x74, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x79, 0x12, 0x1b, 0x0a, 0x17, 0x50, 0x4f, 0x52, 0x54, 0x5f, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, + 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x50, 0x52, 0x49, 0x56, 0x41, 0x54, 0x45, 0x10, 0x00, 0x12, 0x1a, + 0x0a, 0x16, 0x50, 0x4f, 0x52, 0x54, 0x5f, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, + 0x59, 0x5f, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x10, 0x01, 0x2a, 0x38, 0x0a, 0x16, 0x57, 0x6f, + 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x42, 0x6f, 0x6f, 0x6c, 0x12, 0x09, 0x0a, 0x05, 0x46, 0x41, 0x4c, 0x53, 0x45, 0x10, 0x00, 0x12, + 0x08, 0x0a, 0x04, 0x54, 0x52, 0x55, 0x45, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x4d, 0x50, + 0x54, 0x59, 0x10, 0x02, 0x2a, 0x83, 0x01, 0x0a, 0x0e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x50, 0x68, 0x61, 0x73, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, + 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, + 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, + 0x10, 0x0a, 0x0c, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x4c, 0x49, 0x5a, 0x49, 0x4e, 0x47, 0x10, + 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x04, 0x12, 0x0f, + 0x0a, 0x0b, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x52, 0x55, 0x50, 0x54, 0x45, 0x44, 0x10, 0x07, 0x12, + 0x0c, 0x0a, 0x08, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x49, 0x4e, 0x47, 0x10, 0x05, 0x12, 0x0b, 0x0a, + 0x07, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x06, 0x2a, 0x85, 0x01, 0x0a, 0x14, 0x57, + 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x46, + 0x6c, 0x61, 0x67, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4f, 0x50, 0x10, 0x00, 0x12, 0x19, 0x0a, + 0x15, 0x46, 0x55, 0x4c, 0x4c, 0x5f, 0x57, 0x4f, 0x52, 0x4b, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, + 0x42, 0x41, 0x43, 0x4b, 0x55, 0x50, 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, 0x46, 0x49, 0x58, 0x45, + 0x44, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x53, 0x10, 0x05, 0x12, 0x1b, 0x0a, + 0x17, 0x50, 0x45, 0x52, 0x53, 0x49, 0x53, 0x54, 0x45, 0x4e, 0x54, 0x5f, 0x56, 0x4f, 0x4c, 0x55, + 0x4d, 0x45, 0x5f, 0x43, 0x4c, 0x41, 0x49, 0x4d, 0x10, 0x07, 0x22, 0x04, 0x08, 0x01, 0x10, 0x01, + 0x22, 0x04, 0x08, 0x02, 0x10, 0x02, 0x22, 0x04, 0x08, 0x03, 0x10, 0x03, 0x22, 0x04, 0x08, 0x06, + 0x10, 0x06, 0x2a, 0x4b, 0x0a, 0x0d, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x45, 0x47, 0x55, 0x4c, 0x41, 0x52, 0x10, 0x00, + 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x52, 0x45, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x10, 0x01, 0x12, 0x09, + 0x0a, 0x05, 0x50, 0x52, 0x4f, 0x42, 0x45, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x4d, 0x41, + 0x47, 0x45, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x10, 0x04, 0x22, 0x04, 0x08, 0x03, 0x10, 0x03, 0x32, + 0xe7, 0x08, 0x0a, 0x10, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x72, 0x12, 0x4c, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x1b, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x47, 0x65, + 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, + 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x4f, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x12, 0x1c, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x53, 0x74, 0x61, + 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, - 0x12, 0x17, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, - 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x77, 0x73, 0x6d, 0x61, - 0x6e, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x43, 0x0a, 0x0a, 0x4d, 0x61, 0x72, 0x6b, 0x41, - 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x18, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x4d, 0x61, - 0x72, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x19, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x41, 0x63, 0x74, 0x69, - 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x0a, - 0x53, 0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x18, 0x2e, 0x77, 0x73, 0x6d, - 0x61, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x53, 0x65, 0x74, - 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x46, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6f, 0x72, 0x74, - 0x12, 0x19, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x50, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x77, 0x73, - 0x6d, 0x61, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6f, 0x72, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x0c, 0x54, 0x61, 0x6b, - 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x1a, 0x2e, 0x77, 0x73, 0x6d, 0x61, - 0x6e, 0x2e, 0x54, 0x61, 0x6b, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x54, 0x61, - 0x6b, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x55, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x41, - 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, - 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, - 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x61, 0x0a, 0x14, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, - 0x68, 0x6f, 0x74, 0x12, 0x22, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x65, + 0x65, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x0d, 0x53, 0x74, 0x6f, 0x70, 0x57, 0x6f, 0x72, 0x6b, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x12, 0x1b, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x53, 0x74, 0x6f, + 0x70, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1c, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x57, 0x6f, + 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x58, 0x0a, 0x11, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x57, 0x6f, 0x72, + 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1f, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x44, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, + 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x52, 0x0a, 0x0f, 0x42, + 0x61, 0x63, 0x6b, 0x75, 0x70, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1d, + 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x57, 0x6f, 0x72, + 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, + 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x57, 0x6f, 0x72, 0x6b, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x42, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x17, 0x2e, 0x77, + 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x53, 0x75, + 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x30, 0x01, 0x12, 0x43, 0x0a, 0x0a, 0x4d, 0x61, 0x72, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, + 0x65, 0x12, 0x18, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x41, 0x63, + 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x77, 0x73, + 0x6d, 0x61, 0x6e, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x0a, 0x53, 0x65, 0x74, 0x54, + 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x18, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x53, + 0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x19, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, + 0x6f, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x46, 0x0a, + 0x0b, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x19, 0x2e, 0x77, + 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6f, 0x72, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, + 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x0c, 0x54, 0x61, 0x6b, 0x65, 0x53, 0x6e, 0x61, + 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x1a, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x54, 0x61, + 0x6b, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1b, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x54, 0x61, 0x6b, 0x65, 0x53, 0x6e, + 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x55, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x41, 0x64, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x61, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, + 0x22, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, 0x6f, + 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x6e, 0x61, 0x70, - 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x49, - 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x53, 0x48, 0x4b, 0x65, 0x79, 0x12, 0x1a, - 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x53, 0x48, - 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x77, 0x73, 0x6d, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x0c, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x53, 0x53, 0x48, 0x4b, 0x65, 0x79, 0x12, 0x1a, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x53, 0x48, 0x4b, 0x65, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x53, 0x48, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x52, 0x0a, 0x0f, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, + 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, + 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x77, 0x73, 0x6d, 0x61, 0x6e, 0x2e, + 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x2c, 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, 0x77, 0x73, 0x2d, 0x6d, 0x61, 0x6e, 0x61, @@ -3589,7 +3750,7 @@ func file_core_proto_rawDescGZIP() []byte { } var file_core_proto_enumTypes = make([]protoimpl.EnumInfo, 7) -var file_core_proto_msgTypes = make([]protoimpl.MessageInfo, 45) +var file_core_proto_msgTypes = make([]protoimpl.MessageInfo, 48) var file_core_proto_goTypes = []interface{}{ (StopWorkspacePolicy)(0), // 0: wsman.StopWorkspacePolicy (AdmissionLevel)(0), // 1: wsman.AdmissionLevel @@ -3639,16 +3800,19 @@ var file_core_proto_goTypes = []interface{}{ (*EnvironmentVariable)(nil), // 45: wsman.EnvironmentVariable (*ExposedPorts)(nil), // 46: wsman.ExposedPorts (*SSHPublicKeys)(nil), // 47: wsman.SSHPublicKeys - nil, // 48: wsman.MetadataFilter.AnnotationsEntry - nil, // 49: wsman.SubscribeResponse.HeaderEntry - nil, // 50: wsman.WorkspaceMetadata.AnnotationsEntry - (*EnvironmentVariable_SecretKeyRef)(nil), // 51: wsman.EnvironmentVariable.SecretKeyRef - (*api.GitStatus)(nil), // 52: contentservice.GitStatus - (*timestamppb.Timestamp)(nil), // 53: google.protobuf.Timestamp - (*api.WorkspaceInitializer)(nil), // 54: contentservice.WorkspaceInitializer + (*DescribeClusterRequest)(nil), // 48: wsman.DescribeClusterRequest + (*DescribeClusterResponse)(nil), // 49: wsman.DescribeClusterResponse + (*WorkspaceClass)(nil), // 50: wsman.WorkspaceClass + nil, // 51: wsman.MetadataFilter.AnnotationsEntry + nil, // 52: wsman.SubscribeResponse.HeaderEntry + nil, // 53: wsman.WorkspaceMetadata.AnnotationsEntry + (*EnvironmentVariable_SecretKeyRef)(nil), // 54: wsman.EnvironmentVariable.SecretKeyRef + (*api.GitStatus)(nil), // 55: contentservice.GitStatus + (*timestamppb.Timestamp)(nil), // 56: google.protobuf.Timestamp + (*api.WorkspaceInitializer)(nil), // 57: contentservice.WorkspaceInitializer } var file_core_proto_depIdxs = []int32{ - 48, // 0: wsman.MetadataFilter.annotations:type_name -> wsman.MetadataFilter.AnnotationsEntry + 51, // 0: wsman.MetadataFilter.annotations:type_name -> wsman.MetadataFilter.AnnotationsEntry 7, // 1: wsman.GetWorkspacesRequest.must_match:type_name -> wsman.MetadataFilter 34, // 2: wsman.GetWorkspacesResponse.status:type_name -> wsman.WorkspaceStatus 40, // 3: wsman.StartWorkspaceRequest.metadata:type_name -> wsman.WorkspaceMetadata @@ -3658,14 +3822,14 @@ var file_core_proto_depIdxs = []int32{ 34, // 7: wsman.DescribeWorkspaceResponse.status:type_name -> wsman.WorkspaceStatus 7, // 8: wsman.SubscribeRequest.must_match:type_name -> wsman.MetadataFilter 34, // 9: wsman.SubscribeResponse.status:type_name -> wsman.WorkspaceStatus - 49, // 10: wsman.SubscribeResponse.header:type_name -> wsman.SubscribeResponse.HeaderEntry + 52, // 10: wsman.SubscribeResponse.header:type_name -> wsman.SubscribeResponse.HeaderEntry 37, // 11: wsman.ControlPortRequest.spec:type_name -> wsman.PortSpec 1, // 12: wsman.ControlAdmissionRequest.level:type_name -> wsman.AdmissionLevel 40, // 13: wsman.WorkspaceStatus.metadata:type_name -> wsman.WorkspaceMetadata 36, // 14: wsman.WorkspaceStatus.spec:type_name -> wsman.WorkspaceSpec 4, // 15: wsman.WorkspaceStatus.phase:type_name -> wsman.WorkspacePhase 39, // 16: wsman.WorkspaceStatus.conditions:type_name -> wsman.WorkspaceConditions - 52, // 17: wsman.WorkspaceStatus.repo:type_name -> contentservice.GitStatus + 55, // 17: wsman.WorkspaceStatus.repo:type_name -> contentservice.GitStatus 41, // 18: wsman.WorkspaceStatus.runtime:type_name -> wsman.WorkspaceRuntimeInfo 42, // 19: wsman.WorkspaceStatus.auth:type_name -> wsman.WorkspaceAuthentication 37, // 20: wsman.WorkspaceSpec.exposed_ports:type_name -> wsman.PortSpec @@ -3676,53 +3840,56 @@ var file_core_proto_depIdxs = []int32{ 3, // 25: wsman.WorkspaceConditions.final_backup_complete:type_name -> wsman.WorkspaceConditionBool 3, // 26: wsman.WorkspaceConditions.deployed:type_name -> wsman.WorkspaceConditionBool 3, // 27: wsman.WorkspaceConditions.network_not_ready:type_name -> wsman.WorkspaceConditionBool - 53, // 28: wsman.WorkspaceConditions.first_user_activity:type_name -> google.protobuf.Timestamp + 56, // 28: wsman.WorkspaceConditions.first_user_activity:type_name -> google.protobuf.Timestamp 3, // 29: wsman.WorkspaceConditions.stopped_by_request:type_name -> wsman.WorkspaceConditionBool 38, // 30: wsman.WorkspaceConditions.volume_snapshot:type_name -> wsman.VolumeSnapshotInfo - 53, // 31: wsman.WorkspaceMetadata.started_at:type_name -> google.protobuf.Timestamp - 50, // 32: wsman.WorkspaceMetadata.annotations:type_name -> wsman.WorkspaceMetadata.AnnotationsEntry + 56, // 31: wsman.WorkspaceMetadata.started_at:type_name -> google.protobuf.Timestamp + 53, // 32: wsman.WorkspaceMetadata.annotations:type_name -> wsman.WorkspaceMetadata.AnnotationsEntry 1, // 33: wsman.WorkspaceAuthentication.admission:type_name -> wsman.AdmissionLevel 5, // 34: wsman.StartWorkspaceSpec.feature_flags:type_name -> wsman.WorkspaceFeatureFlag - 54, // 35: wsman.StartWorkspaceSpec.initializer:type_name -> contentservice.WorkspaceInitializer + 57, // 35: wsman.StartWorkspaceSpec.initializer:type_name -> contentservice.WorkspaceInitializer 37, // 36: wsman.StartWorkspaceSpec.ports:type_name -> wsman.PortSpec 45, // 37: wsman.StartWorkspaceSpec.envvars:type_name -> wsman.EnvironmentVariable 44, // 38: wsman.StartWorkspaceSpec.git:type_name -> wsman.GitSpec 1, // 39: wsman.StartWorkspaceSpec.admission:type_name -> wsman.AdmissionLevel 35, // 40: wsman.StartWorkspaceSpec.ide_image:type_name -> wsman.IDEImage 38, // 41: wsman.StartWorkspaceSpec.volume_snapshot:type_name -> wsman.VolumeSnapshotInfo - 51, // 42: wsman.EnvironmentVariable.secret:type_name -> wsman.EnvironmentVariable.SecretKeyRef + 54, // 42: wsman.EnvironmentVariable.secret:type_name -> wsman.EnvironmentVariable.SecretKeyRef 37, // 43: wsman.ExposedPorts.ports:type_name -> wsman.PortSpec - 8, // 44: wsman.WorkspaceManager.GetWorkspaces:input_type -> wsman.GetWorkspacesRequest - 10, // 45: wsman.WorkspaceManager.StartWorkspace:input_type -> wsman.StartWorkspaceRequest - 12, // 46: wsman.WorkspaceManager.StopWorkspace:input_type -> wsman.StopWorkspaceRequest - 14, // 47: wsman.WorkspaceManager.DescribeWorkspace:input_type -> wsman.DescribeWorkspaceRequest - 30, // 48: wsman.WorkspaceManager.BackupWorkspace:input_type -> wsman.BackupWorkspaceRequest - 16, // 49: wsman.WorkspaceManager.Subscribe:input_type -> wsman.SubscribeRequest - 18, // 50: wsman.WorkspaceManager.MarkActive:input_type -> wsman.MarkActiveRequest - 20, // 51: wsman.WorkspaceManager.SetTimeout:input_type -> wsman.SetTimeoutRequest - 22, // 52: wsman.WorkspaceManager.ControlPort:input_type -> wsman.ControlPortRequest - 24, // 53: wsman.WorkspaceManager.TakeSnapshot:input_type -> wsman.TakeSnapshotRequest - 26, // 54: wsman.WorkspaceManager.ControlAdmission:input_type -> wsman.ControlAdmissionRequest - 28, // 55: wsman.WorkspaceManager.DeleteVolumeSnapshot:input_type -> wsman.DeleteVolumeSnapshotRequest - 32, // 56: wsman.WorkspaceManager.UpdateSSHKey:input_type -> wsman.UpdateSSHKeyRequest - 9, // 57: wsman.WorkspaceManager.GetWorkspaces:output_type -> wsman.GetWorkspacesResponse - 11, // 58: wsman.WorkspaceManager.StartWorkspace:output_type -> wsman.StartWorkspaceResponse - 13, // 59: wsman.WorkspaceManager.StopWorkspace:output_type -> wsman.StopWorkspaceResponse - 15, // 60: wsman.WorkspaceManager.DescribeWorkspace:output_type -> wsman.DescribeWorkspaceResponse - 31, // 61: wsman.WorkspaceManager.BackupWorkspace:output_type -> wsman.BackupWorkspaceResponse - 17, // 62: wsman.WorkspaceManager.Subscribe:output_type -> wsman.SubscribeResponse - 19, // 63: wsman.WorkspaceManager.MarkActive:output_type -> wsman.MarkActiveResponse - 21, // 64: wsman.WorkspaceManager.SetTimeout:output_type -> wsman.SetTimeoutResponse - 23, // 65: wsman.WorkspaceManager.ControlPort:output_type -> wsman.ControlPortResponse - 25, // 66: wsman.WorkspaceManager.TakeSnapshot:output_type -> wsman.TakeSnapshotResponse - 27, // 67: wsman.WorkspaceManager.ControlAdmission:output_type -> wsman.ControlAdmissionResponse - 29, // 68: wsman.WorkspaceManager.DeleteVolumeSnapshot:output_type -> wsman.DeleteVolumeSnapshotResponse - 33, // 69: wsman.WorkspaceManager.UpdateSSHKey:output_type -> wsman.UpdateSSHKeyResponse - 57, // [57:70] is the sub-list for method output_type - 44, // [44:57] is the sub-list for method input_type - 44, // [44:44] is the sub-list for extension type_name - 44, // [44:44] is the sub-list for extension extendee - 0, // [0:44] is the sub-list for field type_name + 50, // 44: wsman.DescribeClusterResponse.WorkspaceClasses:type_name -> wsman.WorkspaceClass + 8, // 45: wsman.WorkspaceManager.GetWorkspaces:input_type -> wsman.GetWorkspacesRequest + 10, // 46: wsman.WorkspaceManager.StartWorkspace:input_type -> wsman.StartWorkspaceRequest + 12, // 47: wsman.WorkspaceManager.StopWorkspace:input_type -> wsman.StopWorkspaceRequest + 14, // 48: wsman.WorkspaceManager.DescribeWorkspace:input_type -> wsman.DescribeWorkspaceRequest + 30, // 49: wsman.WorkspaceManager.BackupWorkspace:input_type -> wsman.BackupWorkspaceRequest + 16, // 50: wsman.WorkspaceManager.Subscribe:input_type -> wsman.SubscribeRequest + 18, // 51: wsman.WorkspaceManager.MarkActive:input_type -> wsman.MarkActiveRequest + 20, // 52: wsman.WorkspaceManager.SetTimeout:input_type -> wsman.SetTimeoutRequest + 22, // 53: wsman.WorkspaceManager.ControlPort:input_type -> wsman.ControlPortRequest + 24, // 54: wsman.WorkspaceManager.TakeSnapshot:input_type -> wsman.TakeSnapshotRequest + 26, // 55: wsman.WorkspaceManager.ControlAdmission:input_type -> wsman.ControlAdmissionRequest + 28, // 56: wsman.WorkspaceManager.DeleteVolumeSnapshot:input_type -> wsman.DeleteVolumeSnapshotRequest + 32, // 57: wsman.WorkspaceManager.UpdateSSHKey:input_type -> wsman.UpdateSSHKeyRequest + 48, // 58: wsman.WorkspaceManager.DescribeCluster:input_type -> wsman.DescribeClusterRequest + 9, // 59: wsman.WorkspaceManager.GetWorkspaces:output_type -> wsman.GetWorkspacesResponse + 11, // 60: wsman.WorkspaceManager.StartWorkspace:output_type -> wsman.StartWorkspaceResponse + 13, // 61: wsman.WorkspaceManager.StopWorkspace:output_type -> wsman.StopWorkspaceResponse + 15, // 62: wsman.WorkspaceManager.DescribeWorkspace:output_type -> wsman.DescribeWorkspaceResponse + 31, // 63: wsman.WorkspaceManager.BackupWorkspace:output_type -> wsman.BackupWorkspaceResponse + 17, // 64: wsman.WorkspaceManager.Subscribe:output_type -> wsman.SubscribeResponse + 19, // 65: wsman.WorkspaceManager.MarkActive:output_type -> wsman.MarkActiveResponse + 21, // 66: wsman.WorkspaceManager.SetTimeout:output_type -> wsman.SetTimeoutResponse + 23, // 67: wsman.WorkspaceManager.ControlPort:output_type -> wsman.ControlPortResponse + 25, // 68: wsman.WorkspaceManager.TakeSnapshot:output_type -> wsman.TakeSnapshotResponse + 27, // 69: wsman.WorkspaceManager.ControlAdmission:output_type -> wsman.ControlAdmissionResponse + 29, // 70: wsman.WorkspaceManager.DeleteVolumeSnapshot:output_type -> wsman.DeleteVolumeSnapshotResponse + 33, // 71: wsman.WorkspaceManager.UpdateSSHKey:output_type -> wsman.UpdateSSHKeyResponse + 49, // 72: wsman.WorkspaceManager.DescribeCluster:output_type -> wsman.DescribeClusterResponse + 59, // [59:73] is the sub-list for method output_type + 45, // [45:59] is the sub-list for method input_type + 45, // [45:45] is the sub-list for extension type_name + 45, // [45:45] is the sub-list for extension extendee + 0, // [0:45] is the sub-list for field type_name } func init() { file_core_proto_init() } @@ -4223,7 +4390,43 @@ func file_core_proto_init() { return nil } } - file_core_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { + file_core_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DescribeClusterRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_core_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DescribeClusterResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_core_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorkspaceClass); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_core_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EnvironmentVariable_SecretKeyRef); i { case 0: return &v.state @@ -4243,7 +4446,7 @@ func file_core_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_core_proto_rawDesc, NumEnums: 7, - NumMessages: 45, + NumMessages: 48, NumExtensions: 0, NumServices: 1, }, diff --git a/components/ws-manager-api/go/core_grpc.pb.go b/components/ws-manager-api/go/core_grpc.pb.go index 77740f22b9406c..e04c804fec0692 100644 --- a/components/ws-manager-api/go/core_grpc.pb.go +++ b/components/ws-manager-api/go/core_grpc.pb.go @@ -52,6 +52,8 @@ type WorkspaceManagerClient interface { DeleteVolumeSnapshot(ctx context.Context, in *DeleteVolumeSnapshotRequest, opts ...grpc.CallOption) (*DeleteVolumeSnapshotResponse, error) // UpdateSSHKey update ssh keys UpdateSSHKey(ctx context.Context, in *UpdateSSHKeyRequest, opts ...grpc.CallOption) (*UpdateSSHKeyResponse, error) + // describeCluster provides information about the cluster + DescribeCluster(ctx context.Context, in *DescribeClusterRequest, opts ...grpc.CallOption) (*DescribeClusterResponse, error) } type workspaceManagerClient struct { @@ -202,6 +204,15 @@ func (c *workspaceManagerClient) UpdateSSHKey(ctx context.Context, in *UpdateSSH return out, nil } +func (c *workspaceManagerClient) DescribeCluster(ctx context.Context, in *DescribeClusterRequest, opts ...grpc.CallOption) (*DescribeClusterResponse, error) { + out := new(DescribeClusterResponse) + err := c.cc.Invoke(ctx, "/wsman.WorkspaceManager/DescribeCluster", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // WorkspaceManagerServer is the server API for WorkspaceManager service. // All implementations must embed UnimplementedWorkspaceManagerServer // for forward compatibility @@ -232,6 +243,8 @@ type WorkspaceManagerServer interface { DeleteVolumeSnapshot(context.Context, *DeleteVolumeSnapshotRequest) (*DeleteVolumeSnapshotResponse, error) // UpdateSSHKey update ssh keys UpdateSSHKey(context.Context, *UpdateSSHKeyRequest) (*UpdateSSHKeyResponse, error) + // describeCluster provides information about the cluster + DescribeCluster(context.Context, *DescribeClusterRequest) (*DescribeClusterResponse, error) mustEmbedUnimplementedWorkspaceManagerServer() } @@ -278,6 +291,9 @@ func (UnimplementedWorkspaceManagerServer) DeleteVolumeSnapshot(context.Context, func (UnimplementedWorkspaceManagerServer) UpdateSSHKey(context.Context, *UpdateSSHKeyRequest) (*UpdateSSHKeyResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateSSHKey not implemented") } +func (UnimplementedWorkspaceManagerServer) DescribeCluster(context.Context, *DescribeClusterRequest) (*DescribeClusterResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DescribeCluster not implemented") +} func (UnimplementedWorkspaceManagerServer) mustEmbedUnimplementedWorkspaceManagerServer() {} // UnsafeWorkspaceManagerServer may be embedded to opt out of forward compatibility for this service. @@ -528,6 +544,24 @@ func _WorkspaceManager_UpdateSSHKey_Handler(srv interface{}, ctx context.Context return interceptor(ctx, in, info, handler) } +func _WorkspaceManager_DescribeCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DescribeClusterRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkspaceManagerServer).DescribeCluster(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/wsman.WorkspaceManager/DescribeCluster", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkspaceManagerServer).DescribeCluster(ctx, req.(*DescribeClusterRequest)) + } + return interceptor(ctx, in, info, handler) +} + // WorkspaceManager_ServiceDesc is the grpc.ServiceDesc for WorkspaceManager service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -583,6 +617,10 @@ var WorkspaceManager_ServiceDesc = grpc.ServiceDesc{ MethodName: "UpdateSSHKey", Handler: _WorkspaceManager_UpdateSSHKey_Handler, }, + { + MethodName: "DescribeCluster", + Handler: _WorkspaceManager_DescribeCluster_Handler, + }, }, Streams: []grpc.StreamDesc{ { diff --git a/components/ws-manager-api/go/mock/mock.go b/components/ws-manager-api/go/mock/mock.go index 49f03fdc77b6bc..338339efaf9fc5 100644 --- a/components/ws-manager-api/go/mock/mock.go +++ b/components/ws-manager-api/go/mock/mock.go @@ -220,6 +220,21 @@ func (mr *MockWorkspaceManagerServerMockRecorder) DeleteVolumeSnapshot(arg0, arg return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteVolumeSnapshot", reflect.TypeOf((*MockWorkspaceManagerServer)(nil).DeleteVolumeSnapshot), arg0, arg1) } +// DescribeCluster mocks base method. +func (m *MockWorkspaceManagerServer) DescribeCluster(arg0 context.Context, arg1 *api.DescribeClusterRequest) (*api.DescribeClusterResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribeCluster", arg0, arg1) + ret0, _ := ret[0].(*api.DescribeClusterResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DescribeCluster indicates an expected call of DescribeCluster. +func (mr *MockWorkspaceManagerServerMockRecorder) DescribeCluster(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeCluster", reflect.TypeOf((*MockWorkspaceManagerServer)(nil).DescribeCluster), arg0, arg1) +} + // DescribeWorkspace mocks base method. func (m *MockWorkspaceManagerServer) DescribeWorkspace(arg0 context.Context, arg1 *api.DescribeWorkspaceRequest) (*api.DescribeWorkspaceResponse, error) { m.ctrl.T.Helper() @@ -592,6 +607,26 @@ func (mr *MockWorkspaceManagerClientMockRecorder) DeleteVolumeSnapshot(arg0, arg return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteVolumeSnapshot", reflect.TypeOf((*MockWorkspaceManagerClient)(nil).DeleteVolumeSnapshot), varargs...) } +// DescribeCluster mocks base method. +func (m *MockWorkspaceManagerClient) DescribeCluster(arg0 context.Context, arg1 *api.DescribeClusterRequest, arg2 ...grpc.CallOption) (*api.DescribeClusterResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DescribeCluster", varargs...) + ret0, _ := ret[0].(*api.DescribeClusterResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DescribeCluster indicates an expected call of DescribeCluster. +func (mr *MockWorkspaceManagerClientMockRecorder) DescribeCluster(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeCluster", reflect.TypeOf((*MockWorkspaceManagerClient)(nil).DescribeCluster), varargs...) +} + // DescribeWorkspace mocks base method. func (m *MockWorkspaceManagerClient) DescribeWorkspace(arg0 context.Context, arg1 *api.DescribeWorkspaceRequest, arg2 ...grpc.CallOption) (*api.DescribeWorkspaceResponse, error) { m.ctrl.T.Helper() diff --git a/components/ws-manager-api/typescript/src/core_grpc_pb.d.ts b/components/ws-manager-api/typescript/src/core_grpc_pb.d.ts index 0c7ea9575175fd..0be0cb62460625 100644 --- a/components/ws-manager-api/typescript/src/core_grpc_pb.d.ts +++ b/components/ws-manager-api/typescript/src/core_grpc_pb.d.ts @@ -29,6 +29,7 @@ interface IWorkspaceManagerService extends grpc.ServiceDefinition { @@ -148,6 +149,15 @@ interface IWorkspaceManagerService_IUpdateSSHKey extends grpc.MethodDefinition; responseDeserialize: grpc.deserialize; } +interface IWorkspaceManagerService_IDescribeCluster extends grpc.MethodDefinition { + path: "/wsman.WorkspaceManager/DescribeCluster"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} export const WorkspaceManagerService: IWorkspaceManagerService; @@ -165,6 +175,7 @@ export interface IWorkspaceManagerServer extends grpc.UntypedServiceImplementati controlAdmission: grpc.handleUnaryCall; deleteVolumeSnapshot: grpc.handleUnaryCall; updateSSHKey: grpc.handleUnaryCall; + describeCluster: grpc.handleUnaryCall; } export interface IWorkspaceManagerClient { @@ -206,6 +217,9 @@ export interface IWorkspaceManagerClient { updateSSHKey(request: core_pb.UpdateSSHKeyRequest, callback: (error: grpc.ServiceError | null, response: core_pb.UpdateSSHKeyResponse) => void): grpc.ClientUnaryCall; updateSSHKey(request: core_pb.UpdateSSHKeyRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: core_pb.UpdateSSHKeyResponse) => void): grpc.ClientUnaryCall; updateSSHKey(request: core_pb.UpdateSSHKeyRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: core_pb.UpdateSSHKeyResponse) => void): grpc.ClientUnaryCall; + describeCluster(request: core_pb.DescribeClusterRequest, callback: (error: grpc.ServiceError | null, response: core_pb.DescribeClusterResponse) => void): grpc.ClientUnaryCall; + describeCluster(request: core_pb.DescribeClusterRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: core_pb.DescribeClusterResponse) => void): grpc.ClientUnaryCall; + describeCluster(request: core_pb.DescribeClusterRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: core_pb.DescribeClusterResponse) => void): grpc.ClientUnaryCall; } export class WorkspaceManagerClient extends grpc.Client implements IWorkspaceManagerClient { @@ -248,4 +262,7 @@ export class WorkspaceManagerClient extends grpc.Client implements IWorkspaceMan public updateSSHKey(request: core_pb.UpdateSSHKeyRequest, callback: (error: grpc.ServiceError | null, response: core_pb.UpdateSSHKeyResponse) => void): grpc.ClientUnaryCall; public updateSSHKey(request: core_pb.UpdateSSHKeyRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: core_pb.UpdateSSHKeyResponse) => void): grpc.ClientUnaryCall; public updateSSHKey(request: core_pb.UpdateSSHKeyRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: core_pb.UpdateSSHKeyResponse) => void): grpc.ClientUnaryCall; + public describeCluster(request: core_pb.DescribeClusterRequest, callback: (error: grpc.ServiceError | null, response: core_pb.DescribeClusterResponse) => void): grpc.ClientUnaryCall; + public describeCluster(request: core_pb.DescribeClusterRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: core_pb.DescribeClusterResponse) => void): grpc.ClientUnaryCall; + public describeCluster(request: core_pb.DescribeClusterRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: core_pb.DescribeClusterResponse) => void): grpc.ClientUnaryCall; } diff --git a/components/ws-manager-api/typescript/src/core_grpc_pb.js b/components/ws-manager-api/typescript/src/core_grpc_pb.js index 10de4976432844..43f88ea232f339 100644 --- a/components/ws-manager-api/typescript/src/core_grpc_pb.js +++ b/components/ws-manager-api/typescript/src/core_grpc_pb.js @@ -100,6 +100,28 @@ function deserialize_wsman_DeleteVolumeSnapshotResponse(buffer_arg) { return core_pb.DeleteVolumeSnapshotResponse.deserializeBinary(new Uint8Array(buffer_arg)); } +function serialize_wsman_DescribeClusterRequest(arg) { + if (!(arg instanceof core_pb.DescribeClusterRequest)) { + throw new Error('Expected argument of type wsman.DescribeClusterRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_wsman_DescribeClusterRequest(buffer_arg) { + return core_pb.DescribeClusterRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_wsman_DescribeClusterResponse(arg) { + if (!(arg instanceof core_pb.DescribeClusterResponse)) { + throw new Error('Expected argument of type wsman.DescribeClusterResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_wsman_DescribeClusterResponse(buffer_arg) { + return core_pb.DescribeClusterResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + function serialize_wsman_DescribeWorkspaceRequest(arg) { if (!(arg instanceof core_pb.DescribeWorkspaceRequest)) { throw new Error('Expected argument of type wsman.DescribeWorkspaceRequest'); @@ -456,6 +478,18 @@ updateSSHKey: { responseSerialize: serialize_wsman_UpdateSSHKeyResponse, responseDeserialize: deserialize_wsman_UpdateSSHKeyResponse, }, + // describeCluster provides information about the cluster +describeCluster: { + path: '/wsman.WorkspaceManager/DescribeCluster', + requestStream: false, + responseStream: false, + requestType: core_pb.DescribeClusterRequest, + responseType: core_pb.DescribeClusterResponse, + requestSerialize: serialize_wsman_DescribeClusterRequest, + requestDeserialize: deserialize_wsman_DescribeClusterRequest, + responseSerialize: serialize_wsman_DescribeClusterResponse, + responseDeserialize: deserialize_wsman_DescribeClusterResponse, + }, }; exports.WorkspaceManagerClient = grpc.makeGenericClientConstructor(WorkspaceManagerService); diff --git a/components/ws-manager-api/typescript/src/core_pb.d.ts b/components/ws-manager-api/typescript/src/core_pb.d.ts index 342385e3a21b7f..36d0429532b39d 100644 --- a/components/ws-manager-api/typescript/src/core_pb.d.ts +++ b/components/ws-manager-api/typescript/src/core_pb.d.ts @@ -1162,6 +1162,68 @@ export namespace SSHPublicKeys { } } +export class DescribeClusterRequest extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DescribeClusterRequest.AsObject; + static toObject(includeInstance: boolean, msg: DescribeClusterRequest): DescribeClusterRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DescribeClusterRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DescribeClusterRequest; + static deserializeBinaryFromReader(message: DescribeClusterRequest, reader: jspb.BinaryReader): DescribeClusterRequest; +} + +export namespace DescribeClusterRequest { + export type AsObject = { + } +} + +export class DescribeClusterResponse extends jspb.Message { + clearWorkspaceclassesList(): void; + getWorkspaceclassesList(): Array; + setWorkspaceclassesList(value: Array): DescribeClusterResponse; + addWorkspaceclasses(value?: WorkspaceClass, index?: number): WorkspaceClass; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DescribeClusterResponse.AsObject; + static toObject(includeInstance: boolean, msg: DescribeClusterResponse): DescribeClusterResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DescribeClusterResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DescribeClusterResponse; + static deserializeBinaryFromReader(message: DescribeClusterResponse, reader: jspb.BinaryReader): DescribeClusterResponse; +} + +export namespace DescribeClusterResponse { + export type AsObject = { + workspaceclassesList: Array, + } +} + +export class WorkspaceClass extends jspb.Message { + getId(): string; + setId(value: string): WorkspaceClass; + getDisplayname(): string; + setDisplayname(value: string): WorkspaceClass; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): WorkspaceClass.AsObject; + static toObject(includeInstance: boolean, msg: WorkspaceClass): WorkspaceClass.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: WorkspaceClass, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): WorkspaceClass; + static deserializeBinaryFromReader(message: WorkspaceClass, reader: jspb.BinaryReader): WorkspaceClass; +} + +export namespace WorkspaceClass { + export type AsObject = { + id: string, + displayname: string, + } +} + export enum StopWorkspacePolicy { NORMALLY = 0, IMMEDIATELY = 1, diff --git a/components/ws-manager-api/typescript/src/core_pb.js b/components/ws-manager-api/typescript/src/core_pb.js index 094f32df3e927a..b4eb3605ec262b 100644 --- a/components/ws-manager-api/typescript/src/core_pb.js +++ b/components/ws-manager-api/typescript/src/core_pb.js @@ -34,6 +34,8 @@ goog.exportSymbol('proto.wsman.ControlPortRequest', null, global); goog.exportSymbol('proto.wsman.ControlPortResponse', null, global); goog.exportSymbol('proto.wsman.DeleteVolumeSnapshotRequest', null, global); goog.exportSymbol('proto.wsman.DeleteVolumeSnapshotResponse', null, global); +goog.exportSymbol('proto.wsman.DescribeClusterRequest', null, global); +goog.exportSymbol('proto.wsman.DescribeClusterResponse', null, global); goog.exportSymbol('proto.wsman.DescribeWorkspaceRequest', null, global); goog.exportSymbol('proto.wsman.DescribeWorkspaceResponse', null, global); goog.exportSymbol('proto.wsman.EnvironmentVariable', null, global); @@ -65,6 +67,7 @@ goog.exportSymbol('proto.wsman.UpdateSSHKeyRequest', null, global); goog.exportSymbol('proto.wsman.UpdateSSHKeyResponse', null, global); goog.exportSymbol('proto.wsman.VolumeSnapshotInfo', null, global); goog.exportSymbol('proto.wsman.WorkspaceAuthentication', null, global); +goog.exportSymbol('proto.wsman.WorkspaceClass', null, global); goog.exportSymbol('proto.wsman.WorkspaceConditionBool', null, global); goog.exportSymbol('proto.wsman.WorkspaceConditions', null, global); goog.exportSymbol('proto.wsman.WorkspaceFeatureFlag', null, global); @@ -956,6 +959,69 @@ if (goog.DEBUG && !COMPILED) { */ proto.wsman.SSHPublicKeys.displayName = 'proto.wsman.SSHPublicKeys'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.wsman.DescribeClusterRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.wsman.DescribeClusterRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.wsman.DescribeClusterRequest.displayName = 'proto.wsman.DescribeClusterRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.wsman.DescribeClusterResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.wsman.DescribeClusterResponse.repeatedFields_, null); +}; +goog.inherits(proto.wsman.DescribeClusterResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.wsman.DescribeClusterResponse.displayName = 'proto.wsman.DescribeClusterResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.wsman.WorkspaceClass = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.wsman.WorkspaceClass, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.wsman.WorkspaceClass.displayName = 'proto.wsman.WorkspaceClass'; +} @@ -9264,6 +9330,427 @@ proto.wsman.SSHPublicKeys.prototype.clearKeysList = function() { }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.wsman.DescribeClusterRequest.prototype.toObject = function(opt_includeInstance) { + return proto.wsman.DescribeClusterRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.wsman.DescribeClusterRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.wsman.DescribeClusterRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.wsman.DescribeClusterRequest} + */ +proto.wsman.DescribeClusterRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.wsman.DescribeClusterRequest; + return proto.wsman.DescribeClusterRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.wsman.DescribeClusterRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.wsman.DescribeClusterRequest} + */ +proto.wsman.DescribeClusterRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.wsman.DescribeClusterRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.wsman.DescribeClusterRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.wsman.DescribeClusterRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.wsman.DescribeClusterRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.wsman.DescribeClusterResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.wsman.DescribeClusterResponse.prototype.toObject = function(opt_includeInstance) { + return proto.wsman.DescribeClusterResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.wsman.DescribeClusterResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.wsman.DescribeClusterResponse.toObject = function(includeInstance, msg) { + var f, obj = { + workspaceclassesList: jspb.Message.toObjectList(msg.getWorkspaceclassesList(), + proto.wsman.WorkspaceClass.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.wsman.DescribeClusterResponse} + */ +proto.wsman.DescribeClusterResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.wsman.DescribeClusterResponse; + return proto.wsman.DescribeClusterResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.wsman.DescribeClusterResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.wsman.DescribeClusterResponse} + */ +proto.wsman.DescribeClusterResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.wsman.WorkspaceClass; + reader.readMessage(value,proto.wsman.WorkspaceClass.deserializeBinaryFromReader); + msg.addWorkspaceclasses(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.wsman.DescribeClusterResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.wsman.DescribeClusterResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.wsman.DescribeClusterResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.wsman.DescribeClusterResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getWorkspaceclassesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.wsman.WorkspaceClass.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated WorkspaceClass WorkspaceClasses = 1; + * @return {!Array} + */ +proto.wsman.DescribeClusterResponse.prototype.getWorkspaceclassesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.wsman.WorkspaceClass, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.wsman.DescribeClusterResponse} returns this +*/ +proto.wsman.DescribeClusterResponse.prototype.setWorkspaceclassesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.wsman.WorkspaceClass=} opt_value + * @param {number=} opt_index + * @return {!proto.wsman.WorkspaceClass} + */ +proto.wsman.DescribeClusterResponse.prototype.addWorkspaceclasses = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.wsman.WorkspaceClass, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.wsman.DescribeClusterResponse} returns this + */ +proto.wsman.DescribeClusterResponse.prototype.clearWorkspaceclassesList = function() { + return this.setWorkspaceclassesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.wsman.WorkspaceClass.prototype.toObject = function(opt_includeInstance) { + return proto.wsman.WorkspaceClass.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.wsman.WorkspaceClass} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.wsman.WorkspaceClass.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + displayname: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.wsman.WorkspaceClass} + */ +proto.wsman.WorkspaceClass.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.wsman.WorkspaceClass; + return proto.wsman.WorkspaceClass.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.wsman.WorkspaceClass} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.wsman.WorkspaceClass} + */ +proto.wsman.WorkspaceClass.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDisplayname(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.wsman.WorkspaceClass.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.wsman.WorkspaceClass.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.wsman.WorkspaceClass} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.wsman.WorkspaceClass.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDisplayname(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string Id = 1; + * @return {string} + */ +proto.wsman.WorkspaceClass.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.wsman.WorkspaceClass} returns this + */ +proto.wsman.WorkspaceClass.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string DisplayName = 2; + * @return {string} + */ +proto.wsman.WorkspaceClass.prototype.getDisplayname = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.wsman.WorkspaceClass} returns this + */ +proto.wsman.WorkspaceClass.prototype.setDisplayname = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + /** * @enum {number} */ From f7e8a43e87c639f91d490ad4ea13eb68b45c26b0 Mon Sep 17 00:00:00 2001 From: Thomas Schubart Date: Tue, 28 Jun 2022 14:58:12 +0000 Subject: [PATCH 2/3] [ws-manager] Implement cluster api --- components/ws-manager/pkg/manager/manager.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/components/ws-manager/pkg/manager/manager.go b/components/ws-manager/pkg/manager/manager.go index 39ecd7f17acdb0..6b58ff97fadfcc 100644 --- a/components/ws-manager/pkg/manager/manager.go +++ b/components/ws-manager/pkg/manager/manager.go @@ -1002,6 +1002,26 @@ func (m *Manager) UpdateSSHKey(ctx context.Context, req *api.UpdateSSHKeyRequest return &api.UpdateSSHKeyResponse{}, err } +func (m *Manager) DescribeCluster(ctx context.Context, req *api.DescribeClusterRequest) (*api.DescribeClusterResponse, error) { + span, _ := tracing.FromContext(ctx, "DescribeCluster") + defer tracing.FinishSpan(span, nil) + + classes := make([]*api.WorkspaceClass, len(m.Config.WorkspaceClasses)) + + i := 0 + for id, class := range m.Config.WorkspaceClasses { + classes[i] = &api.WorkspaceClass{ + Id: id, + DisplayName: class.Name, + } + i += 1 + } + + return &api.DescribeClusterResponse{ + WorkspaceClasses: classes, + }, nil +} + // Subscribe streams all status updates to a client func (m *Manager) Subscribe(req *api.SubscribeRequest, srv api.WorkspaceManager_SubscribeServer) (err error) { var sub subscriber = srv From 8de09067b4e657fcc34d430acc41f6019f5159d5 Mon Sep 17 00:00:00 2001 From: Thomas Schubart Date: Tue, 28 Jun 2022 14:58:35 +0000 Subject: [PATCH 3/3] [installer] Add display name to workspace class --- components/ws-manager-api/go/config/config.go | 1 + install/installer/pkg/components/ws-manager/configmap.go | 2 ++ install/installer/pkg/config/v1/experimental/experimental.go | 1 + 3 files changed, 4 insertions(+) diff --git a/components/ws-manager-api/go/config/config.go b/components/ws-manager-api/go/config/config.go index 859b94ba695e53..9ca78a17c6a5c0 100644 --- a/components/ws-manager-api/go/config/config.go +++ b/components/ws-manager-api/go/config/config.go @@ -120,6 +120,7 @@ type Configuration struct { } type WorkspaceClass struct { + Name string `json:"name"` Container ContainerConfiguration `json:"container"` Templates WorkspacePodTemplateConfiguration `json:"templates"` PVC PVCConfiguration `json:"pvc"` diff --git a/install/installer/pkg/components/ws-manager/configmap.go b/install/installer/pkg/components/ws-manager/configmap.go index 7032f50c8da00a..69bcb0c637c1f7 100644 --- a/install/installer/pkg/components/ws-manager/configmap.go +++ b/install/installer/pkg/components/ws-manager/configmap.go @@ -55,6 +55,7 @@ func configmap(ctx *common.RenderContext) ([]runtime.Object, error) { classes := map[string]*config.WorkspaceClass{ config.DefaultWorkspaceClass: { + Name: config.DefaultWorkspaceClass, Container: config.ContainerConfiguration{ Requests: &config.ResourceConfiguration{ CPU: quantityString(ctx.Config.Workspace.Resources.Requests, corev1.ResourceCPU), @@ -90,6 +91,7 @@ func configmap(ctx *common.RenderContext) ([]runtime.Object, error) { return err } classes[k] = &config.WorkspaceClass{ + Name: c.Name, Container: config.ContainerConfiguration{ Requests: &config.ResourceConfiguration{ CPU: quantityString(c.Resources.Requests, corev1.ResourceCPU), diff --git a/install/installer/pkg/config/v1/experimental/experimental.go b/install/installer/pkg/config/v1/experimental/experimental.go index fd33c58aae921f..3358e6dcfe843c 100644 --- a/install/installer/pkg/config/v1/experimental/experimental.go +++ b/install/installer/pkg/config/v1/experimental/experimental.go @@ -79,6 +79,7 @@ type PersistentVolumeClaim struct { } type WorkspaceClass struct { + Name string `json:"name" validate:"required"` Resources struct { Requests corev1.ResourceList `json:"requests" validate:"required"` Limits corev1.ResourceList `json:"limits,omitempty"`