diff --git a/components/dashboard/src/data/setup.tsx b/components/dashboard/src/data/setup.tsx index ba787e844218e2..28d2ac4ea6a0e0 100644 --- a/components/dashboard/src/data/setup.tsx +++ b/components/dashboard/src/data/setup.tsx @@ -31,7 +31,7 @@ import * as SSHClasses from "@gitpod/public-api/lib/gitpod/v1/ssh_pb"; // This is used to version the cache // If data we cache changes in a non-backwards compatible way, increment this version // That will bust any previous cache versions a client may have stored -const CACHE_VERSION = "9"; +const CACHE_VERSION = "10"; export function noPersistence(queryKey: QueryKey): QueryKey { return [...queryKey, "no-persistence"]; diff --git a/components/dashboard/src/data/workspaces/default-workspace-image-query.ts b/components/dashboard/src/data/workspaces/default-workspace-image-query.ts index 20e2b04cc5f051..f8041db828c555 100644 --- a/components/dashboard/src/data/workspaces/default-workspace-image-query.ts +++ b/components/dashboard/src/data/workspaces/default-workspace-image-query.ts @@ -7,13 +7,26 @@ import { useQuery } from "@tanstack/react-query"; import { getGitpodService } from "../../service/service"; import { GetDefaultWorkspaceImageResult } from "@gitpod/gitpod-protocol"; +import { GetWorkspaceDefaultImageResponse } from "@gitpod/public-api/lib/gitpod/v1/workspace_pb"; +import { workspaceClient } from "../../service/public-api"; export const useDefaultWorkspaceImageQuery = (workspaceId?: string) => { return useQuery({ queryKey: ["default-workspace-image", { workspaceId }], staleTime: 1000 * 60 * 10, // 10 minute queryFn: async () => { + // without `workspaceId` getDefaultWorkspaceImage will return org setting and if not set fallback to installation return await getGitpodService().server.getDefaultWorkspaceImage({ workspaceId }); }, }); }; + +export const useWorkspaceDefaultImageQuery = (workspaceId: string) => { + return useQuery({ + queryKey: ["default-workspace-image-v2", { workspaceId }], + staleTime: 1000 * 60 * 10, // 10 minute + queryFn: async () => { + return await workspaceClient.getWorkspaceDefaultImage({ workspaceId }); + }, + }); +}; diff --git a/components/dashboard/src/service/json-rpc-workspace-client.ts b/components/dashboard/src/service/json-rpc-workspace-client.ts index 51de57128bec62..246444eb5d9f0d 100644 --- a/components/dashboard/src/service/json-rpc-workspace-client.ts +++ b/components/dashboard/src/service/json-rpc-workspace-client.ts @@ -18,6 +18,16 @@ import { WatchWorkspaceStatusResponse, ListWorkspacesRequest, ListWorkspacesResponse, + GetWorkspaceDefaultImageRequest, + GetWorkspaceDefaultImageResponse, + GetWorkspaceEditorCredentialsRequest, + GetWorkspaceEditorCredentialsResponse, + GetWorkspaceOwnerTokenRequest, + GetWorkspaceOwnerTokenResponse, + SendHeartBeatRequest, + SendHeartBeatResponse, + WorkspacePhase_Phase, + GetWorkspaceDefaultImageResponse_Source, } from "@gitpod/public-api/lib/gitpod/v1/workspace_pb"; import { converter } from "./public-api"; import { getGitpodService } from "./service"; @@ -160,4 +170,74 @@ export class JsonRpcWorkspaceClient implements PromiseClient, + _options?: CallOptions | undefined, + ): Promise { + if (!request.workspaceId) { + throw new ApplicationError(ErrorCodes.BAD_REQUEST, "workspaceId is required"); + } + const response = await getGitpodService().server.getDefaultWorkspaceImage({ + workspaceId: request.workspaceId, + }); + const result = new GetWorkspaceDefaultImageResponse(); + result.defaultWorkspaceImage = response.image; + switch (response.source) { + case "installation": + result.source = GetWorkspaceDefaultImageResponse_Source.INSTALLATION; + break; + case "organization": + result.source = GetWorkspaceDefaultImageResponse_Source.ORGANIZATION; + break; + } + return result; + } + + async sendHeartBeat( + request: PartialMessage, + _options?: CallOptions | undefined, + ): Promise { + if (!request.workspaceId) { + throw new ApplicationError(ErrorCodes.BAD_REQUEST, "workspaceId is required"); + } + const workspace = await this.getWorkspace({ workspaceId: request.workspaceId }); + if ( + !workspace.workspace?.status?.phase || + workspace.workspace.status.phase.name !== WorkspacePhase_Phase.RUNNING + ) { + throw new ApplicationError(ErrorCodes.PRECONDITION_FAILED, "workspace is not running"); + } + await getGitpodService().server.sendHeartBeat({ + instanceId: workspace.workspace.status.instanceId, + wasClosed: request.disconnected === true, + }); + return new SendHeartBeatResponse(); + } + + async getWorkspaceOwnerToken( + request: PartialMessage, + _options?: CallOptions | undefined, + ): Promise { + if (!request.workspaceId) { + throw new ApplicationError(ErrorCodes.BAD_REQUEST, "workspaceId is required"); + } + const ownerToken = await getGitpodService().server.getOwnerToken(request.workspaceId); + const result = new GetWorkspaceOwnerTokenResponse(); + result.ownerToken = ownerToken; + return result; + } + + async getWorkspaceEditorCredentials( + request: PartialMessage, + _options?: CallOptions | undefined, + ): Promise { + if (!request.workspaceId) { + throw new ApplicationError(ErrorCodes.BAD_REQUEST, "workspaceId is required"); + } + const credentials = await getGitpodService().server.getIDECredentials(request.workspaceId); + const result = new GetWorkspaceEditorCredentialsResponse(); + result.editorCredentials = credentials; + return result; + } } diff --git a/components/dashboard/src/service/service.tsx b/components/dashboard/src/service/service.tsx index bf782fe39f5c36..834677f5e745bf 100644 --- a/components/dashboard/src/service/service.tsx +++ b/components/dashboard/src/service/service.tsx @@ -19,7 +19,7 @@ import { GitpodHostUrl } from "@gitpod/gitpod-protocol/lib/util/gitpod-host-url" import { log } from "@gitpod/gitpod-protocol/lib/util/logging"; import { IDEFrontendDashboardService } from "@gitpod/gitpod-protocol/lib/frontend-dashboard-service"; import { RemoteTrackMessage } from "@gitpod/gitpod-protocol/lib/analytics"; -import { helloService } from "./public-api"; +import { helloService, workspaceClient } from "./public-api"; import { getExperimentsClient } from "../experiments/client"; import { ConnectError, Code } from "@connectrpc/connect"; import { instrumentWebSocket } from "./metrics"; @@ -237,7 +237,9 @@ export class IDEFrontendService implements IDEFrontendDashboardService.IServer { const [user, listener, ideCredentials] = await Promise.all([ this.service.server.getLoggedInUser(), this.service.listenToInstance(this.workspaceID), - this.service.server.getIDECredentials(this.workspaceID), + workspaceClient + .getWorkspaceEditorCredentials({ workspaceId: this.workspaceID }) + .then((resp) => resp.editorCredentials), ]); this.user = user; this.ideCredentials = ideCredentials; @@ -299,8 +301,8 @@ export class IDEFrontendService implements IDEFrontendDashboardService.IServer { } private activeHeartbeat(): void { - if (this.instanceID) { - this.service.server.sendHeartBeat({ instanceId: this.instanceID }); + if (this.workspaceID) { + workspaceClient.sendHeartBeat({ workspaceId: this.workspaceID }); } } diff --git a/components/dashboard/src/start/StartPage.tsx b/components/dashboard/src/start/StartPage.tsx index 8002c2bf024475..eeaf6998d2ac64 100644 --- a/components/dashboard/src/start/StartPage.tsx +++ b/components/dashboard/src/start/StartPage.tsx @@ -12,7 +12,8 @@ import { useDocumentTitle } from "../hooks/use-document-title"; import gitpodIcon from "../icons/gitpod.svg"; import { gitpodHostUrl } from "../service/service"; import { VerifyModal } from "./VerifyModal"; -import { useDefaultWorkspaceImageQuery } from "../data/workspaces/default-workspace-image-query"; +import { useWorkspaceDefaultImageQuery } from "../data/workspaces/default-workspace-image-query"; +import { GetWorkspaceDefaultImageResponse_Source } from "@gitpod/public-api/lib/gitpod/v1/workspace_pb"; export enum StartPhase { Checking = 0, @@ -133,9 +134,14 @@ function StartError(props: { error: StartWorkspaceError }) { } function WarningView(props: { workspaceId?: string; showLatestIdeWarning?: boolean; error?: StartWorkspaceError }) { - const { data: imageInfo } = useDefaultWorkspaceImageQuery(props.workspaceId); + const { data: imageInfo } = useWorkspaceDefaultImageQuery(props.workspaceId ?? ""); let useWarning: "latestIde" | "orgImage" | undefined = props.showLatestIdeWarning ? "latestIde" : undefined; - if (props.error && props.workspaceId && imageInfo?.source === "organization") { + if ( + props.error && + props.workspaceId && + imageInfo && + imageInfo.source === GetWorkspaceDefaultImageResponse_Source.ORGANIZATION + ) { useWarning = "orgImage"; } return ( diff --git a/components/dashboard/src/start/StartWorkspace.tsx b/components/dashboard/src/start/StartWorkspace.tsx index e4ba2cbca73efb..eba9a44fbe2472 100644 --- a/components/dashboard/src/start/StartWorkspace.tsx +++ b/components/dashboard/src/start/StartWorkspace.tsx @@ -22,7 +22,13 @@ import Alert from "../components/Alert"; import { workspaceClient, workspacesService } from "../service/public-api"; import { watchWorkspaceStatus } from "../data/workspaces/listen-to-workspace-ws-messages"; import { Button } from "@podkit/buttons/Button"; -import { GetWorkspaceRequest, StartWorkspaceRequest, StartWorkspaceResponse, Workspace, WorkspacePhase_Phase } from "@gitpod/public-api/lib/gitpod/v1/workspace_pb"; +import { + GetWorkspaceRequest, + StartWorkspaceRequest, + StartWorkspaceResponse, + Workspace, + WorkspacePhase_Phase, +} from "@gitpod/public-api/lib/gitpod/v1/workspace_pb"; import { PartialMessage } from "@bufbuild/protobuf"; const sessionId = v4(); @@ -575,10 +581,13 @@ export default class StartWorkspace extends React.Component { - const ownerToken = await getGitpodService().server.getOwnerToken( - this.props.workspaceId, - ); - this.setState({ isSSHModalVisible: true, ownerToken }); + const response = await workspaceClient.getWorkspaceOwnerToken({ + workspaceId: this.props.workspaceId, + }); + this.setState({ + isSSHModalVisible: true, + ownerToken: response.ownerToken, + }); }, }, { diff --git a/components/dashboard/src/workspaces/WorkspaceOverflowMenu.tsx b/components/dashboard/src/workspaces/WorkspaceOverflowMenu.tsx index 92a4263f8b78d6..953dd742f69d0b 100644 --- a/components/dashboard/src/workspaces/WorkspaceOverflowMenu.tsx +++ b/components/dashboard/src/workspaces/WorkspaceOverflowMenu.tsx @@ -11,12 +11,12 @@ import { ItemFieldContextMenu } from "../components/ItemsList"; import { useStopWorkspaceMutation } from "../data/workspaces/stop-workspace-mutation"; import { useToggleWorkspacedPinnedMutation } from "../data/workspaces/toggle-workspace-pinned-mutation"; import { useToggleWorkspaceSharedMutation } from "../data/workspaces/toggle-workspace-shared-mutation"; -import { getGitpodService } from "../service/service"; import ConnectToSSHModal from "./ConnectToSSHModal"; import { DeleteWorkspaceModal } from "./DeleteWorkspaceModal"; import { useToast } from "../components/toasts/Toasts"; import { RenameWorkspaceModal } from "./RenameWorkspaceModal"; import { AdmissionLevel, Workspace, WorkspacePhase_Phase } from "@gitpod/public-api/lib/gitpod/v1/workspace_pb"; +import { workspaceClient } from "../service/public-api"; type WorkspaceEntryOverflowMenuProps = { info: Workspace; @@ -42,8 +42,8 @@ export const WorkspaceEntryOverflowMenu: FunctionComponent { - const ot = await getGitpodService().server.getOwnerToken(workspace.id); - setOwnerToken(ot); + const response = await workspaceClient.getWorkspaceOwnerToken({ workspaceId: workspace.id }); + setOwnerToken(response.ownerToken); setSSHModalVisible(true); }, [workspace.id]); diff --git a/components/public-api/gitpod/v1/workspace.proto b/components/public-api/gitpod/v1/workspace.proto index 9670624a472cee..118c2f0ad575e4 100644 --- a/components/public-api/gitpod/v1/workspace.proto +++ b/components/public-api/gitpod/v1/workspace.proto @@ -29,6 +29,20 @@ service WorkspaceService { // StartWorkspace starts an existing workspace. // If the specified workspace is not in stopped phase, this will return the workspace as is. rpc StartWorkspace(StartWorkspaceRequest) returns (StartWorkspaceResponse) {} + + // GetWorkspaceDefaultImage returns the default workspace image of specified + // workspace. + rpc GetWorkspaceDefaultImage(GetWorkspaceDefaultImageRequest) returns (GetWorkspaceDefaultImageResponse) {} + + // SendHeartBeat sends a heartbeat to activate the workspace + rpc SendHeartBeat(SendHeartBeatRequest) returns (SendHeartBeatResponse) {} + + // GetWorkspaceOwnerToken returns an owner token of workspace. + rpc GetWorkspaceOwnerToken(GetWorkspaceOwnerTokenRequest) returns (GetWorkspaceOwnerTokenResponse) {} + + // GetWorkspaceEditorCredentials returns an credentials that is used in editor + // to encrypt and decrypt secrets + rpc GetWorkspaceEditorCredentials(GetWorkspaceEditorCredentialsRequest) returns (GetWorkspaceEditorCredentialsResponse) {} } message GetWorkspaceRequest { @@ -158,6 +172,52 @@ message StartWorkspaceResponse { Workspace workspace = 1; } +message GetWorkspaceDefaultImageRequest { + // workspace_id specifies the workspace to get default image + string workspace_id = 1; +} + +message GetWorkspaceDefaultImageResponse { + enum Source { + SOURCE_UNSPECIFIED = 0; + SOURCE_INSTALLATION = 1; + SOURCE_ORGANIZATION = 2; + } + + string default_workspace_image = 1; + + Source source = 2; +} + +message SendHeartBeatRequest { + // workspace_id specifies the workspace to send heartbeat + // + // +required + string workspace_id = 1; + + // disconnected indicates if the editor connection is disconnected. + // If set to true, the workspace will be stopped after Timeout.disconnected. + bool disconnected = 2; +} + +message SendHeartBeatResponse {} + +message GetWorkspaceOwnerTokenRequest { + string workspace_id = 1; +} + +message GetWorkspaceOwnerTokenResponse { + string owner_token = 1; +} + +message GetWorkspaceEditorCredentialsRequest { + string workspace_id = 1; +} + +message GetWorkspaceEditorCredentialsResponse { + string editor_credentials = 1; +} + // +resource get workspace message Workspace { string id = 1; diff --git a/components/public-api/go/v1/user.pb.go b/components/public-api/go/v1/user.pb.go index 8750f5ff82d51d..ea0d1217243127 100644 --- a/components/public-api/go/v1/user.pb.go +++ b/components/public-api/go/v1/user.pb.go @@ -253,7 +253,7 @@ type User struct { // // +optional if not set, this account is owned by the installation. OrganizationId string `protobuf:"bytes,2,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"` - // name is the username + // name is the full name of the user Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` // avatar_url is a link to the user avatar AvatarUrl string `protobuf:"bytes,4,opt,name=avatar_url,json=avatarUrl,proto3" json:"avatar_url,omitempty"` diff --git a/components/public-api/go/v1/v1connect/workspace.connect.go b/components/public-api/go/v1/v1connect/workspace.connect.go index 691ab0d6497e7d..6d8cb6d89c2996 100644 --- a/components/public-api/go/v1/v1connect/workspace.connect.go +++ b/components/public-api/go/v1/v1connect/workspace.connect.go @@ -47,6 +47,16 @@ type WorkspaceServiceClient interface { // StartWorkspace starts an existing workspace. // If the specified workspace is not in stopped phase, this will return the workspace as is. StartWorkspace(context.Context, *connect_go.Request[v1.StartWorkspaceRequest]) (*connect_go.Response[v1.StartWorkspaceResponse], error) + // GetWorkspaceDefaultImage returns the default workspace image of specified + // workspace. + GetWorkspaceDefaultImage(context.Context, *connect_go.Request[v1.GetWorkspaceDefaultImageRequest]) (*connect_go.Response[v1.GetWorkspaceDefaultImageResponse], error) + // SendHeartBeat sends a heartbeat to activate the workspace + SendHeartBeat(context.Context, *connect_go.Request[v1.SendHeartBeatRequest]) (*connect_go.Response[v1.SendHeartBeatResponse], error) + // GetWorkspaceOwnerToken returns an owner token of workspace. + GetWorkspaceOwnerToken(context.Context, *connect_go.Request[v1.GetWorkspaceOwnerTokenRequest]) (*connect_go.Response[v1.GetWorkspaceOwnerTokenResponse], error) + // GetWorkspaceEditorCredentials returns an credentials that is used in editor + // to encrypt and decrypt secrets + GetWorkspaceEditorCredentials(context.Context, *connect_go.Request[v1.GetWorkspaceEditorCredentialsRequest]) (*connect_go.Response[v1.GetWorkspaceEditorCredentialsResponse], error) } // NewWorkspaceServiceClient constructs a client for the gitpod.v1.WorkspaceService service. By @@ -84,16 +94,40 @@ func NewWorkspaceServiceClient(httpClient connect_go.HTTPClient, baseURL string, baseURL+"/gitpod.v1.WorkspaceService/StartWorkspace", opts..., ), + getWorkspaceDefaultImage: connect_go.NewClient[v1.GetWorkspaceDefaultImageRequest, v1.GetWorkspaceDefaultImageResponse]( + httpClient, + baseURL+"/gitpod.v1.WorkspaceService/GetWorkspaceDefaultImage", + opts..., + ), + sendHeartBeat: connect_go.NewClient[v1.SendHeartBeatRequest, v1.SendHeartBeatResponse]( + httpClient, + baseURL+"/gitpod.v1.WorkspaceService/SendHeartBeat", + opts..., + ), + getWorkspaceOwnerToken: connect_go.NewClient[v1.GetWorkspaceOwnerTokenRequest, v1.GetWorkspaceOwnerTokenResponse]( + httpClient, + baseURL+"/gitpod.v1.WorkspaceService/GetWorkspaceOwnerToken", + opts..., + ), + getWorkspaceEditorCredentials: connect_go.NewClient[v1.GetWorkspaceEditorCredentialsRequest, v1.GetWorkspaceEditorCredentialsResponse]( + httpClient, + baseURL+"/gitpod.v1.WorkspaceService/GetWorkspaceEditorCredentials", + opts..., + ), } } // workspaceServiceClient implements WorkspaceServiceClient. type workspaceServiceClient struct { - getWorkspace *connect_go.Client[v1.GetWorkspaceRequest, v1.GetWorkspaceResponse] - watchWorkspaceStatus *connect_go.Client[v1.WatchWorkspaceStatusRequest, v1.WatchWorkspaceStatusResponse] - listWorkspaces *connect_go.Client[v1.ListWorkspacesRequest, v1.ListWorkspacesResponse] - createAndStartWorkspace *connect_go.Client[v1.CreateAndStartWorkspaceRequest, v1.CreateAndStartWorkspaceResponse] - startWorkspace *connect_go.Client[v1.StartWorkspaceRequest, v1.StartWorkspaceResponse] + getWorkspace *connect_go.Client[v1.GetWorkspaceRequest, v1.GetWorkspaceResponse] + watchWorkspaceStatus *connect_go.Client[v1.WatchWorkspaceStatusRequest, v1.WatchWorkspaceStatusResponse] + listWorkspaces *connect_go.Client[v1.ListWorkspacesRequest, v1.ListWorkspacesResponse] + createAndStartWorkspace *connect_go.Client[v1.CreateAndStartWorkspaceRequest, v1.CreateAndStartWorkspaceResponse] + startWorkspace *connect_go.Client[v1.StartWorkspaceRequest, v1.StartWorkspaceResponse] + getWorkspaceDefaultImage *connect_go.Client[v1.GetWorkspaceDefaultImageRequest, v1.GetWorkspaceDefaultImageResponse] + sendHeartBeat *connect_go.Client[v1.SendHeartBeatRequest, v1.SendHeartBeatResponse] + getWorkspaceOwnerToken *connect_go.Client[v1.GetWorkspaceOwnerTokenRequest, v1.GetWorkspaceOwnerTokenResponse] + getWorkspaceEditorCredentials *connect_go.Client[v1.GetWorkspaceEditorCredentialsRequest, v1.GetWorkspaceEditorCredentialsResponse] } // GetWorkspace calls gitpod.v1.WorkspaceService.GetWorkspace. @@ -121,6 +155,26 @@ func (c *workspaceServiceClient) StartWorkspace(ctx context.Context, req *connec return c.startWorkspace.CallUnary(ctx, req) } +// GetWorkspaceDefaultImage calls gitpod.v1.WorkspaceService.GetWorkspaceDefaultImage. +func (c *workspaceServiceClient) GetWorkspaceDefaultImage(ctx context.Context, req *connect_go.Request[v1.GetWorkspaceDefaultImageRequest]) (*connect_go.Response[v1.GetWorkspaceDefaultImageResponse], error) { + return c.getWorkspaceDefaultImage.CallUnary(ctx, req) +} + +// SendHeartBeat calls gitpod.v1.WorkspaceService.SendHeartBeat. +func (c *workspaceServiceClient) SendHeartBeat(ctx context.Context, req *connect_go.Request[v1.SendHeartBeatRequest]) (*connect_go.Response[v1.SendHeartBeatResponse], error) { + return c.sendHeartBeat.CallUnary(ctx, req) +} + +// GetWorkspaceOwnerToken calls gitpod.v1.WorkspaceService.GetWorkspaceOwnerToken. +func (c *workspaceServiceClient) GetWorkspaceOwnerToken(ctx context.Context, req *connect_go.Request[v1.GetWorkspaceOwnerTokenRequest]) (*connect_go.Response[v1.GetWorkspaceOwnerTokenResponse], error) { + return c.getWorkspaceOwnerToken.CallUnary(ctx, req) +} + +// GetWorkspaceEditorCredentials calls gitpod.v1.WorkspaceService.GetWorkspaceEditorCredentials. +func (c *workspaceServiceClient) GetWorkspaceEditorCredentials(ctx context.Context, req *connect_go.Request[v1.GetWorkspaceEditorCredentialsRequest]) (*connect_go.Response[v1.GetWorkspaceEditorCredentialsResponse], error) { + return c.getWorkspaceEditorCredentials.CallUnary(ctx, req) +} + // WorkspaceServiceHandler is an implementation of the gitpod.v1.WorkspaceService service. type WorkspaceServiceHandler interface { // GetWorkspace returns a single workspace. @@ -139,6 +193,16 @@ type WorkspaceServiceHandler interface { // StartWorkspace starts an existing workspace. // If the specified workspace is not in stopped phase, this will return the workspace as is. StartWorkspace(context.Context, *connect_go.Request[v1.StartWorkspaceRequest]) (*connect_go.Response[v1.StartWorkspaceResponse], error) + // GetWorkspaceDefaultImage returns the default workspace image of specified + // workspace. + GetWorkspaceDefaultImage(context.Context, *connect_go.Request[v1.GetWorkspaceDefaultImageRequest]) (*connect_go.Response[v1.GetWorkspaceDefaultImageResponse], error) + // SendHeartBeat sends a heartbeat to activate the workspace + SendHeartBeat(context.Context, *connect_go.Request[v1.SendHeartBeatRequest]) (*connect_go.Response[v1.SendHeartBeatResponse], error) + // GetWorkspaceOwnerToken returns an owner token of workspace. + GetWorkspaceOwnerToken(context.Context, *connect_go.Request[v1.GetWorkspaceOwnerTokenRequest]) (*connect_go.Response[v1.GetWorkspaceOwnerTokenResponse], error) + // GetWorkspaceEditorCredentials returns an credentials that is used in editor + // to encrypt and decrypt secrets + GetWorkspaceEditorCredentials(context.Context, *connect_go.Request[v1.GetWorkspaceEditorCredentialsRequest]) (*connect_go.Response[v1.GetWorkspaceEditorCredentialsResponse], error) } // NewWorkspaceServiceHandler builds an HTTP handler from the service implementation. It returns the @@ -173,6 +237,26 @@ func NewWorkspaceServiceHandler(svc WorkspaceServiceHandler, opts ...connect_go. svc.StartWorkspace, opts..., )) + mux.Handle("/gitpod.v1.WorkspaceService/GetWorkspaceDefaultImage", connect_go.NewUnaryHandler( + "/gitpod.v1.WorkspaceService/GetWorkspaceDefaultImage", + svc.GetWorkspaceDefaultImage, + opts..., + )) + mux.Handle("/gitpod.v1.WorkspaceService/SendHeartBeat", connect_go.NewUnaryHandler( + "/gitpod.v1.WorkspaceService/SendHeartBeat", + svc.SendHeartBeat, + opts..., + )) + mux.Handle("/gitpod.v1.WorkspaceService/GetWorkspaceOwnerToken", connect_go.NewUnaryHandler( + "/gitpod.v1.WorkspaceService/GetWorkspaceOwnerToken", + svc.GetWorkspaceOwnerToken, + opts..., + )) + mux.Handle("/gitpod.v1.WorkspaceService/GetWorkspaceEditorCredentials", connect_go.NewUnaryHandler( + "/gitpod.v1.WorkspaceService/GetWorkspaceEditorCredentials", + svc.GetWorkspaceEditorCredentials, + opts..., + )) return "/gitpod.v1.WorkspaceService/", mux } @@ -198,3 +282,19 @@ func (UnimplementedWorkspaceServiceHandler) CreateAndStartWorkspace(context.Cont func (UnimplementedWorkspaceServiceHandler) StartWorkspace(context.Context, *connect_go.Request[v1.StartWorkspaceRequest]) (*connect_go.Response[v1.StartWorkspaceResponse], error) { return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("gitpod.v1.WorkspaceService.StartWorkspace is not implemented")) } + +func (UnimplementedWorkspaceServiceHandler) GetWorkspaceDefaultImage(context.Context, *connect_go.Request[v1.GetWorkspaceDefaultImageRequest]) (*connect_go.Response[v1.GetWorkspaceDefaultImageResponse], error) { + return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("gitpod.v1.WorkspaceService.GetWorkspaceDefaultImage is not implemented")) +} + +func (UnimplementedWorkspaceServiceHandler) SendHeartBeat(context.Context, *connect_go.Request[v1.SendHeartBeatRequest]) (*connect_go.Response[v1.SendHeartBeatResponse], error) { + return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("gitpod.v1.WorkspaceService.SendHeartBeat is not implemented")) +} + +func (UnimplementedWorkspaceServiceHandler) GetWorkspaceOwnerToken(context.Context, *connect_go.Request[v1.GetWorkspaceOwnerTokenRequest]) (*connect_go.Response[v1.GetWorkspaceOwnerTokenResponse], error) { + return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("gitpod.v1.WorkspaceService.GetWorkspaceOwnerToken is not implemented")) +} + +func (UnimplementedWorkspaceServiceHandler) GetWorkspaceEditorCredentials(context.Context, *connect_go.Request[v1.GetWorkspaceEditorCredentialsRequest]) (*connect_go.Response[v1.GetWorkspaceEditorCredentialsResponse], error) { + return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("gitpod.v1.WorkspaceService.GetWorkspaceEditorCredentials is not implemented")) +} diff --git a/components/public-api/go/v1/v1connect/workspace.proxy.connect.go b/components/public-api/go/v1/v1connect/workspace.proxy.connect.go index 0c5e4c6064d04a..4fb5753a2737d5 100644 --- a/components/public-api/go/v1/v1connect/workspace.proxy.connect.go +++ b/components/public-api/go/v1/v1connect/workspace.proxy.connect.go @@ -58,3 +58,43 @@ func (s *ProxyWorkspaceServiceHandler) StartWorkspace(ctx context.Context, req * return connect_go.NewResponse(resp), nil } + +func (s *ProxyWorkspaceServiceHandler) GetWorkspaceDefaultImage(ctx context.Context, req *connect_go.Request[v1.GetWorkspaceDefaultImageRequest]) (*connect_go.Response[v1.GetWorkspaceDefaultImageResponse], error) { + resp, err := s.Client.GetWorkspaceDefaultImage(ctx, req.Msg) + if err != nil { + // TODO(milan): Convert to correct status code + return nil, err + } + + return connect_go.NewResponse(resp), nil +} + +func (s *ProxyWorkspaceServiceHandler) SendHeartBeat(ctx context.Context, req *connect_go.Request[v1.SendHeartBeatRequest]) (*connect_go.Response[v1.SendHeartBeatResponse], error) { + resp, err := s.Client.SendHeartBeat(ctx, req.Msg) + if err != nil { + // TODO(milan): Convert to correct status code + return nil, err + } + + return connect_go.NewResponse(resp), nil +} + +func (s *ProxyWorkspaceServiceHandler) GetWorkspaceOwnerToken(ctx context.Context, req *connect_go.Request[v1.GetWorkspaceOwnerTokenRequest]) (*connect_go.Response[v1.GetWorkspaceOwnerTokenResponse], error) { + resp, err := s.Client.GetWorkspaceOwnerToken(ctx, req.Msg) + if err != nil { + // TODO(milan): Convert to correct status code + return nil, err + } + + return connect_go.NewResponse(resp), nil +} + +func (s *ProxyWorkspaceServiceHandler) GetWorkspaceEditorCredentials(ctx context.Context, req *connect_go.Request[v1.GetWorkspaceEditorCredentialsRequest]) (*connect_go.Response[v1.GetWorkspaceEditorCredentialsResponse], error) { + resp, err := s.Client.GetWorkspaceEditorCredentials(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/v1/workspace.pb.go b/components/public-api/go/v1/workspace.pb.go index 08b8fd3a8a6a53..28d9a832231cb8 100644 --- a/components/public-api/go/v1/workspace.pb.go +++ b/components/public-api/go/v1/workspace.pb.go @@ -79,6 +79,55 @@ func (AdmissionLevel) EnumDescriptor() ([]byte, []int) { return file_gitpod_v1_workspace_proto_rawDescGZIP(), []int{0} } +type GetWorkspaceDefaultImageResponse_Source int32 + +const ( + GetWorkspaceDefaultImageResponse_SOURCE_UNSPECIFIED GetWorkspaceDefaultImageResponse_Source = 0 + GetWorkspaceDefaultImageResponse_SOURCE_INSTALLATION GetWorkspaceDefaultImageResponse_Source = 1 + GetWorkspaceDefaultImageResponse_SOURCE_ORGANIZATION GetWorkspaceDefaultImageResponse_Source = 2 +) + +// Enum value maps for GetWorkspaceDefaultImageResponse_Source. +var ( + GetWorkspaceDefaultImageResponse_Source_name = map[int32]string{ + 0: "SOURCE_UNSPECIFIED", + 1: "SOURCE_INSTALLATION", + 2: "SOURCE_ORGANIZATION", + } + GetWorkspaceDefaultImageResponse_Source_value = map[string]int32{ + "SOURCE_UNSPECIFIED": 0, + "SOURCE_INSTALLATION": 1, + "SOURCE_ORGANIZATION": 2, + } +) + +func (x GetWorkspaceDefaultImageResponse_Source) Enum() *GetWorkspaceDefaultImageResponse_Source { + p := new(GetWorkspaceDefaultImageResponse_Source) + *p = x + return p +} + +func (x GetWorkspaceDefaultImageResponse_Source) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (GetWorkspaceDefaultImageResponse_Source) Descriptor() protoreflect.EnumDescriptor { + return file_gitpod_v1_workspace_proto_enumTypes[1].Descriptor() +} + +func (GetWorkspaceDefaultImageResponse_Source) Type() protoreflect.EnumType { + return &file_gitpod_v1_workspace_proto_enumTypes[1] +} + +func (x GetWorkspaceDefaultImageResponse_Source) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use GetWorkspaceDefaultImageResponse_Source.Descriptor instead. +func (GetWorkspaceDefaultImageResponse_Source) EnumDescriptor() ([]byte, []int) { + return file_gitpod_v1_workspace_proto_rawDescGZIP(), []int{11, 0} +} + // Policy defines the accssbility policy of a workspace port is guarded by an // authentication in the proxy type WorkspacePort_Policy int32 @@ -118,11 +167,11 @@ func (x WorkspacePort_Policy) String() string { } func (WorkspacePort_Policy) Descriptor() protoreflect.EnumDescriptor { - return file_gitpod_v1_workspace_proto_enumTypes[1].Descriptor() + return file_gitpod_v1_workspace_proto_enumTypes[2].Descriptor() } func (WorkspacePort_Policy) Type() protoreflect.EnumType { - return &file_gitpod_v1_workspace_proto_enumTypes[1] + return &file_gitpod_v1_workspace_proto_enumTypes[2] } func (x WorkspacePort_Policy) Number() protoreflect.EnumNumber { @@ -131,7 +180,7 @@ func (x WorkspacePort_Policy) Number() protoreflect.EnumNumber { // Deprecated: Use WorkspacePort_Policy.Descriptor instead. func (WorkspacePort_Policy) EnumDescriptor() ([]byte, []int) { - return file_gitpod_v1_workspace_proto_rawDescGZIP(), []int{13, 0} + return file_gitpod_v1_workspace_proto_rawDescGZIP(), []int{21, 0} } // Protocol defines the backend protocol of port @@ -170,11 +219,11 @@ func (x WorkspacePort_Protocol) String() string { } func (WorkspacePort_Protocol) Descriptor() protoreflect.EnumDescriptor { - return file_gitpod_v1_workspace_proto_enumTypes[2].Descriptor() + return file_gitpod_v1_workspace_proto_enumTypes[3].Descriptor() } func (WorkspacePort_Protocol) Type() protoreflect.EnumType { - return &file_gitpod_v1_workspace_proto_enumTypes[2] + return &file_gitpod_v1_workspace_proto_enumTypes[3] } func (x WorkspacePort_Protocol) Number() protoreflect.EnumNumber { @@ -183,7 +232,7 @@ func (x WorkspacePort_Protocol) Number() protoreflect.EnumNumber { // Deprecated: Use WorkspacePort_Protocol.Descriptor instead. func (WorkspacePort_Protocol) EnumDescriptor() ([]byte, []int) { - return file_gitpod_v1_workspace_proto_rawDescGZIP(), []int{13, 1} + return file_gitpod_v1_workspace_proto_rawDescGZIP(), []int{21, 1} } type WorkspacePhase_Phase int32 @@ -267,11 +316,11 @@ func (x WorkspacePhase_Phase) String() string { } func (WorkspacePhase_Phase) Descriptor() protoreflect.EnumDescriptor { - return file_gitpod_v1_workspace_proto_enumTypes[3].Descriptor() + return file_gitpod_v1_workspace_proto_enumTypes[4].Descriptor() } func (WorkspacePhase_Phase) Type() protoreflect.EnumType { - return &file_gitpod_v1_workspace_proto_enumTypes[3] + return &file_gitpod_v1_workspace_proto_enumTypes[4] } func (x WorkspacePhase_Phase) Number() protoreflect.EnumNumber { @@ -280,7 +329,7 @@ func (x WorkspacePhase_Phase) Number() protoreflect.EnumNumber { // Deprecated: Use WorkspacePhase_Phase.Descriptor instead. func (WorkspacePhase_Phase) EnumDescriptor() ([]byte, []int) { - return file_gitpod_v1_workspace_proto_rawDescGZIP(), []int{15, 0} + return file_gitpod_v1_workspace_proto_rawDescGZIP(), []int{23, 0} } type GetWorkspaceRequest struct { @@ -949,6 +998,395 @@ func (x *StartWorkspaceResponse) GetWorkspace() *Workspace { return nil } +type GetWorkspaceDefaultImageRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // workspace_id specifies the workspace to get default image + WorkspaceId string `protobuf:"bytes,1,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` +} + +func (x *GetWorkspaceDefaultImageRequest) Reset() { + *x = GetWorkspaceDefaultImageRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gitpod_v1_workspace_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetWorkspaceDefaultImageRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetWorkspaceDefaultImageRequest) ProtoMessage() {} + +func (x *GetWorkspaceDefaultImageRequest) ProtoReflect() protoreflect.Message { + mi := &file_gitpod_v1_workspace_proto_msgTypes[10] + 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 GetWorkspaceDefaultImageRequest.ProtoReflect.Descriptor instead. +func (*GetWorkspaceDefaultImageRequest) Descriptor() ([]byte, []int) { + return file_gitpod_v1_workspace_proto_rawDescGZIP(), []int{10} +} + +func (x *GetWorkspaceDefaultImageRequest) GetWorkspaceId() string { + if x != nil { + return x.WorkspaceId + } + return "" +} + +type GetWorkspaceDefaultImageResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DefaultWorkspaceImage string `protobuf:"bytes,1,opt,name=default_workspace_image,json=defaultWorkspaceImage,proto3" json:"default_workspace_image,omitempty"` + Source GetWorkspaceDefaultImageResponse_Source `protobuf:"varint,2,opt,name=source,proto3,enum=gitpod.v1.GetWorkspaceDefaultImageResponse_Source" json:"source,omitempty"` +} + +func (x *GetWorkspaceDefaultImageResponse) Reset() { + *x = GetWorkspaceDefaultImageResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_gitpod_v1_workspace_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetWorkspaceDefaultImageResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetWorkspaceDefaultImageResponse) ProtoMessage() {} + +func (x *GetWorkspaceDefaultImageResponse) ProtoReflect() protoreflect.Message { + mi := &file_gitpod_v1_workspace_proto_msgTypes[11] + 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 GetWorkspaceDefaultImageResponse.ProtoReflect.Descriptor instead. +func (*GetWorkspaceDefaultImageResponse) Descriptor() ([]byte, []int) { + return file_gitpod_v1_workspace_proto_rawDescGZIP(), []int{11} +} + +func (x *GetWorkspaceDefaultImageResponse) GetDefaultWorkspaceImage() string { + if x != nil { + return x.DefaultWorkspaceImage + } + return "" +} + +func (x *GetWorkspaceDefaultImageResponse) GetSource() GetWorkspaceDefaultImageResponse_Source { + if x != nil { + return x.Source + } + return GetWorkspaceDefaultImageResponse_SOURCE_UNSPECIFIED +} + +type SendHeartBeatRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // workspace_id specifies the workspace to send heartbeat + // + // +required + WorkspaceId string `protobuf:"bytes,1,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` + // disconnected indicates if the editor connection is disconnected. + // If set to true, the workspace will be stopped after Timeout.disconnected. + Disconnected bool `protobuf:"varint,2,opt,name=disconnected,proto3" json:"disconnected,omitempty"` +} + +func (x *SendHeartBeatRequest) Reset() { + *x = SendHeartBeatRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gitpod_v1_workspace_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SendHeartBeatRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SendHeartBeatRequest) ProtoMessage() {} + +func (x *SendHeartBeatRequest) ProtoReflect() protoreflect.Message { + mi := &file_gitpod_v1_workspace_proto_msgTypes[12] + 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 SendHeartBeatRequest.ProtoReflect.Descriptor instead. +func (*SendHeartBeatRequest) Descriptor() ([]byte, []int) { + return file_gitpod_v1_workspace_proto_rawDescGZIP(), []int{12} +} + +func (x *SendHeartBeatRequest) GetWorkspaceId() string { + if x != nil { + return x.WorkspaceId + } + return "" +} + +func (x *SendHeartBeatRequest) GetDisconnected() bool { + if x != nil { + return x.Disconnected + } + return false +} + +type SendHeartBeatResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SendHeartBeatResponse) Reset() { + *x = SendHeartBeatResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_gitpod_v1_workspace_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SendHeartBeatResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SendHeartBeatResponse) ProtoMessage() {} + +func (x *SendHeartBeatResponse) ProtoReflect() protoreflect.Message { + mi := &file_gitpod_v1_workspace_proto_msgTypes[13] + 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 SendHeartBeatResponse.ProtoReflect.Descriptor instead. +func (*SendHeartBeatResponse) Descriptor() ([]byte, []int) { + return file_gitpod_v1_workspace_proto_rawDescGZIP(), []int{13} +} + +type GetWorkspaceOwnerTokenRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + WorkspaceId string `protobuf:"bytes,1,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` +} + +func (x *GetWorkspaceOwnerTokenRequest) Reset() { + *x = GetWorkspaceOwnerTokenRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gitpod_v1_workspace_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetWorkspaceOwnerTokenRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetWorkspaceOwnerTokenRequest) ProtoMessage() {} + +func (x *GetWorkspaceOwnerTokenRequest) ProtoReflect() protoreflect.Message { + mi := &file_gitpod_v1_workspace_proto_msgTypes[14] + 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 GetWorkspaceOwnerTokenRequest.ProtoReflect.Descriptor instead. +func (*GetWorkspaceOwnerTokenRequest) Descriptor() ([]byte, []int) { + return file_gitpod_v1_workspace_proto_rawDescGZIP(), []int{14} +} + +func (x *GetWorkspaceOwnerTokenRequest) GetWorkspaceId() string { + if x != nil { + return x.WorkspaceId + } + return "" +} + +type GetWorkspaceOwnerTokenResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OwnerToken string `protobuf:"bytes,1,opt,name=owner_token,json=ownerToken,proto3" json:"owner_token,omitempty"` +} + +func (x *GetWorkspaceOwnerTokenResponse) Reset() { + *x = GetWorkspaceOwnerTokenResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_gitpod_v1_workspace_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetWorkspaceOwnerTokenResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetWorkspaceOwnerTokenResponse) ProtoMessage() {} + +func (x *GetWorkspaceOwnerTokenResponse) ProtoReflect() protoreflect.Message { + mi := &file_gitpod_v1_workspace_proto_msgTypes[15] + 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 GetWorkspaceOwnerTokenResponse.ProtoReflect.Descriptor instead. +func (*GetWorkspaceOwnerTokenResponse) Descriptor() ([]byte, []int) { + return file_gitpod_v1_workspace_proto_rawDescGZIP(), []int{15} +} + +func (x *GetWorkspaceOwnerTokenResponse) GetOwnerToken() string { + if x != nil { + return x.OwnerToken + } + return "" +} + +type GetWorkspaceEditorCredentialsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + WorkspaceId string `protobuf:"bytes,1,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` +} + +func (x *GetWorkspaceEditorCredentialsRequest) Reset() { + *x = GetWorkspaceEditorCredentialsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gitpod_v1_workspace_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetWorkspaceEditorCredentialsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetWorkspaceEditorCredentialsRequest) ProtoMessage() {} + +func (x *GetWorkspaceEditorCredentialsRequest) ProtoReflect() protoreflect.Message { + mi := &file_gitpod_v1_workspace_proto_msgTypes[16] + 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 GetWorkspaceEditorCredentialsRequest.ProtoReflect.Descriptor instead. +func (*GetWorkspaceEditorCredentialsRequest) Descriptor() ([]byte, []int) { + return file_gitpod_v1_workspace_proto_rawDescGZIP(), []int{16} +} + +func (x *GetWorkspaceEditorCredentialsRequest) GetWorkspaceId() string { + if x != nil { + return x.WorkspaceId + } + return "" +} + +type GetWorkspaceEditorCredentialsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + EditorCredentials string `protobuf:"bytes,1,opt,name=editor_credentials,json=editorCredentials,proto3" json:"editor_credentials,omitempty"` +} + +func (x *GetWorkspaceEditorCredentialsResponse) Reset() { + *x = GetWorkspaceEditorCredentialsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_gitpod_v1_workspace_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetWorkspaceEditorCredentialsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetWorkspaceEditorCredentialsResponse) ProtoMessage() {} + +func (x *GetWorkspaceEditorCredentialsResponse) ProtoReflect() protoreflect.Message { + mi := &file_gitpod_v1_workspace_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetWorkspaceEditorCredentialsResponse.ProtoReflect.Descriptor instead. +func (*GetWorkspaceEditorCredentialsResponse) Descriptor() ([]byte, []int) { + return file_gitpod_v1_workspace_proto_rawDescGZIP(), []int{17} +} + +func (x *GetWorkspaceEditorCredentialsResponse) GetEditorCredentials() string { + if x != nil { + return x.EditorCredentials + } + return "" +} + // +resource get workspace type Workspace struct { state protoimpl.MessageState @@ -998,7 +1436,7 @@ type Workspace struct { func (x *Workspace) Reset() { *x = Workspace{} if protoimpl.UnsafeEnabled { - mi := &file_gitpod_v1_workspace_proto_msgTypes[10] + mi := &file_gitpod_v1_workspace_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1011,7 +1449,7 @@ func (x *Workspace) String() string { func (*Workspace) ProtoMessage() {} func (x *Workspace) ProtoReflect() protoreflect.Message { - mi := &file_gitpod_v1_workspace_proto_msgTypes[10] + mi := &file_gitpod_v1_workspace_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1024,7 +1462,7 @@ func (x *Workspace) ProtoReflect() protoreflect.Message { // Deprecated: Use Workspace.ProtoReflect.Descriptor instead. func (*Workspace) Descriptor() ([]byte, []int) { - return file_gitpod_v1_workspace_proto_rawDescGZIP(), []int{10} + return file_gitpod_v1_workspace_proto_rawDescGZIP(), []int{18} } func (x *Workspace) GetId() string { @@ -1143,7 +1581,7 @@ type WorkspaceStatus struct { func (x *WorkspaceStatus) Reset() { *x = WorkspaceStatus{} if protoimpl.UnsafeEnabled { - mi := &file_gitpod_v1_workspace_proto_msgTypes[11] + mi := &file_gitpod_v1_workspace_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1156,7 +1594,7 @@ func (x *WorkspaceStatus) String() string { func (*WorkspaceStatus) ProtoMessage() {} func (x *WorkspaceStatus) ProtoReflect() protoreflect.Message { - mi := &file_gitpod_v1_workspace_proto_msgTypes[11] + mi := &file_gitpod_v1_workspace_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1169,7 +1607,7 @@ func (x *WorkspaceStatus) ProtoReflect() protoreflect.Message { // Deprecated: Use WorkspaceStatus.ProtoReflect.Descriptor instead. func (*WorkspaceStatus) Descriptor() ([]byte, []int) { - return file_gitpod_v1_workspace_proto_rawDescGZIP(), []int{11} + return file_gitpod_v1_workspace_proto_rawDescGZIP(), []int{19} } func (x *WorkspaceStatus) GetPhase() *WorkspacePhase { @@ -1244,7 +1682,7 @@ type WorkspaceConditions struct { func (x *WorkspaceConditions) Reset() { *x = WorkspaceConditions{} if protoimpl.UnsafeEnabled { - mi := &file_gitpod_v1_workspace_proto_msgTypes[12] + mi := &file_gitpod_v1_workspace_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1257,7 +1695,7 @@ func (x *WorkspaceConditions) String() string { func (*WorkspaceConditions) ProtoMessage() {} func (x *WorkspaceConditions) ProtoReflect() protoreflect.Message { - mi := &file_gitpod_v1_workspace_proto_msgTypes[12] + mi := &file_gitpod_v1_workspace_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1270,7 +1708,7 @@ func (x *WorkspaceConditions) ProtoReflect() protoreflect.Message { // Deprecated: Use WorkspaceConditions.ProtoReflect.Descriptor instead. func (*WorkspaceConditions) Descriptor() ([]byte, []int) { - return file_gitpod_v1_workspace_proto_rawDescGZIP(), []int{12} + return file_gitpod_v1_workspace_proto_rawDescGZIP(), []int{20} } func (x *WorkspaceConditions) GetFailed() string { @@ -1305,7 +1743,7 @@ type WorkspacePort struct { func (x *WorkspacePort) Reset() { *x = WorkspacePort{} if protoimpl.UnsafeEnabled { - mi := &file_gitpod_v1_workspace_proto_msgTypes[13] + mi := &file_gitpod_v1_workspace_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1318,7 +1756,7 @@ func (x *WorkspacePort) String() string { func (*WorkspacePort) ProtoMessage() {} func (x *WorkspacePort) ProtoReflect() protoreflect.Message { - mi := &file_gitpod_v1_workspace_proto_msgTypes[13] + mi := &file_gitpod_v1_workspace_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1331,7 +1769,7 @@ func (x *WorkspacePort) ProtoReflect() protoreflect.Message { // Deprecated: Use WorkspacePort.ProtoReflect.Descriptor instead. func (*WorkspacePort) Descriptor() ([]byte, []int) { - return file_gitpod_v1_workspace_proto_rawDescGZIP(), []int{13} + return file_gitpod_v1_workspace_proto_rawDescGZIP(), []int{21} } func (x *WorkspacePort) GetPort() uint64 { @@ -1393,7 +1831,7 @@ type WorkspaceGitStatus struct { func (x *WorkspaceGitStatus) Reset() { *x = WorkspaceGitStatus{} if protoimpl.UnsafeEnabled { - mi := &file_gitpod_v1_workspace_proto_msgTypes[14] + mi := &file_gitpod_v1_workspace_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1406,7 +1844,7 @@ func (x *WorkspaceGitStatus) String() string { func (*WorkspaceGitStatus) ProtoMessage() {} func (x *WorkspaceGitStatus) ProtoReflect() protoreflect.Message { - mi := &file_gitpod_v1_workspace_proto_msgTypes[14] + mi := &file_gitpod_v1_workspace_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1419,7 +1857,7 @@ func (x *WorkspaceGitStatus) ProtoReflect() protoreflect.Message { // Deprecated: Use WorkspaceGitStatus.ProtoReflect.Descriptor instead. func (*WorkspaceGitStatus) Descriptor() ([]byte, []int) { - return file_gitpod_v1_workspace_proto_rawDescGZIP(), []int{14} + return file_gitpod_v1_workspace_proto_rawDescGZIP(), []int{22} } func (x *WorkspaceGitStatus) GetCloneUrl() string { @@ -1497,7 +1935,7 @@ type WorkspacePhase struct { func (x *WorkspacePhase) Reset() { *x = WorkspacePhase{} if protoimpl.UnsafeEnabled { - mi := &file_gitpod_v1_workspace_proto_msgTypes[15] + mi := &file_gitpod_v1_workspace_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1510,7 +1948,7 @@ func (x *WorkspacePhase) String() string { func (*WorkspacePhase) ProtoMessage() {} func (x *WorkspacePhase) ProtoReflect() protoreflect.Message { - mi := &file_gitpod_v1_workspace_proto_msgTypes[15] + mi := &file_gitpod_v1_workspace_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1523,7 +1961,7 @@ func (x *WorkspacePhase) ProtoReflect() protoreflect.Message { // Deprecated: Use WorkspacePhase.ProtoReflect.Descriptor instead. func (*WorkspacePhase) Descriptor() ([]byte, []int) { - return file_gitpod_v1_workspace_proto_rawDescGZIP(), []int{15} + return file_gitpod_v1_workspace_proto_rawDescGZIP(), []int{23} } func (x *WorkspacePhase) GetName() WorkspacePhase_Phase { @@ -1552,7 +1990,7 @@ type WorkspaceEnvironmentVariable struct { func (x *WorkspaceEnvironmentVariable) Reset() { *x = WorkspaceEnvironmentVariable{} if protoimpl.UnsafeEnabled { - mi := &file_gitpod_v1_workspace_proto_msgTypes[16] + mi := &file_gitpod_v1_workspace_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1565,7 +2003,7 @@ func (x *WorkspaceEnvironmentVariable) String() string { func (*WorkspaceEnvironmentVariable) ProtoMessage() {} func (x *WorkspaceEnvironmentVariable) ProtoReflect() protoreflect.Message { - mi := &file_gitpod_v1_workspace_proto_msgTypes[16] + mi := &file_gitpod_v1_workspace_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1578,7 +2016,7 @@ func (x *WorkspaceEnvironmentVariable) ProtoReflect() protoreflect.Message { // Deprecated: Use WorkspaceEnvironmentVariable.ProtoReflect.Descriptor instead. func (*WorkspaceEnvironmentVariable) Descriptor() ([]byte, []int) { - return file_gitpod_v1_workspace_proto_rawDescGZIP(), []int{16} + return file_gitpod_v1_workspace_proto_rawDescGZIP(), []int{24} } func (x *WorkspaceEnvironmentVariable) GetName() string { @@ -1613,7 +2051,7 @@ type CreateAndStartWorkspaceRequest_Git struct { func (x *CreateAndStartWorkspaceRequest_Git) Reset() { *x = CreateAndStartWorkspaceRequest_Git{} if protoimpl.UnsafeEnabled { - mi := &file_gitpod_v1_workspace_proto_msgTypes[17] + mi := &file_gitpod_v1_workspace_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1626,7 +2064,7 @@ func (x *CreateAndStartWorkspaceRequest_Git) String() string { func (*CreateAndStartWorkspaceRequest_Git) ProtoMessage() {} func (x *CreateAndStartWorkspaceRequest_Git) ProtoReflect() protoreflect.Message { - mi := &file_gitpod_v1_workspace_proto_msgTypes[17] + mi := &file_gitpod_v1_workspace_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1771,184 +2209,258 @@ var file_gitpod_v1_workspace_proto_rawDesc = []byte{ 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x52, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0xea, - 0x03, 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, 0x32, 0x0a, - 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 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, 0x71, 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, 0x27, 0x2e, 0x67, 0x69, + 0x61, 0x63, 0x65, 0x52, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x44, + 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x44, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x49, 0x64, 0x22, 0xfa, 0x01, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x49, 0x6d, 0x61, 0x67, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x17, 0x64, 0x65, 0x66, + 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, + 0x6d, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x64, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x6d, 0x61, 0x67, + 0x65, 0x12, 0x4a, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x32, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, + 0x74, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x52, 0x0a, + 0x06, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x4f, 0x55, 0x52, 0x43, + 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x17, 0x0a, 0x13, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x49, 0x4e, 0x53, 0x54, 0x41, 0x4c, + 0x4c, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x4f, 0x55, 0x52, + 0x43, 0x45, 0x5f, 0x4f, 0x52, 0x47, 0x41, 0x4e, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, + 0x02, 0x22, 0x5d, 0x0a, 0x14, 0x53, 0x65, 0x6e, 0x64, 0x48, 0x65, 0x61, 0x72, 0x74, 0x42, 0x65, + 0x61, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x77, 0x6f, 0x72, + 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, + 0x64, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0c, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, + 0x22, 0x17, 0x0a, 0x15, 0x53, 0x65, 0x6e, 0x64, 0x48, 0x65, 0x61, 0x72, 0x74, 0x42, 0x65, 0x61, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x42, 0x0a, 0x1d, 0x47, 0x65, 0x74, + 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x77, 0x6f, + 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x22, 0x41, 0x0a, + 0x1e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4f, 0x77, 0x6e, + 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x1f, 0x0a, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x22, 0x49, 0x0a, 0x24, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x45, 0x64, 0x69, 0x74, 0x6f, 0x72, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x77, 0x6f, 0x72, 0x6b, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x22, 0x56, 0x0a, 0x25, 0x47, + 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x45, 0x64, 0x69, 0x74, 0x6f, + 0x72, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x65, 0x64, 0x69, 0x74, 0x6f, 0x72, 0x5f, 0x63, + 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x11, 0x65, 0x64, 0x69, 0x74, 0x6f, 0x72, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x61, 0x6c, 0x73, 0x22, 0xea, 0x03, 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, 0x32, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 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, 0x71, 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, 0x27, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 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, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, + 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, + 0x6e, 0x12, 0x27, 0x0a, 0x0f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x63, + 0x6c, 0x61, 0x73, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x77, 0x6f, 0x72, 0x6b, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x32, 0x0a, 0x06, 0x65, 0x64, + 0x69, 0x74, 0x6f, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x69, 0x74, + 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x66, + 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x06, 0x65, 0x64, 0x69, 0x74, 0x6f, 0x72, 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, + 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x0c, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, + 0x22, 0x89, 0x03, 0x0a, 0x0f, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x2f, 0x0a, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, + 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x50, 0x68, 0x61, 0x73, 0x65, 0x52, 0x05, + 0x70, 0x68, 0x61, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 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, 0x3c, 0x0a, 0x0a, 0x67, 0x69, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, + 0x64, 0x2e, 0x76, 0x31, 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, 0x2e, 0x0a, 0x05, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x6f, + 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x05, 0x70, 0x6f, 0x72, + 0x74, 0x73, 0x12, 0x37, 0x0a, 0x09, 0x61, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, + 0x31, 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, 0x3e, 0x0a, 0x0a, + 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1e, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 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, 0x22, 0x47, 0x0a, 0x13, + 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x74, + 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x69, + 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22, 0xc3, 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, 0x37, 0x0a, 0x06, 0x70, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 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, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x0a, 0x0f, - 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x43, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x32, 0x0a, 0x06, 0x65, 0x64, 0x69, 0x74, 0x6f, 0x72, 0x18, - 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, - 0x31, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, - 0x65, 0x52, 0x06, 0x65, 0x64, 0x69, 0x74, 0x6f, 0x72, 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, 0x1f, 0x0a, 0x0b, 0x70, 0x72, - 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x70, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x22, 0x89, 0x03, 0x0a, 0x0f, - 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x2f, 0x0a, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x50, 0x68, 0x61, 0x73, 0x65, 0x52, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, - 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 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, - 0x3c, 0x0a, 0x0a, 0x67, 0x69, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, + 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, 0x3d, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, + 0x64, 0x2e, 0x76, 0x31, 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, 0x52, 0x09, 0x67, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2e, 0x0a, - 0x05, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, + 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, 0xef, 0x02, 0x0a, 0x0e, + 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x50, 0x68, 0x61, 0x73, 0x65, 0x12, 0x33, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x05, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x12, 0x37, 0x0a, - 0x09, 0x61, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x19, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 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, 0x3e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x69, - 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 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, 0x22, 0x47, 0x0a, 0x13, 0x57, 0x6f, 0x72, 0x6b, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x16, - 0x0a, 0x06, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, - 0x22, 0xc3, 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, 0x37, 0x0a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, - 0x76, 0x31, 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, 0x3d, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 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, 0xef, 0x02, 0x0a, 0x0e, 0x57, 0x6f, 0x72, 0x6b, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x50, 0x68, 0x61, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, - 0x2e, 0x76, 0x31, 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, 0x48, 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, 0x14, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 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, 0xf8, 0x03, 0x0a, 0x10, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x51, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x57, - 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1e, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, - 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, - 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6b, 0x0a, 0x14, 0x57, - 0x61, 0x74, 0x63, 0x68, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x12, 0x26, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, - 0x57, 0x61, 0x74, 0x63, 0x68, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x67, 0x69, - 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x57, 0x6f, 0x72, - 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x57, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, - 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x20, 0x2e, 0x67, 0x69, 0x74, - 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x67, - 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, - 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x72, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x6e, 0x64, 0x53, 0x74, - 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x29, 0x2e, 0x67, + 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, 0x48, 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, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 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, 0xbd, 0x07, 0x0a, 0x10, 0x57, 0x6f, 0x72, + 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x51, 0x0a, + 0x0c, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1e, 0x2e, + 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, + 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, + 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, + 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x6b, 0x0a, 0x14, 0x57, 0x61, 0x74, 0x63, 0x68, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x26, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, + 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x27, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x61, 0x74, + 0x63, 0x68, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x57, 0x0a, + 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, + 0x20, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x21, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x72, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x41, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x12, 0x29, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x41, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, - 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x6e, 0x64, 0x53, 0x74, 0x61, - 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x57, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, - 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x20, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, - 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x67, 0x69, 0x74, 0x70, - 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x39, - 0x5a, 0x37, 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, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x57, 0x0a, 0x0e, 0x53, 0x74, + 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x20, 0x2e, 0x67, + 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, + 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, + 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, + 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x75, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, + 0x2a, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x57, + 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x49, + 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x67, 0x69, + 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x49, 0x6d, 0x61, 0x67, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x54, 0x0a, 0x0d, 0x53, 0x65, + 0x6e, 0x64, 0x48, 0x65, 0x61, 0x72, 0x74, 0x42, 0x65, 0x61, 0x74, 0x12, 0x1f, 0x2e, 0x67, 0x69, + 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x48, 0x65, 0x61, 0x72, + 0x74, 0x42, 0x65, 0x61, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x67, + 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x48, 0x65, 0x61, + 0x72, 0x74, 0x42, 0x65, 0x61, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x6f, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x28, 0x2e, 0x67, 0x69, 0x74, + 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4f, 0x77, 0x6e, + 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x84, 0x01, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x45, 0x64, 0x69, 0x74, 0x6f, 0x72, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x61, 0x6c, 0x73, 0x12, 0x2f, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x45, 0x64, 0x69, 0x74, + 0x6f, 0x72, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x45, 0x64, 0x69, + 0x74, 0x6f, 0x72, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x39, 0x5a, 0x37, 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, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1963,74 +2475,92 @@ func file_gitpod_v1_workspace_proto_rawDescGZIP() []byte { return file_gitpod_v1_workspace_proto_rawDescData } -var file_gitpod_v1_workspace_proto_enumTypes = make([]protoimpl.EnumInfo, 4) -var file_gitpod_v1_workspace_proto_msgTypes = make([]protoimpl.MessageInfo, 18) +var file_gitpod_v1_workspace_proto_enumTypes = make([]protoimpl.EnumInfo, 5) +var file_gitpod_v1_workspace_proto_msgTypes = make([]protoimpl.MessageInfo, 26) var file_gitpod_v1_workspace_proto_goTypes = []interface{}{ - (AdmissionLevel)(0), // 0: gitpod.v1.AdmissionLevel - (WorkspacePort_Policy)(0), // 1: gitpod.v1.WorkspacePort.Policy - (WorkspacePort_Protocol)(0), // 2: gitpod.v1.WorkspacePort.Protocol - (WorkspacePhase_Phase)(0), // 3: gitpod.v1.WorkspacePhase.Phase - (*GetWorkspaceRequest)(nil), // 4: gitpod.v1.GetWorkspaceRequest - (*GetWorkspaceResponse)(nil), // 5: gitpod.v1.GetWorkspaceResponse - (*WatchWorkspaceStatusRequest)(nil), // 6: gitpod.v1.WatchWorkspaceStatusRequest - (*WatchWorkspaceStatusResponse)(nil), // 7: gitpod.v1.WatchWorkspaceStatusResponse - (*ListWorkspacesRequest)(nil), // 8: gitpod.v1.ListWorkspacesRequest - (*ListWorkspacesResponse)(nil), // 9: gitpod.v1.ListWorkspacesResponse - (*CreateAndStartWorkspaceRequest)(nil), // 10: gitpod.v1.CreateAndStartWorkspaceRequest - (*CreateAndStartWorkspaceResponse)(nil), // 11: gitpod.v1.CreateAndStartWorkspaceResponse - (*StartWorkspaceRequest)(nil), // 12: gitpod.v1.StartWorkspaceRequest - (*StartWorkspaceResponse)(nil), // 13: gitpod.v1.StartWorkspaceResponse - (*Workspace)(nil), // 14: gitpod.v1.Workspace - (*WorkspaceStatus)(nil), // 15: gitpod.v1.WorkspaceStatus - (*WorkspaceConditions)(nil), // 16: gitpod.v1.WorkspaceConditions - (*WorkspacePort)(nil), // 17: gitpod.v1.WorkspacePort - (*WorkspaceGitStatus)(nil), // 18: gitpod.v1.WorkspaceGitStatus - (*WorkspacePhase)(nil), // 19: gitpod.v1.WorkspacePhase - (*WorkspaceEnvironmentVariable)(nil), // 20: gitpod.v1.WorkspaceEnvironmentVariable - (*CreateAndStartWorkspaceRequest_Git)(nil), // 21: gitpod.v1.CreateAndStartWorkspaceRequest.Git - (*PaginationRequest)(nil), // 22: gitpod.v1.PaginationRequest - (*PaginationResponse)(nil), // 23: gitpod.v1.PaginationResponse - (*EditorReference)(nil), // 24: gitpod.v1.EditorReference - (*timestamppb.Timestamp)(nil), // 25: google.protobuf.Timestamp + (AdmissionLevel)(0), // 0: gitpod.v1.AdmissionLevel + (GetWorkspaceDefaultImageResponse_Source)(0), // 1: gitpod.v1.GetWorkspaceDefaultImageResponse.Source + (WorkspacePort_Policy)(0), // 2: gitpod.v1.WorkspacePort.Policy + (WorkspacePort_Protocol)(0), // 3: gitpod.v1.WorkspacePort.Protocol + (WorkspacePhase_Phase)(0), // 4: gitpod.v1.WorkspacePhase.Phase + (*GetWorkspaceRequest)(nil), // 5: gitpod.v1.GetWorkspaceRequest + (*GetWorkspaceResponse)(nil), // 6: gitpod.v1.GetWorkspaceResponse + (*WatchWorkspaceStatusRequest)(nil), // 7: gitpod.v1.WatchWorkspaceStatusRequest + (*WatchWorkspaceStatusResponse)(nil), // 8: gitpod.v1.WatchWorkspaceStatusResponse + (*ListWorkspacesRequest)(nil), // 9: gitpod.v1.ListWorkspacesRequest + (*ListWorkspacesResponse)(nil), // 10: gitpod.v1.ListWorkspacesResponse + (*CreateAndStartWorkspaceRequest)(nil), // 11: gitpod.v1.CreateAndStartWorkspaceRequest + (*CreateAndStartWorkspaceResponse)(nil), // 12: gitpod.v1.CreateAndStartWorkspaceResponse + (*StartWorkspaceRequest)(nil), // 13: gitpod.v1.StartWorkspaceRequest + (*StartWorkspaceResponse)(nil), // 14: gitpod.v1.StartWorkspaceResponse + (*GetWorkspaceDefaultImageRequest)(nil), // 15: gitpod.v1.GetWorkspaceDefaultImageRequest + (*GetWorkspaceDefaultImageResponse)(nil), // 16: gitpod.v1.GetWorkspaceDefaultImageResponse + (*SendHeartBeatRequest)(nil), // 17: gitpod.v1.SendHeartBeatRequest + (*SendHeartBeatResponse)(nil), // 18: gitpod.v1.SendHeartBeatResponse + (*GetWorkspaceOwnerTokenRequest)(nil), // 19: gitpod.v1.GetWorkspaceOwnerTokenRequest + (*GetWorkspaceOwnerTokenResponse)(nil), // 20: gitpod.v1.GetWorkspaceOwnerTokenResponse + (*GetWorkspaceEditorCredentialsRequest)(nil), // 21: gitpod.v1.GetWorkspaceEditorCredentialsRequest + (*GetWorkspaceEditorCredentialsResponse)(nil), // 22: gitpod.v1.GetWorkspaceEditorCredentialsResponse + (*Workspace)(nil), // 23: gitpod.v1.Workspace + (*WorkspaceStatus)(nil), // 24: gitpod.v1.WorkspaceStatus + (*WorkspaceConditions)(nil), // 25: gitpod.v1.WorkspaceConditions + (*WorkspacePort)(nil), // 26: gitpod.v1.WorkspacePort + (*WorkspaceGitStatus)(nil), // 27: gitpod.v1.WorkspaceGitStatus + (*WorkspacePhase)(nil), // 28: gitpod.v1.WorkspacePhase + (*WorkspaceEnvironmentVariable)(nil), // 29: gitpod.v1.WorkspaceEnvironmentVariable + (*CreateAndStartWorkspaceRequest_Git)(nil), // 30: gitpod.v1.CreateAndStartWorkspaceRequest.Git + (*PaginationRequest)(nil), // 31: gitpod.v1.PaginationRequest + (*PaginationResponse)(nil), // 32: gitpod.v1.PaginationResponse + (*EditorReference)(nil), // 33: gitpod.v1.EditorReference + (*timestamppb.Timestamp)(nil), // 34: google.protobuf.Timestamp } var file_gitpod_v1_workspace_proto_depIdxs = []int32{ - 14, // 0: gitpod.v1.GetWorkspaceResponse.workspace:type_name -> gitpod.v1.Workspace - 15, // 1: gitpod.v1.WatchWorkspaceStatusResponse.status:type_name -> gitpod.v1.WorkspaceStatus - 22, // 2: gitpod.v1.ListWorkspacesRequest.pagination:type_name -> gitpod.v1.PaginationRequest - 14, // 3: gitpod.v1.ListWorkspacesResponse.workspaces:type_name -> gitpod.v1.Workspace - 23, // 4: gitpod.v1.ListWorkspacesResponse.pagination:type_name -> gitpod.v1.PaginationResponse - 21, // 5: gitpod.v1.CreateAndStartWorkspaceRequest.git:type_name -> gitpod.v1.CreateAndStartWorkspaceRequest.Git - 20, // 6: gitpod.v1.CreateAndStartWorkspaceRequest.additional_env_variables:type_name -> gitpod.v1.WorkspaceEnvironmentVariable - 24, // 7: gitpod.v1.CreateAndStartWorkspaceRequest.editor:type_name -> gitpod.v1.EditorReference - 14, // 8: gitpod.v1.CreateAndStartWorkspaceResponse.workspace:type_name -> gitpod.v1.Workspace - 14, // 9: gitpod.v1.StartWorkspaceResponse.workspace:type_name -> gitpod.v1.Workspace - 15, // 10: gitpod.v1.Workspace.status:type_name -> gitpod.v1.WorkspaceStatus - 20, // 11: gitpod.v1.Workspace.additional_environment_variables:type_name -> gitpod.v1.WorkspaceEnvironmentVariable - 24, // 12: gitpod.v1.Workspace.editor:type_name -> gitpod.v1.EditorReference - 19, // 13: gitpod.v1.WorkspaceStatus.phase:type_name -> gitpod.v1.WorkspacePhase - 18, // 14: gitpod.v1.WorkspaceStatus.git_status:type_name -> gitpod.v1.WorkspaceGitStatus - 17, // 15: gitpod.v1.WorkspaceStatus.ports:type_name -> gitpod.v1.WorkspacePort - 0, // 16: gitpod.v1.WorkspaceStatus.admission:type_name -> gitpod.v1.AdmissionLevel - 16, // 17: gitpod.v1.WorkspaceStatus.conditions:type_name -> gitpod.v1.WorkspaceConditions - 1, // 18: gitpod.v1.WorkspacePort.policy:type_name -> gitpod.v1.WorkspacePort.Policy - 2, // 19: gitpod.v1.WorkspacePort.protocol:type_name -> gitpod.v1.WorkspacePort.Protocol - 3, // 20: gitpod.v1.WorkspacePhase.name:type_name -> gitpod.v1.WorkspacePhase.Phase - 25, // 21: gitpod.v1.WorkspacePhase.last_transition_time:type_name -> google.protobuf.Timestamp - 4, // 22: gitpod.v1.WorkspaceService.GetWorkspace:input_type -> gitpod.v1.GetWorkspaceRequest - 6, // 23: gitpod.v1.WorkspaceService.WatchWorkspaceStatus:input_type -> gitpod.v1.WatchWorkspaceStatusRequest - 8, // 24: gitpod.v1.WorkspaceService.ListWorkspaces:input_type -> gitpod.v1.ListWorkspacesRequest - 10, // 25: gitpod.v1.WorkspaceService.CreateAndStartWorkspace:input_type -> gitpod.v1.CreateAndStartWorkspaceRequest - 12, // 26: gitpod.v1.WorkspaceService.StartWorkspace:input_type -> gitpod.v1.StartWorkspaceRequest - 5, // 27: gitpod.v1.WorkspaceService.GetWorkspace:output_type -> gitpod.v1.GetWorkspaceResponse - 7, // 28: gitpod.v1.WorkspaceService.WatchWorkspaceStatus:output_type -> gitpod.v1.WatchWorkspaceStatusResponse - 9, // 29: gitpod.v1.WorkspaceService.ListWorkspaces:output_type -> gitpod.v1.ListWorkspacesResponse - 11, // 30: gitpod.v1.WorkspaceService.CreateAndStartWorkspace:output_type -> gitpod.v1.CreateAndStartWorkspaceResponse - 13, // 31: gitpod.v1.WorkspaceService.StartWorkspace:output_type -> gitpod.v1.StartWorkspaceResponse - 27, // [27:32] is the sub-list for method output_type - 22, // [22:27] is the sub-list for method input_type - 22, // [22:22] is the sub-list for extension type_name - 22, // [22:22] is the sub-list for extension extendee - 0, // [0:22] is the sub-list for field type_name + 23, // 0: gitpod.v1.GetWorkspaceResponse.workspace:type_name -> gitpod.v1.Workspace + 24, // 1: gitpod.v1.WatchWorkspaceStatusResponse.status:type_name -> gitpod.v1.WorkspaceStatus + 31, // 2: gitpod.v1.ListWorkspacesRequest.pagination:type_name -> gitpod.v1.PaginationRequest + 23, // 3: gitpod.v1.ListWorkspacesResponse.workspaces:type_name -> gitpod.v1.Workspace + 32, // 4: gitpod.v1.ListWorkspacesResponse.pagination:type_name -> gitpod.v1.PaginationResponse + 30, // 5: gitpod.v1.CreateAndStartWorkspaceRequest.git:type_name -> gitpod.v1.CreateAndStartWorkspaceRequest.Git + 29, // 6: gitpod.v1.CreateAndStartWorkspaceRequest.additional_env_variables:type_name -> gitpod.v1.WorkspaceEnvironmentVariable + 33, // 7: gitpod.v1.CreateAndStartWorkspaceRequest.editor:type_name -> gitpod.v1.EditorReference + 23, // 8: gitpod.v1.CreateAndStartWorkspaceResponse.workspace:type_name -> gitpod.v1.Workspace + 23, // 9: gitpod.v1.StartWorkspaceResponse.workspace:type_name -> gitpod.v1.Workspace + 1, // 10: gitpod.v1.GetWorkspaceDefaultImageResponse.source:type_name -> gitpod.v1.GetWorkspaceDefaultImageResponse.Source + 24, // 11: gitpod.v1.Workspace.status:type_name -> gitpod.v1.WorkspaceStatus + 29, // 12: gitpod.v1.Workspace.additional_environment_variables:type_name -> gitpod.v1.WorkspaceEnvironmentVariable + 33, // 13: gitpod.v1.Workspace.editor:type_name -> gitpod.v1.EditorReference + 28, // 14: gitpod.v1.WorkspaceStatus.phase:type_name -> gitpod.v1.WorkspacePhase + 27, // 15: gitpod.v1.WorkspaceStatus.git_status:type_name -> gitpod.v1.WorkspaceGitStatus + 26, // 16: gitpod.v1.WorkspaceStatus.ports:type_name -> gitpod.v1.WorkspacePort + 0, // 17: gitpod.v1.WorkspaceStatus.admission:type_name -> gitpod.v1.AdmissionLevel + 25, // 18: gitpod.v1.WorkspaceStatus.conditions:type_name -> gitpod.v1.WorkspaceConditions + 2, // 19: gitpod.v1.WorkspacePort.policy:type_name -> gitpod.v1.WorkspacePort.Policy + 3, // 20: gitpod.v1.WorkspacePort.protocol:type_name -> gitpod.v1.WorkspacePort.Protocol + 4, // 21: gitpod.v1.WorkspacePhase.name:type_name -> gitpod.v1.WorkspacePhase.Phase + 34, // 22: gitpod.v1.WorkspacePhase.last_transition_time:type_name -> google.protobuf.Timestamp + 5, // 23: gitpod.v1.WorkspaceService.GetWorkspace:input_type -> gitpod.v1.GetWorkspaceRequest + 7, // 24: gitpod.v1.WorkspaceService.WatchWorkspaceStatus:input_type -> gitpod.v1.WatchWorkspaceStatusRequest + 9, // 25: gitpod.v1.WorkspaceService.ListWorkspaces:input_type -> gitpod.v1.ListWorkspacesRequest + 11, // 26: gitpod.v1.WorkspaceService.CreateAndStartWorkspace:input_type -> gitpod.v1.CreateAndStartWorkspaceRequest + 13, // 27: gitpod.v1.WorkspaceService.StartWorkspace:input_type -> gitpod.v1.StartWorkspaceRequest + 15, // 28: gitpod.v1.WorkspaceService.GetWorkspaceDefaultImage:input_type -> gitpod.v1.GetWorkspaceDefaultImageRequest + 17, // 29: gitpod.v1.WorkspaceService.SendHeartBeat:input_type -> gitpod.v1.SendHeartBeatRequest + 19, // 30: gitpod.v1.WorkspaceService.GetWorkspaceOwnerToken:input_type -> gitpod.v1.GetWorkspaceOwnerTokenRequest + 21, // 31: gitpod.v1.WorkspaceService.GetWorkspaceEditorCredentials:input_type -> gitpod.v1.GetWorkspaceEditorCredentialsRequest + 6, // 32: gitpod.v1.WorkspaceService.GetWorkspace:output_type -> gitpod.v1.GetWorkspaceResponse + 8, // 33: gitpod.v1.WorkspaceService.WatchWorkspaceStatus:output_type -> gitpod.v1.WatchWorkspaceStatusResponse + 10, // 34: gitpod.v1.WorkspaceService.ListWorkspaces:output_type -> gitpod.v1.ListWorkspacesResponse + 12, // 35: gitpod.v1.WorkspaceService.CreateAndStartWorkspace:output_type -> gitpod.v1.CreateAndStartWorkspaceResponse + 14, // 36: gitpod.v1.WorkspaceService.StartWorkspace:output_type -> gitpod.v1.StartWorkspaceResponse + 16, // 37: gitpod.v1.WorkspaceService.GetWorkspaceDefaultImage:output_type -> gitpod.v1.GetWorkspaceDefaultImageResponse + 18, // 38: gitpod.v1.WorkspaceService.SendHeartBeat:output_type -> gitpod.v1.SendHeartBeatResponse + 20, // 39: gitpod.v1.WorkspaceService.GetWorkspaceOwnerToken:output_type -> gitpod.v1.GetWorkspaceOwnerTokenResponse + 22, // 40: gitpod.v1.WorkspaceService.GetWorkspaceEditorCredentials:output_type -> gitpod.v1.GetWorkspaceEditorCredentialsResponse + 32, // [32:41] is the sub-list for method output_type + 23, // [23:32] is the sub-list for method input_type + 23, // [23:23] is the sub-list for extension type_name + 23, // [23:23] is the sub-list for extension extendee + 0, // [0:23] is the sub-list for field type_name } func init() { file_gitpod_v1_workspace_proto_init() } @@ -2162,7 +2692,7 @@ func file_gitpod_v1_workspace_proto_init() { } } file_gitpod_v1_workspace_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Workspace); i { + switch v := v.(*GetWorkspaceDefaultImageRequest); i { case 0: return &v.state case 1: @@ -2174,7 +2704,7 @@ func file_gitpod_v1_workspace_proto_init() { } } file_gitpod_v1_workspace_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WorkspaceStatus); i { + switch v := v.(*GetWorkspaceDefaultImageResponse); i { case 0: return &v.state case 1: @@ -2186,7 +2716,7 @@ func file_gitpod_v1_workspace_proto_init() { } } file_gitpod_v1_workspace_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WorkspaceConditions); i { + switch v := v.(*SendHeartBeatRequest); i { case 0: return &v.state case 1: @@ -2198,7 +2728,7 @@ func file_gitpod_v1_workspace_proto_init() { } } file_gitpod_v1_workspace_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WorkspacePort); i { + switch v := v.(*SendHeartBeatResponse); i { case 0: return &v.state case 1: @@ -2210,7 +2740,7 @@ func file_gitpod_v1_workspace_proto_init() { } } file_gitpod_v1_workspace_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WorkspaceGitStatus); i { + switch v := v.(*GetWorkspaceOwnerTokenRequest); i { case 0: return &v.state case 1: @@ -2222,7 +2752,7 @@ func file_gitpod_v1_workspace_proto_init() { } } file_gitpod_v1_workspace_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WorkspacePhase); i { + switch v := v.(*GetWorkspaceOwnerTokenResponse); i { case 0: return &v.state case 1: @@ -2234,7 +2764,7 @@ func file_gitpod_v1_workspace_proto_init() { } } file_gitpod_v1_workspace_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WorkspaceEnvironmentVariable); i { + switch v := v.(*GetWorkspaceEditorCredentialsRequest); i { case 0: return &v.state case 1: @@ -2246,6 +2776,102 @@ func file_gitpod_v1_workspace_proto_init() { } } file_gitpod_v1_workspace_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetWorkspaceEditorCredentialsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitpod_v1_workspace_proto_msgTypes[18].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_v1_workspace_proto_msgTypes[19].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_v1_workspace_proto_msgTypes[20].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_v1_workspace_proto_msgTypes[21].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_v1_workspace_proto_msgTypes[22].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_v1_workspace_proto_msgTypes[23].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_v1_workspace_proto_msgTypes[24].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_v1_workspace_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CreateAndStartWorkspaceRequest_Git); i { case 0: return &v.state @@ -2267,8 +2893,8 @@ func file_gitpod_v1_workspace_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_gitpod_v1_workspace_proto_rawDesc, - NumEnums: 4, - NumMessages: 18, + NumEnums: 5, + NumMessages: 26, NumExtensions: 0, NumServices: 1, }, diff --git a/components/public-api/go/v1/workspace_grpc.pb.go b/components/public-api/go/v1/workspace_grpc.pb.go index 38576c6b5b3688..36b61d48cb5fdb 100644 --- a/components/public-api/go/v1/workspace_grpc.pb.go +++ b/components/public-api/go/v1/workspace_grpc.pb.go @@ -42,6 +42,16 @@ type WorkspaceServiceClient interface { // StartWorkspace starts an existing workspace. // If the specified workspace is not in stopped phase, this will return the workspace as is. StartWorkspace(ctx context.Context, in *StartWorkspaceRequest, opts ...grpc.CallOption) (*StartWorkspaceResponse, error) + // GetWorkspaceDefaultImage returns the default workspace image of specified + // workspace. + GetWorkspaceDefaultImage(ctx context.Context, in *GetWorkspaceDefaultImageRequest, opts ...grpc.CallOption) (*GetWorkspaceDefaultImageResponse, error) + // SendHeartBeat sends a heartbeat to activate the workspace + SendHeartBeat(ctx context.Context, in *SendHeartBeatRequest, opts ...grpc.CallOption) (*SendHeartBeatResponse, error) + // GetWorkspaceOwnerToken returns an owner token of workspace. + GetWorkspaceOwnerToken(ctx context.Context, in *GetWorkspaceOwnerTokenRequest, opts ...grpc.CallOption) (*GetWorkspaceOwnerTokenResponse, error) + // GetWorkspaceEditorCredentials returns an credentials that is used in editor + // to encrypt and decrypt secrets + GetWorkspaceEditorCredentials(ctx context.Context, in *GetWorkspaceEditorCredentialsRequest, opts ...grpc.CallOption) (*GetWorkspaceEditorCredentialsResponse, error) } type workspaceServiceClient struct { @@ -120,6 +130,42 @@ func (c *workspaceServiceClient) StartWorkspace(ctx context.Context, in *StartWo return out, nil } +func (c *workspaceServiceClient) GetWorkspaceDefaultImage(ctx context.Context, in *GetWorkspaceDefaultImageRequest, opts ...grpc.CallOption) (*GetWorkspaceDefaultImageResponse, error) { + out := new(GetWorkspaceDefaultImageResponse) + err := c.cc.Invoke(ctx, "/gitpod.v1.WorkspaceService/GetWorkspaceDefaultImage", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *workspaceServiceClient) SendHeartBeat(ctx context.Context, in *SendHeartBeatRequest, opts ...grpc.CallOption) (*SendHeartBeatResponse, error) { + out := new(SendHeartBeatResponse) + err := c.cc.Invoke(ctx, "/gitpod.v1.WorkspaceService/SendHeartBeat", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *workspaceServiceClient) GetWorkspaceOwnerToken(ctx context.Context, in *GetWorkspaceOwnerTokenRequest, opts ...grpc.CallOption) (*GetWorkspaceOwnerTokenResponse, error) { + out := new(GetWorkspaceOwnerTokenResponse) + err := c.cc.Invoke(ctx, "/gitpod.v1.WorkspaceService/GetWorkspaceOwnerToken", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *workspaceServiceClient) GetWorkspaceEditorCredentials(ctx context.Context, in *GetWorkspaceEditorCredentialsRequest, opts ...grpc.CallOption) (*GetWorkspaceEditorCredentialsResponse, error) { + out := new(GetWorkspaceEditorCredentialsResponse) + err := c.cc.Invoke(ctx, "/gitpod.v1.WorkspaceService/GetWorkspaceEditorCredentials", 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 @@ -140,6 +186,16 @@ type WorkspaceServiceServer interface { // StartWorkspace starts an existing workspace. // If the specified workspace is not in stopped phase, this will return the workspace as is. StartWorkspace(context.Context, *StartWorkspaceRequest) (*StartWorkspaceResponse, error) + // GetWorkspaceDefaultImage returns the default workspace image of specified + // workspace. + GetWorkspaceDefaultImage(context.Context, *GetWorkspaceDefaultImageRequest) (*GetWorkspaceDefaultImageResponse, error) + // SendHeartBeat sends a heartbeat to activate the workspace + SendHeartBeat(context.Context, *SendHeartBeatRequest) (*SendHeartBeatResponse, error) + // GetWorkspaceOwnerToken returns an owner token of workspace. + GetWorkspaceOwnerToken(context.Context, *GetWorkspaceOwnerTokenRequest) (*GetWorkspaceOwnerTokenResponse, error) + // GetWorkspaceEditorCredentials returns an credentials that is used in editor + // to encrypt and decrypt secrets + GetWorkspaceEditorCredentials(context.Context, *GetWorkspaceEditorCredentialsRequest) (*GetWorkspaceEditorCredentialsResponse, error) mustEmbedUnimplementedWorkspaceServiceServer() } @@ -162,6 +218,18 @@ func (UnimplementedWorkspaceServiceServer) CreateAndStartWorkspace(context.Conte func (UnimplementedWorkspaceServiceServer) StartWorkspace(context.Context, *StartWorkspaceRequest) (*StartWorkspaceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StartWorkspace not implemented") } +func (UnimplementedWorkspaceServiceServer) GetWorkspaceDefaultImage(context.Context, *GetWorkspaceDefaultImageRequest) (*GetWorkspaceDefaultImageResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetWorkspaceDefaultImage not implemented") +} +func (UnimplementedWorkspaceServiceServer) SendHeartBeat(context.Context, *SendHeartBeatRequest) (*SendHeartBeatResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SendHeartBeat not implemented") +} +func (UnimplementedWorkspaceServiceServer) GetWorkspaceOwnerToken(context.Context, *GetWorkspaceOwnerTokenRequest) (*GetWorkspaceOwnerTokenResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetWorkspaceOwnerToken not implemented") +} +func (UnimplementedWorkspaceServiceServer) GetWorkspaceEditorCredentials(context.Context, *GetWorkspaceEditorCredentialsRequest) (*GetWorkspaceEditorCredentialsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetWorkspaceEditorCredentials not implemented") +} func (UnimplementedWorkspaceServiceServer) mustEmbedUnimplementedWorkspaceServiceServer() {} // UnsafeWorkspaceServiceServer may be embedded to opt out of forward compatibility for this service. @@ -268,6 +336,78 @@ func _WorkspaceService_StartWorkspace_Handler(srv interface{}, ctx context.Conte return interceptor(ctx, in, info, handler) } +func _WorkspaceService_GetWorkspaceDefaultImage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetWorkspaceDefaultImageRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkspaceServiceServer).GetWorkspaceDefaultImage(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gitpod.v1.WorkspaceService/GetWorkspaceDefaultImage", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkspaceServiceServer).GetWorkspaceDefaultImage(ctx, req.(*GetWorkspaceDefaultImageRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WorkspaceService_SendHeartBeat_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SendHeartBeatRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkspaceServiceServer).SendHeartBeat(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gitpod.v1.WorkspaceService/SendHeartBeat", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkspaceServiceServer).SendHeartBeat(ctx, req.(*SendHeartBeatRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WorkspaceService_GetWorkspaceOwnerToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetWorkspaceOwnerTokenRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkspaceServiceServer).GetWorkspaceOwnerToken(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gitpod.v1.WorkspaceService/GetWorkspaceOwnerToken", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkspaceServiceServer).GetWorkspaceOwnerToken(ctx, req.(*GetWorkspaceOwnerTokenRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WorkspaceService_GetWorkspaceEditorCredentials_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetWorkspaceEditorCredentialsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkspaceServiceServer).GetWorkspaceEditorCredentials(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gitpod.v1.WorkspaceService/GetWorkspaceEditorCredentials", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkspaceServiceServer).GetWorkspaceEditorCredentials(ctx, req.(*GetWorkspaceEditorCredentialsRequest)) + } + 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) @@ -291,6 +431,22 @@ var WorkspaceService_ServiceDesc = grpc.ServiceDesc{ MethodName: "StartWorkspace", Handler: _WorkspaceService_StartWorkspace_Handler, }, + { + MethodName: "GetWorkspaceDefaultImage", + Handler: _WorkspaceService_GetWorkspaceDefaultImage_Handler, + }, + { + MethodName: "SendHeartBeat", + Handler: _WorkspaceService_SendHeartBeat_Handler, + }, + { + MethodName: "GetWorkspaceOwnerToken", + Handler: _WorkspaceService_GetWorkspaceOwnerToken_Handler, + }, + { + MethodName: "GetWorkspaceEditorCredentials", + Handler: _WorkspaceService_GetWorkspaceEditorCredentials_Handler, + }, }, Streams: []grpc.StreamDesc{ { diff --git a/components/public-api/typescript/src/gitpod/v1/user_pb.ts b/components/public-api/typescript/src/gitpod/v1/user_pb.ts index 34028c5c791690..0f752ad335f724 100644 --- a/components/public-api/typescript/src/gitpod/v1/user_pb.ts +++ b/components/public-api/typescript/src/gitpod/v1/user_pb.ts @@ -102,7 +102,7 @@ export class User extends Message { organizationId = ""; /** - * name is the username + * name is the full name of the user * * @generated from field: string name = 3; */ diff --git a/components/public-api/typescript/src/gitpod/v1/workspace_connect.ts b/components/public-api/typescript/src/gitpod/v1/workspace_connect.ts index 0ea430f9892986..fcec3dc6ac50cc 100644 --- a/components/public-api/typescript/src/gitpod/v1/workspace_connect.ts +++ b/components/public-api/typescript/src/gitpod/v1/workspace_connect.ts @@ -9,7 +9,7 @@ /* eslint-disable */ // @ts-nocheck -import { CreateAndStartWorkspaceRequest, CreateAndStartWorkspaceResponse, GetWorkspaceRequest, GetWorkspaceResponse, ListWorkspacesRequest, ListWorkspacesResponse, StartWorkspaceRequest, StartWorkspaceResponse, WatchWorkspaceStatusRequest, WatchWorkspaceStatusResponse } from "./workspace_pb.js"; +import { CreateAndStartWorkspaceRequest, CreateAndStartWorkspaceResponse, GetWorkspaceDefaultImageRequest, GetWorkspaceDefaultImageResponse, GetWorkspaceEditorCredentialsRequest, GetWorkspaceEditorCredentialsResponse, GetWorkspaceOwnerTokenRequest, GetWorkspaceOwnerTokenResponse, GetWorkspaceRequest, GetWorkspaceResponse, ListWorkspacesRequest, ListWorkspacesResponse, SendHeartBeatRequest, SendHeartBeatResponse, StartWorkspaceRequest, StartWorkspaceResponse, WatchWorkspaceStatusRequest, WatchWorkspaceStatusResponse } from "./workspace_pb.js"; import { MethodKind } from "@bufbuild/protobuf"; /** @@ -79,5 +79,51 @@ export const WorkspaceService = { O: StartWorkspaceResponse, kind: MethodKind.Unary, }, + /** + * GetWorkspaceDefaultImage returns the default workspace image of specified + * workspace. + * + * @generated from rpc gitpod.v1.WorkspaceService.GetWorkspaceDefaultImage + */ + getWorkspaceDefaultImage: { + name: "GetWorkspaceDefaultImage", + I: GetWorkspaceDefaultImageRequest, + O: GetWorkspaceDefaultImageResponse, + kind: MethodKind.Unary, + }, + /** + * SendHeartBeat sends a heartbeat to activate the workspace + * + * @generated from rpc gitpod.v1.WorkspaceService.SendHeartBeat + */ + sendHeartBeat: { + name: "SendHeartBeat", + I: SendHeartBeatRequest, + O: SendHeartBeatResponse, + kind: MethodKind.Unary, + }, + /** + * GetWorkspaceOwnerToken returns an owner token of workspace. + * + * @generated from rpc gitpod.v1.WorkspaceService.GetWorkspaceOwnerToken + */ + getWorkspaceOwnerToken: { + name: "GetWorkspaceOwnerToken", + I: GetWorkspaceOwnerTokenRequest, + O: GetWorkspaceOwnerTokenResponse, + kind: MethodKind.Unary, + }, + /** + * GetWorkspaceEditorCredentials returns an credentials that is used in editor + * to encrypt and decrypt secrets + * + * @generated from rpc gitpod.v1.WorkspaceService.GetWorkspaceEditorCredentials + */ + getWorkspaceEditorCredentials: { + name: "GetWorkspaceEditorCredentials", + I: GetWorkspaceEditorCredentialsRequest, + O: GetWorkspaceEditorCredentialsResponse, + kind: MethodKind.Unary, + }, } } as const; diff --git a/components/public-api/typescript/src/gitpod/v1/workspace_pb.ts b/components/public-api/typescript/src/gitpod/v1/workspace_pb.ts index 2fd980f6dce657..66f8481801ad41 100644 --- a/components/public-api/typescript/src/gitpod/v1/workspace_pb.ts +++ b/components/public-api/typescript/src/gitpod/v1/workspace_pb.ts @@ -635,6 +635,343 @@ export class StartWorkspaceResponse extends Message { } } +/** + * @generated from message gitpod.v1.GetWorkspaceDefaultImageRequest + */ +export class GetWorkspaceDefaultImageRequest extends Message { + /** + * workspace_id specifies the workspace to get default image + * + * @generated from field: string workspace_id = 1; + */ + workspaceId = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "gitpod.v1.GetWorkspaceDefaultImageRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "workspace_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): GetWorkspaceDefaultImageRequest { + return new GetWorkspaceDefaultImageRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): GetWorkspaceDefaultImageRequest { + return new GetWorkspaceDefaultImageRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): GetWorkspaceDefaultImageRequest { + return new GetWorkspaceDefaultImageRequest().fromJsonString(jsonString, options); + } + + static equals(a: GetWorkspaceDefaultImageRequest | PlainMessage | undefined, b: GetWorkspaceDefaultImageRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(GetWorkspaceDefaultImageRequest, a, b); + } +} + +/** + * @generated from message gitpod.v1.GetWorkspaceDefaultImageResponse + */ +export class GetWorkspaceDefaultImageResponse extends Message { + /** + * @generated from field: string default_workspace_image = 1; + */ + defaultWorkspaceImage = ""; + + /** + * @generated from field: gitpod.v1.GetWorkspaceDefaultImageResponse.Source source = 2; + */ + source = GetWorkspaceDefaultImageResponse_Source.UNSPECIFIED; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "gitpod.v1.GetWorkspaceDefaultImageResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "default_workspace_image", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "source", kind: "enum", T: proto3.getEnumType(GetWorkspaceDefaultImageResponse_Source) }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): GetWorkspaceDefaultImageResponse { + return new GetWorkspaceDefaultImageResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): GetWorkspaceDefaultImageResponse { + return new GetWorkspaceDefaultImageResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): GetWorkspaceDefaultImageResponse { + return new GetWorkspaceDefaultImageResponse().fromJsonString(jsonString, options); + } + + static equals(a: GetWorkspaceDefaultImageResponse | PlainMessage | undefined, b: GetWorkspaceDefaultImageResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(GetWorkspaceDefaultImageResponse, a, b); + } +} + +/** + * @generated from enum gitpod.v1.GetWorkspaceDefaultImageResponse.Source + */ +export enum GetWorkspaceDefaultImageResponse_Source { + /** + * @generated from enum value: SOURCE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: SOURCE_INSTALLATION = 1; + */ + INSTALLATION = 1, + + /** + * @generated from enum value: SOURCE_ORGANIZATION = 2; + */ + ORGANIZATION = 2, +} +// Retrieve enum metadata with: proto3.getEnumType(GetWorkspaceDefaultImageResponse_Source) +proto3.util.setEnumType(GetWorkspaceDefaultImageResponse_Source, "gitpod.v1.GetWorkspaceDefaultImageResponse.Source", [ + { no: 0, name: "SOURCE_UNSPECIFIED" }, + { no: 1, name: "SOURCE_INSTALLATION" }, + { no: 2, name: "SOURCE_ORGANIZATION" }, +]); + +/** + * @generated from message gitpod.v1.SendHeartBeatRequest + */ +export class SendHeartBeatRequest extends Message { + /** + * workspace_id specifies the workspace to send heartbeat + * + * +required + * + * @generated from field: string workspace_id = 1; + */ + workspaceId = ""; + + /** + * disconnected indicates if the editor connection is disconnected. + * If set to true, the workspace will be stopped after Timeout.disconnected. + * + * @generated from field: bool disconnected = 2; + */ + disconnected = false; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "gitpod.v1.SendHeartBeatRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "workspace_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "disconnected", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): SendHeartBeatRequest { + return new SendHeartBeatRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): SendHeartBeatRequest { + return new SendHeartBeatRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): SendHeartBeatRequest { + return new SendHeartBeatRequest().fromJsonString(jsonString, options); + } + + static equals(a: SendHeartBeatRequest | PlainMessage | undefined, b: SendHeartBeatRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(SendHeartBeatRequest, a, b); + } +} + +/** + * @generated from message gitpod.v1.SendHeartBeatResponse + */ +export class SendHeartBeatResponse extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "gitpod.v1.SendHeartBeatResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): SendHeartBeatResponse { + return new SendHeartBeatResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): SendHeartBeatResponse { + return new SendHeartBeatResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): SendHeartBeatResponse { + return new SendHeartBeatResponse().fromJsonString(jsonString, options); + } + + static equals(a: SendHeartBeatResponse | PlainMessage | undefined, b: SendHeartBeatResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(SendHeartBeatResponse, a, b); + } +} + +/** + * @generated from message gitpod.v1.GetWorkspaceOwnerTokenRequest + */ +export class GetWorkspaceOwnerTokenRequest extends Message { + /** + * @generated from field: string workspace_id = 1; + */ + workspaceId = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "gitpod.v1.GetWorkspaceOwnerTokenRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "workspace_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): GetWorkspaceOwnerTokenRequest { + return new GetWorkspaceOwnerTokenRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): GetWorkspaceOwnerTokenRequest { + return new GetWorkspaceOwnerTokenRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): GetWorkspaceOwnerTokenRequest { + return new GetWorkspaceOwnerTokenRequest().fromJsonString(jsonString, options); + } + + static equals(a: GetWorkspaceOwnerTokenRequest | PlainMessage | undefined, b: GetWorkspaceOwnerTokenRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(GetWorkspaceOwnerTokenRequest, a, b); + } +} + +/** + * @generated from message gitpod.v1.GetWorkspaceOwnerTokenResponse + */ +export class GetWorkspaceOwnerTokenResponse extends Message { + /** + * @generated from field: string owner_token = 1; + */ + ownerToken = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "gitpod.v1.GetWorkspaceOwnerTokenResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "owner_token", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): GetWorkspaceOwnerTokenResponse { + return new GetWorkspaceOwnerTokenResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): GetWorkspaceOwnerTokenResponse { + return new GetWorkspaceOwnerTokenResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): GetWorkspaceOwnerTokenResponse { + return new GetWorkspaceOwnerTokenResponse().fromJsonString(jsonString, options); + } + + static equals(a: GetWorkspaceOwnerTokenResponse | PlainMessage | undefined, b: GetWorkspaceOwnerTokenResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(GetWorkspaceOwnerTokenResponse, a, b); + } +} + +/** + * @generated from message gitpod.v1.GetWorkspaceEditorCredentialsRequest + */ +export class GetWorkspaceEditorCredentialsRequest extends Message { + /** + * @generated from field: string workspace_id = 1; + */ + workspaceId = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "gitpod.v1.GetWorkspaceEditorCredentialsRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "workspace_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): GetWorkspaceEditorCredentialsRequest { + return new GetWorkspaceEditorCredentialsRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): GetWorkspaceEditorCredentialsRequest { + return new GetWorkspaceEditorCredentialsRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): GetWorkspaceEditorCredentialsRequest { + return new GetWorkspaceEditorCredentialsRequest().fromJsonString(jsonString, options); + } + + static equals(a: GetWorkspaceEditorCredentialsRequest | PlainMessage | undefined, b: GetWorkspaceEditorCredentialsRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(GetWorkspaceEditorCredentialsRequest, a, b); + } +} + +/** + * @generated from message gitpod.v1.GetWorkspaceEditorCredentialsResponse + */ +export class GetWorkspaceEditorCredentialsResponse extends Message { + /** + * @generated from field: string editor_credentials = 1; + */ + editorCredentials = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "gitpod.v1.GetWorkspaceEditorCredentialsResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "editor_credentials", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): GetWorkspaceEditorCredentialsResponse { + return new GetWorkspaceEditorCredentialsResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): GetWorkspaceEditorCredentialsResponse { + return new GetWorkspaceEditorCredentialsResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): GetWorkspaceEditorCredentialsResponse { + return new GetWorkspaceEditorCredentialsResponse().fromJsonString(jsonString, options); + } + + static equals(a: GetWorkspaceEditorCredentialsResponse | PlainMessage | undefined, b: GetWorkspaceEditorCredentialsResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(GetWorkspaceEditorCredentialsResponse, a, b); + } +} + /** * +resource get workspace * diff --git a/components/server/src/api/workspace-service-api.ts b/components/server/src/api/workspace-service-api.ts index 5c6a5440f63e6a..8c26fb7baec43c 100644 --- a/components/server/src/api/workspace-service-api.ts +++ b/components/server/src/api/workspace-service-api.ts @@ -17,6 +17,15 @@ import { WatchWorkspaceStatusResponse, ListWorkspacesRequest, ListWorkspacesResponse, + GetWorkspaceDefaultImageRequest, + GetWorkspaceDefaultImageResponse, + GetWorkspaceEditorCredentialsRequest, + GetWorkspaceEditorCredentialsResponse, + GetWorkspaceOwnerTokenRequest, + GetWorkspaceOwnerTokenResponse, + SendHeartBeatRequest, + SendHeartBeatResponse, + GetWorkspaceDefaultImageResponse_Source, } from "@gitpod/public-api/lib/gitpod/v1/workspace_pb"; import { inject, injectable } from "inversify"; import { WorkspaceService } from "../workspace/workspace-service"; @@ -174,4 +183,68 @@ export class WorkspaceServiceAPI implements ServiceImpl { + if (!req.workspaceId) { + throw new ApplicationError(ErrorCodes.BAD_REQUEST, "workspaceId is required"); + } + const result = await this.workspaceService.getWorkspaceDefaultImage(ctxUserId(), req.workspaceId); + const response = new GetWorkspaceDefaultImageResponse({ + defaultWorkspaceImage: result.image, + }); + switch (result.source) { + case "organization": + response.source = GetWorkspaceDefaultImageResponse_Source.ORGANIZATION; + break; + case "installation": + response.source = GetWorkspaceDefaultImageResponse_Source.INSTALLATION; + break; + } + return response; + } + + async sendHeartBeat(req: SendHeartBeatRequest, _: HandlerContext): Promise { + if (!req.workspaceId) { + throw new ApplicationError(ErrorCodes.BAD_REQUEST, "workspaceId is required"); + } + const info = await this.workspaceService.getWorkspace(ctxUserId(), req.workspaceId); + if (!info.latestInstance?.id || info.latestInstance.status.phase !== "running") { + throw new ApplicationError(ErrorCodes.PRECONDITION_FAILED, "workspace is not running"); + } + await this.workspaceService.sendHeartBeat(ctxUserId(), { + instanceId: info.latestInstance.id, + wasClosed: req.disconnected === true, + }); + + return new SendHeartBeatResponse(); + } + + async getWorkspaceOwnerToken( + req: GetWorkspaceOwnerTokenRequest, + _: HandlerContext, + ): Promise { + if (!req.workspaceId) { + throw new ApplicationError(ErrorCodes.BAD_REQUEST, "workspaceId is required"); + } + const ownerToken = await this.workspaceService.getOwnerToken(ctxUserId(), req.workspaceId); + const response = new GetWorkspaceOwnerTokenResponse(); + response.ownerToken = ownerToken; + return response; + } + + async getWorkspaceEditorCredentials( + req: GetWorkspaceEditorCredentialsRequest, + _: HandlerContext, + ): Promise { + if (!req.workspaceId) { + throw new ApplicationError(ErrorCodes.BAD_REQUEST, "workspaceId is required"); + } + const credentials = await this.workspaceService.getIDECredentials(ctxUserId(), req.workspaceId); + const response = new GetWorkspaceEditorCredentialsResponse(); + response.editorCredentials = credentials; + return response; + } } diff --git a/components/server/src/workspace/workspace-service.ts b/components/server/src/workspace/workspace-service.ts index 836aa62b53c676..399edf1b28f176 100644 --- a/components/server/src/workspace/workspace-service.ts +++ b/components/server/src/workspace/workspace-service.ts @@ -970,6 +970,24 @@ export class WorkspaceService { throw e; } } + + public async getWorkspaceDefaultImage( + userId: string, + workspaceId: string, + ): Promise<{ source: "organization" | "installation"; image: string }> { + const workspace = await this.doGetWorkspace(userId, workspaceId); + const settings = await this.orgService.getSettings(userId, workspace.organizationId); + if (settings.defaultWorkspaceImage) { + return { + source: "organization", + image: settings.defaultWorkspaceImage, + }; + } + return { + source: "installation", + image: this.config.workspaceDefaults.workspaceImage, + }; + } } // TODO(gpl) Make private after FGA rollout