From 2338184cfb34c448d0ca04e1d921818d8a8dbdfa Mon Sep 17 00:00:00 2001 From: Anton Kosyakov Date: Tue, 17 Oct 2023 10:06:25 +0200 Subject: [PATCH] [public-api] add v2 WorkspaceService.getWorkspace (#18930) --- .../gitpod/experimental/v2/workspace.proto | 260 +++ .../v2/v2connect/workspace.connect.go | 99 ++ .../v2/v2connect/workspace.proxy.connect.go | 30 + .../go/experimental/v2/workspace.pb.go | 1479 +++++++++++++++++ .../go/experimental/v2/workspace_grpc.pb.go | 117 ++ components/public-api/typescript/BUILD.yaml | 2 - .../experimental/v2/workspace_connect.ts | 36 + .../gitpod/experimental/v2/workspace_pb.ts | 879 ++++++++++ 8 files changed, 2900 insertions(+), 2 deletions(-) create mode 100644 components/public-api/gitpod/experimental/v2/workspace.proto create mode 100644 components/public-api/go/experimental/v2/v2connect/workspace.connect.go create mode 100644 components/public-api/go/experimental/v2/v2connect/workspace.proxy.connect.go create mode 100644 components/public-api/go/experimental/v2/workspace.pb.go create mode 100644 components/public-api/go/experimental/v2/workspace_grpc.pb.go create mode 100644 components/public-api/typescript/src/gitpod/experimental/v2/workspace_connect.ts create mode 100644 components/public-api/typescript/src/gitpod/experimental/v2/workspace_pb.ts diff --git a/components/public-api/gitpod/experimental/v2/workspace.proto b/components/public-api/gitpod/experimental/v2/workspace.proto new file mode 100644 index 00000000000000..cf9c006b46f90a --- /dev/null +++ b/components/public-api/gitpod/experimental/v2/workspace.proto @@ -0,0 +1,260 @@ +syntax = "proto3"; + +package gitpod.experimental.v2; + +import "google/protobuf/timestamp.proto"; + +option go_package = "github.com/gitpod-io/gitpod/components/public-api/go/experimental/v2"; + +service WorkspaceService { + // GetWorkspace returns a single workspace. + // + // +return NOT_FOUND User does not have access to a workspace with the given + // ID +return NOT_FOUND Workspace does not exist + rpc GetWorkspace(GetWorkspaceRequest) returns (GetWorkspaceResponse) {} +} + +message GetWorkspaceRequest { string id = 1; } + +message GetWorkspaceResponse { Workspace item = 1; } + +// +resource get workspace +message Workspace { + string id = 1; + // prebuild indicates it is a prebuild + // TODO(ak) model prebuilds as a separate resource + bool prebuild = 2; + + string organization_id = 3; + + string name = 4; + bool pinned = 5; + + WorkspaceStatus status = 6; + + // additional_environment_variables provide additional environment variables + // which take precedence over environment variables provided by the project + // and user. + // + // +optional + repeated WorkspaceEnvironmentVariable additional_environment_variables = 7; + + // region specifies the region in which the workspace will be created. + // Obtain available regions using the ListRegions operation. + // + // +optional defaults to the user's default region + optional string region = 8; + + // workspace_class specifies the workspace class with which to create the + // workspace. Obtain available workspace classes using the ListWorkspaceClass + // operation. + // + // +optional defaults to the class configured on the project or the cluster's + // default class. + optional string workspace_class = 9; + + // editor specifies the editor that will be used with this workspace. + // Obtain available editors using the EditorService.ListEditors operation. + // + // +optional defaults to the default editor of the user + optional EditorReference editor = 10; + + // context_url is the normalized URL from which the workspace was created + // TODO(ak) replace with resolveContextURL API + string context_url = 11; + + // Prebuild ID is the unique identifier of the prebuild + // from which this workspace was created + // +optional if empty then this workspace was not created from a prebuild + optional string prebuild_id = 12; +} + +message WorkspaceStatus { + // Phase is a simple, high-level summary of where the workspace is in its + // lifecycle. The phase is not intended to be a comprehensive rollup of + // observations of the workspace state, nor is it intended to be a + // comprehensive state machine. + WorkspacePhase phase = 1; + + // message is an optional human-readable message detailing the current phase + optional string message = 2; + + // workspace_url is the URL of the workspace. Only present when the phase is + // running. + string workspace_url = 3; + + // git_status details the Git working copy status of the workspace. + // Note: this is a best-effort field and more often than not will not be + // present. Its absence does not indicate the absence of a working copy. + WorkspaceGitStatus git_status = 4; + + // ports lists the network ports currently available/known of this workspace + repeated WorkspacePort ports = 5; + + // Admission describes who can access a workspace instance and its ports. + AdmissionLevel admission = 6; + + // Instance ID is the unique identifier of the workspace instance + string instance_id = 7; + + // Conditions contains observations of the workspace's current phase. + WorkspaceConditions conditions = 8; +} + +message WorkspaceConditions { + // failed contains technical details for the failure of the workspace. + // +optional If this field is empty, the workspace has not failed. + optional string failed = 1; + + // timeout contains the reason the workspace has timed out. + // +optional If this field is empty, the workspace has not timed out. + optional string timeout = 2; +} + +// Admission level describes who can access a workspace instance and its ports. +enum AdmissionLevel { + ADMISSION_LEVEL_UNSPECIFIED = 0; + + // ADMISSION_LEVEL_OWNER_ONLY means the workspace can only be accessed using + // the owner token + ADMISSION_LEVEL_OWNER_ONLY = 1; + + // ADMISSION_LEVEL_EVERYONE means the workspace (including ports) can be + // accessed by everyone. + ADMISSION_LEVEL_EVERYONE = 2; +} + +message WorkspacePort { + // Policy defines the accssbility policy of a workspace port is guarded by an + // authentication in the proxy + enum Policy { + POLICY_UNSPECIFIED = 0; + + // Private means the port is accessible by the workspace owner only using + // the workspace port URL + POLICY_PRIVATE = 1; + + // Public means the port is accessible by everybody using the workspace port + // URL + POLICY_PUBLIC = 2; + } + + // Protocol defines the backend protocol of port + enum Protocol { + PROTOCOL_UNSPECIFIED = 0; + + // Http means the port backend is http + PROTOCOL_HTTP = 1; + + // Https means the port backend is https + PROTOCOL_HTTPS = 2; + } + + // port number + uint64 port = 1; + + // policy of this port + Policy policy = 2; + + // url that can be used to access the port + string url = 3; + + // backend protocol of this port + Protocol protocol = 4; +} + +message WorkspaceGitStatus { + // clone_url is the repository url as you would pass it to "git clone". + // Only HTTPS clone URLs are supported. + string clone_url = 1; + + // branch is branch we're currently on + string branch = 2; + + // latest_commit is the most recent commit on the current branch + string latest_commit = 3; + + // uncommited_files is an array of uncommitted files, possibly truncated + repeated string uncommited_files = 4; + + // the total number of uncommited files + int32 total_uncommited_files = 5; + + // untracked_files is an array of untracked files in the workspace, possibly + // truncated + repeated string untracked_files = 6; + + // the total number of untracked files + int32 total_untracked_files = 7; + + // unpushed_commits is an array of unpushed changes in the workspace, possibly + // truncated + repeated string unpushed_commits = 8; + + // the total number of unpushed changes + int32 total_unpushed_commits = 9; +} + +message WorkspacePhase { + enum Phase { + // Unknown indicates an issue within the workspace manager in that it cannot + // determine the actual phase of a workspace. This phase is usually + // accompanied by an error. + PHASE_UNSPECIFIED = 0; + + // Preparing means that we haven't actually started the workspace instance + // just yet, but rather are still preparing for launch. + PHASE_PREPARING = 1; + + // ImageBuild indicates that there's an image build running for this + // workspace. + PHASE_IMAGEBUILD = 2; + + // Pending means the workspace does not yet consume resources in the + // cluster, but rather is looking for some space within the cluster. If for + // example the cluster needs to scale up to accomodate the workspace, the + // workspace will be in Pending state until that happened. + PHASE_PENDING = 3; + + // Creating means the workspace is currently being created. That includes + // downloading the images required to run the workspace over the network. + // The time spent in this phase varies widely and depends on the current + // network speed, image size and cache states. + PHASE_CREATING = 4; + + // Initializing is the phase in which the workspace is executing the + // appropriate workspace initializer (e.g. Git clone or backup download). + // After this phase one can expect the workspace to either be Running or + // Failed. + PHASE_INITIALIZING = 5; + + // Running means the workspace is able to actively perform work, either by + // serving a user through Theia, or as a headless workspace. + PHASE_RUNNING = 6; + + // Interrupted is an exceptional state where the container should be running + // but is temporarily unavailable. When in this state, we expect it to + // become running or stopping anytime soon. + PHASE_INTERRUPTED = 7; + + // Stopping means that the workspace is currently shutting down. It could go + // to stopped every moment. + PHASE_STOPPING = 8; + + // Stopped means the workspace ended regularly because it was shut down. + PHASE_STOPPED = 9; + } + + Phase name = 1; + google.protobuf.Timestamp last_transition_time = 2; +} + +message EditorReference { + string name = 1; + string version = 2; +} + +message WorkspaceEnvironmentVariable { + string name = 1; + optional string value = 2; +} diff --git a/components/public-api/go/experimental/v2/v2connect/workspace.connect.go b/components/public-api/go/experimental/v2/v2connect/workspace.connect.go new file mode 100644 index 00000000000000..99088f06a4518f --- /dev/null +++ b/components/public-api/go/experimental/v2/v2connect/workspace.connect.go @@ -0,0 +1,99 @@ +// Copyright (c) 2023 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. + +// Code generated by protoc-gen-connect-go. DO NOT EDIT. +// +// Source: gitpod/experimental/v2/workspace.proto + +package v2connect + +import ( + context "context" + errors "errors" + connect_go "github.com/bufbuild/connect-go" + v2 "github.com/gitpod-io/gitpod/components/public-api/go/experimental/v2" + http "net/http" + strings "strings" +) + +// This is a compile-time assertion to ensure that this generated file and the connect package are +// compatible. If you get a compiler error that this constant is not defined, this code was +// generated with a version of connect newer than the one compiled into your binary. You can fix the +// problem by either regenerating this code with an older version of connect or updating the connect +// version compiled into your binary. +const _ = connect_go.IsAtLeastVersion0_1_0 + +const ( + // WorkspaceServiceName is the fully-qualified name of the WorkspaceService service. + WorkspaceServiceName = "gitpod.experimental.v2.WorkspaceService" +) + +// WorkspaceServiceClient is a client for the gitpod.experimental.v2.WorkspaceService service. +type WorkspaceServiceClient interface { + // GetWorkspace returns a single workspace. + // + // +return NOT_FOUND User does not have access to a workspace with the given + // ID +return NOT_FOUND Workspace does not exist + GetWorkspace(context.Context, *connect_go.Request[v2.GetWorkspaceRequest]) (*connect_go.Response[v2.GetWorkspaceResponse], error) +} + +// NewWorkspaceServiceClient constructs a client for the gitpod.experimental.v2.WorkspaceService +// service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for +// gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply +// the connect.WithGRPC() or connect.WithGRPCWeb() options. +// +// The URL supplied here should be the base URL for the Connect or gRPC server (for example, +// http://api.acme.com or https://acme.com/grpc). +func NewWorkspaceServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) WorkspaceServiceClient { + baseURL = strings.TrimRight(baseURL, "/") + return &workspaceServiceClient{ + getWorkspace: connect_go.NewClient[v2.GetWorkspaceRequest, v2.GetWorkspaceResponse]( + httpClient, + baseURL+"/gitpod.experimental.v2.WorkspaceService/GetWorkspace", + opts..., + ), + } +} + +// workspaceServiceClient implements WorkspaceServiceClient. +type workspaceServiceClient struct { + getWorkspace *connect_go.Client[v2.GetWorkspaceRequest, v2.GetWorkspaceResponse] +} + +// GetWorkspace calls gitpod.experimental.v2.WorkspaceService.GetWorkspace. +func (c *workspaceServiceClient) GetWorkspace(ctx context.Context, req *connect_go.Request[v2.GetWorkspaceRequest]) (*connect_go.Response[v2.GetWorkspaceResponse], error) { + return c.getWorkspace.CallUnary(ctx, req) +} + +// WorkspaceServiceHandler is an implementation of the gitpod.experimental.v2.WorkspaceService +// service. +type WorkspaceServiceHandler interface { + // GetWorkspace returns a single workspace. + // + // +return NOT_FOUND User does not have access to a workspace with the given + // ID +return NOT_FOUND Workspace does not exist + GetWorkspace(context.Context, *connect_go.Request[v2.GetWorkspaceRequest]) (*connect_go.Response[v2.GetWorkspaceResponse], error) +} + +// NewWorkspaceServiceHandler builds an HTTP handler from the service implementation. It returns the +// path on which to mount the handler and the handler itself. +// +// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf +// and JSON codecs. They also support gzip compression. +func NewWorkspaceServiceHandler(svc WorkspaceServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler) { + mux := http.NewServeMux() + mux.Handle("/gitpod.experimental.v2.WorkspaceService/GetWorkspace", connect_go.NewUnaryHandler( + "/gitpod.experimental.v2.WorkspaceService/GetWorkspace", + svc.GetWorkspace, + opts..., + )) + return "/gitpod.experimental.v2.WorkspaceService/", mux +} + +// UnimplementedWorkspaceServiceHandler returns CodeUnimplemented from all methods. +type UnimplementedWorkspaceServiceHandler struct{} + +func (UnimplementedWorkspaceServiceHandler) GetWorkspace(context.Context, *connect_go.Request[v2.GetWorkspaceRequest]) (*connect_go.Response[v2.GetWorkspaceResponse], error) { + return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("gitpod.experimental.v2.WorkspaceService.GetWorkspace is not implemented")) +} diff --git a/components/public-api/go/experimental/v2/v2connect/workspace.proxy.connect.go b/components/public-api/go/experimental/v2/v2connect/workspace.proxy.connect.go new file mode 100644 index 00000000000000..d708438ab96498 --- /dev/null +++ b/components/public-api/go/experimental/v2/v2connect/workspace.proxy.connect.go @@ -0,0 +1,30 @@ +// Copyright (c) 2023 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. + +// Code generated by protoc-proxy-gen. DO NOT EDIT. + +package v2connect + +import ( + context "context" + connect_go "github.com/bufbuild/connect-go" + v2 "github.com/gitpod-io/gitpod/components/public-api/go/experimental/v2" +) + +var _ WorkspaceServiceHandler = (*ProxyWorkspaceServiceHandler)(nil) + +type ProxyWorkspaceServiceHandler struct { + Client v2.WorkspaceServiceClient + UnimplementedWorkspaceServiceHandler +} + +func (s *ProxyWorkspaceServiceHandler) GetWorkspace(ctx context.Context, req *connect_go.Request[v2.GetWorkspaceRequest]) (*connect_go.Response[v2.GetWorkspaceResponse], error) { + resp, err := s.Client.GetWorkspace(ctx, req.Msg) + if err != nil { + // TODO(milan): Convert to correct status code + return nil, err + } + + return connect_go.NewResponse(resp), nil +} diff --git a/components/public-api/go/experimental/v2/workspace.pb.go b/components/public-api/go/experimental/v2/workspace.pb.go new file mode 100644 index 00000000000000..6438a28b6d809e --- /dev/null +++ b/components/public-api/go/experimental/v2/workspace.pb.go @@ -0,0 +1,1479 @@ +// Copyright (c) 2023 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. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: gitpod/experimental/v2/workspace.proto + +package v2 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Admission level describes who can access a workspace instance and its ports. +type AdmissionLevel int32 + +const ( + AdmissionLevel_ADMISSION_LEVEL_UNSPECIFIED AdmissionLevel = 0 + // ADMISSION_LEVEL_OWNER_ONLY means the workspace can only be accessed using + // the owner token + AdmissionLevel_ADMISSION_LEVEL_OWNER_ONLY AdmissionLevel = 1 + // ADMISSION_LEVEL_EVERYONE means the workspace (including ports) can be + // accessed by everyone. + AdmissionLevel_ADMISSION_LEVEL_EVERYONE AdmissionLevel = 2 +) + +// Enum value maps for AdmissionLevel. +var ( + AdmissionLevel_name = map[int32]string{ + 0: "ADMISSION_LEVEL_UNSPECIFIED", + 1: "ADMISSION_LEVEL_OWNER_ONLY", + 2: "ADMISSION_LEVEL_EVERYONE", + } + AdmissionLevel_value = map[string]int32{ + "ADMISSION_LEVEL_UNSPECIFIED": 0, + "ADMISSION_LEVEL_OWNER_ONLY": 1, + "ADMISSION_LEVEL_EVERYONE": 2, + } +) + +func (x AdmissionLevel) Enum() *AdmissionLevel { + p := new(AdmissionLevel) + *p = x + return p +} + +func (x AdmissionLevel) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AdmissionLevel) Descriptor() protoreflect.EnumDescriptor { + return file_gitpod_experimental_v2_workspace_proto_enumTypes[0].Descriptor() +} + +func (AdmissionLevel) Type() protoreflect.EnumType { + return &file_gitpod_experimental_v2_workspace_proto_enumTypes[0] +} + +func (x AdmissionLevel) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AdmissionLevel.Descriptor instead. +func (AdmissionLevel) EnumDescriptor() ([]byte, []int) { + return file_gitpod_experimental_v2_workspace_proto_rawDescGZIP(), []int{0} +} + +// Policy defines the accssbility policy of a workspace port is guarded by an +// authentication in the proxy +type WorkspacePort_Policy int32 + +const ( + WorkspacePort_POLICY_UNSPECIFIED WorkspacePort_Policy = 0 + // Private means the port is accessible by the workspace owner only using + // the workspace port URL + WorkspacePort_POLICY_PRIVATE WorkspacePort_Policy = 1 + // Public means the port is accessible by everybody using the workspace port + // URL + WorkspacePort_POLICY_PUBLIC WorkspacePort_Policy = 2 +) + +// Enum value maps for WorkspacePort_Policy. +var ( + WorkspacePort_Policy_name = map[int32]string{ + 0: "POLICY_UNSPECIFIED", + 1: "POLICY_PRIVATE", + 2: "POLICY_PUBLIC", + } + WorkspacePort_Policy_value = map[string]int32{ + "POLICY_UNSPECIFIED": 0, + "POLICY_PRIVATE": 1, + "POLICY_PUBLIC": 2, + } +) + +func (x WorkspacePort_Policy) Enum() *WorkspacePort_Policy { + p := new(WorkspacePort_Policy) + *p = x + return p +} + +func (x WorkspacePort_Policy) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (WorkspacePort_Policy) Descriptor() protoreflect.EnumDescriptor { + return file_gitpod_experimental_v2_workspace_proto_enumTypes[1].Descriptor() +} + +func (WorkspacePort_Policy) Type() protoreflect.EnumType { + return &file_gitpod_experimental_v2_workspace_proto_enumTypes[1] +} + +func (x WorkspacePort_Policy) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use WorkspacePort_Policy.Descriptor instead. +func (WorkspacePort_Policy) EnumDescriptor() ([]byte, []int) { + return file_gitpod_experimental_v2_workspace_proto_rawDescGZIP(), []int{5, 0} +} + +// Protocol defines the backend protocol of port +type WorkspacePort_Protocol int32 + +const ( + WorkspacePort_PROTOCOL_UNSPECIFIED WorkspacePort_Protocol = 0 + // Http means the port backend is http + WorkspacePort_PROTOCOL_HTTP WorkspacePort_Protocol = 1 + // Https means the port backend is https + WorkspacePort_PROTOCOL_HTTPS WorkspacePort_Protocol = 2 +) + +// Enum value maps for WorkspacePort_Protocol. +var ( + WorkspacePort_Protocol_name = map[int32]string{ + 0: "PROTOCOL_UNSPECIFIED", + 1: "PROTOCOL_HTTP", + 2: "PROTOCOL_HTTPS", + } + WorkspacePort_Protocol_value = map[string]int32{ + "PROTOCOL_UNSPECIFIED": 0, + "PROTOCOL_HTTP": 1, + "PROTOCOL_HTTPS": 2, + } +) + +func (x WorkspacePort_Protocol) Enum() *WorkspacePort_Protocol { + p := new(WorkspacePort_Protocol) + *p = x + return p +} + +func (x WorkspacePort_Protocol) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (WorkspacePort_Protocol) Descriptor() protoreflect.EnumDescriptor { + return file_gitpod_experimental_v2_workspace_proto_enumTypes[2].Descriptor() +} + +func (WorkspacePort_Protocol) Type() protoreflect.EnumType { + return &file_gitpod_experimental_v2_workspace_proto_enumTypes[2] +} + +func (x WorkspacePort_Protocol) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use WorkspacePort_Protocol.Descriptor instead. +func (WorkspacePort_Protocol) EnumDescriptor() ([]byte, []int) { + return file_gitpod_experimental_v2_workspace_proto_rawDescGZIP(), []int{5, 1} +} + +type WorkspacePhase_Phase int32 + +const ( + // Unknown indicates an issue within the workspace manager in that it cannot + // determine the actual phase of a workspace. This phase is usually + // accompanied by an error. + WorkspacePhase_PHASE_UNSPECIFIED WorkspacePhase_Phase = 0 + // Preparing means that we haven't actually started the workspace instance + // just yet, but rather are still preparing for launch. + WorkspacePhase_PHASE_PREPARING WorkspacePhase_Phase = 1 + // ImageBuild indicates that there's an image build running for this + // workspace. + WorkspacePhase_PHASE_IMAGEBUILD WorkspacePhase_Phase = 2 + // Pending means the workspace does not yet consume resources in the + // cluster, but rather is looking for some space within the cluster. If for + // example the cluster needs to scale up to accomodate the workspace, the + // workspace will be in Pending state until that happened. + WorkspacePhase_PHASE_PENDING WorkspacePhase_Phase = 3 + // Creating means the workspace is currently being created. That includes + // downloading the images required to run the workspace over the network. + // The time spent in this phase varies widely and depends on the current + // network speed, image size and cache states. + WorkspacePhase_PHASE_CREATING WorkspacePhase_Phase = 4 + // Initializing is the phase in which the workspace is executing the + // appropriate workspace initializer (e.g. Git clone or backup download). + // After this phase one can expect the workspace to either be Running or + // Failed. + WorkspacePhase_PHASE_INITIALIZING WorkspacePhase_Phase = 5 + // Running means the workspace is able to actively perform work, either by + // serving a user through Theia, or as a headless workspace. + WorkspacePhase_PHASE_RUNNING WorkspacePhase_Phase = 6 + // Interrupted is an exceptional state where the container should be running + // but is temporarily unavailable. When in this state, we expect it to + // become running or stopping anytime soon. + WorkspacePhase_PHASE_INTERRUPTED WorkspacePhase_Phase = 7 + // Stopping means that the workspace is currently shutting down. It could go + // to stopped every moment. + WorkspacePhase_PHASE_STOPPING WorkspacePhase_Phase = 8 + // Stopped means the workspace ended regularly because it was shut down. + WorkspacePhase_PHASE_STOPPED WorkspacePhase_Phase = 9 +) + +// Enum value maps for WorkspacePhase_Phase. +var ( + WorkspacePhase_Phase_name = map[int32]string{ + 0: "PHASE_UNSPECIFIED", + 1: "PHASE_PREPARING", + 2: "PHASE_IMAGEBUILD", + 3: "PHASE_PENDING", + 4: "PHASE_CREATING", + 5: "PHASE_INITIALIZING", + 6: "PHASE_RUNNING", + 7: "PHASE_INTERRUPTED", + 8: "PHASE_STOPPING", + 9: "PHASE_STOPPED", + } + WorkspacePhase_Phase_value = map[string]int32{ + "PHASE_UNSPECIFIED": 0, + "PHASE_PREPARING": 1, + "PHASE_IMAGEBUILD": 2, + "PHASE_PENDING": 3, + "PHASE_CREATING": 4, + "PHASE_INITIALIZING": 5, + "PHASE_RUNNING": 6, + "PHASE_INTERRUPTED": 7, + "PHASE_STOPPING": 8, + "PHASE_STOPPED": 9, + } +) + +func (x WorkspacePhase_Phase) Enum() *WorkspacePhase_Phase { + p := new(WorkspacePhase_Phase) + *p = x + return p +} + +func (x WorkspacePhase_Phase) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (WorkspacePhase_Phase) Descriptor() protoreflect.EnumDescriptor { + return file_gitpod_experimental_v2_workspace_proto_enumTypes[3].Descriptor() +} + +func (WorkspacePhase_Phase) Type() protoreflect.EnumType { + return &file_gitpod_experimental_v2_workspace_proto_enumTypes[3] +} + +func (x WorkspacePhase_Phase) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use WorkspacePhase_Phase.Descriptor instead. +func (WorkspacePhase_Phase) EnumDescriptor() ([]byte, []int) { + return file_gitpod_experimental_v2_workspace_proto_rawDescGZIP(), []int{7, 0} +} + +type GetWorkspaceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetWorkspaceRequest) Reset() { + *x = GetWorkspaceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gitpod_experimental_v2_workspace_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetWorkspaceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetWorkspaceRequest) ProtoMessage() {} + +func (x *GetWorkspaceRequest) ProtoReflect() protoreflect.Message { + mi := &file_gitpod_experimental_v2_workspace_proto_msgTypes[0] + 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 GetWorkspaceRequest.ProtoReflect.Descriptor instead. +func (*GetWorkspaceRequest) Descriptor() ([]byte, []int) { + return file_gitpod_experimental_v2_workspace_proto_rawDescGZIP(), []int{0} +} + +func (x *GetWorkspaceRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type GetWorkspaceResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Item *Workspace `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"` +} + +func (x *GetWorkspaceResponse) Reset() { + *x = GetWorkspaceResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_gitpod_experimental_v2_workspace_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetWorkspaceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetWorkspaceResponse) ProtoMessage() {} + +func (x *GetWorkspaceResponse) ProtoReflect() protoreflect.Message { + mi := &file_gitpod_experimental_v2_workspace_proto_msgTypes[1] + 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 GetWorkspaceResponse.ProtoReflect.Descriptor instead. +func (*GetWorkspaceResponse) Descriptor() ([]byte, []int) { + return file_gitpod_experimental_v2_workspace_proto_rawDescGZIP(), []int{1} +} + +func (x *GetWorkspaceResponse) GetItem() *Workspace { + if x != nil { + return x.Item + } + return nil +} + +// +resource get workspace +type Workspace struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // prebuild indicates it is a prebuild + // TODO(ak) model prebuilds as a separate resource + Prebuild bool `protobuf:"varint,2,opt,name=prebuild,proto3" json:"prebuild,omitempty"` + OrganizationId string `protobuf:"bytes,3,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"` + Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` + Pinned bool `protobuf:"varint,5,opt,name=pinned,proto3" json:"pinned,omitempty"` + Status *WorkspaceStatus `protobuf:"bytes,6,opt,name=status,proto3" json:"status,omitempty"` + // additional_environment_variables provide additional environment variables + // which take precedence over environment variables provided by the project + // and user. + // + // +optional + AdditionalEnvironmentVariables []*WorkspaceEnvironmentVariable `protobuf:"bytes,7,rep,name=additional_environment_variables,json=additionalEnvironmentVariables,proto3" json:"additional_environment_variables,omitempty"` + // region specifies the region in which the workspace will be created. + // Obtain available regions using the ListRegions operation. + // + // +optional defaults to the user's default region + Region *string `protobuf:"bytes,8,opt,name=region,proto3,oneof" json:"region,omitempty"` + // workspace_class specifies the workspace class with which to create the + // workspace. Obtain available workspace classes using the ListWorkspaceClass + // operation. + // + // +optional defaults to the class configured on the project or the cluster's + // default class. + WorkspaceClass *string `protobuf:"bytes,9,opt,name=workspace_class,json=workspaceClass,proto3,oneof" json:"workspace_class,omitempty"` + // editor specifies the editor that will be used with this workspace. + // Obtain available editors using the EditorService.ListEditors operation. + // + // +optional defaults to the default editor of the user + Editor *EditorReference `protobuf:"bytes,10,opt,name=editor,proto3,oneof" json:"editor,omitempty"` + // context_url is the normalized URL from which the workspace was created + // TODO(ak) replace with resolveContextURL API + ContextUrl string `protobuf:"bytes,11,opt,name=context_url,json=contextUrl,proto3" json:"context_url,omitempty"` + // Prebuild ID is the unique identifier of the prebuild + // from which this workspace was created + // +optional if empty then this workspace was not created from a prebuild + PrebuildId *string `protobuf:"bytes,12,opt,name=prebuild_id,json=prebuildId,proto3,oneof" json:"prebuild_id,omitempty"` +} + +func (x *Workspace) Reset() { + *x = Workspace{} + if protoimpl.UnsafeEnabled { + mi := &file_gitpod_experimental_v2_workspace_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Workspace) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Workspace) ProtoMessage() {} + +func (x *Workspace) ProtoReflect() protoreflect.Message { + mi := &file_gitpod_experimental_v2_workspace_proto_msgTypes[2] + 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 Workspace.ProtoReflect.Descriptor instead. +func (*Workspace) Descriptor() ([]byte, []int) { + return file_gitpod_experimental_v2_workspace_proto_rawDescGZIP(), []int{2} +} + +func (x *Workspace) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Workspace) GetPrebuild() bool { + if x != nil { + return x.Prebuild + } + return false +} + +func (x *Workspace) GetOrganizationId() string { + if x != nil { + return x.OrganizationId + } + return "" +} + +func (x *Workspace) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Workspace) GetPinned() bool { + if x != nil { + return x.Pinned + } + return false +} + +func (x *Workspace) GetStatus() *WorkspaceStatus { + if x != nil { + return x.Status + } + return nil +} + +func (x *Workspace) GetAdditionalEnvironmentVariables() []*WorkspaceEnvironmentVariable { + if x != nil { + return x.AdditionalEnvironmentVariables + } + return nil +} + +func (x *Workspace) GetRegion() string { + if x != nil && x.Region != nil { + return *x.Region + } + return "" +} + +func (x *Workspace) GetWorkspaceClass() string { + if x != nil && x.WorkspaceClass != nil { + return *x.WorkspaceClass + } + return "" +} + +func (x *Workspace) GetEditor() *EditorReference { + if x != nil { + return x.Editor + } + return nil +} + +func (x *Workspace) GetContextUrl() string { + if x != nil { + return x.ContextUrl + } + return "" +} + +func (x *Workspace) GetPrebuildId() string { + if x != nil && x.PrebuildId != nil { + return *x.PrebuildId + } + return "" +} + +type WorkspaceStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Phase is a simple, high-level summary of where the workspace is in its + // lifecycle. The phase is not intended to be a comprehensive rollup of + // observations of the workspace state, nor is it intended to be a + // comprehensive state machine. + Phase *WorkspacePhase `protobuf:"bytes,1,opt,name=phase,proto3" json:"phase,omitempty"` + // message is an optional human-readable message detailing the current phase + Message *string `protobuf:"bytes,2,opt,name=message,proto3,oneof" json:"message,omitempty"` + // workspace_url is the URL of the workspace. Only present when the phase is + // running. + WorkspaceUrl string `protobuf:"bytes,3,opt,name=workspace_url,json=workspaceUrl,proto3" json:"workspace_url,omitempty"` + // git_status details the Git working copy status of the workspace. + // Note: this is a best-effort field and more often than not will not be + // present. Its absence does not indicate the absence of a working copy. + GitStatus *WorkspaceGitStatus `protobuf:"bytes,4,opt,name=git_status,json=gitStatus,proto3" json:"git_status,omitempty"` + // ports lists the network ports currently available/known of this workspace + Ports []*WorkspacePort `protobuf:"bytes,5,rep,name=ports,proto3" json:"ports,omitempty"` + // Admission describes who can access a workspace instance and its ports. + Admission AdmissionLevel `protobuf:"varint,6,opt,name=admission,proto3,enum=gitpod.experimental.v2.AdmissionLevel" json:"admission,omitempty"` + // Instance ID is the unique identifier of the workspace instance + InstanceId string `protobuf:"bytes,7,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"` + // Conditions contains observations of the workspace's current phase. + Conditions *WorkspaceConditions `protobuf:"bytes,8,opt,name=conditions,proto3" json:"conditions,omitempty"` +} + +func (x *WorkspaceStatus) Reset() { + *x = WorkspaceStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_gitpod_experimental_v2_workspace_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorkspaceStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkspaceStatus) ProtoMessage() {} + +func (x *WorkspaceStatus) ProtoReflect() protoreflect.Message { + mi := &file_gitpod_experimental_v2_workspace_proto_msgTypes[3] + 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 WorkspaceStatus.ProtoReflect.Descriptor instead. +func (*WorkspaceStatus) Descriptor() ([]byte, []int) { + return file_gitpod_experimental_v2_workspace_proto_rawDescGZIP(), []int{3} +} + +func (x *WorkspaceStatus) GetPhase() *WorkspacePhase { + if x != nil { + return x.Phase + } + return nil +} + +func (x *WorkspaceStatus) GetMessage() string { + if x != nil && x.Message != nil { + return *x.Message + } + return "" +} + +func (x *WorkspaceStatus) GetWorkspaceUrl() string { + if x != nil { + return x.WorkspaceUrl + } + return "" +} + +func (x *WorkspaceStatus) GetGitStatus() *WorkspaceGitStatus { + if x != nil { + return x.GitStatus + } + return nil +} + +func (x *WorkspaceStatus) GetPorts() []*WorkspacePort { + if x != nil { + return x.Ports + } + return nil +} + +func (x *WorkspaceStatus) GetAdmission() AdmissionLevel { + if x != nil { + return x.Admission + } + return AdmissionLevel_ADMISSION_LEVEL_UNSPECIFIED +} + +func (x *WorkspaceStatus) GetInstanceId() string { + if x != nil { + return x.InstanceId + } + return "" +} + +func (x *WorkspaceStatus) GetConditions() *WorkspaceConditions { + if x != nil { + return x.Conditions + } + return nil +} + +type WorkspaceConditions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // failed contains technical details for the failure of the workspace. + // +optional If this field is empty, the workspace has not failed. + Failed *string `protobuf:"bytes,1,opt,name=failed,proto3,oneof" json:"failed,omitempty"` + // timeout contains the reason the workspace has timed out. + // +optional If this field is empty, the workspace has not timed out. + Timeout *string `protobuf:"bytes,2,opt,name=timeout,proto3,oneof" json:"timeout,omitempty"` +} + +func (x *WorkspaceConditions) Reset() { + *x = WorkspaceConditions{} + if protoimpl.UnsafeEnabled { + mi := &file_gitpod_experimental_v2_workspace_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorkspaceConditions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkspaceConditions) ProtoMessage() {} + +func (x *WorkspaceConditions) ProtoReflect() protoreflect.Message { + mi := &file_gitpod_experimental_v2_workspace_proto_msgTypes[4] + 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 WorkspaceConditions.ProtoReflect.Descriptor instead. +func (*WorkspaceConditions) Descriptor() ([]byte, []int) { + return file_gitpod_experimental_v2_workspace_proto_rawDescGZIP(), []int{4} +} + +func (x *WorkspaceConditions) GetFailed() string { + if x != nil && x.Failed != nil { + return *x.Failed + } + return "" +} + +func (x *WorkspaceConditions) GetTimeout() string { + if x != nil && x.Timeout != nil { + return *x.Timeout + } + return "" +} + +type WorkspacePort struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // port number + Port uint64 `protobuf:"varint,1,opt,name=port,proto3" json:"port,omitempty"` + // policy of this port + Policy WorkspacePort_Policy `protobuf:"varint,2,opt,name=policy,proto3,enum=gitpod.experimental.v2.WorkspacePort_Policy" json:"policy,omitempty"` + // url that can be used to access the port + Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"` + // backend protocol of this port + Protocol WorkspacePort_Protocol `protobuf:"varint,4,opt,name=protocol,proto3,enum=gitpod.experimental.v2.WorkspacePort_Protocol" json:"protocol,omitempty"` +} + +func (x *WorkspacePort) Reset() { + *x = WorkspacePort{} + if protoimpl.UnsafeEnabled { + mi := &file_gitpod_experimental_v2_workspace_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorkspacePort) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkspacePort) ProtoMessage() {} + +func (x *WorkspacePort) ProtoReflect() protoreflect.Message { + mi := &file_gitpod_experimental_v2_workspace_proto_msgTypes[5] + 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 WorkspacePort.ProtoReflect.Descriptor instead. +func (*WorkspacePort) Descriptor() ([]byte, []int) { + return file_gitpod_experimental_v2_workspace_proto_rawDescGZIP(), []int{5} +} + +func (x *WorkspacePort) GetPort() uint64 { + if x != nil { + return x.Port + } + return 0 +} + +func (x *WorkspacePort) GetPolicy() WorkspacePort_Policy { + if x != nil { + return x.Policy + } + return WorkspacePort_POLICY_UNSPECIFIED +} + +func (x *WorkspacePort) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +func (x *WorkspacePort) GetProtocol() WorkspacePort_Protocol { + if x != nil { + return x.Protocol + } + return WorkspacePort_PROTOCOL_UNSPECIFIED +} + +type WorkspaceGitStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // clone_url is the repository url as you would pass it to "git clone". + // Only HTTPS clone URLs are supported. + CloneUrl string `protobuf:"bytes,1,opt,name=clone_url,json=cloneUrl,proto3" json:"clone_url,omitempty"` + // branch is branch we're currently on + Branch string `protobuf:"bytes,2,opt,name=branch,proto3" json:"branch,omitempty"` + // latest_commit is the most recent commit on the current branch + LatestCommit string `protobuf:"bytes,3,opt,name=latest_commit,json=latestCommit,proto3" json:"latest_commit,omitempty"` + // uncommited_files is an array of uncommitted files, possibly truncated + UncommitedFiles []string `protobuf:"bytes,4,rep,name=uncommited_files,json=uncommitedFiles,proto3" json:"uncommited_files,omitempty"` + // the total number of uncommited files + TotalUncommitedFiles int32 `protobuf:"varint,5,opt,name=total_uncommited_files,json=totalUncommitedFiles,proto3" json:"total_uncommited_files,omitempty"` + // untracked_files is an array of untracked files in the workspace, possibly + // truncated + UntrackedFiles []string `protobuf:"bytes,6,rep,name=untracked_files,json=untrackedFiles,proto3" json:"untracked_files,omitempty"` + // the total number of untracked files + TotalUntrackedFiles int32 `protobuf:"varint,7,opt,name=total_untracked_files,json=totalUntrackedFiles,proto3" json:"total_untracked_files,omitempty"` + // unpushed_commits is an array of unpushed changes in the workspace, possibly + // truncated + UnpushedCommits []string `protobuf:"bytes,8,rep,name=unpushed_commits,json=unpushedCommits,proto3" json:"unpushed_commits,omitempty"` + // the total number of unpushed changes + TotalUnpushedCommits int32 `protobuf:"varint,9,opt,name=total_unpushed_commits,json=totalUnpushedCommits,proto3" json:"total_unpushed_commits,omitempty"` +} + +func (x *WorkspaceGitStatus) Reset() { + *x = WorkspaceGitStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_gitpod_experimental_v2_workspace_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorkspaceGitStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkspaceGitStatus) ProtoMessage() {} + +func (x *WorkspaceGitStatus) ProtoReflect() protoreflect.Message { + mi := &file_gitpod_experimental_v2_workspace_proto_msgTypes[6] + 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 WorkspaceGitStatus.ProtoReflect.Descriptor instead. +func (*WorkspaceGitStatus) Descriptor() ([]byte, []int) { + return file_gitpod_experimental_v2_workspace_proto_rawDescGZIP(), []int{6} +} + +func (x *WorkspaceGitStatus) GetCloneUrl() string { + if x != nil { + return x.CloneUrl + } + return "" +} + +func (x *WorkspaceGitStatus) GetBranch() string { + if x != nil { + return x.Branch + } + return "" +} + +func (x *WorkspaceGitStatus) GetLatestCommit() string { + if x != nil { + return x.LatestCommit + } + return "" +} + +func (x *WorkspaceGitStatus) GetUncommitedFiles() []string { + if x != nil { + return x.UncommitedFiles + } + return nil +} + +func (x *WorkspaceGitStatus) GetTotalUncommitedFiles() int32 { + if x != nil { + return x.TotalUncommitedFiles + } + return 0 +} + +func (x *WorkspaceGitStatus) GetUntrackedFiles() []string { + if x != nil { + return x.UntrackedFiles + } + return nil +} + +func (x *WorkspaceGitStatus) GetTotalUntrackedFiles() int32 { + if x != nil { + return x.TotalUntrackedFiles + } + return 0 +} + +func (x *WorkspaceGitStatus) GetUnpushedCommits() []string { + if x != nil { + return x.UnpushedCommits + } + return nil +} + +func (x *WorkspaceGitStatus) GetTotalUnpushedCommits() int32 { + if x != nil { + return x.TotalUnpushedCommits + } + return 0 +} + +type WorkspacePhase struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name WorkspacePhase_Phase `protobuf:"varint,1,opt,name=name,proto3,enum=gitpod.experimental.v2.WorkspacePhase_Phase" json:"name,omitempty"` + LastTransitionTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=last_transition_time,json=lastTransitionTime,proto3" json:"last_transition_time,omitempty"` +} + +func (x *WorkspacePhase) Reset() { + *x = WorkspacePhase{} + if protoimpl.UnsafeEnabled { + mi := &file_gitpod_experimental_v2_workspace_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorkspacePhase) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkspacePhase) ProtoMessage() {} + +func (x *WorkspacePhase) ProtoReflect() protoreflect.Message { + mi := &file_gitpod_experimental_v2_workspace_proto_msgTypes[7] + 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 WorkspacePhase.ProtoReflect.Descriptor instead. +func (*WorkspacePhase) Descriptor() ([]byte, []int) { + return file_gitpod_experimental_v2_workspace_proto_rawDescGZIP(), []int{7} +} + +func (x *WorkspacePhase) GetName() WorkspacePhase_Phase { + if x != nil { + return x.Name + } + return WorkspacePhase_PHASE_UNSPECIFIED +} + +func (x *WorkspacePhase) GetLastTransitionTime() *timestamppb.Timestamp { + if x != nil { + return x.LastTransitionTime + } + return nil +} + +type EditorReference struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` +} + +func (x *EditorReference) Reset() { + *x = EditorReference{} + if protoimpl.UnsafeEnabled { + mi := &file_gitpod_experimental_v2_workspace_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EditorReference) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EditorReference) ProtoMessage() {} + +func (x *EditorReference) ProtoReflect() protoreflect.Message { + mi := &file_gitpod_experimental_v2_workspace_proto_msgTypes[8] + 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 EditorReference.ProtoReflect.Descriptor instead. +func (*EditorReference) Descriptor() ([]byte, []int) { + return file_gitpod_experimental_v2_workspace_proto_rawDescGZIP(), []int{8} +} + +func (x *EditorReference) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *EditorReference) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +type WorkspaceEnvironmentVariable struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Value *string `protobuf:"bytes,2,opt,name=value,proto3,oneof" json:"value,omitempty"` +} + +func (x *WorkspaceEnvironmentVariable) Reset() { + *x = WorkspaceEnvironmentVariable{} + if protoimpl.UnsafeEnabled { + mi := &file_gitpod_experimental_v2_workspace_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorkspaceEnvironmentVariable) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkspaceEnvironmentVariable) ProtoMessage() {} + +func (x *WorkspaceEnvironmentVariable) ProtoReflect() protoreflect.Message { + mi := &file_gitpod_experimental_v2_workspace_proto_msgTypes[9] + 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 WorkspaceEnvironmentVariable.ProtoReflect.Descriptor instead. +func (*WorkspaceEnvironmentVariable) Descriptor() ([]byte, []int) { + return file_gitpod_experimental_v2_workspace_proto_rawDescGZIP(), []int{9} +} + +func (x *WorkspaceEnvironmentVariable) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *WorkspaceEnvironmentVariable) GetValue() string { + if x != nil && x.Value != nil { + return *x.Value + } + return "" +} + +var File_gitpod_experimental_v2_workspace_proto protoreflect.FileDescriptor + +var file_gitpod_experimental_v2_workspace_proto_rawDesc = []byte{ + 0x0a, 0x26, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2f, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, + 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x2f, 0x76, 0x32, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, + 0x2e, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x2e, 0x76, 0x32, + 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x25, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x4d, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x57, + 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x35, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, + 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, + 0x6e, 0x74, 0x61, 0x6c, 0x2e, 0x76, 0x32, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22, 0xdf, 0x04, 0x0a, 0x09, 0x57, 0x6f, 0x72, 0x6b, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x70, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, + 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, + 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x70, 0x69, 0x6e, 0x6e, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, + 0x70, 0x69, 0x6e, 0x6e, 0x65, 0x64, 0x12, 0x3f, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, + 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x2e, 0x76, 0x32, 0x2e, + 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x7e, 0x0a, 0x20, 0x61, 0x64, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, + 0x74, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x65, 0x78, 0x70, 0x65, 0x72, + 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x2e, 0x76, 0x32, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, + 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x1e, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x61, 0x6c, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, + 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, + 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, + 0x6e, 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, 0x0f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, + 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x88, + 0x01, 0x01, 0x12, 0x44, 0x0a, 0x06, 0x65, 0x64, 0x69, 0x74, 0x6f, 0x72, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x65, 0x78, 0x70, 0x65, + 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x64, 0x69, 0x74, + 0x6f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x48, 0x02, 0x52, 0x06, 0x65, + 0x64, 0x69, 0x74, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x55, 0x72, 0x6c, 0x12, 0x24, 0x0a, 0x0b, 0x70, 0x72, 0x65, + 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, + 0x52, 0x0a, 0x70, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x88, 0x01, 0x01, 0x42, + 0x09, 0x0a, 0x07, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x77, + 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x42, 0x09, + 0x0a, 0x07, 0x5f, 0x65, 0x64, 0x69, 0x74, 0x6f, 0x72, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x70, 0x72, + 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x22, 0xdb, 0x03, 0x0a, 0x0f, 0x57, 0x6f, + 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3c, 0x0a, + 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, + 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, + 0x61, 0x6c, 0x2e, 0x76, 0x32, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x50, + 0x68, 0x61, 0x73, 0x65, 0x52, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x07, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x88, 0x01, 0x01, 0x12, 0x23, 0x0a, 0x0d, 0x77, 0x6f, + 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x55, 0x72, 0x6c, 0x12, + 0x49, 0x0a, 0x0a, 0x67, 0x69, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x65, 0x78, 0x70, + 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x2e, 0x76, 0x32, 0x2e, 0x57, 0x6f, 0x72, + 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x47, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x09, 0x67, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3b, 0x0a, 0x05, 0x70, 0x6f, + 0x72, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x69, 0x74, 0x70, + 0x6f, 0x64, 0x2e, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x2e, + 0x76, 0x32, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, + 0x52, 0x05, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x12, 0x44, 0x0a, 0x09, 0x61, 0x64, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x67, 0x69, 0x74, + 0x70, 0x6f, 0x64, 0x2e, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, + 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, + 0x65, 0x6c, 0x52, 0x09, 0x61, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, + 0x0b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x4b, + 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x65, 0x78, 0x70, 0x65, + 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x2e, 0x76, 0x32, 0x2e, 0x57, 0x6f, 0x72, 0x6b, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x0a, 0x0a, 0x08, 0x5f, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x68, 0x0a, 0x13, 0x57, 0x6f, 0x72, 0x6b, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1b, + 0x0a, 0x06, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x06, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x74, + 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x07, + 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x88, 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x66, + 0x61, 0x69, 0x6c, 0x65, 0x64, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, + 0x74, 0x22, 0xdd, 0x02, 0x0a, 0x0d, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x50, + 0x6f, 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x44, 0x0a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, + 0x2e, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x2e, 0x76, 0x32, + 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x2e, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x75, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, + 0x4a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x2e, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x65, 0x78, 0x70, 0x65, 0x72, + 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x2e, 0x76, 0x32, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x22, 0x47, 0x0a, 0x06, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x16, 0x0a, 0x12, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, + 0x0e, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x50, 0x52, 0x49, 0x56, 0x41, 0x54, 0x45, 0x10, + 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x50, 0x55, 0x42, 0x4c, + 0x49, 0x43, 0x10, 0x02, 0x22, 0x4b, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x12, 0x18, 0x0a, 0x14, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x50, 0x52, + 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x5f, 0x48, 0x54, 0x54, 0x50, 0x10, 0x01, 0x12, 0x12, 0x0a, + 0x0e, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x5f, 0x48, 0x54, 0x54, 0x50, 0x53, 0x10, + 0x02, 0x22, 0x8d, 0x03, 0x0a, 0x12, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x47, + 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x6c, 0x6f, 0x6e, + 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6c, 0x6f, + 0x6e, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x23, 0x0a, + 0x0d, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x6d, + 0x69, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x75, 0x6e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x65, 0x64, + 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x75, 0x6e, + 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x34, 0x0a, + 0x16, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x75, 0x6e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x65, + 0x64, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x14, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x55, 0x6e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x46, 0x69, + 0x6c, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x75, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x64, + 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x75, 0x6e, + 0x74, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x15, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x75, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, + 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x13, 0x74, 0x6f, 0x74, + 0x61, 0x6c, 0x55, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, + 0x12, 0x29, 0x0a, 0x10, 0x75, 0x6e, 0x70, 0x75, 0x73, 0x68, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6d, + 0x6d, 0x69, 0x74, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x75, 0x6e, 0x70, 0x75, + 0x73, 0x68, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x12, 0x34, 0x0a, 0x16, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x75, 0x6e, 0x70, 0x75, 0x73, 0x68, 0x65, 0x64, 0x5f, 0x63, 0x6f, + 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x14, 0x74, 0x6f, 0x74, + 0x61, 0x6c, 0x55, 0x6e, 0x70, 0x75, 0x73, 0x68, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, + 0x73, 0x22, 0xfc, 0x02, 0x0a, 0x0e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x50, + 0x68, 0x61, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x65, 0x78, 0x70, 0x65, + 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x2e, 0x76, 0x32, 0x2e, 0x57, 0x6f, 0x72, 0x6b, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x50, 0x68, 0x61, 0x73, 0x65, 0x2e, 0x50, 0x68, 0x61, 0x73, 0x65, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4c, 0x0a, 0x14, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x52, 0x12, 0x6c, 0x61, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x54, 0x69, 0x6d, 0x65, 0x22, 0xd9, 0x01, 0x0a, 0x05, 0x50, 0x68, 0x61, 0x73, 0x65, 0x12, 0x15, + 0x0a, 0x11, 0x50, 0x48, 0x41, 0x53, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x50, 0x48, 0x41, 0x53, 0x45, 0x5f, 0x50, + 0x52, 0x45, 0x50, 0x41, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x50, 0x48, + 0x41, 0x53, 0x45, 0x5f, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x10, 0x02, + 0x12, 0x11, 0x0a, 0x0d, 0x50, 0x48, 0x41, 0x53, 0x45, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, + 0x47, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x50, 0x48, 0x41, 0x53, 0x45, 0x5f, 0x43, 0x52, 0x45, + 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x04, 0x12, 0x16, 0x0a, 0x12, 0x50, 0x48, 0x41, 0x53, 0x45, + 0x5f, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x4c, 0x49, 0x5a, 0x49, 0x4e, 0x47, 0x10, 0x05, 0x12, + 0x11, 0x0a, 0x0d, 0x50, 0x48, 0x41, 0x53, 0x45, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, + 0x10, 0x06, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x48, 0x41, 0x53, 0x45, 0x5f, 0x49, 0x4e, 0x54, 0x45, + 0x52, 0x52, 0x55, 0x50, 0x54, 0x45, 0x44, 0x10, 0x07, 0x12, 0x12, 0x0a, 0x0e, 0x50, 0x48, 0x41, + 0x53, 0x45, 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x49, 0x4e, 0x47, 0x10, 0x08, 0x12, 0x11, 0x0a, + 0x0d, 0x50, 0x48, 0x41, 0x53, 0x45, 0x5f, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, 0x10, 0x09, + 0x22, 0x3f, 0x0a, 0x0f, 0x45, 0x64, 0x69, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, + 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x22, 0x57, 0x0a, 0x1c, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x45, 0x6e, + 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, + 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, + 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2a, 0x6f, 0x0a, 0x0e, 0x41, 0x64, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x1f, 0x0a, 0x1b, + 0x41, 0x44, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1e, 0x0a, + 0x1a, 0x41, 0x44, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, + 0x5f, 0x4f, 0x57, 0x4e, 0x45, 0x52, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x01, 0x12, 0x1c, 0x0a, + 0x18, 0x41, 0x44, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, + 0x5f, 0x45, 0x56, 0x45, 0x52, 0x59, 0x4f, 0x4e, 0x45, 0x10, 0x02, 0x32, 0x7f, 0x0a, 0x10, 0x57, + 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x6b, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, + 0x2b, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, + 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x67, + 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, + 0x61, 0x6c, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x46, 0x5a, 0x44, + 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, 0x63, 0x6f, 0x6d, 0x70, + 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x2d, 0x61, 0x70, + 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x61, + 0x6c, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_gitpod_experimental_v2_workspace_proto_rawDescOnce sync.Once + file_gitpod_experimental_v2_workspace_proto_rawDescData = file_gitpod_experimental_v2_workspace_proto_rawDesc +) + +func file_gitpod_experimental_v2_workspace_proto_rawDescGZIP() []byte { + file_gitpod_experimental_v2_workspace_proto_rawDescOnce.Do(func() { + file_gitpod_experimental_v2_workspace_proto_rawDescData = protoimpl.X.CompressGZIP(file_gitpod_experimental_v2_workspace_proto_rawDescData) + }) + return file_gitpod_experimental_v2_workspace_proto_rawDescData +} + +var file_gitpod_experimental_v2_workspace_proto_enumTypes = make([]protoimpl.EnumInfo, 4) +var file_gitpod_experimental_v2_workspace_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_gitpod_experimental_v2_workspace_proto_goTypes = []interface{}{ + (AdmissionLevel)(0), // 0: gitpod.experimental.v2.AdmissionLevel + (WorkspacePort_Policy)(0), // 1: gitpod.experimental.v2.WorkspacePort.Policy + (WorkspacePort_Protocol)(0), // 2: gitpod.experimental.v2.WorkspacePort.Protocol + (WorkspacePhase_Phase)(0), // 3: gitpod.experimental.v2.WorkspacePhase.Phase + (*GetWorkspaceRequest)(nil), // 4: gitpod.experimental.v2.GetWorkspaceRequest + (*GetWorkspaceResponse)(nil), // 5: gitpod.experimental.v2.GetWorkspaceResponse + (*Workspace)(nil), // 6: gitpod.experimental.v2.Workspace + (*WorkspaceStatus)(nil), // 7: gitpod.experimental.v2.WorkspaceStatus + (*WorkspaceConditions)(nil), // 8: gitpod.experimental.v2.WorkspaceConditions + (*WorkspacePort)(nil), // 9: gitpod.experimental.v2.WorkspacePort + (*WorkspaceGitStatus)(nil), // 10: gitpod.experimental.v2.WorkspaceGitStatus + (*WorkspacePhase)(nil), // 11: gitpod.experimental.v2.WorkspacePhase + (*EditorReference)(nil), // 12: gitpod.experimental.v2.EditorReference + (*WorkspaceEnvironmentVariable)(nil), // 13: gitpod.experimental.v2.WorkspaceEnvironmentVariable + (*timestamppb.Timestamp)(nil), // 14: google.protobuf.Timestamp +} +var file_gitpod_experimental_v2_workspace_proto_depIdxs = []int32{ + 6, // 0: gitpod.experimental.v2.GetWorkspaceResponse.item:type_name -> gitpod.experimental.v2.Workspace + 7, // 1: gitpod.experimental.v2.Workspace.status:type_name -> gitpod.experimental.v2.WorkspaceStatus + 13, // 2: gitpod.experimental.v2.Workspace.additional_environment_variables:type_name -> gitpod.experimental.v2.WorkspaceEnvironmentVariable + 12, // 3: gitpod.experimental.v2.Workspace.editor:type_name -> gitpod.experimental.v2.EditorReference + 11, // 4: gitpod.experimental.v2.WorkspaceStatus.phase:type_name -> gitpod.experimental.v2.WorkspacePhase + 10, // 5: gitpod.experimental.v2.WorkspaceStatus.git_status:type_name -> gitpod.experimental.v2.WorkspaceGitStatus + 9, // 6: gitpod.experimental.v2.WorkspaceStatus.ports:type_name -> gitpod.experimental.v2.WorkspacePort + 0, // 7: gitpod.experimental.v2.WorkspaceStatus.admission:type_name -> gitpod.experimental.v2.AdmissionLevel + 8, // 8: gitpod.experimental.v2.WorkspaceStatus.conditions:type_name -> gitpod.experimental.v2.WorkspaceConditions + 1, // 9: gitpod.experimental.v2.WorkspacePort.policy:type_name -> gitpod.experimental.v2.WorkspacePort.Policy + 2, // 10: gitpod.experimental.v2.WorkspacePort.protocol:type_name -> gitpod.experimental.v2.WorkspacePort.Protocol + 3, // 11: gitpod.experimental.v2.WorkspacePhase.name:type_name -> gitpod.experimental.v2.WorkspacePhase.Phase + 14, // 12: gitpod.experimental.v2.WorkspacePhase.last_transition_time:type_name -> google.protobuf.Timestamp + 4, // 13: gitpod.experimental.v2.WorkspaceService.GetWorkspace:input_type -> gitpod.experimental.v2.GetWorkspaceRequest + 5, // 14: gitpod.experimental.v2.WorkspaceService.GetWorkspace:output_type -> gitpod.experimental.v2.GetWorkspaceResponse + 14, // [14:15] is the sub-list for method output_type + 13, // [13:14] 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 +} + +func init() { file_gitpod_experimental_v2_workspace_proto_init() } +func file_gitpod_experimental_v2_workspace_proto_init() { + if File_gitpod_experimental_v2_workspace_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_gitpod_experimental_v2_workspace_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetWorkspaceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitpod_experimental_v2_workspace_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetWorkspaceResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitpod_experimental_v2_workspace_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Workspace); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitpod_experimental_v2_workspace_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorkspaceStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitpod_experimental_v2_workspace_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorkspaceConditions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitpod_experimental_v2_workspace_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorkspacePort); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitpod_experimental_v2_workspace_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorkspaceGitStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitpod_experimental_v2_workspace_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorkspacePhase); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitpod_experimental_v2_workspace_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EditorReference); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitpod_experimental_v2_workspace_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorkspaceEnvironmentVariable); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_gitpod_experimental_v2_workspace_proto_msgTypes[2].OneofWrappers = []interface{}{} + file_gitpod_experimental_v2_workspace_proto_msgTypes[3].OneofWrappers = []interface{}{} + file_gitpod_experimental_v2_workspace_proto_msgTypes[4].OneofWrappers = []interface{}{} + file_gitpod_experimental_v2_workspace_proto_msgTypes[9].OneofWrappers = []interface{}{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_gitpod_experimental_v2_workspace_proto_rawDesc, + NumEnums: 4, + NumMessages: 10, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_gitpod_experimental_v2_workspace_proto_goTypes, + DependencyIndexes: file_gitpod_experimental_v2_workspace_proto_depIdxs, + EnumInfos: file_gitpod_experimental_v2_workspace_proto_enumTypes, + MessageInfos: file_gitpod_experimental_v2_workspace_proto_msgTypes, + }.Build() + File_gitpod_experimental_v2_workspace_proto = out.File + file_gitpod_experimental_v2_workspace_proto_rawDesc = nil + file_gitpod_experimental_v2_workspace_proto_goTypes = nil + file_gitpod_experimental_v2_workspace_proto_depIdxs = nil +} diff --git a/components/public-api/go/experimental/v2/workspace_grpc.pb.go b/components/public-api/go/experimental/v2/workspace_grpc.pb.go new file mode 100644 index 00000000000000..8387d2a0532d93 --- /dev/null +++ b/components/public-api/go/experimental/v2/workspace_grpc.pb.go @@ -0,0 +1,117 @@ +// Copyright (c) 2023 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. + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc (unknown) +// source: gitpod/experimental/v2/workspace.proto + +package v2 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// WorkspaceServiceClient is the client API for WorkspaceService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type WorkspaceServiceClient interface { + // GetWorkspace returns a single workspace. + // + // +return NOT_FOUND User does not have access to a workspace with the given + // ID +return NOT_FOUND Workspace does not exist + GetWorkspace(ctx context.Context, in *GetWorkspaceRequest, opts ...grpc.CallOption) (*GetWorkspaceResponse, error) +} + +type workspaceServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewWorkspaceServiceClient(cc grpc.ClientConnInterface) WorkspaceServiceClient { + return &workspaceServiceClient{cc} +} + +func (c *workspaceServiceClient) GetWorkspace(ctx context.Context, in *GetWorkspaceRequest, opts ...grpc.CallOption) (*GetWorkspaceResponse, error) { + out := new(GetWorkspaceResponse) + err := c.cc.Invoke(ctx, "/gitpod.experimental.v2.WorkspaceService/GetWorkspace", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// WorkspaceServiceServer is the server API for WorkspaceService service. +// All implementations must embed UnimplementedWorkspaceServiceServer +// for forward compatibility +type WorkspaceServiceServer interface { + // GetWorkspace returns a single workspace. + // + // +return NOT_FOUND User does not have access to a workspace with the given + // ID +return NOT_FOUND Workspace does not exist + GetWorkspace(context.Context, *GetWorkspaceRequest) (*GetWorkspaceResponse, error) + mustEmbedUnimplementedWorkspaceServiceServer() +} + +// UnimplementedWorkspaceServiceServer must be embedded to have forward compatible implementations. +type UnimplementedWorkspaceServiceServer struct { +} + +func (UnimplementedWorkspaceServiceServer) GetWorkspace(context.Context, *GetWorkspaceRequest) (*GetWorkspaceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetWorkspace not implemented") +} +func (UnimplementedWorkspaceServiceServer) mustEmbedUnimplementedWorkspaceServiceServer() {} + +// UnsafeWorkspaceServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to WorkspaceServiceServer will +// result in compilation errors. +type UnsafeWorkspaceServiceServer interface { + mustEmbedUnimplementedWorkspaceServiceServer() +} + +func RegisterWorkspaceServiceServer(s grpc.ServiceRegistrar, srv WorkspaceServiceServer) { + s.RegisterService(&WorkspaceService_ServiceDesc, srv) +} + +func _WorkspaceService_GetWorkspace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetWorkspaceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkspaceServiceServer).GetWorkspace(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gitpod.experimental.v2.WorkspaceService/GetWorkspace", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkspaceServiceServer).GetWorkspace(ctx, req.(*GetWorkspaceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// WorkspaceService_ServiceDesc is the grpc.ServiceDesc for WorkspaceService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var WorkspaceService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "gitpod.experimental.v2.WorkspaceService", + HandlerType: (*WorkspaceServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetWorkspace", + Handler: _WorkspaceService_GetWorkspace_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "gitpod/experimental/v2/workspace.proto", +} diff --git a/components/public-api/typescript/BUILD.yaml b/components/public-api/typescript/BUILD.yaml index 79cf1afd147027..afb58e10b6c192 100644 --- a/components/public-api/typescript/BUILD.yaml +++ b/components/public-api/typescript/BUILD.yaml @@ -1,8 +1,6 @@ packages: - name: lib type: yarn - deps: - - components/gitpod-protocol:lib srcs: - src/** - package.json diff --git a/components/public-api/typescript/src/gitpod/experimental/v2/workspace_connect.ts b/components/public-api/typescript/src/gitpod/experimental/v2/workspace_connect.ts new file mode 100644 index 00000000000000..2ad2ebe1b94fdf --- /dev/null +++ b/components/public-api/typescript/src/gitpod/experimental/v2/workspace_connect.ts @@ -0,0 +1,36 @@ +/** + * Copyright (c) 2023 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. + */ + +// @generated by protoc-gen-connect-es v1.1.2 with parameter "target=ts" +// @generated from file gitpod/experimental/v2/workspace.proto (package gitpod.experimental.v2, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { GetWorkspaceRequest, GetWorkspaceResponse } from "./workspace_pb.js"; +import { MethodKind } from "@bufbuild/protobuf"; + +/** + * @generated from service gitpod.experimental.v2.WorkspaceService + */ +export const WorkspaceService = { + typeName: "gitpod.experimental.v2.WorkspaceService", + methods: { + /** + * GetWorkspace returns a single workspace. + * + * +return NOT_FOUND User does not have access to a workspace with the given + * ID +return NOT_FOUND Workspace does not exist + * + * @generated from rpc gitpod.experimental.v2.WorkspaceService.GetWorkspace + */ + getWorkspace: { + name: "GetWorkspace", + I: GetWorkspaceRequest, + O: GetWorkspaceResponse, + kind: MethodKind.Unary, + }, + } +} as const; diff --git a/components/public-api/typescript/src/gitpod/experimental/v2/workspace_pb.ts b/components/public-api/typescript/src/gitpod/experimental/v2/workspace_pb.ts new file mode 100644 index 00000000000000..7f0302759f9089 --- /dev/null +++ b/components/public-api/typescript/src/gitpod/experimental/v2/workspace_pb.ts @@ -0,0 +1,879 @@ +/** + * Copyright (c) 2023 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. + */ + +// @generated by protoc-gen-es v1.3.3 with parameter "target=ts" +// @generated from file gitpod/experimental/v2/workspace.proto (package gitpod.experimental.v2, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3, protoInt64, Timestamp } from "@bufbuild/protobuf"; + +/** + * Admission level describes who can access a workspace instance and its ports. + * + * @generated from enum gitpod.experimental.v2.AdmissionLevel + */ +export enum AdmissionLevel { + /** + * @generated from enum value: ADMISSION_LEVEL_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * ADMISSION_LEVEL_OWNER_ONLY means the workspace can only be accessed using + * the owner token + * + * @generated from enum value: ADMISSION_LEVEL_OWNER_ONLY = 1; + */ + OWNER_ONLY = 1, + + /** + * ADMISSION_LEVEL_EVERYONE means the workspace (including ports) can be + * accessed by everyone. + * + * @generated from enum value: ADMISSION_LEVEL_EVERYONE = 2; + */ + EVERYONE = 2, +} +// Retrieve enum metadata with: proto3.getEnumType(AdmissionLevel) +proto3.util.setEnumType(AdmissionLevel, "gitpod.experimental.v2.AdmissionLevel", [ + { no: 0, name: "ADMISSION_LEVEL_UNSPECIFIED" }, + { no: 1, name: "ADMISSION_LEVEL_OWNER_ONLY" }, + { no: 2, name: "ADMISSION_LEVEL_EVERYONE" }, +]); + +/** + * @generated from message gitpod.experimental.v2.GetWorkspaceRequest + */ +export class GetWorkspaceRequest extends Message { + /** + * @generated from field: string id = 1; + */ + id = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "gitpod.experimental.v2.GetWorkspaceRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): GetWorkspaceRequest { + return new GetWorkspaceRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): GetWorkspaceRequest { + return new GetWorkspaceRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): GetWorkspaceRequest { + return new GetWorkspaceRequest().fromJsonString(jsonString, options); + } + + static equals(a: GetWorkspaceRequest | PlainMessage | undefined, b: GetWorkspaceRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(GetWorkspaceRequest, a, b); + } +} + +/** + * @generated from message gitpod.experimental.v2.GetWorkspaceResponse + */ +export class GetWorkspaceResponse extends Message { + /** + * @generated from field: gitpod.experimental.v2.Workspace item = 1; + */ + item?: Workspace; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "gitpod.experimental.v2.GetWorkspaceResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "item", kind: "message", T: Workspace }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): GetWorkspaceResponse { + return new GetWorkspaceResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): GetWorkspaceResponse { + return new GetWorkspaceResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): GetWorkspaceResponse { + return new GetWorkspaceResponse().fromJsonString(jsonString, options); + } + + static equals(a: GetWorkspaceResponse | PlainMessage | undefined, b: GetWorkspaceResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(GetWorkspaceResponse, a, b); + } +} + +/** + * +resource get workspace + * + * @generated from message gitpod.experimental.v2.Workspace + */ +export class Workspace extends Message { + /** + * @generated from field: string id = 1; + */ + id = ""; + + /** + * prebuild indicates it is a prebuild + * TODO(ak) model prebuilds as a separate resource + * + * @generated from field: bool prebuild = 2; + */ + prebuild = false; + + /** + * @generated from field: string organization_id = 3; + */ + organizationId = ""; + + /** + * @generated from field: string name = 4; + */ + name = ""; + + /** + * @generated from field: bool pinned = 5; + */ + pinned = false; + + /** + * @generated from field: gitpod.experimental.v2.WorkspaceStatus status = 6; + */ + status?: WorkspaceStatus; + + /** + * additional_environment_variables provide additional environment variables + * which take precedence over environment variables provided by the project + * and user. + * + * +optional + * + * @generated from field: repeated gitpod.experimental.v2.WorkspaceEnvironmentVariable additional_environment_variables = 7; + */ + additionalEnvironmentVariables: WorkspaceEnvironmentVariable[] = []; + + /** + * region specifies the region in which the workspace will be created. + * Obtain available regions using the ListRegions operation. + * + * +optional defaults to the user's default region + * + * @generated from field: optional string region = 8; + */ + region?: string; + + /** + * workspace_class specifies the workspace class with which to create the + * workspace. Obtain available workspace classes using the ListWorkspaceClass + * operation. + * + * +optional defaults to the class configured on the project or the cluster's + * default class. + * + * @generated from field: optional string workspace_class = 9; + */ + workspaceClass?: string; + + /** + * editor specifies the editor that will be used with this workspace. + * Obtain available editors using the EditorService.ListEditors operation. + * + * +optional defaults to the default editor of the user + * + * @generated from field: optional gitpod.experimental.v2.EditorReference editor = 10; + */ + editor?: EditorReference; + + /** + * context_url is the normalized URL from which the workspace was created + * TODO(ak) replace with resolveContextURL API + * + * @generated from field: string context_url = 11; + */ + contextUrl = ""; + + /** + * Prebuild ID is the unique identifier of the prebuild + * from which this workspace was created + * +optional if empty then this workspace was not created from a prebuild + * + * @generated from field: optional string prebuild_id = 12; + */ + prebuildId?: string; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "gitpod.experimental.v2.Workspace"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "prebuild", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 3, name: "organization_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "pinned", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 6, name: "status", kind: "message", T: WorkspaceStatus }, + { no: 7, name: "additional_environment_variables", kind: "message", T: WorkspaceEnvironmentVariable, repeated: true }, + { no: 8, name: "region", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 9, name: "workspace_class", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 10, name: "editor", kind: "message", T: EditorReference, opt: true }, + { no: 11, name: "context_url", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 12, name: "prebuild_id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Workspace { + return new Workspace().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Workspace { + return new Workspace().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Workspace { + return new Workspace().fromJsonString(jsonString, options); + } + + static equals(a: Workspace | PlainMessage | undefined, b: Workspace | PlainMessage | undefined): boolean { + return proto3.util.equals(Workspace, a, b); + } +} + +/** + * @generated from message gitpod.experimental.v2.WorkspaceStatus + */ +export class WorkspaceStatus extends Message { + /** + * Phase is a simple, high-level summary of where the workspace is in its + * lifecycle. The phase is not intended to be a comprehensive rollup of + * observations of the workspace state, nor is it intended to be a + * comprehensive state machine. + * + * @generated from field: gitpod.experimental.v2.WorkspacePhase phase = 1; + */ + phase?: WorkspacePhase; + + /** + * message is an optional human-readable message detailing the current phase + * + * @generated from field: optional string message = 2; + */ + message?: string; + + /** + * workspace_url is the URL of the workspace. Only present when the phase is + * running. + * + * @generated from field: string workspace_url = 3; + */ + workspaceUrl = ""; + + /** + * git_status details the Git working copy status of the workspace. + * Note: this is a best-effort field and more often than not will not be + * present. Its absence does not indicate the absence of a working copy. + * + * @generated from field: gitpod.experimental.v2.WorkspaceGitStatus git_status = 4; + */ + gitStatus?: WorkspaceGitStatus; + + /** + * ports lists the network ports currently available/known of this workspace + * + * @generated from field: repeated gitpod.experimental.v2.WorkspacePort ports = 5; + */ + ports: WorkspacePort[] = []; + + /** + * Admission describes who can access a workspace instance and its ports. + * + * @generated from field: gitpod.experimental.v2.AdmissionLevel admission = 6; + */ + admission = AdmissionLevel.UNSPECIFIED; + + /** + * Instance ID is the unique identifier of the workspace instance + * + * @generated from field: string instance_id = 7; + */ + instanceId = ""; + + /** + * Conditions contains observations of the workspace's current phase. + * + * @generated from field: gitpod.experimental.v2.WorkspaceConditions conditions = 8; + */ + conditions?: WorkspaceConditions; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "gitpod.experimental.v2.WorkspaceStatus"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "phase", kind: "message", T: WorkspacePhase }, + { no: 2, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 3, name: "workspace_url", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "git_status", kind: "message", T: WorkspaceGitStatus }, + { no: 5, name: "ports", kind: "message", T: WorkspacePort, repeated: true }, + { no: 6, name: "admission", kind: "enum", T: proto3.getEnumType(AdmissionLevel) }, + { no: 7, name: "instance_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 8, name: "conditions", kind: "message", T: WorkspaceConditions }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): WorkspaceStatus { + return new WorkspaceStatus().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): WorkspaceStatus { + return new WorkspaceStatus().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): WorkspaceStatus { + return new WorkspaceStatus().fromJsonString(jsonString, options); + } + + static equals(a: WorkspaceStatus | PlainMessage | undefined, b: WorkspaceStatus | PlainMessage | undefined): boolean { + return proto3.util.equals(WorkspaceStatus, a, b); + } +} + +/** + * @generated from message gitpod.experimental.v2.WorkspaceConditions + */ +export class WorkspaceConditions extends Message { + /** + * failed contains technical details for the failure of the workspace. + * +optional If this field is empty, the workspace has not failed. + * + * @generated from field: optional string failed = 1; + */ + failed?: string; + + /** + * timeout contains the reason the workspace has timed out. + * +optional If this field is empty, the workspace has not timed out. + * + * @generated from field: optional string timeout = 2; + */ + timeout?: string; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "gitpod.experimental.v2.WorkspaceConditions"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "failed", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 2, name: "timeout", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): WorkspaceConditions { + return new WorkspaceConditions().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): WorkspaceConditions { + return new WorkspaceConditions().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): WorkspaceConditions { + return new WorkspaceConditions().fromJsonString(jsonString, options); + } + + static equals(a: WorkspaceConditions | PlainMessage | undefined, b: WorkspaceConditions | PlainMessage | undefined): boolean { + return proto3.util.equals(WorkspaceConditions, a, b); + } +} + +/** + * @generated from message gitpod.experimental.v2.WorkspacePort + */ +export class WorkspacePort extends Message { + /** + * port number + * + * @generated from field: uint64 port = 1; + */ + port = protoInt64.zero; + + /** + * policy of this port + * + * @generated from field: gitpod.experimental.v2.WorkspacePort.Policy policy = 2; + */ + policy = WorkspacePort_Policy.UNSPECIFIED; + + /** + * url that can be used to access the port + * + * @generated from field: string url = 3; + */ + url = ""; + + /** + * backend protocol of this port + * + * @generated from field: gitpod.experimental.v2.WorkspacePort.Protocol protocol = 4; + */ + protocol = WorkspacePort_Protocol.UNSPECIFIED; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "gitpod.experimental.v2.WorkspacePort"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "port", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, + { no: 2, name: "policy", kind: "enum", T: proto3.getEnumType(WorkspacePort_Policy) }, + { no: 3, name: "url", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "protocol", kind: "enum", T: proto3.getEnumType(WorkspacePort_Protocol) }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): WorkspacePort { + return new WorkspacePort().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): WorkspacePort { + return new WorkspacePort().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): WorkspacePort { + return new WorkspacePort().fromJsonString(jsonString, options); + } + + static equals(a: WorkspacePort | PlainMessage | undefined, b: WorkspacePort | PlainMessage | undefined): boolean { + return proto3.util.equals(WorkspacePort, a, b); + } +} + +/** + * Policy defines the accssbility policy of a workspace port is guarded by an + * authentication in the proxy + * + * @generated from enum gitpod.experimental.v2.WorkspacePort.Policy + */ +export enum WorkspacePort_Policy { + /** + * @generated from enum value: POLICY_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * Private means the port is accessible by the workspace owner only using + * the workspace port URL + * + * @generated from enum value: POLICY_PRIVATE = 1; + */ + PRIVATE = 1, + + /** + * Public means the port is accessible by everybody using the workspace port + * URL + * + * @generated from enum value: POLICY_PUBLIC = 2; + */ + PUBLIC = 2, +} +// Retrieve enum metadata with: proto3.getEnumType(WorkspacePort_Policy) +proto3.util.setEnumType(WorkspacePort_Policy, "gitpod.experimental.v2.WorkspacePort.Policy", [ + { no: 0, name: "POLICY_UNSPECIFIED" }, + { no: 1, name: "POLICY_PRIVATE" }, + { no: 2, name: "POLICY_PUBLIC" }, +]); + +/** + * Protocol defines the backend protocol of port + * + * @generated from enum gitpod.experimental.v2.WorkspacePort.Protocol + */ +export enum WorkspacePort_Protocol { + /** + * @generated from enum value: PROTOCOL_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * Http means the port backend is http + * + * @generated from enum value: PROTOCOL_HTTP = 1; + */ + HTTP = 1, + + /** + * Https means the port backend is https + * + * @generated from enum value: PROTOCOL_HTTPS = 2; + */ + HTTPS = 2, +} +// Retrieve enum metadata with: proto3.getEnumType(WorkspacePort_Protocol) +proto3.util.setEnumType(WorkspacePort_Protocol, "gitpod.experimental.v2.WorkspacePort.Protocol", [ + { no: 0, name: "PROTOCOL_UNSPECIFIED" }, + { no: 1, name: "PROTOCOL_HTTP" }, + { no: 2, name: "PROTOCOL_HTTPS" }, +]); + +/** + * @generated from message gitpod.experimental.v2.WorkspaceGitStatus + */ +export class WorkspaceGitStatus extends Message { + /** + * clone_url is the repository url as you would pass it to "git clone". + * Only HTTPS clone URLs are supported. + * + * @generated from field: string clone_url = 1; + */ + cloneUrl = ""; + + /** + * branch is branch we're currently on + * + * @generated from field: string branch = 2; + */ + branch = ""; + + /** + * latest_commit is the most recent commit on the current branch + * + * @generated from field: string latest_commit = 3; + */ + latestCommit = ""; + + /** + * uncommited_files is an array of uncommitted files, possibly truncated + * + * @generated from field: repeated string uncommited_files = 4; + */ + uncommitedFiles: string[] = []; + + /** + * the total number of uncommited files + * + * @generated from field: int32 total_uncommited_files = 5; + */ + totalUncommitedFiles = 0; + + /** + * untracked_files is an array of untracked files in the workspace, possibly + * truncated + * + * @generated from field: repeated string untracked_files = 6; + */ + untrackedFiles: string[] = []; + + /** + * the total number of untracked files + * + * @generated from field: int32 total_untracked_files = 7; + */ + totalUntrackedFiles = 0; + + /** + * unpushed_commits is an array of unpushed changes in the workspace, possibly + * truncated + * + * @generated from field: repeated string unpushed_commits = 8; + */ + unpushedCommits: string[] = []; + + /** + * the total number of unpushed changes + * + * @generated from field: int32 total_unpushed_commits = 9; + */ + totalUnpushedCommits = 0; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "gitpod.experimental.v2.WorkspaceGitStatus"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "clone_url", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "branch", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "latest_commit", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "uncommited_files", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 5, name: "total_uncommited_files", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, + { no: 6, name: "untracked_files", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 7, name: "total_untracked_files", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, + { no: 8, name: "unpushed_commits", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 9, name: "total_unpushed_commits", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): WorkspaceGitStatus { + return new WorkspaceGitStatus().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): WorkspaceGitStatus { + return new WorkspaceGitStatus().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): WorkspaceGitStatus { + return new WorkspaceGitStatus().fromJsonString(jsonString, options); + } + + static equals(a: WorkspaceGitStatus | PlainMessage | undefined, b: WorkspaceGitStatus | PlainMessage | undefined): boolean { + return proto3.util.equals(WorkspaceGitStatus, a, b); + } +} + +/** + * @generated from message gitpod.experimental.v2.WorkspacePhase + */ +export class WorkspacePhase extends Message { + /** + * @generated from field: gitpod.experimental.v2.WorkspacePhase.Phase name = 1; + */ + name = WorkspacePhase_Phase.UNSPECIFIED; + + /** + * @generated from field: google.protobuf.Timestamp last_transition_time = 2; + */ + lastTransitionTime?: Timestamp; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "gitpod.experimental.v2.WorkspacePhase"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "name", kind: "enum", T: proto3.getEnumType(WorkspacePhase_Phase) }, + { no: 2, name: "last_transition_time", kind: "message", T: Timestamp }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): WorkspacePhase { + return new WorkspacePhase().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): WorkspacePhase { + return new WorkspacePhase().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): WorkspacePhase { + return new WorkspacePhase().fromJsonString(jsonString, options); + } + + static equals(a: WorkspacePhase | PlainMessage | undefined, b: WorkspacePhase | PlainMessage | undefined): boolean { + return proto3.util.equals(WorkspacePhase, a, b); + } +} + +/** + * @generated from enum gitpod.experimental.v2.WorkspacePhase.Phase + */ +export enum WorkspacePhase_Phase { + /** + * Unknown indicates an issue within the workspace manager in that it cannot + * determine the actual phase of a workspace. This phase is usually + * accompanied by an error. + * + * @generated from enum value: PHASE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * Preparing means that we haven't actually started the workspace instance + * just yet, but rather are still preparing for launch. + * + * @generated from enum value: PHASE_PREPARING = 1; + */ + PREPARING = 1, + + /** + * ImageBuild indicates that there's an image build running for this + * workspace. + * + * @generated from enum value: PHASE_IMAGEBUILD = 2; + */ + IMAGEBUILD = 2, + + /** + * Pending means the workspace does not yet consume resources in the + * cluster, but rather is looking for some space within the cluster. If for + * example the cluster needs to scale up to accomodate the workspace, the + * workspace will be in Pending state until that happened. + * + * @generated from enum value: PHASE_PENDING = 3; + */ + PENDING = 3, + + /** + * Creating means the workspace is currently being created. That includes + * downloading the images required to run the workspace over the network. + * The time spent in this phase varies widely and depends on the current + * network speed, image size and cache states. + * + * @generated from enum value: PHASE_CREATING = 4; + */ + CREATING = 4, + + /** + * Initializing is the phase in which the workspace is executing the + * appropriate workspace initializer (e.g. Git clone or backup download). + * After this phase one can expect the workspace to either be Running or + * Failed. + * + * @generated from enum value: PHASE_INITIALIZING = 5; + */ + INITIALIZING = 5, + + /** + * Running means the workspace is able to actively perform work, either by + * serving a user through Theia, or as a headless workspace. + * + * @generated from enum value: PHASE_RUNNING = 6; + */ + RUNNING = 6, + + /** + * Interrupted is an exceptional state where the container should be running + * but is temporarily unavailable. When in this state, we expect it to + * become running or stopping anytime soon. + * + * @generated from enum value: PHASE_INTERRUPTED = 7; + */ + INTERRUPTED = 7, + + /** + * Stopping means that the workspace is currently shutting down. It could go + * to stopped every moment. + * + * @generated from enum value: PHASE_STOPPING = 8; + */ + STOPPING = 8, + + /** + * Stopped means the workspace ended regularly because it was shut down. + * + * @generated from enum value: PHASE_STOPPED = 9; + */ + STOPPED = 9, +} +// Retrieve enum metadata with: proto3.getEnumType(WorkspacePhase_Phase) +proto3.util.setEnumType(WorkspacePhase_Phase, "gitpod.experimental.v2.WorkspacePhase.Phase", [ + { no: 0, name: "PHASE_UNSPECIFIED" }, + { no: 1, name: "PHASE_PREPARING" }, + { no: 2, name: "PHASE_IMAGEBUILD" }, + { no: 3, name: "PHASE_PENDING" }, + { no: 4, name: "PHASE_CREATING" }, + { no: 5, name: "PHASE_INITIALIZING" }, + { no: 6, name: "PHASE_RUNNING" }, + { no: 7, name: "PHASE_INTERRUPTED" }, + { no: 8, name: "PHASE_STOPPING" }, + { no: 9, name: "PHASE_STOPPED" }, +]); + +/** + * @generated from message gitpod.experimental.v2.EditorReference + */ +export class EditorReference extends Message { + /** + * @generated from field: string name = 1; + */ + name = ""; + + /** + * @generated from field: string version = 2; + */ + version = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "gitpod.experimental.v2.EditorReference"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "version", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): EditorReference { + return new EditorReference().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): EditorReference { + return new EditorReference().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): EditorReference { + return new EditorReference().fromJsonString(jsonString, options); + } + + static equals(a: EditorReference | PlainMessage | undefined, b: EditorReference | PlainMessage | undefined): boolean { + return proto3.util.equals(EditorReference, a, b); + } +} + +/** + * @generated from message gitpod.experimental.v2.WorkspaceEnvironmentVariable + */ +export class WorkspaceEnvironmentVariable extends Message { + /** + * @generated from field: string name = 1; + */ + name = ""; + + /** + * @generated from field: optional string value = 2; + */ + value?: string; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "gitpod.experimental.v2.WorkspaceEnvironmentVariable"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): WorkspaceEnvironmentVariable { + return new WorkspaceEnvironmentVariable().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): WorkspaceEnvironmentVariable { + return new WorkspaceEnvironmentVariable().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): WorkspaceEnvironmentVariable { + return new WorkspaceEnvironmentVariable().fromJsonString(jsonString, options); + } + + static equals(a: WorkspaceEnvironmentVariable | PlainMessage | undefined, b: WorkspaceEnvironmentVariable | PlainMessage | undefined): boolean { + return proto3.util.equals(WorkspaceEnvironmentVariable, a, b); + } +}