diff --git a/components/dashboard/src/data/workspaces/create-workspace-mutation.ts b/components/dashboard/src/data/workspaces/create-workspace-mutation.ts index b45152033682d7..e60332dc7845e4 100644 --- a/components/dashboard/src/data/workspaces/create-workspace-mutation.ts +++ b/components/dashboard/src/data/workspaces/create-workspace-mutation.ts @@ -4,26 +4,34 @@ * See License.AGPL.txt in the project root for license information. */ -import { GitpodServer, WorkspaceCreationResult } from "@gitpod/gitpod-protocol"; import { useMutation } from "@tanstack/react-query"; -import { getGitpodService } from "../../service/service"; import { useState } from "react"; -import { StartWorkspaceError } from "../../start/StartPage"; +import { workspaceClient } from "../../service/public-api"; +import { + CreateAndStartWorkspaceRequest, + CreateAndStartWorkspaceResponse, +} from "@gitpod/public-api/lib/gitpod/v1/workspace_pb"; +import { PartialMessage } from "@bufbuild/protobuf"; +import { ConnectError } from "@connectrpc/connect"; export const useCreateWorkspaceMutation = () => { const [isStarting, setIsStarting] = useState(false); - const mutation = useMutation({ + const mutation = useMutation< + CreateAndStartWorkspaceResponse, + ConnectError, + PartialMessage + >({ mutationFn: async (options) => { - return await getGitpodService().server.createWorkspace(options); + return await workspaceClient.createAndStartWorkspace(options); }, - onMutate: async (options: GitpodServer.CreateWorkspaceOptions) => { + onMutate: async (options: PartialMessage) => { setIsStarting(true); }, onError: (error) => { setIsStarting(false); }, onSuccess: (result) => { - if (result && result.createdWorkspaceId) { + if (result.workspace?.id) { // successfully started a workspace, wait a bit before we allow to start another one setTimeout(() => { setIsStarting(false); @@ -34,7 +42,7 @@ export const useCreateWorkspaceMutation = () => { }, }); return { - createWorkspace: (options: GitpodServer.CreateWorkspaceOptions) => { + createWorkspace: (options: PartialMessage) => { return mutation.mutateAsync(options); }, // Can we use mutation.isLoading here instead? diff --git a/components/dashboard/src/service/json-rpc-workspace-client.ts b/components/dashboard/src/service/json-rpc-workspace-client.ts index e98c8de87ddcbe..d9861153735bb0 100644 --- a/components/dashboard/src/service/json-rpc-workspace-client.ts +++ b/components/dashboard/src/service/json-rpc-workspace-client.ts @@ -8,8 +8,12 @@ import { CallOptions, Code, ConnectError, PromiseClient } from "@connectrpc/conn import { PartialMessage } from "@bufbuild/protobuf"; import { WorkspaceService } from "@gitpod/public-api/lib/gitpod/v1/workspace_connect"; import { + CreateAndStartWorkspaceRequest, + CreateAndStartWorkspaceResponse, GetWorkspaceRequest, GetWorkspaceResponse, + StartWorkspaceRequest, + StartWorkspaceResponse, WatchWorkspaceStatusRequest, WatchWorkspaceStatusResponse, } from "@gitpod/public-api/lib/gitpod/v1/workspace_pb"; @@ -17,6 +21,7 @@ import { converter } from "./public-api"; import { getGitpodService } from "./service"; import { generateAsyncGenerator } from "@gitpod/gitpod-protocol/lib/generate-async-generator"; import { WorkspaceInstance } from "@gitpod/gitpod-protocol"; +import { validate as uuidValidate } from "uuid"; export class JsonRpcWorkspaceClient implements PromiseClient { async getWorkspace(request: PartialMessage): Promise { @@ -80,4 +85,47 @@ export class JsonRpcWorkspaceClient implements PromiseClient, + options?: CallOptions | undefined, + ) { + if (request.source?.source?.case !== "contextUrl") { + throw new ConnectError("not implemented", Code.Unimplemented); + } + if (!request.organizationId || !uuidValidate(request.organizationId)) { + throw new ConnectError("organizationId is required", Code.InvalidArgument); + } + if (!request.editor) { + throw new ConnectError("editor is required", Code.InvalidArgument); + } + const response = await getGitpodService().server.createWorkspace({ + organizationId: request.organizationId, + ignoreRunningWorkspaceOnSameCommit: true, + contextUrl: request.source.source.value, + forceDefaultConfig: request.forceDefaultConfig, + workspaceClass: request.workspaceClass, + ideSettings: { + defaultIde: request.editor.name, + useLatestVersion: request.editor.version === "latest", + }, + }); + const workspace = await this.getWorkspace({ workspaceId: response.createdWorkspaceId }); + const result = new CreateAndStartWorkspaceResponse(); + result.workspace = workspace.workspace; + return result; + } + + async startWorkspace(request: PartialMessage, options?: CallOptions | undefined) { + if (!request.workspaceId) { + throw new ConnectError("workspaceId is required", Code.InvalidArgument); + } + await getGitpodService().server.startWorkspace(request.workspaceId, { + forceDefaultImage: request.forceDefaultConfig, + }); + const workspace = await this.getWorkspace({ workspaceId: request.workspaceId }); + const result = new StartWorkspaceResponse(); + result.workspace = workspace.workspace; + return result; + } } diff --git a/components/dashboard/src/workspaces/CreateWorkspacePage.tsx b/components/dashboard/src/workspaces/CreateWorkspacePage.tsx index efe6d490422349..dc8da18f2aa770 100644 --- a/components/dashboard/src/workspaces/CreateWorkspacePage.tsx +++ b/components/dashboard/src/workspaces/CreateWorkspacePage.tsx @@ -4,13 +4,7 @@ * See License.AGPL.txt in the project root for license information. */ -import { - AdditionalUserData, - CommitContext, - GitpodServer, - SuggestedRepository, - WithReferrerContext, -} from "@gitpod/gitpod-protocol"; +import { AdditionalUserData, CommitContext, SuggestedRepository, WithReferrerContext } from "@gitpod/gitpod-protocol"; import { SelectAccountPayload } from "@gitpod/gitpod-protocol/lib/auth"; import { ErrorCodes } from "@gitpod/gitpod-protocol/lib/messaging/error"; import { Deferred } from "@gitpod/gitpod-protocol/lib/util/deferred"; @@ -43,6 +37,8 @@ import { UserContext, useCurrentUser } from "../user-context"; import { SelectAccountModal } from "../user-settings/SelectAccountModal"; import { settingsPathIntegrations } from "../user-settings/settings.routes"; import { WorkspaceEntry } from "./WorkspaceEntry"; +import { CreateAndStartWorkspaceRequest } from "@gitpod/public-api/lib/gitpod/v1/workspace_pb"; +import { PartialMessage } from "@bufbuild/protobuf"; export function CreateWorkspacePage() { const { user, setUser } = useContext(UserContext); @@ -174,12 +170,20 @@ export function CreateWorkspacePage() { const [selectAccountError, setSelectAccountError] = useState(undefined); const createWorkspace = useCallback( - async (options?: Omit) => { + async (options?: Omit, "contextUrl" | "organizationId">) => { // add options from search params const opts = options || {}; - // we already have shown running workspaces to the user - opts.ignoreRunningWorkspaceOnSameCommit = true; + if (!contextURL) { + return; + } + + const organizationId = currentOrg?.id; + if (!organizationId) { + // We need an organizationId for this group of users + console.error("Skipping createWorkspace"); + return; + } // if user received an INVALID_GITPOD_YML yml for their contextURL they can choose to proceed using default configuration if (workspaceContext.error?.code === ErrorCodes.INVALID_GITPOD_YML) { @@ -189,22 +193,12 @@ export function CreateWorkspacePage() { if (!opts.workspaceClass) { opts.workspaceClass = selectedWsClass; } - if (!opts.ideSettings) { - opts.ideSettings = { - defaultIde: selectedIde, - useLatestVersion: useLatestIde, + if (!opts.editor) { + opts.editor = { + name: selectedIde, + version: useLatestIde ? "latest" : undefined, }; } - if (!contextURL) { - return; - } - - const organizationId = currentOrg?.id; - if (!organizationId) { - // We need an organizationId for this group of users - console.error("Skipping createWorkspace"); - return; - } try { if (createWorkspaceMutation.isStarting) { @@ -213,18 +207,24 @@ export function CreateWorkspacePage() { } // we wait at least 5 secs const timeout = new Promise((resolve) => setTimeout(resolve, 5000)); + const result = await createWorkspaceMutation.createWorkspace({ - contextUrl: contextURL, - organizationId, - projectId: selectedProjectID, + source: { + source: { + case: "contextUrl", + value: contextURL, + }, + }, ...opts, + organizationId, + configurationId: selectedProjectID, }); await storeAutoStartOptions(); await timeout; - if (result.workspaceURL) { - window.location.href = result.workspaceURL; - } else if (result.createdWorkspaceId) { - history.push(`/start/#${result.createdWorkspaceId}`); + if (result.workspace?.status?.workspaceUrl) { + window.location.href = result.workspace.status.workspaceUrl; + } else if (result.workspace!.id) { + history.push(`/start/#${result.workspace!.id}`); } } catch (error) { console.log(error); diff --git a/components/public-api/gitpod/v1/workspace.proto b/components/public-api/gitpod/v1/workspace.proto index 153cd782a789aa..ffddbf381eece1 100644 --- a/components/public-api/gitpod/v1/workspace.proto +++ b/components/public-api/gitpod/v1/workspace.proto @@ -103,7 +103,11 @@ message CreateAndStartWorkspaceRequest { message CreateAndStartWorkspaceResponse { Workspace workspace = 1; } -message StartWorkspaceRequest { string workspace_id = 1; } +message StartWorkspaceRequest { + string workspace_id = 1; + + bool force_default_config = 2; +} message StartWorkspaceResponse { Workspace workspace = 1; } diff --git a/components/public-api/go/v1/context.pb.go b/components/public-api/go/v1/context.pb.go new file mode 100644 index 00000000000000..f5585f75096875 --- /dev/null +++ b/components/public-api/go/v1/context.pb.go @@ -0,0 +1,305 @@ +// Copyright (c) 2023 Gitpod GmbH. All rights reserved. +// Licensed under the GNU Affero General Public License (AGPL). +// See License.AGPL.txt in the project root for license information. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: gitpod/v1/context.proto + +package v1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ParseContextRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` +} + +func (x *ParseContextRequest) Reset() { + *x = ParseContextRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gitpod_v1_context_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ParseContextRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ParseContextRequest) ProtoMessage() {} + +func (x *ParseContextRequest) ProtoReflect() protoreflect.Message { + mi := &file_gitpod_v1_context_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ParseContextRequest.ProtoReflect.Descriptor instead. +func (*ParseContextRequest) Descriptor() ([]byte, []int) { + return file_gitpod_v1_context_proto_rawDescGZIP(), []int{0} +} + +func (x *ParseContextRequest) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +type ParseContextResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Context *Context `protobuf:"bytes,1,opt,name=context,proto3" json:"context,omitempty"` +} + +func (x *ParseContextResponse) Reset() { + *x = ParseContextResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_gitpod_v1_context_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ParseContextResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ParseContextResponse) ProtoMessage() {} + +func (x *ParseContextResponse) ProtoReflect() protoreflect.Message { + mi := &file_gitpod_v1_context_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ParseContextResponse.ProtoReflect.Descriptor instead. +func (*ParseContextResponse) Descriptor() ([]byte, []int) { + return file_gitpod_v1_context_proto_rawDescGZIP(), []int{1} +} + +func (x *ParseContextResponse) GetContext() *Context { + if x != nil { + return x.Context + } + return nil +} + +type Context struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + NormalizedUrl string `protobuf:"bytes,2,opt,name=normalized_url,json=normalizedUrl,proto3" json:"normalized_url,omitempty"` + Ref string `protobuf:"bytes,3,opt,name=ref,proto3" json:"ref,omitempty"` +} + +func (x *Context) Reset() { + *x = Context{} + if protoimpl.UnsafeEnabled { + mi := &file_gitpod_v1_context_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Context) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Context) ProtoMessage() {} + +func (x *Context) ProtoReflect() protoreflect.Message { + mi := &file_gitpod_v1_context_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Context.ProtoReflect.Descriptor instead. +func (*Context) Descriptor() ([]byte, []int) { + return file_gitpod_v1_context_proto_rawDescGZIP(), []int{2} +} + +func (x *Context) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *Context) GetNormalizedUrl() string { + if x != nil { + return x.NormalizedUrl + } + return "" +} + +func (x *Context) GetRef() string { + if x != nil { + return x.Ref + } + return "" +} + +var File_gitpod_v1_context_proto protoreflect.FileDescriptor + +var file_gitpod_v1_context_proto_rawDesc = []byte{ + 0x0a, 0x17, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x67, 0x69, 0x74, 0x70, 0x6f, + 0x64, 0x2e, 0x76, 0x31, 0x22, 0x27, 0x0a, 0x13, 0x50, 0x61, 0x72, 0x73, 0x65, 0x43, 0x6f, 0x6e, + 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, + 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x44, 0x0a, + 0x14, 0x50, 0x61, 0x72, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x22, 0x58, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x14, + 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, + 0x69, 0x74, 0x6c, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, + 0x65, 0x64, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x6f, + 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x55, 0x72, 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x72, + 0x65, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x72, 0x65, 0x66, 0x32, 0x63, 0x0a, + 0x0e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x51, 0x0a, 0x0c, 0x50, 0x61, 0x72, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, + 0x1e, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x73, + 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1f, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x73, + 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 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 ( + file_gitpod_v1_context_proto_rawDescOnce sync.Once + file_gitpod_v1_context_proto_rawDescData = file_gitpod_v1_context_proto_rawDesc +) + +func file_gitpod_v1_context_proto_rawDescGZIP() []byte { + file_gitpod_v1_context_proto_rawDescOnce.Do(func() { + file_gitpod_v1_context_proto_rawDescData = protoimpl.X.CompressGZIP(file_gitpod_v1_context_proto_rawDescData) + }) + return file_gitpod_v1_context_proto_rawDescData +} + +var file_gitpod_v1_context_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_gitpod_v1_context_proto_goTypes = []interface{}{ + (*ParseContextRequest)(nil), // 0: gitpod.v1.ParseContextRequest + (*ParseContextResponse)(nil), // 1: gitpod.v1.ParseContextResponse + (*Context)(nil), // 2: gitpod.v1.Context +} +var file_gitpod_v1_context_proto_depIdxs = []int32{ + 2, // 0: gitpod.v1.ParseContextResponse.context:type_name -> gitpod.v1.Context + 0, // 1: gitpod.v1.ContextService.ParseContext:input_type -> gitpod.v1.ParseContextRequest + 1, // 2: gitpod.v1.ContextService.ParseContext:output_type -> gitpod.v1.ParseContextResponse + 2, // [2:3] is the sub-list for method output_type + 1, // [1:2] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_gitpod_v1_context_proto_init() } +func file_gitpod_v1_context_proto_init() { + if File_gitpod_v1_context_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_gitpod_v1_context_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ParseContextRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitpod_v1_context_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ParseContextResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitpod_v1_context_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Context); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_gitpod_v1_context_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_gitpod_v1_context_proto_goTypes, + DependencyIndexes: file_gitpod_v1_context_proto_depIdxs, + MessageInfos: file_gitpod_v1_context_proto_msgTypes, + }.Build() + File_gitpod_v1_context_proto = out.File + file_gitpod_v1_context_proto_rawDesc = nil + file_gitpod_v1_context_proto_goTypes = nil + file_gitpod_v1_context_proto_depIdxs = nil +} diff --git a/components/public-api/go/v1/context_grpc.pb.go b/components/public-api/go/v1/context_grpc.pb.go new file mode 100644 index 00000000000000..d0783796bcdacd --- /dev/null +++ b/components/public-api/go/v1/context_grpc.pb.go @@ -0,0 +1,111 @@ +// Copyright (c) 2023 Gitpod GmbH. All rights reserved. +// Licensed under the GNU Affero General Public License (AGPL). +// See License.AGPL.txt in the project root for license information. + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc (unknown) +// source: gitpod/v1/context.proto + +package v1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// ContextServiceClient is the client API for ContextService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type ContextServiceClient interface { + // ParseContext parses the url and returns the context + ParseContext(ctx context.Context, in *ParseContextRequest, opts ...grpc.CallOption) (*ParseContextResponse, error) +} + +type contextServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewContextServiceClient(cc grpc.ClientConnInterface) ContextServiceClient { + return &contextServiceClient{cc} +} + +func (c *contextServiceClient) ParseContext(ctx context.Context, in *ParseContextRequest, opts ...grpc.CallOption) (*ParseContextResponse, error) { + out := new(ParseContextResponse) + err := c.cc.Invoke(ctx, "/gitpod.v1.ContextService/ParseContext", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ContextServiceServer is the server API for ContextService service. +// All implementations must embed UnimplementedContextServiceServer +// for forward compatibility +type ContextServiceServer interface { + // ParseContext parses the url and returns the context + ParseContext(context.Context, *ParseContextRequest) (*ParseContextResponse, error) + mustEmbedUnimplementedContextServiceServer() +} + +// UnimplementedContextServiceServer must be embedded to have forward compatible implementations. +type UnimplementedContextServiceServer struct { +} + +func (UnimplementedContextServiceServer) ParseContext(context.Context, *ParseContextRequest) (*ParseContextResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ParseContext not implemented") +} +func (UnimplementedContextServiceServer) mustEmbedUnimplementedContextServiceServer() {} + +// UnsafeContextServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ContextServiceServer will +// result in compilation errors. +type UnsafeContextServiceServer interface { + mustEmbedUnimplementedContextServiceServer() +} + +func RegisterContextServiceServer(s grpc.ServiceRegistrar, srv ContextServiceServer) { + s.RegisterService(&ContextService_ServiceDesc, srv) +} + +func _ContextService_ParseContext_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ParseContextRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ContextServiceServer).ParseContext(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gitpod.v1.ContextService/ParseContext", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ContextServiceServer).ParseContext(ctx, req.(*ParseContextRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ContextService_ServiceDesc is the grpc.ServiceDesc for ContextService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ContextService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "gitpod.v1.ContextService", + HandlerType: (*ContextServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ParseContext", + Handler: _ContextService_ParseContext_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "gitpod/v1/context.proto", +} diff --git a/components/public-api/go/v1/v1connect/context.connect.go b/components/public-api/go/v1/v1connect/context.connect.go new file mode 100644 index 00000000000000..4222b534bb562f --- /dev/null +++ b/components/public-api/go/v1/v1connect/context.connect.go @@ -0,0 +1,92 @@ +// Copyright (c) 2023 Gitpod GmbH. All rights reserved. +// Licensed under the GNU Affero General Public License (AGPL). +// See License.AGPL.txt in the project root for license information. + +// Code generated by protoc-gen-connect-go. DO NOT EDIT. +// +// Source: gitpod/v1/context.proto + +package v1connect + +import ( + context "context" + errors "errors" + connect_go "github.com/bufbuild/connect-go" + v1 "github.com/gitpod-io/gitpod/components/public-api/go/v1" + http "net/http" + strings "strings" +) + +// This is a compile-time assertion to ensure that this generated file and the connect package are +// compatible. If you get a compiler error that this constant is not defined, this code was +// generated with a version of connect newer than the one compiled into your binary. You can fix the +// problem by either regenerating this code with an older version of connect or updating the connect +// version compiled into your binary. +const _ = connect_go.IsAtLeastVersion0_1_0 + +const ( + // ContextServiceName is the fully-qualified name of the ContextService service. + ContextServiceName = "gitpod.v1.ContextService" +) + +// ContextServiceClient is a client for the gitpod.v1.ContextService service. +type ContextServiceClient interface { + // ParseContext parses the url and returns the context + ParseContext(context.Context, *connect_go.Request[v1.ParseContextRequest]) (*connect_go.Response[v1.ParseContextResponse], error) +} + +// NewContextServiceClient constructs a client for the gitpod.v1.ContextService service. By default, +// it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and +// sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() +// or connect.WithGRPCWeb() options. +// +// The URL supplied here should be the base URL for the Connect or gRPC server (for example, +// http://api.acme.com or https://acme.com/grpc). +func NewContextServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) ContextServiceClient { + baseURL = strings.TrimRight(baseURL, "/") + return &contextServiceClient{ + parseContext: connect_go.NewClient[v1.ParseContextRequest, v1.ParseContextResponse]( + httpClient, + baseURL+"/gitpod.v1.ContextService/ParseContext", + opts..., + ), + } +} + +// contextServiceClient implements ContextServiceClient. +type contextServiceClient struct { + parseContext *connect_go.Client[v1.ParseContextRequest, v1.ParseContextResponse] +} + +// ParseContext calls gitpod.v1.ContextService.ParseContext. +func (c *contextServiceClient) ParseContext(ctx context.Context, req *connect_go.Request[v1.ParseContextRequest]) (*connect_go.Response[v1.ParseContextResponse], error) { + return c.parseContext.CallUnary(ctx, req) +} + +// ContextServiceHandler is an implementation of the gitpod.v1.ContextService service. +type ContextServiceHandler interface { + // ParseContext parses the url and returns the context + ParseContext(context.Context, *connect_go.Request[v1.ParseContextRequest]) (*connect_go.Response[v1.ParseContextResponse], error) +} + +// NewContextServiceHandler builds an HTTP handler from the service implementation. It returns the +// path on which to mount the handler and the handler itself. +// +// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf +// and JSON codecs. They also support gzip compression. +func NewContextServiceHandler(svc ContextServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler) { + mux := http.NewServeMux() + mux.Handle("/gitpod.v1.ContextService/ParseContext", connect_go.NewUnaryHandler( + "/gitpod.v1.ContextService/ParseContext", + svc.ParseContext, + opts..., + )) + return "/gitpod.v1.ContextService/", mux +} + +// UnimplementedContextServiceHandler returns CodeUnimplemented from all methods. +type UnimplementedContextServiceHandler struct{} + +func (UnimplementedContextServiceHandler) ParseContext(context.Context, *connect_go.Request[v1.ParseContextRequest]) (*connect_go.Response[v1.ParseContextResponse], error) { + return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("gitpod.v1.ContextService.ParseContext is not implemented")) +} diff --git a/components/public-api/go/v1/v1connect/context.proxy.connect.go b/components/public-api/go/v1/v1connect/context.proxy.connect.go new file mode 100644 index 00000000000000..6c22c915d0153e --- /dev/null +++ b/components/public-api/go/v1/v1connect/context.proxy.connect.go @@ -0,0 +1,30 @@ +// Copyright (c) 2023 Gitpod GmbH. All rights reserved. +// Licensed under the GNU Affero General Public License (AGPL). +// See License.AGPL.txt in the project root for license information. + +// Code generated by protoc-proxy-gen. DO NOT EDIT. + +package v1connect + +import ( + context "context" + connect_go "github.com/bufbuild/connect-go" + v1 "github.com/gitpod-io/gitpod/components/public-api/go/v1" +) + +var _ ContextServiceHandler = (*ProxyContextServiceHandler)(nil) + +type ProxyContextServiceHandler struct { + Client v1.ContextServiceClient + UnimplementedContextServiceHandler +} + +func (s *ProxyContextServiceHandler) ParseContext(ctx context.Context, req *connect_go.Request[v1.ParseContextRequest]) (*connect_go.Response[v1.ParseContextResponse], error) { + resp, err := s.Client.ParseContext(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/v1connect/workspace.connect.go b/components/public-api/go/v1/v1connect/workspace.connect.go index 5a9689843c68eb..2a9afa3deb5ae5 100644 --- a/components/public-api/go/v1/v1connect/workspace.connect.go +++ b/components/public-api/go/v1/v1connect/workspace.connect.go @@ -40,6 +40,10 @@ type WorkspaceServiceClient interface { // // workspace_id +return NOT_FOUND Workspace does not exist WatchWorkspaceStatus(context.Context, *connect_go.Request[v1.WatchWorkspaceStatusRequest]) (*connect_go.ServerStreamForClient[v1.WatchWorkspaceStatusResponse], error) + // CreateAndStartWorkspace creates a new workspace and starts it. + CreateAndStartWorkspace(context.Context, *connect_go.Request[v1.CreateAndStartWorkspaceRequest]) (*connect_go.Response[v1.CreateAndStartWorkspaceResponse], error) + // StartWorkspace starts an existing workspace. + StartWorkspace(context.Context, *connect_go.Request[v1.StartWorkspaceRequest]) (*connect_go.Response[v1.StartWorkspaceResponse], error) } // NewWorkspaceServiceClient constructs a client for the gitpod.v1.WorkspaceService service. By @@ -62,13 +66,25 @@ func NewWorkspaceServiceClient(httpClient connect_go.HTTPClient, baseURL string, baseURL+"/gitpod.v1.WorkspaceService/WatchWorkspaceStatus", opts..., ), + createAndStartWorkspace: connect_go.NewClient[v1.CreateAndStartWorkspaceRequest, v1.CreateAndStartWorkspaceResponse]( + httpClient, + baseURL+"/gitpod.v1.WorkspaceService/CreateAndStartWorkspace", + opts..., + ), + startWorkspace: connect_go.NewClient[v1.StartWorkspaceRequest, v1.StartWorkspaceResponse]( + httpClient, + baseURL+"/gitpod.v1.WorkspaceService/StartWorkspace", + opts..., + ), } } // workspaceServiceClient implements WorkspaceServiceClient. type workspaceServiceClient struct { - getWorkspace *connect_go.Client[v1.GetWorkspaceRequest, v1.GetWorkspaceResponse] - watchWorkspaceStatus *connect_go.Client[v1.WatchWorkspaceStatusRequest, v1.WatchWorkspaceStatusResponse] + getWorkspace *connect_go.Client[v1.GetWorkspaceRequest, v1.GetWorkspaceResponse] + watchWorkspaceStatus *connect_go.Client[v1.WatchWorkspaceStatusRequest, v1.WatchWorkspaceStatusResponse] + createAndStartWorkspace *connect_go.Client[v1.CreateAndStartWorkspaceRequest, v1.CreateAndStartWorkspaceResponse] + startWorkspace *connect_go.Client[v1.StartWorkspaceRequest, v1.StartWorkspaceResponse] } // GetWorkspace calls gitpod.v1.WorkspaceService.GetWorkspace. @@ -81,6 +97,16 @@ func (c *workspaceServiceClient) WatchWorkspaceStatus(ctx context.Context, req * return c.watchWorkspaceStatus.CallServerStream(ctx, req) } +// CreateAndStartWorkspace calls gitpod.v1.WorkspaceService.CreateAndStartWorkspace. +func (c *workspaceServiceClient) CreateAndStartWorkspace(ctx context.Context, req *connect_go.Request[v1.CreateAndStartWorkspaceRequest]) (*connect_go.Response[v1.CreateAndStartWorkspaceResponse], error) { + return c.createAndStartWorkspace.CallUnary(ctx, req) +} + +// StartWorkspace calls gitpod.v1.WorkspaceService.StartWorkspace. +func (c *workspaceServiceClient) StartWorkspace(ctx context.Context, req *connect_go.Request[v1.StartWorkspaceRequest]) (*connect_go.Response[v1.StartWorkspaceResponse], error) { + return c.startWorkspace.CallUnary(ctx, req) +} + // WorkspaceServiceHandler is an implementation of the gitpod.v1.WorkspaceService service. type WorkspaceServiceHandler interface { // GetWorkspace returns a single workspace. @@ -92,6 +118,10 @@ type WorkspaceServiceHandler interface { // // workspace_id +return NOT_FOUND Workspace does not exist WatchWorkspaceStatus(context.Context, *connect_go.Request[v1.WatchWorkspaceStatusRequest], *connect_go.ServerStream[v1.WatchWorkspaceStatusResponse]) error + // CreateAndStartWorkspace creates a new workspace and starts it. + CreateAndStartWorkspace(context.Context, *connect_go.Request[v1.CreateAndStartWorkspaceRequest]) (*connect_go.Response[v1.CreateAndStartWorkspaceResponse], error) + // StartWorkspace starts an existing workspace. + StartWorkspace(context.Context, *connect_go.Request[v1.StartWorkspaceRequest]) (*connect_go.Response[v1.StartWorkspaceResponse], error) } // NewWorkspaceServiceHandler builds an HTTP handler from the service implementation. It returns the @@ -111,6 +141,16 @@ func NewWorkspaceServiceHandler(svc WorkspaceServiceHandler, opts ...connect_go. svc.WatchWorkspaceStatus, opts..., )) + mux.Handle("/gitpod.v1.WorkspaceService/CreateAndStartWorkspace", connect_go.NewUnaryHandler( + "/gitpod.v1.WorkspaceService/CreateAndStartWorkspace", + svc.CreateAndStartWorkspace, + opts..., + )) + mux.Handle("/gitpod.v1.WorkspaceService/StartWorkspace", connect_go.NewUnaryHandler( + "/gitpod.v1.WorkspaceService/StartWorkspace", + svc.StartWorkspace, + opts..., + )) return "/gitpod.v1.WorkspaceService/", mux } @@ -124,3 +164,11 @@ func (UnimplementedWorkspaceServiceHandler) GetWorkspace(context.Context, *conne func (UnimplementedWorkspaceServiceHandler) WatchWorkspaceStatus(context.Context, *connect_go.Request[v1.WatchWorkspaceStatusRequest], *connect_go.ServerStream[v1.WatchWorkspaceStatusResponse]) error { return connect_go.NewError(connect_go.CodeUnimplemented, errors.New("gitpod.v1.WorkspaceService.WatchWorkspaceStatus is not implemented")) } + +func (UnimplementedWorkspaceServiceHandler) CreateAndStartWorkspace(context.Context, *connect_go.Request[v1.CreateAndStartWorkspaceRequest]) (*connect_go.Response[v1.CreateAndStartWorkspaceResponse], error) { + return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("gitpod.v1.WorkspaceService.CreateAndStartWorkspace is not implemented")) +} + +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")) +} 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 4ddcbccc800e4a..756ae11aa5465f 100644 --- a/components/public-api/go/v1/v1connect/workspace.proxy.connect.go +++ b/components/public-api/go/v1/v1connect/workspace.proxy.connect.go @@ -28,3 +28,23 @@ func (s *ProxyWorkspaceServiceHandler) GetWorkspace(ctx context.Context, req *co return connect_go.NewResponse(resp), nil } + +func (s *ProxyWorkspaceServiceHandler) CreateAndStartWorkspace(ctx context.Context, req *connect_go.Request[v1.CreateAndStartWorkspaceRequest]) (*connect_go.Response[v1.CreateAndStartWorkspaceResponse], error) { + resp, err := s.Client.CreateAndStartWorkspace(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) StartWorkspace(ctx context.Context, req *connect_go.Request[v1.StartWorkspaceRequest]) (*connect_go.Response[v1.StartWorkspaceResponse], error) { + resp, err := s.Client.StartWorkspace(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 2b640f39dc85fd..1b1233592e7e07 100644 --- a/components/public-api/go/v1/workspace.pb.go +++ b/components/public-api/go/v1/workspace.pb.go @@ -131,7 +131,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{7, 0} + return file_gitpod_v1_workspace_proto_rawDescGZIP(), []int{11, 0} } // Protocol defines the backend protocol of port @@ -183,7 +183,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{7, 1} + return file_gitpod_v1_workspace_proto_rawDescGZIP(), []int{11, 1} } type WorkspacePhase_Phase int32 @@ -280,7 +280,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{9, 0} + return file_gitpod_v1_workspace_proto_rawDescGZIP(), []int{13, 0} } type GetWorkspaceRequest struct { @@ -484,6 +484,282 @@ func (x *WatchWorkspaceStatusResponse) GetStatus() *WorkspaceStatus { return nil } +type CreateAndStartWorkspaceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OrganizationId string `protobuf:"bytes,1,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"` + ConfigurationId string `protobuf:"bytes,2,opt,name=configuration_id,json=configurationId,proto3" json:"configuration_id,omitempty"` + // source describes the source refer of workspace. + Source *CreateAndStartWorkspaceRequest_Source `protobuf:"bytes,3,opt,name=source,proto3" json:"source,omitempty"` + // additional_env_variables provide additional environment variables to the + // workspace. + // It will take precedence over environment variables provided by + // the user and the configuration + AdditionalEnvVariables []*WorkspaceEnvironmentVariable `protobuf:"bytes,4,rep,name=additional_env_variables,json=additionalEnvVariables,proto3" json:"additional_env_variables,omitempty"` + Region string `protobuf:"bytes,5,opt,name=region,proto3" json:"region,omitempty"` + WorkspaceClass string `protobuf:"bytes,6,opt,name=workspace_class,json=workspaceClass,proto3" json:"workspace_class,omitempty"` + Editor *EditorReference `protobuf:"bytes,7,opt,name=editor,proto3" json:"editor,omitempty"` + Name string `protobuf:"bytes,8,opt,name=name,proto3" json:"name,omitempty"` + Pinned bool `protobuf:"varint,9,opt,name=pinned,proto3" json:"pinned,omitempty"` + // force_default_config indicates that the workspace should be created with + // the default configuration instead of the configuration provided in + // `.gitpod.yml` file + ForceDefaultConfig bool `protobuf:"varint,10,opt,name=force_default_config,json=forceDefaultConfig,proto3" json:"force_default_config,omitempty"` +} + +func (x *CreateAndStartWorkspaceRequest) Reset() { + *x = CreateAndStartWorkspaceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gitpod_v1_workspace_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateAndStartWorkspaceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateAndStartWorkspaceRequest) ProtoMessage() {} + +func (x *CreateAndStartWorkspaceRequest) ProtoReflect() protoreflect.Message { + mi := &file_gitpod_v1_workspace_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateAndStartWorkspaceRequest.ProtoReflect.Descriptor instead. +func (*CreateAndStartWorkspaceRequest) Descriptor() ([]byte, []int) { + return file_gitpod_v1_workspace_proto_rawDescGZIP(), []int{4} +} + +func (x *CreateAndStartWorkspaceRequest) GetOrganizationId() string { + if x != nil { + return x.OrganizationId + } + return "" +} + +func (x *CreateAndStartWorkspaceRequest) GetConfigurationId() string { + if x != nil { + return x.ConfigurationId + } + return "" +} + +func (x *CreateAndStartWorkspaceRequest) GetSource() *CreateAndStartWorkspaceRequest_Source { + if x != nil { + return x.Source + } + return nil +} + +func (x *CreateAndStartWorkspaceRequest) GetAdditionalEnvVariables() []*WorkspaceEnvironmentVariable { + if x != nil { + return x.AdditionalEnvVariables + } + return nil +} + +func (x *CreateAndStartWorkspaceRequest) GetRegion() string { + if x != nil { + return x.Region + } + return "" +} + +func (x *CreateAndStartWorkspaceRequest) GetWorkspaceClass() string { + if x != nil { + return x.WorkspaceClass + } + return "" +} + +func (x *CreateAndStartWorkspaceRequest) GetEditor() *EditorReference { + if x != nil { + return x.Editor + } + return nil +} + +func (x *CreateAndStartWorkspaceRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *CreateAndStartWorkspaceRequest) GetPinned() bool { + if x != nil { + return x.Pinned + } + return false +} + +func (x *CreateAndStartWorkspaceRequest) GetForceDefaultConfig() bool { + if x != nil { + return x.ForceDefaultConfig + } + return false +} + +type CreateAndStartWorkspaceResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Workspace *Workspace `protobuf:"bytes,1,opt,name=workspace,proto3" json:"workspace,omitempty"` +} + +func (x *CreateAndStartWorkspaceResponse) Reset() { + *x = CreateAndStartWorkspaceResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_gitpod_v1_workspace_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateAndStartWorkspaceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateAndStartWorkspaceResponse) ProtoMessage() {} + +func (x *CreateAndStartWorkspaceResponse) ProtoReflect() protoreflect.Message { + mi := &file_gitpod_v1_workspace_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateAndStartWorkspaceResponse.ProtoReflect.Descriptor instead. +func (*CreateAndStartWorkspaceResponse) Descriptor() ([]byte, []int) { + return file_gitpod_v1_workspace_proto_rawDescGZIP(), []int{5} +} + +func (x *CreateAndStartWorkspaceResponse) GetWorkspace() *Workspace { + if x != nil { + return x.Workspace + } + return nil +} + +type StartWorkspaceRequest 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"` + ForceDefaultConfig bool `protobuf:"varint,2,opt,name=force_default_config,json=forceDefaultConfig,proto3" json:"force_default_config,omitempty"` +} + +func (x *StartWorkspaceRequest) Reset() { + *x = StartWorkspaceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gitpod_v1_workspace_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StartWorkspaceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StartWorkspaceRequest) ProtoMessage() {} + +func (x *StartWorkspaceRequest) ProtoReflect() protoreflect.Message { + mi := &file_gitpod_v1_workspace_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StartWorkspaceRequest.ProtoReflect.Descriptor instead. +func (*StartWorkspaceRequest) Descriptor() ([]byte, []int) { + return file_gitpod_v1_workspace_proto_rawDescGZIP(), []int{6} +} + +func (x *StartWorkspaceRequest) GetWorkspaceId() string { + if x != nil { + return x.WorkspaceId + } + return "" +} + +func (x *StartWorkspaceRequest) GetForceDefaultConfig() bool { + if x != nil { + return x.ForceDefaultConfig + } + return false +} + +type StartWorkspaceResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Workspace *Workspace `protobuf:"bytes,1,opt,name=workspace,proto3" json:"workspace,omitempty"` +} + +func (x *StartWorkspaceResponse) Reset() { + *x = StartWorkspaceResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_gitpod_v1_workspace_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StartWorkspaceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StartWorkspaceResponse) ProtoMessage() {} + +func (x *StartWorkspaceResponse) ProtoReflect() protoreflect.Message { + mi := &file_gitpod_v1_workspace_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StartWorkspaceResponse.ProtoReflect.Descriptor instead. +func (*StartWorkspaceResponse) Descriptor() ([]byte, []int) { + return file_gitpod_v1_workspace_proto_rawDescGZIP(), []int{7} +} + +func (x *StartWorkspaceResponse) GetWorkspace() *Workspace { + if x != nil { + return x.Workspace + } + return nil +} + // +resource get workspace type Workspace struct { state protoimpl.MessageState @@ -533,7 +809,7 @@ type Workspace struct { func (x *Workspace) Reset() { *x = Workspace{} if protoimpl.UnsafeEnabled { - mi := &file_gitpod_v1_workspace_proto_msgTypes[4] + mi := &file_gitpod_v1_workspace_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -546,7 +822,7 @@ func (x *Workspace) String() string { func (*Workspace) ProtoMessage() {} func (x *Workspace) ProtoReflect() protoreflect.Message { - mi := &file_gitpod_v1_workspace_proto_msgTypes[4] + mi := &file_gitpod_v1_workspace_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -559,7 +835,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{4} + return file_gitpod_v1_workspace_proto_rawDescGZIP(), []int{8} } func (x *Workspace) GetId() string { @@ -678,7 +954,7 @@ type WorkspaceStatus struct { func (x *WorkspaceStatus) Reset() { *x = WorkspaceStatus{} if protoimpl.UnsafeEnabled { - mi := &file_gitpod_v1_workspace_proto_msgTypes[5] + mi := &file_gitpod_v1_workspace_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -691,7 +967,7 @@ func (x *WorkspaceStatus) String() string { func (*WorkspaceStatus) ProtoMessage() {} func (x *WorkspaceStatus) ProtoReflect() protoreflect.Message { - mi := &file_gitpod_v1_workspace_proto_msgTypes[5] + mi := &file_gitpod_v1_workspace_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -704,7 +980,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{5} + return file_gitpod_v1_workspace_proto_rawDescGZIP(), []int{9} } func (x *WorkspaceStatus) GetPhase() *WorkspacePhase { @@ -779,7 +1055,7 @@ type WorkspaceConditions struct { func (x *WorkspaceConditions) Reset() { *x = WorkspaceConditions{} if protoimpl.UnsafeEnabled { - mi := &file_gitpod_v1_workspace_proto_msgTypes[6] + mi := &file_gitpod_v1_workspace_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -792,7 +1068,7 @@ func (x *WorkspaceConditions) String() string { func (*WorkspaceConditions) ProtoMessage() {} func (x *WorkspaceConditions) ProtoReflect() protoreflect.Message { - mi := &file_gitpod_v1_workspace_proto_msgTypes[6] + mi := &file_gitpod_v1_workspace_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -805,7 +1081,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{6} + return file_gitpod_v1_workspace_proto_rawDescGZIP(), []int{10} } func (x *WorkspaceConditions) GetFailed() string { @@ -840,7 +1116,7 @@ type WorkspacePort struct { func (x *WorkspacePort) Reset() { *x = WorkspacePort{} if protoimpl.UnsafeEnabled { - mi := &file_gitpod_v1_workspace_proto_msgTypes[7] + mi := &file_gitpod_v1_workspace_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -853,7 +1129,7 @@ func (x *WorkspacePort) String() string { func (*WorkspacePort) ProtoMessage() {} func (x *WorkspacePort) ProtoReflect() protoreflect.Message { - mi := &file_gitpod_v1_workspace_proto_msgTypes[7] + mi := &file_gitpod_v1_workspace_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -866,7 +1142,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{7} + return file_gitpod_v1_workspace_proto_rawDescGZIP(), []int{11} } func (x *WorkspacePort) GetPort() uint64 { @@ -928,7 +1204,7 @@ type WorkspaceGitStatus struct { func (x *WorkspaceGitStatus) Reset() { *x = WorkspaceGitStatus{} if protoimpl.UnsafeEnabled { - mi := &file_gitpod_v1_workspace_proto_msgTypes[8] + mi := &file_gitpod_v1_workspace_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -941,7 +1217,7 @@ func (x *WorkspaceGitStatus) String() string { func (*WorkspaceGitStatus) ProtoMessage() {} func (x *WorkspaceGitStatus) ProtoReflect() protoreflect.Message { - mi := &file_gitpod_v1_workspace_proto_msgTypes[8] + mi := &file_gitpod_v1_workspace_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -954,7 +1230,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{8} + return file_gitpod_v1_workspace_proto_rawDescGZIP(), []int{12} } func (x *WorkspaceGitStatus) GetCloneUrl() string { @@ -1032,7 +1308,7 @@ type WorkspacePhase struct { func (x *WorkspacePhase) Reset() { *x = WorkspacePhase{} if protoimpl.UnsafeEnabled { - mi := &file_gitpod_v1_workspace_proto_msgTypes[9] + mi := &file_gitpod_v1_workspace_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1045,7 +1321,7 @@ func (x *WorkspacePhase) String() string { func (*WorkspacePhase) ProtoMessage() {} func (x *WorkspacePhase) ProtoReflect() protoreflect.Message { - mi := &file_gitpod_v1_workspace_proto_msgTypes[9] + mi := &file_gitpod_v1_workspace_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1058,7 +1334,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{9} + return file_gitpod_v1_workspace_proto_rawDescGZIP(), []int{13} } func (x *WorkspacePhase) GetName() WorkspacePhase_Phase { @@ -1087,7 +1363,7 @@ type EditorReference struct { func (x *EditorReference) Reset() { *x = EditorReference{} if protoimpl.UnsafeEnabled { - mi := &file_gitpod_v1_workspace_proto_msgTypes[10] + mi := &file_gitpod_v1_workspace_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1100,7 +1376,7 @@ func (x *EditorReference) String() string { func (*EditorReference) ProtoMessage() {} func (x *EditorReference) ProtoReflect() protoreflect.Message { - mi := &file_gitpod_v1_workspace_proto_msgTypes[10] + mi := &file_gitpod_v1_workspace_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1113,7 +1389,7 @@ func (x *EditorReference) ProtoReflect() protoreflect.Message { // Deprecated: Use EditorReference.ProtoReflect.Descriptor instead. func (*EditorReference) Descriptor() ([]byte, []int) { - return file_gitpod_v1_workspace_proto_rawDescGZIP(), []int{10} + return file_gitpod_v1_workspace_proto_rawDescGZIP(), []int{14} } func (x *EditorReference) GetName() string { @@ -1142,7 +1418,7 @@ type WorkspaceEnvironmentVariable struct { func (x *WorkspaceEnvironmentVariable) Reset() { *x = WorkspaceEnvironmentVariable{} if protoimpl.UnsafeEnabled { - mi := &file_gitpod_v1_workspace_proto_msgTypes[11] + mi := &file_gitpod_v1_workspace_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1155,7 +1431,7 @@ func (x *WorkspaceEnvironmentVariable) String() string { func (*WorkspaceEnvironmentVariable) ProtoMessage() {} func (x *WorkspaceEnvironmentVariable) ProtoReflect() protoreflect.Message { - mi := &file_gitpod_v1_workspace_proto_msgTypes[11] + mi := &file_gitpod_v1_workspace_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1168,7 +1444,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{11} + return file_gitpod_v1_workspace_proto_rawDescGZIP(), []int{15} } func (x *WorkspaceEnvironmentVariable) GetName() string { @@ -1185,6 +1461,159 @@ func (x *WorkspaceEnvironmentVariable) GetValue() string { return "" } +type CreateAndStartWorkspaceRequest_Source struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Source: + // + // *CreateAndStartWorkspaceRequest_Source_Git_ + // *CreateAndStartWorkspaceRequest_Source_ContextUrl + Source isCreateAndStartWorkspaceRequest_Source_Source `protobuf_oneof:"source"` +} + +func (x *CreateAndStartWorkspaceRequest_Source) Reset() { + *x = CreateAndStartWorkspaceRequest_Source{} + if protoimpl.UnsafeEnabled { + mi := &file_gitpod_v1_workspace_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateAndStartWorkspaceRequest_Source) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateAndStartWorkspaceRequest_Source) ProtoMessage() {} + +func (x *CreateAndStartWorkspaceRequest_Source) 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 CreateAndStartWorkspaceRequest_Source.ProtoReflect.Descriptor instead. +func (*CreateAndStartWorkspaceRequest_Source) Descriptor() ([]byte, []int) { + return file_gitpod_v1_workspace_proto_rawDescGZIP(), []int{4, 0} +} + +func (m *CreateAndStartWorkspaceRequest_Source) GetSource() isCreateAndStartWorkspaceRequest_Source_Source { + if m != nil { + return m.Source + } + return nil +} + +func (x *CreateAndStartWorkspaceRequest_Source) GetGit() *CreateAndStartWorkspaceRequest_Source_Git { + if x, ok := x.GetSource().(*CreateAndStartWorkspaceRequest_Source_Git_); ok { + return x.Git + } + return nil +} + +func (x *CreateAndStartWorkspaceRequest_Source) GetContextUrl() string { + if x, ok := x.GetSource().(*CreateAndStartWorkspaceRequest_Source_ContextUrl); ok { + return x.ContextUrl + } + return "" +} + +type isCreateAndStartWorkspaceRequest_Source_Source interface { + isCreateAndStartWorkspaceRequest_Source_Source() +} + +type CreateAndStartWorkspaceRequest_Source_Git_ struct { + // git describes the source refer of workspace + // Obtain available git using the ContextService.ParseContext operation if + // not sure about it. + Git *CreateAndStartWorkspaceRequest_Source_Git `protobuf:"bytes,1,opt,name=git,proto3,oneof"` +} + +type CreateAndStartWorkspaceRequest_Source_ContextUrl struct { + ContextUrl string `protobuf:"bytes,2,opt,name=context_url,json=contextUrl,proto3,oneof"` +} + +func (*CreateAndStartWorkspaceRequest_Source_Git_) isCreateAndStartWorkspaceRequest_Source_Source() {} + +func (*CreateAndStartWorkspaceRequest_Source_ContextUrl) isCreateAndStartWorkspaceRequest_Source_Source() { +} + +type CreateAndStartWorkspaceRequest_Source_Git struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // clone_url is the URL of the repository to clone + CloneUrl string `protobuf:"bytes,1,opt,name=clone_url,json=cloneUrl,proto3" json:"clone_url,omitempty"` + // ref is an alternatively symbolic. e.g. refs/tags/v1.0, + // empty string means the default branch of the repository + Ref string `protobuf:"bytes,2,opt,name=ref,proto3" json:"ref,omitempty"` + // create_local_branch is the branch you want to create based on provided + // clone_url and ref when workspace started + CreateLocalBranch string `protobuf:"bytes,3,opt,name=create_local_branch,json=createLocalBranch,proto3" json:"create_local_branch,omitempty"` +} + +func (x *CreateAndStartWorkspaceRequest_Source_Git) Reset() { + *x = CreateAndStartWorkspaceRequest_Source_Git{} + if protoimpl.UnsafeEnabled { + mi := &file_gitpod_v1_workspace_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateAndStartWorkspaceRequest_Source_Git) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateAndStartWorkspaceRequest_Source_Git) ProtoMessage() {} + +func (x *CreateAndStartWorkspaceRequest_Source_Git) 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 CreateAndStartWorkspaceRequest_Source_Git.ProtoReflect.Descriptor instead. +func (*CreateAndStartWorkspaceRequest_Source_Git) Descriptor() ([]byte, []int) { + return file_gitpod_v1_workspace_proto_rawDescGZIP(), []int{4, 0, 0} +} + +func (x *CreateAndStartWorkspaceRequest_Source_Git) GetCloneUrl() string { + if x != nil { + return x.CloneUrl + } + return "" +} + +func (x *CreateAndStartWorkspaceRequest_Source_Git) GetRef() string { + if x != nil { + return x.Ref + } + return "" +} + +func (x *CreateAndStartWorkspaceRequest_Source_Git) GetCreateLocalBranch() string { + if x != nil { + return x.CreateLocalBranch + } + return "" +} + var File_gitpod_v1_workspace_proto protoreflect.FileDescriptor var file_gitpod_v1_workspace_proto_rawDesc = []byte{ @@ -1212,169 +1641,245 @@ var file_gitpod_v1_workspace_proto_rawDesc = []byte{ 0x49, 0x64, 0x12, 0x32, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 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, 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, 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, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xdc, 0x05, 0x0a, 0x1e, 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, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x64, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x48, 0x0a, + 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 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, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, + 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x61, 0x0a, 0x18, 0x61, 0x64, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x65, 0x6e, 0x76, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, + 0x6c, 0x65, 0x73, 0x18, 0x04, 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, 0x16, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x45, 0x6e, + 0x76, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, + 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x05, 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, 0x06, 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, 0x07, 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, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x69, 0x6e, 0x6e, 0x65, 0x64, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x06, 0x70, 0x69, 0x6e, 0x6e, 0x65, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x66, + 0x6f, 0x72, 0x63, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x66, 0x6f, 0x72, 0x63, 0x65, + 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xe5, 0x01, + 0x0a, 0x06, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x48, 0x0a, 0x03, 0x67, 0x69, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 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, + 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x47, 0x69, 0x74, 0x48, 0x00, 0x52, 0x03, 0x67, + 0x69, 0x74, 0x12, 0x21, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x75, 0x72, + 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x78, 0x74, 0x55, 0x72, 0x6c, 0x1a, 0x64, 0x0a, 0x03, 0x47, 0x69, 0x74, 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, 0x10, 0x0a, 0x03, 0x72, 0x65, 0x66, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x72, 0x65, 0x66, 0x12, 0x2e, 0x0a, 0x13, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x62, 0x72, 0x61, 0x6e, + 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x42, 0x08, 0x0a, 0x06, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x55, 0x0a, 0x1f, 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, 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, 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, 0x3f, 0x0a, 0x0f, 0x45, 0x64, 0x69, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, - 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x22, 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, 0xd2, 0x01, 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, 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, + 0x65, 0x52, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x6c, 0x0a, 0x15, + 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 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, 0x12, 0x30, 0x0a, 0x14, 0x66, 0x6f, 0x72, 0x63, + 0x65, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x44, 0x65, 0x66, + 0x61, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x4c, 0x0a, 0x16, 0x53, 0x74, + 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 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, 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, 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, 0x3f, 0x0a, 0x0f, 0x45, 0x64, 0x69, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x66, 0x65, + 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x22, 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, 0x9f, + 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, 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, 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, } var ( @@ -1390,50 +1895,66 @@ func file_gitpod_v1_workspace_proto_rawDescGZIP() []byte { } var file_gitpod_v1_workspace_proto_enumTypes = make([]protoimpl.EnumInfo, 4) -var file_gitpod_v1_workspace_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_gitpod_v1_workspace_proto_msgTypes = make([]protoimpl.MessageInfo, 18) 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 - (*Workspace)(nil), // 8: gitpod.v1.Workspace - (*WorkspaceStatus)(nil), // 9: gitpod.v1.WorkspaceStatus - (*WorkspaceConditions)(nil), // 10: gitpod.v1.WorkspaceConditions - (*WorkspacePort)(nil), // 11: gitpod.v1.WorkspacePort - (*WorkspaceGitStatus)(nil), // 12: gitpod.v1.WorkspaceGitStatus - (*WorkspacePhase)(nil), // 13: gitpod.v1.WorkspacePhase - (*EditorReference)(nil), // 14: gitpod.v1.EditorReference - (*WorkspaceEnvironmentVariable)(nil), // 15: gitpod.v1.WorkspaceEnvironmentVariable - (*timestamppb.Timestamp)(nil), // 16: google.protobuf.Timestamp + (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 + (*CreateAndStartWorkspaceRequest)(nil), // 8: gitpod.v1.CreateAndStartWorkspaceRequest + (*CreateAndStartWorkspaceResponse)(nil), // 9: gitpod.v1.CreateAndStartWorkspaceResponse + (*StartWorkspaceRequest)(nil), // 10: gitpod.v1.StartWorkspaceRequest + (*StartWorkspaceResponse)(nil), // 11: gitpod.v1.StartWorkspaceResponse + (*Workspace)(nil), // 12: gitpod.v1.Workspace + (*WorkspaceStatus)(nil), // 13: gitpod.v1.WorkspaceStatus + (*WorkspaceConditions)(nil), // 14: gitpod.v1.WorkspaceConditions + (*WorkspacePort)(nil), // 15: gitpod.v1.WorkspacePort + (*WorkspaceGitStatus)(nil), // 16: gitpod.v1.WorkspaceGitStatus + (*WorkspacePhase)(nil), // 17: gitpod.v1.WorkspacePhase + (*EditorReference)(nil), // 18: gitpod.v1.EditorReference + (*WorkspaceEnvironmentVariable)(nil), // 19: gitpod.v1.WorkspaceEnvironmentVariable + (*CreateAndStartWorkspaceRequest_Source)(nil), // 20: gitpod.v1.CreateAndStartWorkspaceRequest.Source + (*CreateAndStartWorkspaceRequest_Source_Git)(nil), // 21: gitpod.v1.CreateAndStartWorkspaceRequest.Source.Git + (*timestamppb.Timestamp)(nil), // 22: google.protobuf.Timestamp } var file_gitpod_v1_workspace_proto_depIdxs = []int32{ - 8, // 0: gitpod.v1.GetWorkspaceResponse.workspace:type_name -> gitpod.v1.Workspace - 9, // 1: gitpod.v1.WatchWorkspaceStatusResponse.status:type_name -> gitpod.v1.WorkspaceStatus - 9, // 2: gitpod.v1.Workspace.status:type_name -> gitpod.v1.WorkspaceStatus - 15, // 3: gitpod.v1.Workspace.additional_environment_variables:type_name -> gitpod.v1.WorkspaceEnvironmentVariable - 14, // 4: gitpod.v1.Workspace.editor:type_name -> gitpod.v1.EditorReference - 13, // 5: gitpod.v1.WorkspaceStatus.phase:type_name -> gitpod.v1.WorkspacePhase - 12, // 6: gitpod.v1.WorkspaceStatus.git_status:type_name -> gitpod.v1.WorkspaceGitStatus - 11, // 7: gitpod.v1.WorkspaceStatus.ports:type_name -> gitpod.v1.WorkspacePort - 0, // 8: gitpod.v1.WorkspaceStatus.admission:type_name -> gitpod.v1.AdmissionLevel - 10, // 9: gitpod.v1.WorkspaceStatus.conditions:type_name -> gitpod.v1.WorkspaceConditions - 1, // 10: gitpod.v1.WorkspacePort.policy:type_name -> gitpod.v1.WorkspacePort.Policy - 2, // 11: gitpod.v1.WorkspacePort.protocol:type_name -> gitpod.v1.WorkspacePort.Protocol - 3, // 12: gitpod.v1.WorkspacePhase.name:type_name -> gitpod.v1.WorkspacePhase.Phase - 16, // 13: gitpod.v1.WorkspacePhase.last_transition_time:type_name -> google.protobuf.Timestamp - 4, // 14: gitpod.v1.WorkspaceService.GetWorkspace:input_type -> gitpod.v1.GetWorkspaceRequest - 6, // 15: gitpod.v1.WorkspaceService.WatchWorkspaceStatus:input_type -> gitpod.v1.WatchWorkspaceStatusRequest - 5, // 16: gitpod.v1.WorkspaceService.GetWorkspace:output_type -> gitpod.v1.GetWorkspaceResponse - 7, // 17: gitpod.v1.WorkspaceService.WatchWorkspaceStatus:output_type -> gitpod.v1.WatchWorkspaceStatusResponse - 16, // [16:18] is the sub-list for method output_type - 14, // [14:16] is the sub-list for method input_type - 14, // [14:14] is the sub-list for extension type_name - 14, // [14:14] is the sub-list for extension extendee - 0, // [0:14] is the sub-list for field type_name + 12, // 0: gitpod.v1.GetWorkspaceResponse.workspace:type_name -> gitpod.v1.Workspace + 13, // 1: gitpod.v1.WatchWorkspaceStatusResponse.status:type_name -> gitpod.v1.WorkspaceStatus + 20, // 2: gitpod.v1.CreateAndStartWorkspaceRequest.source:type_name -> gitpod.v1.CreateAndStartWorkspaceRequest.Source + 19, // 3: gitpod.v1.CreateAndStartWorkspaceRequest.additional_env_variables:type_name -> gitpod.v1.WorkspaceEnvironmentVariable + 18, // 4: gitpod.v1.CreateAndStartWorkspaceRequest.editor:type_name -> gitpod.v1.EditorReference + 12, // 5: gitpod.v1.CreateAndStartWorkspaceResponse.workspace:type_name -> gitpod.v1.Workspace + 12, // 6: gitpod.v1.StartWorkspaceResponse.workspace:type_name -> gitpod.v1.Workspace + 13, // 7: gitpod.v1.Workspace.status:type_name -> gitpod.v1.WorkspaceStatus + 19, // 8: gitpod.v1.Workspace.additional_environment_variables:type_name -> gitpod.v1.WorkspaceEnvironmentVariable + 18, // 9: gitpod.v1.Workspace.editor:type_name -> gitpod.v1.EditorReference + 17, // 10: gitpod.v1.WorkspaceStatus.phase:type_name -> gitpod.v1.WorkspacePhase + 16, // 11: gitpod.v1.WorkspaceStatus.git_status:type_name -> gitpod.v1.WorkspaceGitStatus + 15, // 12: gitpod.v1.WorkspaceStatus.ports:type_name -> gitpod.v1.WorkspacePort + 0, // 13: gitpod.v1.WorkspaceStatus.admission:type_name -> gitpod.v1.AdmissionLevel + 14, // 14: gitpod.v1.WorkspaceStatus.conditions:type_name -> gitpod.v1.WorkspaceConditions + 1, // 15: gitpod.v1.WorkspacePort.policy:type_name -> gitpod.v1.WorkspacePort.Policy + 2, // 16: gitpod.v1.WorkspacePort.protocol:type_name -> gitpod.v1.WorkspacePort.Protocol + 3, // 17: gitpod.v1.WorkspacePhase.name:type_name -> gitpod.v1.WorkspacePhase.Phase + 22, // 18: gitpod.v1.WorkspacePhase.last_transition_time:type_name -> google.protobuf.Timestamp + 21, // 19: gitpod.v1.CreateAndStartWorkspaceRequest.Source.git:type_name -> gitpod.v1.CreateAndStartWorkspaceRequest.Source.Git + 4, // 20: gitpod.v1.WorkspaceService.GetWorkspace:input_type -> gitpod.v1.GetWorkspaceRequest + 6, // 21: gitpod.v1.WorkspaceService.WatchWorkspaceStatus:input_type -> gitpod.v1.WatchWorkspaceStatusRequest + 8, // 22: gitpod.v1.WorkspaceService.CreateAndStartWorkspace:input_type -> gitpod.v1.CreateAndStartWorkspaceRequest + 10, // 23: gitpod.v1.WorkspaceService.StartWorkspace:input_type -> gitpod.v1.StartWorkspaceRequest + 5, // 24: gitpod.v1.WorkspaceService.GetWorkspace:output_type -> gitpod.v1.GetWorkspaceResponse + 7, // 25: gitpod.v1.WorkspaceService.WatchWorkspaceStatus:output_type -> gitpod.v1.WatchWorkspaceStatusResponse + 9, // 26: gitpod.v1.WorkspaceService.CreateAndStartWorkspace:output_type -> gitpod.v1.CreateAndStartWorkspaceResponse + 11, // 27: gitpod.v1.WorkspaceService.StartWorkspace:output_type -> gitpod.v1.StartWorkspaceResponse + 24, // [24:28] is the sub-list for method output_type + 20, // [20:24] is the sub-list for method input_type + 20, // [20:20] is the sub-list for extension type_name + 20, // [20:20] is the sub-list for extension extendee + 0, // [0:20] is the sub-list for field type_name } func init() { file_gitpod_v1_workspace_proto_init() } @@ -1491,7 +2012,7 @@ func file_gitpod_v1_workspace_proto_init() { } } file_gitpod_v1_workspace_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Workspace); i { + switch v := v.(*CreateAndStartWorkspaceRequest); i { case 0: return &v.state case 1: @@ -1503,7 +2024,7 @@ func file_gitpod_v1_workspace_proto_init() { } } file_gitpod_v1_workspace_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WorkspaceStatus); i { + switch v := v.(*CreateAndStartWorkspaceResponse); i { case 0: return &v.state case 1: @@ -1515,7 +2036,7 @@ func file_gitpod_v1_workspace_proto_init() { } } file_gitpod_v1_workspace_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WorkspaceConditions); i { + switch v := v.(*StartWorkspaceRequest); i { case 0: return &v.state case 1: @@ -1527,7 +2048,7 @@ func file_gitpod_v1_workspace_proto_init() { } } file_gitpod_v1_workspace_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WorkspacePort); i { + switch v := v.(*StartWorkspaceResponse); i { case 0: return &v.state case 1: @@ -1539,7 +2060,7 @@ func file_gitpod_v1_workspace_proto_init() { } } file_gitpod_v1_workspace_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WorkspaceGitStatus); i { + switch v := v.(*Workspace); i { case 0: return &v.state case 1: @@ -1551,7 +2072,7 @@ func file_gitpod_v1_workspace_proto_init() { } } file_gitpod_v1_workspace_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WorkspacePhase); i { + switch v := v.(*WorkspaceStatus); i { case 0: return &v.state case 1: @@ -1563,7 +2084,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.(*EditorReference); i { + switch v := v.(*WorkspaceConditions); i { case 0: return &v.state case 1: @@ -1575,6 +2096,54 @@ func file_gitpod_v1_workspace_proto_init() { } } file_gitpod_v1_workspace_proto_msgTypes[11].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[12].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[13].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[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EditorReference); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gitpod_v1_workspace_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*WorkspaceEnvironmentVariable); i { case 0: return &v.state @@ -1586,6 +2155,34 @@ func file_gitpod_v1_workspace_proto_init() { return nil } } + file_gitpod_v1_workspace_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateAndStartWorkspaceRequest_Source); 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[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateAndStartWorkspaceRequest_Source_Git); 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[16].OneofWrappers = []interface{}{ + (*CreateAndStartWorkspaceRequest_Source_Git_)(nil), + (*CreateAndStartWorkspaceRequest_Source_ContextUrl)(nil), } type x struct{} out := protoimpl.TypeBuilder{ @@ -1593,7 +2190,7 @@ func file_gitpod_v1_workspace_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_gitpod_v1_workspace_proto_rawDesc, NumEnums: 4, - NumMessages: 12, + NumMessages: 18, 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 4c6e80e895ff97..0d75f1ded6215e 100644 --- a/components/public-api/go/v1/workspace_grpc.pb.go +++ b/components/public-api/go/v1/workspace_grpc.pb.go @@ -35,6 +35,10 @@ type WorkspaceServiceClient interface { // // workspace_id +return NOT_FOUND Workspace does not exist WatchWorkspaceStatus(ctx context.Context, in *WatchWorkspaceStatusRequest, opts ...grpc.CallOption) (WorkspaceService_WatchWorkspaceStatusClient, error) + // CreateAndStartWorkspace creates a new workspace and starts it. + CreateAndStartWorkspace(ctx context.Context, in *CreateAndStartWorkspaceRequest, opts ...grpc.CallOption) (*CreateAndStartWorkspaceResponse, error) + // StartWorkspace starts an existing workspace. + StartWorkspace(ctx context.Context, in *StartWorkspaceRequest, opts ...grpc.CallOption) (*StartWorkspaceResponse, error) } type workspaceServiceClient struct { @@ -86,6 +90,24 @@ func (x *workspaceServiceWatchWorkspaceStatusClient) Recv() (*WatchWorkspaceStat return m, nil } +func (c *workspaceServiceClient) CreateAndStartWorkspace(ctx context.Context, in *CreateAndStartWorkspaceRequest, opts ...grpc.CallOption) (*CreateAndStartWorkspaceResponse, error) { + out := new(CreateAndStartWorkspaceResponse) + err := c.cc.Invoke(ctx, "/gitpod.v1.WorkspaceService/CreateAndStartWorkspace", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *workspaceServiceClient) StartWorkspace(ctx context.Context, in *StartWorkspaceRequest, opts ...grpc.CallOption) (*StartWorkspaceResponse, error) { + out := new(StartWorkspaceResponse) + err := c.cc.Invoke(ctx, "/gitpod.v1.WorkspaceService/StartWorkspace", 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 @@ -99,6 +121,10 @@ type WorkspaceServiceServer interface { // // workspace_id +return NOT_FOUND Workspace does not exist WatchWorkspaceStatus(*WatchWorkspaceStatusRequest, WorkspaceService_WatchWorkspaceStatusServer) error + // CreateAndStartWorkspace creates a new workspace and starts it. + CreateAndStartWorkspace(context.Context, *CreateAndStartWorkspaceRequest) (*CreateAndStartWorkspaceResponse, error) + // StartWorkspace starts an existing workspace. + StartWorkspace(context.Context, *StartWorkspaceRequest) (*StartWorkspaceResponse, error) mustEmbedUnimplementedWorkspaceServiceServer() } @@ -112,6 +138,12 @@ func (UnimplementedWorkspaceServiceServer) GetWorkspace(context.Context, *GetWor func (UnimplementedWorkspaceServiceServer) WatchWorkspaceStatus(*WatchWorkspaceStatusRequest, WorkspaceService_WatchWorkspaceStatusServer) error { return status.Errorf(codes.Unimplemented, "method WatchWorkspaceStatus not implemented") } +func (UnimplementedWorkspaceServiceServer) CreateAndStartWorkspace(context.Context, *CreateAndStartWorkspaceRequest) (*CreateAndStartWorkspaceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateAndStartWorkspace not implemented") +} +func (UnimplementedWorkspaceServiceServer) StartWorkspace(context.Context, *StartWorkspaceRequest) (*StartWorkspaceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method StartWorkspace not implemented") +} func (UnimplementedWorkspaceServiceServer) mustEmbedUnimplementedWorkspaceServiceServer() {} // UnsafeWorkspaceServiceServer may be embedded to opt out of forward compatibility for this service. @@ -164,6 +196,42 @@ func (x *workspaceServiceWatchWorkspaceStatusServer) Send(m *WatchWorkspaceStatu return x.ServerStream.SendMsg(m) } +func _WorkspaceService_CreateAndStartWorkspace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateAndStartWorkspaceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkspaceServiceServer).CreateAndStartWorkspace(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gitpod.v1.WorkspaceService/CreateAndStartWorkspace", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkspaceServiceServer).CreateAndStartWorkspace(ctx, req.(*CreateAndStartWorkspaceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WorkspaceService_StartWorkspace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StartWorkspaceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WorkspaceServiceServer).StartWorkspace(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gitpod.v1.WorkspaceService/StartWorkspace", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WorkspaceServiceServer).StartWorkspace(ctx, req.(*StartWorkspaceRequest)) + } + 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) @@ -175,6 +243,14 @@ var WorkspaceService_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetWorkspace", Handler: _WorkspaceService_GetWorkspace_Handler, }, + { + MethodName: "CreateAndStartWorkspace", + Handler: _WorkspaceService_CreateAndStartWorkspace_Handler, + }, + { + MethodName: "StartWorkspace", + Handler: _WorkspaceService_StartWorkspace_Handler, + }, }, Streams: []grpc.StreamDesc{ { diff --git a/components/public-api/typescript/src/gitpod/v1/context_connect.ts b/components/public-api/typescript/src/gitpod/v1/context_connect.ts new file mode 100644 index 00000000000000..a3ad5e09287d11 --- /dev/null +++ b/components/public-api/typescript/src/gitpod/v1/context_connect.ts @@ -0,0 +1,33 @@ +/** + * Copyright (c) 2023 Gitpod GmbH. All rights reserved. + * Licensed under the GNU Affero General Public License (AGPL). + * See License.AGPL.txt in the project root for license information. + */ + +// @generated by protoc-gen-connect-es v1.1.2 with parameter "target=ts" +// @generated from file gitpod/v1/context.proto (package gitpod.v1, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { ParseContextRequest, ParseContextResponse } from "./context_pb.js"; +import { MethodKind } from "@bufbuild/protobuf"; + +/** + * @generated from service gitpod.v1.ContextService + */ +export const ContextService = { + typeName: "gitpod.v1.ContextService", + methods: { + /** + * ParseContext parses the url and returns the context + * + * @generated from rpc gitpod.v1.ContextService.ParseContext + */ + parseContext: { + name: "ParseContext", + I: ParseContextRequest, + O: ParseContextResponse, + kind: MethodKind.Unary, + }, + } +} as const; diff --git a/components/public-api/typescript/src/gitpod/v1/context_pb.ts b/components/public-api/typescript/src/gitpod/v1/context_pb.ts new file mode 100644 index 00000000000000..410ff6f2d669fe --- /dev/null +++ b/components/public-api/typescript/src/gitpod/v1/context_pb.ts @@ -0,0 +1,136 @@ +/** + * Copyright (c) 2023 Gitpod GmbH. All rights reserved. + * Licensed under the GNU Affero General Public License (AGPL). + * See License.AGPL.txt in the project root for license information. + */ + +// @generated by protoc-gen-es v1.3.3 with parameter "target=ts" +// @generated from file gitpod/v1/context.proto (package gitpod.v1, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; + +/** + * @generated from message gitpod.v1.ParseContextRequest + */ +export class ParseContextRequest extends Message { + /** + * @generated from field: string url = 1; + */ + url = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "gitpod.v1.ParseContextRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "url", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ParseContextRequest { + return new ParseContextRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ParseContextRequest { + return new ParseContextRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ParseContextRequest { + return new ParseContextRequest().fromJsonString(jsonString, options); + } + + static equals(a: ParseContextRequest | PlainMessage | undefined, b: ParseContextRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(ParseContextRequest, a, b); + } +} + +/** + * @generated from message gitpod.v1.ParseContextResponse + */ +export class ParseContextResponse extends Message { + /** + * @generated from field: gitpod.v1.Context context = 1; + */ + context?: Context; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "gitpod.v1.ParseContextResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "context", kind: "message", T: Context }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ParseContextResponse { + return new ParseContextResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ParseContextResponse { + return new ParseContextResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ParseContextResponse { + return new ParseContextResponse().fromJsonString(jsonString, options); + } + + static equals(a: ParseContextResponse | PlainMessage | undefined, b: ParseContextResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(ParseContextResponse, a, b); + } +} + +/** + * @generated from message gitpod.v1.Context + */ +export class Context extends Message { + /** + * @generated from field: string title = 1; + */ + title = ""; + + /** + * @generated from field: string normalized_url = 2; + */ + normalizedUrl = ""; + + /** + * @generated from field: string ref = 3; + */ + ref = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "gitpod.v1.Context"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "title", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "normalized_url", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "ref", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Context { + return new Context().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Context { + return new Context().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Context { + return new Context().fromJsonString(jsonString, options); + } + + static equals(a: Context | PlainMessage | undefined, b: Context | PlainMessage | undefined): boolean { + return proto3.util.equals(Context, a, b); + } +} 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 ad5a53d23637ce..09515b868d5bc8 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 { GetWorkspaceRequest, GetWorkspaceResponse, WatchWorkspaceStatusRequest, WatchWorkspaceStatusResponse } from "./workspace_pb.js"; +import { CreateAndStartWorkspaceRequest, CreateAndStartWorkspaceResponse, GetWorkspaceRequest, GetWorkspaceResponse, StartWorkspaceRequest, StartWorkspaceResponse, WatchWorkspaceStatusRequest, WatchWorkspaceStatusResponse } from "./workspace_pb.js"; import { MethodKind } from "@bufbuild/protobuf"; /** @@ -45,5 +45,27 @@ export const WorkspaceService = { O: WatchWorkspaceStatusResponse, kind: MethodKind.ServerStreaming, }, + /** + * CreateAndStartWorkspace creates a new workspace and starts it. + * + * @generated from rpc gitpod.v1.WorkspaceService.CreateAndStartWorkspace + */ + createAndStartWorkspace: { + name: "CreateAndStartWorkspace", + I: CreateAndStartWorkspaceRequest, + O: CreateAndStartWorkspaceResponse, + kind: MethodKind.Unary, + }, + /** + * StartWorkspace starts an existing workspace. + * + * @generated from rpc gitpod.v1.WorkspaceService.StartWorkspace + */ + startWorkspace: { + name: "StartWorkspace", + I: StartWorkspaceRequest, + O: StartWorkspaceResponse, + 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 b6f262b0ce612f..0526db55511974 100644 --- a/components/public-api/typescript/src/gitpod/v1/workspace_pb.ts +++ b/components/public-api/typescript/src/gitpod/v1/workspace_pb.ts @@ -208,6 +208,336 @@ export class WatchWorkspaceStatusResponse extends Message { + /** + * @generated from field: string organization_id = 1; + */ + organizationId = ""; + + /** + * @generated from field: string configuration_id = 2; + */ + configurationId = ""; + + /** + * source describes the source refer of workspace. + * + * @generated from field: gitpod.v1.CreateAndStartWorkspaceRequest.Source source = 3; + */ + source?: CreateAndStartWorkspaceRequest_Source; + + /** + * additional_env_variables provide additional environment variables to the + * workspace. + * It will take precedence over environment variables provided by + * the user and the configuration + * + * @generated from field: repeated gitpod.v1.WorkspaceEnvironmentVariable additional_env_variables = 4; + */ + additionalEnvVariables: WorkspaceEnvironmentVariable[] = []; + + /** + * @generated from field: string region = 5; + */ + region = ""; + + /** + * @generated from field: string workspace_class = 6; + */ + workspaceClass = ""; + + /** + * @generated from field: gitpod.v1.EditorReference editor = 7; + */ + editor?: EditorReference; + + /** + * @generated from field: string name = 8; + */ + name = ""; + + /** + * @generated from field: bool pinned = 9; + */ + pinned = false; + + /** + * force_default_config indicates that the workspace should be created with + * the default configuration instead of the configuration provided in + * `.gitpod.yml` file + * + * @generated from field: bool force_default_config = 10; + */ + forceDefaultConfig = false; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "gitpod.v1.CreateAndStartWorkspaceRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "organization_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "configuration_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "source", kind: "message", T: CreateAndStartWorkspaceRequest_Source }, + { no: 4, name: "additional_env_variables", kind: "message", T: WorkspaceEnvironmentVariable, repeated: true }, + { no: 5, name: "region", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 6, name: "workspace_class", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 7, name: "editor", kind: "message", T: EditorReference }, + { no: 8, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 9, name: "pinned", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 10, name: "force_default_config", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): CreateAndStartWorkspaceRequest { + return new CreateAndStartWorkspaceRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): CreateAndStartWorkspaceRequest { + return new CreateAndStartWorkspaceRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): CreateAndStartWorkspaceRequest { + return new CreateAndStartWorkspaceRequest().fromJsonString(jsonString, options); + } + + static equals(a: CreateAndStartWorkspaceRequest | PlainMessage | undefined, b: CreateAndStartWorkspaceRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(CreateAndStartWorkspaceRequest, a, b); + } +} + +/** + * @generated from message gitpod.v1.CreateAndStartWorkspaceRequest.Source + */ +export class CreateAndStartWorkspaceRequest_Source extends Message { + /** + * @generated from oneof gitpod.v1.CreateAndStartWorkspaceRequest.Source.source + */ + source: { + /** + * git describes the source refer of workspace + * Obtain available git using the ContextService.ParseContext operation if + * not sure about it. + * + * @generated from field: gitpod.v1.CreateAndStartWorkspaceRequest.Source.Git git = 1; + */ + value: CreateAndStartWorkspaceRequest_Source_Git; + case: "git"; + } | { + /** + * @generated from field: string context_url = 2; + */ + value: string; + case: "contextUrl"; + } | { case: undefined; value?: undefined } = { case: undefined }; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "gitpod.v1.CreateAndStartWorkspaceRequest.Source"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "git", kind: "message", T: CreateAndStartWorkspaceRequest_Source_Git, oneof: "source" }, + { no: 2, name: "context_url", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "source" }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): CreateAndStartWorkspaceRequest_Source { + return new CreateAndStartWorkspaceRequest_Source().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): CreateAndStartWorkspaceRequest_Source { + return new CreateAndStartWorkspaceRequest_Source().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): CreateAndStartWorkspaceRequest_Source { + return new CreateAndStartWorkspaceRequest_Source().fromJsonString(jsonString, options); + } + + static equals(a: CreateAndStartWorkspaceRequest_Source | PlainMessage | undefined, b: CreateAndStartWorkspaceRequest_Source | PlainMessage | undefined): boolean { + return proto3.util.equals(CreateAndStartWorkspaceRequest_Source, a, b); + } +} + +/** + * @generated from message gitpod.v1.CreateAndStartWorkspaceRequest.Source.Git + */ +export class CreateAndStartWorkspaceRequest_Source_Git extends Message { + /** + * clone_url is the URL of the repository to clone + * + * @generated from field: string clone_url = 1; + */ + cloneUrl = ""; + + /** + * ref is an alternatively symbolic. e.g. refs/tags/v1.0, + * empty string means the default branch of the repository + * + * @generated from field: string ref = 2; + */ + ref = ""; + + /** + * create_local_branch is the branch you want to create based on provided + * clone_url and ref when workspace started + * + * @generated from field: string create_local_branch = 3; + */ + createLocalBranch = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "gitpod.v1.CreateAndStartWorkspaceRequest.Source.Git"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "clone_url", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "ref", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "create_local_branch", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): CreateAndStartWorkspaceRequest_Source_Git { + return new CreateAndStartWorkspaceRequest_Source_Git().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): CreateAndStartWorkspaceRequest_Source_Git { + return new CreateAndStartWorkspaceRequest_Source_Git().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): CreateAndStartWorkspaceRequest_Source_Git { + return new CreateAndStartWorkspaceRequest_Source_Git().fromJsonString(jsonString, options); + } + + static equals(a: CreateAndStartWorkspaceRequest_Source_Git | PlainMessage | undefined, b: CreateAndStartWorkspaceRequest_Source_Git | PlainMessage | undefined): boolean { + return proto3.util.equals(CreateAndStartWorkspaceRequest_Source_Git, a, b); + } +} + +/** + * @generated from message gitpod.v1.CreateAndStartWorkspaceResponse + */ +export class CreateAndStartWorkspaceResponse extends Message { + /** + * @generated from field: gitpod.v1.Workspace workspace = 1; + */ + workspace?: Workspace; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "gitpod.v1.CreateAndStartWorkspaceResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "workspace", kind: "message", T: Workspace }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): CreateAndStartWorkspaceResponse { + return new CreateAndStartWorkspaceResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): CreateAndStartWorkspaceResponse { + return new CreateAndStartWorkspaceResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): CreateAndStartWorkspaceResponse { + return new CreateAndStartWorkspaceResponse().fromJsonString(jsonString, options); + } + + static equals(a: CreateAndStartWorkspaceResponse | PlainMessage | undefined, b: CreateAndStartWorkspaceResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(CreateAndStartWorkspaceResponse, a, b); + } +} + +/** + * @generated from message gitpod.v1.StartWorkspaceRequest + */ +export class StartWorkspaceRequest extends Message { + /** + * @generated from field: string workspace_id = 1; + */ + workspaceId = ""; + + /** + * @generated from field: bool force_default_config = 2; + */ + forceDefaultConfig = false; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "gitpod.v1.StartWorkspaceRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "workspace_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "force_default_config", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): StartWorkspaceRequest { + return new StartWorkspaceRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): StartWorkspaceRequest { + return new StartWorkspaceRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): StartWorkspaceRequest { + return new StartWorkspaceRequest().fromJsonString(jsonString, options); + } + + static equals(a: StartWorkspaceRequest | PlainMessage | undefined, b: StartWorkspaceRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(StartWorkspaceRequest, a, b); + } +} + +/** + * @generated from message gitpod.v1.StartWorkspaceResponse + */ +export class StartWorkspaceResponse extends Message { + /** + * @generated from field: gitpod.v1.Workspace workspace = 1; + */ + workspace?: Workspace; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "gitpod.v1.StartWorkspaceResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "workspace", kind: "message", T: Workspace }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): StartWorkspaceResponse { + return new StartWorkspaceResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): StartWorkspaceResponse { + return new StartWorkspaceResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): StartWorkspaceResponse { + return new StartWorkspaceResponse().fromJsonString(jsonString, options); + } + + static equals(a: StartWorkspaceResponse | PlainMessage | undefined, b: StartWorkspaceResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(StartWorkspaceResponse, 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 9a42d274d1d53b..a16a3d89e20544 100644 --- a/components/server/src/api/workspace-service-api.ts +++ b/components/server/src/api/workspace-service-api.ts @@ -7,8 +7,12 @@ import { Code, ConnectError, HandlerContext, ServiceImpl } from "@connectrpc/connect"; import { WorkspaceService as WorkspaceServiceInterface } from "@gitpod/public-api/lib/gitpod/v1/workspace_connect"; import { + CreateAndStartWorkspaceRequest, + CreateAndStartWorkspaceResponse, GetWorkspaceRequest, GetWorkspaceResponse, + StartWorkspaceRequest, + StartWorkspaceResponse, WatchWorkspaceStatusRequest, WatchWorkspaceStatusResponse, } from "@gitpod/public-api/lib/gitpod/v1/workspace_pb"; @@ -16,6 +20,7 @@ import { inject, injectable } from "inversify"; import { WorkspaceService } from "../workspace/workspace-service"; import { PublicAPIConverter } from "@gitpod/gitpod-protocol/lib/public-api-converter"; import { ctxSignal, ctxUserId } from "../util/request-context"; +import { ApplicationError, ErrorCodes } from "@gitpod/gitpod-protocol/lib/messaging/error"; @injectable() export class WorkspaceServiceAPI implements ServiceImpl { @@ -67,4 +72,12 @@ export class WorkspaceServiceAPI implements ServiceImpl { + throw new ApplicationError(ErrorCodes.INTERNAL_SERVER_ERROR, "not implemented"); + } + + async startWorkspace(req: StartWorkspaceRequest): Promise { + throw new ApplicationError(ErrorCodes.INTERNAL_SERVER_ERROR, "not implemented"); + } }