From ffb60d18fb87d5956ce58e410b8900570b2b8204 Mon Sep 17 00:00:00 2001 From: Anton Kosyakov Date: Wed, 8 Nov 2023 12:13:39 +0000 Subject: [PATCH] [public-api] align with API guidelines --- components/dashboard/package.json | 1 + .../dashboard/src/components/PrebuildLogs.tsx | 6 +- .../update-org-settings-mutation.ts | 26 +- .../service/json-rpc-organization-client.ts | 35 +- .../src/service/json-rpc-workspace-client.ts | 16 +- .../dashboard/src/start/StartWorkspace.tsx | 10 +- .../dashboard/src/teams/TeamSettings.tsx | 5 +- components/gitpod-db/src/team-db.ts | 2 +- .../gitpod-db/src/typeorm/team-db-impl.ts | 23 +- .../gitpod-protocol/src/messaging/error.ts | 38 +- .../src/public-api-converter.spec.ts | 4 + .../src/public-api-converter.ts | 42 +- .../src/teams-projects-protocol.ts | 1 + components/public-api/buf.yaml | 2 + .../public-api/gitpod/v1/organization.proto | 20 +- .../public-api/gitpod/v1/workspace.proto | 22 +- .../public-api/go/v1/organization.pb.go | 450 ++++++++++-------- components/public-api/go/v1/workspace.pb.go | 439 +++++++++-------- .../gitpod/experimental/v1/dummy_connect.ts | 1 + .../src/gitpod/experimental/v1/dummy_pb.ts | 1 + .../experimental/v1/editor_service_connect.ts | 1 + .../experimental/v1/editor_service_pb.ts | 1 + .../experimental/v1/ide_client_connect.ts | 1 + .../gitpod/experimental/v1/ide_client_pb.ts | 1 + .../v1/identityprovider_connect.ts | 1 + .../experimental/v1/identityprovider_pb.ts | 1 + .../gitpod/experimental/v1/oidc_connect.ts | 1 + .../src/gitpod/experimental/v1/oidc_pb.ts | 1 + .../gitpod/experimental/v1/pagination_pb.ts | 1 + .../experimental/v1/projects_connect.ts | 1 + .../src/gitpod/experimental/v1/projects_pb.ts | 1 + .../src/gitpod/experimental/v1/scm_connect.ts | 1 + .../src/gitpod/experimental/v1/scm_pb.ts | 1 + .../gitpod/experimental/v1/stats_connect.ts | 1 + .../src/gitpod/experimental/v1/stats_pb.ts | 1 + .../gitpod/experimental/v1/teams_connect.ts | 1 + .../src/gitpod/experimental/v1/teams_pb.ts | 1 + .../gitpod/experimental/v1/tokens_connect.ts | 1 + .../src/gitpod/experimental/v1/tokens_pb.ts | 1 + .../gitpod/experimental/v1/user_connect.ts | 1 + .../src/gitpod/experimental/v1/user_pb.ts | 1 + .../experimental/v1/workspaces_connect.ts | 1 + .../gitpod/experimental/v1/workspaces_pb.ts | 1 + .../src/gitpod/v1/configuration_connect.ts | 1 + .../src/gitpod/v1/configuration_pb.ts | 1 + .../src/gitpod/v1/organization_connect.ts | 1 + .../src/gitpod/v1/organization_pb.ts | 59 ++- .../typescript/src/gitpod/v1/pagination_pb.ts | 1 + .../src/gitpod/v1/workspace_connect.ts | 1 + .../typescript/src/gitpod/v1/workspace_pb.ts | 64 +-- .../src/api/organization-service-api.ts | 92 +++- .../server/src/api/workspace-service-api.ts | 9 +- components/server/src/container-module.ts | 9 + .../orgs/default-workspace-image-validator.ts | 8 + .../src/orgs/organization-service.spec.db.ts | 75 ++- .../server/src/orgs/organization-service.ts | 35 +- .../websocket/websocket-connection-manager.ts | 3 - .../src/workspace/gitpod-server-impl.ts | 13 +- .../server/src/workspace/workspace-service.ts | 17 +- 59 files changed, 908 insertions(+), 648 deletions(-) create mode 100644 components/server/src/orgs/default-workspace-image-validator.ts diff --git a/components/dashboard/package.json b/components/dashboard/package.json index c07f8bb5d9b396..4db61a1b77fbfe 100644 --- a/components/dashboard/package.json +++ b/components/dashboard/package.json @@ -4,6 +4,7 @@ "version": "0.0.0", "private": true, "dependencies": { + "@bufbuild/protobuf": "^1.3.3", "@connectrpc/connect": "1.1.2", "@connectrpc/connect-web": "1.1.2", "@gitpod/gitpod-protocol": "0.1.5", diff --git a/components/dashboard/src/components/PrebuildLogs.tsx b/components/dashboard/src/components/PrebuildLogs.tsx index 077a512550c612..1fcf3ee5e60949 100644 --- a/components/dashboard/src/components/PrebuildLogs.tsx +++ b/components/dashboard/src/components/PrebuildLogs.tsx @@ -67,11 +67,11 @@ export default function PrebuildLogs(props: PrebuildLogsProps) { // Try get hold of a recent WorkspaceInfo try { const request = new GetWorkspaceRequest(); - request.id = props.workspaceId; + request.workspaceId = props.workspaceId; const response = await workspaceClient.getWorkspace(request); setWorkspace({ - instanceId: response.item?.status?.instanceId, - phase: response.item?.status?.phase?.name, + instanceId: response.workspace?.status?.instanceId, + phase: response.workspace?.status?.phase?.name, }); } catch (err) { console.error(err); diff --git a/components/dashboard/src/data/organizations/update-org-settings-mutation.ts b/components/dashboard/src/data/organizations/update-org-settings-mutation.ts index a54e5b250411e4..183238d3e516e1 100644 --- a/components/dashboard/src/data/organizations/update-org-settings-mutation.ts +++ b/components/dashboard/src/data/organizations/update-org-settings-mutation.ts @@ -8,7 +8,11 @@ import { useMutation } from "@tanstack/react-query"; import { useOrgSettingsQueryInvalidator } from "./org-settings-query"; import { useCurrentOrg } from "./orgs-query"; import { organizationClient } from "../../service/public-api"; -import { OrganizationSettings } from "@gitpod/public-api/lib/gitpod/v1/organization_pb"; +import { + OrganizationSettings, + UpdateOrganizationSettingsRequest, +} from "@gitpod/public-api/lib/gitpod/v1/organization_pb"; +import { FieldMask } from "@bufbuild/protobuf"; type UpdateOrganizationSettingsArgs = Partial< Pick @@ -17,17 +21,23 @@ type UpdateOrganizationSettingsArgs = Partial< export const useUpdateOrgSettingsMutation = () => { const org = useCurrentOrg().data; const invalidator = useOrgSettingsQueryInvalidator(); - const teamId = org?.id || ""; + const organizationId = org?.id || ""; return useMutation({ mutationFn: async ({ workspaceSharingDisabled, defaultWorkspaceImage }) => { - const settings = await organizationClient.updateOrganizationSettings({ - organizationId: teamId, - settings: { - workspaceSharingDisabled: workspaceSharingDisabled || false, - defaultWorkspaceImage, - }, + const request = new UpdateOrganizationSettingsRequest({ + organizationId, + workspaceSharingDisabled, }); + defaultWorkspaceImage = defaultWorkspaceImage?.trim(); + if (defaultWorkspaceImage) { + request.defaultWorkspaceImage = defaultWorkspaceImage; + } else if (defaultWorkspaceImage === "") { + request.resetMask = new FieldMask({ + paths: ["defaultWorkspaceImage"], + }); + } + const settings = await organizationClient.updateOrganizationSettings(request); return settings.settings || new OrganizationSettings(); }, onSuccess: invalidator, diff --git a/components/dashboard/src/service/json-rpc-organization-client.ts b/components/dashboard/src/service/json-rpc-organization-client.ts index 59629ed788dc38..aed99413677651 100644 --- a/components/dashboard/src/service/json-rpc-organization-client.ts +++ b/components/dashboard/src/service/json-rpc-organization-client.ts @@ -37,6 +37,7 @@ import { } from "@gitpod/public-api/lib/gitpod/v1/organization_pb"; import { getGitpodService } from "./service"; import { converter } from "./public-api"; +import { OrganizationSettings } from "@gitpod/gitpod-protocol"; export class JsonRpcOrganizationClient implements PromiseClient { async createOrganization( @@ -71,7 +72,7 @@ export class JsonRpcOrganizationClient implements PromiseClient { if (!request.organizationId) { - throw new ConnectError("id is required", Code.InvalidArgument); + throw new ConnectError("organizationId is required", Code.InvalidArgument); } if (!request.name) { throw new ConnectError("name is required", Code.InvalidArgument); @@ -97,7 +98,7 @@ export class JsonRpcOrganizationClient implements PromiseClient { if (!request.organizationId) { - throw new ConnectError("id is required", Code.InvalidArgument); + throw new ConnectError("organizationId is required", Code.InvalidArgument); } await getGitpodService().server.deleteTeam(request.organizationId); return new DeleteOrganizationResponse(); @@ -108,7 +109,7 @@ export class JsonRpcOrganizationClient implements PromiseClient { if (!request.organizationId) { - throw new ConnectError("id is required", Code.InvalidArgument); + throw new ConnectError("organizationId is required", Code.InvalidArgument); } const result = await getGitpodService().server.getGenericInvite(request.organizationId); return new GetOrganizationInvitationResponse({ @@ -134,7 +135,7 @@ export class JsonRpcOrganizationClient implements PromiseClient { if (!request.organizationId) { - throw new ConnectError("id is required", Code.InvalidArgument); + throw new ConnectError("organizationId is required", Code.InvalidArgument); } const newInvite = await getGitpodService().server.resetGenericInvite(request.organizationId); return new ResetOrganizationInvitationResponse({ @@ -147,7 +148,7 @@ export class JsonRpcOrganizationClient implements PromiseClient { if (!request.organizationId) { - throw new ConnectError("id is required", Code.InvalidArgument); + throw new ConnectError("organizationId is required", Code.InvalidArgument); } const result = await getGitpodService().server.getTeamMembers(request.organizationId); return new ListOrganizationMembersResponse({ @@ -160,7 +161,7 @@ export class JsonRpcOrganizationClient implements PromiseClient { if (!request.organizationId) { - throw new ConnectError("id is required", Code.InvalidArgument); + throw new ConnectError("organizationId is required", Code.InvalidArgument); } if (!request.userId) { throw new ConnectError("userId is required", Code.InvalidArgument); @@ -181,7 +182,7 @@ export class JsonRpcOrganizationClient implements PromiseClient { if (!request.organizationId) { - throw new ConnectError("id is required", Code.InvalidArgument); + throw new ConnectError("organizationId is required", Code.InvalidArgument); } if (!request.userId) { throw new ConnectError("userId is required", Code.InvalidArgument); @@ -195,7 +196,7 @@ export class JsonRpcOrganizationClient implements PromiseClient { if (!request.organizationId) { - throw new ConnectError("id is required", Code.InvalidArgument); + throw new ConnectError("organizationId is required", Code.InvalidArgument); } const result = await getGitpodService().server.getOrgSettings(request.organizationId); return new GetOrganizationSettingsResponse({ @@ -208,12 +209,18 @@ export class JsonRpcOrganizationClient implements PromiseClient { if (!request.organizationId) { - throw new ConnectError("id is required", Code.InvalidArgument); - } - await getGitpodService().server.updateOrgSettings(request.organizationId, { - workspaceSharingDisabled: request.settings?.workspaceSharingDisabled, - defaultWorkspaceImage: request.settings?.defaultWorkspaceImage, - }); + throw new ConnectError("organizationId is required", Code.InvalidArgument); + } + const update: Partial = { + workspaceSharingDisabled: request?.workspaceSharingDisabled, + }; + const resetDefaultWorkspaceImage = request.resetMask?.paths?.includes("defaultWorkspaceImage"); + if (resetDefaultWorkspaceImage) { + update.defaultWorkspaceImage = null; + } else if (typeof request?.defaultWorkspaceImage === "string") { + update.defaultWorkspaceImage = request.defaultWorkspaceImage; + } + await getGitpodService().server.updateOrgSettings(request.organizationId, update); return new UpdateOrganizationSettingsResponse(); } } diff --git a/components/dashboard/src/service/json-rpc-workspace-client.ts b/components/dashboard/src/service/json-rpc-workspace-client.ts index e789769ff0feb9..e98c8de87ddcbe 100644 --- a/components/dashboard/src/service/json-rpc-workspace-client.ts +++ b/components/dashboard/src/service/json-rpc-workspace-client.ts @@ -20,13 +20,13 @@ import { WorkspaceInstance } from "@gitpod/gitpod-protocol"; export class JsonRpcWorkspaceClient implements PromiseClient { async getWorkspace(request: PartialMessage): Promise { - if (!request.id) { - throw new ConnectError("id is required", Code.InvalidArgument); + if (!request.workspaceId) { + throw new ConnectError("workspaceId is required", Code.InvalidArgument); } - const info = await getGitpodService().server.getWorkspace(request.id); + const info = await getGitpodService().server.getWorkspace(request.workspaceId); const workspace = converter.toWorkspace(info); const result = new GetWorkspaceResponse(); - result.item = workspace; + result.workspace = workspace; return result; } @@ -38,11 +38,11 @@ export class JsonRpcWorkspaceClient implements PromiseClient ({ - workspace: response.item, - startedInstanceId: s.startedInstanceId || response.item?.status?.instanceId, // note: here's a potential mismatch between startedInstanceId and instance.id. TODO(gpl) How to handle this? + workspace: response.workspace, + startedInstanceId: s.startedInstanceId || response.workspace?.status?.instanceId, // note: here's a potential mismatch between startedInstanceId and instance.id. TODO(gpl) How to handle this? })); - this.onWorkspaceUpdate(response.item); + this.onWorkspaceUpdate(response.workspace); } } catch (error) { console.error(error); diff --git a/components/dashboard/src/teams/TeamSettings.tsx b/components/dashboard/src/teams/TeamSettings.tsx index 157645e7ef6d28..7db29aeb785577 100644 --- a/components/dashboard/src/teams/TeamSettings.tsx +++ b/components/dashboard/src/teams/TeamSettings.tsx @@ -204,7 +204,6 @@ function OrgSettingsForm(props: { org?: Organization; isOwner: boolean }) {
{ e.preventDefault(); - // handleUpdateTeamSettings({ defaultWorkspaceImage }); }} > {props.org && ( @@ -282,7 +281,7 @@ function WorkspaceImageButton(props: { }; } - const image = props.settings?.defaultWorkspaceImage ?? props.defaultWorkspaceImage ?? ""; + const image = props.settings?.defaultWorkspaceImage || props.defaultWorkspaceImage || ""; const descList = useMemo(() => { const arr: ReactNode[] = [Default image]; @@ -348,7 +347,7 @@ interface OrgDefaultWorkspaceImageModalProps { function OrgDefaultWorkspaceImageModal(props: OrgDefaultWorkspaceImageModalProps) { const [errorMsg, setErrorMsg] = useState(""); - const [defaultWorkspaceImage, setDefaultWorkspaceImage] = useState(props.settings?.defaultWorkspaceImage ?? ""); + const [defaultWorkspaceImage, setDefaultWorkspaceImage] = useState(props.settings?.defaultWorkspaceImage || ""); const updateTeamSettings = useUpdateOrgSettingsMutation(); const handleUpdateTeamSettings = useCallback( diff --git a/components/gitpod-db/src/team-db.ts b/components/gitpod-db/src/team-db.ts index c79c64ae4fdd6c..e55932caab6699 100644 --- a/components/gitpod-db/src/team-db.ts +++ b/components/gitpod-db/src/team-db.ts @@ -40,7 +40,7 @@ export interface TeamDB extends TransactionalDB { deleteTeam(teamId: string): Promise; findOrgSettings(teamId: string): Promise; - setOrgSettings(teamId: string, settings: Partial): Promise; + setOrgSettings(teamId: string, settings: Partial): Promise; hasActiveSSO(organizationId: string): Promise; } diff --git a/components/gitpod-db/src/typeorm/team-db-impl.ts b/components/gitpod-db/src/typeorm/team-db-impl.ts index f2a66c1ddd2531..cb695bb05e77a0 100644 --- a/components/gitpod-db/src/typeorm/team-db-impl.ts +++ b/components/gitpod-db/src/typeorm/team-db-impl.ts @@ -366,28 +366,19 @@ export class TeamDBImpl extends TransactionalDBImpl implements TeamDB { }); } - public async setOrgSettings(orgId: string, settings: Partial): Promise { + public async setOrgSettings(orgId: string, settings: Partial): Promise { const repo = await this.getOrgSettingsRepo(); const team = await repo.findOne({ where: { orgId, deleted: false } }); - const update: Partial = { - defaultWorkspaceImage: settings.defaultWorkspaceImage, - workspaceSharingDisabled: settings.workspaceSharingDisabled, - }; - // Set to null if defaultWorkspaceImage is empty string, so that it can fallback to default image - if (update.defaultWorkspaceImage?.trim() === "") { - update.defaultWorkspaceImage = null; - } if (!team) { - await repo.insert({ - ...update, + return await repo.save({ + ...settings, orgId, }); - } else { - await repo.save({ - ...team, - ...update, - }); } + return await repo.save({ + ...team, + ...settings, + }); } public async hasActiveSSO(organizationId: string): Promise { diff --git a/components/gitpod-protocol/src/messaging/error.ts b/components/gitpod-protocol/src/messaging/error.ts index 64e8946fc573df..52f5bbef4b7d17 100644 --- a/components/gitpod-protocol/src/messaging/error.ts +++ b/components/gitpod-protocol/src/messaging/error.ts @@ -5,7 +5,6 @@ */ import { scrubber } from "../util/scrubbing"; -import { Status } from "nice-grpc-common"; export class ApplicationError extends Error { constructor(public readonly code: ErrorCode, message: string, public readonly data?: any) { @@ -24,7 +23,7 @@ export class ApplicationError extends Error { export namespace ApplicationError { export function hasErrorCode(e: any): e is Error & { code: ErrorCode; data?: any } { - return e && e.code !== undefined; + return ErrorCode.is(e["code"]); } export async function notFoundToUndefined(p: Promise): Promise { @@ -37,41 +36,18 @@ export namespace ApplicationError { throw e; } } - - export function fromGRPCError(e: any, data?: any): ApplicationError { - // Argument e should be ServerErrorResponse - // But to reduce dependency requirement, we use Error here - - // eslint-disable-next-line @typescript-eslint/no-unsafe-argument - return new ApplicationError(categorizeRPCError(e.code), e.message, data); - } - - export function categorizeRPCError(code?: Status): ErrorCode { - // Mostly align to https://github.com/gitpod-io/gitpod/blob/ef95e6f3ca0bf314c40da1b83251423c2208d175/components/public-api-server/pkg/proxy/errors.go#L25 - switch (code) { - case Status.INVALID_ARGUMENT: - return ErrorCodes.BAD_REQUEST; - case Status.UNAUTHENTICATED: - return ErrorCodes.NOT_AUTHENTICATED; - case Status.PERMISSION_DENIED: - return ErrorCodes.PERMISSION_DENIED; // or UserBlocked - case Status.NOT_FOUND: - return ErrorCodes.NOT_FOUND; - case Status.ALREADY_EXISTS: - return ErrorCodes.CONFLICT; - case Status.FAILED_PRECONDITION: - return ErrorCodes.PRECONDITION_FAILED; - case Status.RESOURCE_EXHAUSTED: - return ErrorCodes.TOO_MANY_REQUESTS; - } - return ErrorCodes.INTERNAL_SERVER_ERROR; - } } export namespace ErrorCode { export function isUserError(code: number | ErrorCode) { return code >= 400 && code < 500; } + export function is(code: any): code is ErrorCode { + if (typeof code !== "number") { + return false; + } + return Object.values(ErrorCodes).includes(code as ErrorCode); + } } export type ErrorCode = typeof ErrorCodes[keyof typeof ErrorCodes]; diff --git a/components/gitpod-protocol/src/public-api-converter.spec.ts b/components/gitpod-protocol/src/public-api-converter.spec.ts index b774e9fdc4766b..93c81ad3e0d33c 100644 --- a/components/gitpod-protocol/src/public-api-converter.spec.ts +++ b/components/gitpod-protocol/src/public-api-converter.spec.ts @@ -233,6 +233,7 @@ describe("PublicAPIConverter", () => { }, additionalEnvironmentVariables: [], region: "dev", + prebuildId: "", workspaceClass: "g1-standard", editor: { name: "code", @@ -362,6 +363,7 @@ describe("PublicAPIConverter", () => { }, additionalEnvironmentVariables: [], region: "dev", + prebuildId: "", workspaceClass: "g1-standard", editor: { name: "code", @@ -502,6 +504,7 @@ describe("PublicAPIConverter", () => { }, additionalEnvironmentVariables: [], region: "dev", + prebuildId: "", workspaceClass: "g1-standard", editor: { name: "code", @@ -617,6 +620,7 @@ describe("PublicAPIConverter", () => { }, additionalEnvironmentVariables: [], region: "dev", + prebuildId: "", workspaceClass: "g1-standard", editor: { name: "code", diff --git a/components/gitpod-protocol/src/public-api-converter.ts b/components/gitpod-protocol/src/public-api-converter.ts index 87f1d5096fca3c..3058f85ef72631 100644 --- a/components/gitpod-protocol/src/public-api-converter.ts +++ b/components/gitpod-protocol/src/public-api-converter.ts @@ -129,23 +129,27 @@ export class PublicAPIConverter { phase.lastTransitionTime = Timestamp.fromDate(new Date(lastTransitionTime)); status.instanceId = arg.id; - status.message = arg.status.message; + if (arg.status.message) { + status.message = arg.status.message; + } status.workspaceUrl = arg.ideUrl; status.ports = this.toPorts(arg.status.exposedPorts); status.conditions = this.toWorkspaceConditions(arg.status.conditions); status.gitStatus = this.toGitStatus(arg, status.gitStatus); workspace.region = arg.region; - workspace.workspaceClass = arg.workspaceClass; + if (arg.workspaceClass) { + workspace.workspaceClass = arg.workspaceClass; + } workspace.editor = this.toEditor(arg.configuration.ideConfig); return workspace; } toWorkspaceConditions(conditions: WorkspaceInstanceConditions): WorkspaceConditions { - const result = new WorkspaceConditions(); - result.failed = conditions.failed; - result.timeout = conditions.timeout; - return result; + return new WorkspaceConditions({ + failed: conditions.failed, + timeout: conditions.timeout, + }); } toEditor(ideConfig: ConfigurationIdeConfig | undefined): EditorReference | undefined { @@ -345,15 +349,15 @@ export class PublicAPIConverter { } toOrganizationMember(member: OrgMemberInfo): OrganizationMember { - const result = new OrganizationMember(); - result.userId = member.userId; - result.fullName = member.fullName; - result.email = member.primaryEmail; - result.avatarUrl = member.avatarUrl; - result.role = this.toOrgMemberRole(member.role); - result.memberSince = Timestamp.fromDate(new Date(member.memberSince)); - result.ownedByOrganization = member.ownedByOrganization; - return result; + return new OrganizationMember({ + userId: member.userId, + fullName: member.fullName, + email: member.primaryEmail, + avatarUrl: member.avatarUrl, + role: this.toOrgMemberRole(member.role), + memberSince: Timestamp.fromDate(new Date(member.memberSince)), + ownedByOrganization: member.ownedByOrganization, + }); } toOrgMemberRole(role: OrgMemberRole): OrganizationRole { @@ -379,10 +383,10 @@ export class PublicAPIConverter { } toOrganizationSettings(settings: OrganizationSettingsProtocol): OrganizationSettings { - const result = new OrganizationSettings(); - result.workspaceSharingDisabled = !!settings.workspaceSharingDisabled; - result.defaultWorkspaceImage = settings.defaultWorkspaceImage || undefined; - return result; + return new OrganizationSettings({ + workspaceSharingDisabled: !!settings.workspaceSharingDisabled, + defaultWorkspaceImage: settings.defaultWorkspaceImage || undefined, + }); } toConfiguration(project: Project): Configuration { diff --git a/components/gitpod-protocol/src/teams-projects-protocol.ts b/components/gitpod-protocol/src/teams-projects-protocol.ts index bf0b274b09bace..20d9a7b5f67950 100644 --- a/components/gitpod-protocol/src/teams-projects-protocol.ts +++ b/components/gitpod-protocol/src/teams-projects-protocol.ts @@ -195,6 +195,7 @@ export interface Organization { export interface OrganizationSettings { workspaceSharingDisabled?: boolean; + // null to reset to default defaultWorkspaceImage?: string | null; } diff --git a/components/public-api/buf.yaml b/components/public-api/buf.yaml index 09d08398d52a23..0b90f4b1b34958 100644 --- a/components/public-api/buf.yaml +++ b/components/public-api/buf.yaml @@ -5,6 +5,8 @@ breaking: ignore: # Do not enforce breaking change detection for the experimental package - gitpod/experimental + # TODO enable again after landing style changes + - gitpod/v1 lint: use: - DEFAULT diff --git a/components/public-api/gitpod/v1/organization.proto b/components/public-api/gitpod/v1/organization.proto index c36d84f3e0ac95..988bca943fb018 100644 --- a/components/public-api/gitpod/v1/organization.proto +++ b/components/public-api/gitpod/v1/organization.proto @@ -2,6 +2,7 @@ syntax = "proto3"; package gitpod.v1; +import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; import "gitpod/v1/pagination.proto"; @@ -18,9 +19,9 @@ message OrganizationMember { string user_id = 1; OrganizationRole role = 2; google.protobuf.Timestamp member_since = 3; - optional string avatar_url = 4; - optional string full_name = 5; - optional string email = 6; + string avatar_url = 4; + string full_name = 5; + string email = 6; bool owned_by_organization = 7; } @@ -32,7 +33,7 @@ enum OrganizationRole { message OrganizationSettings { bool workspace_sharing_disabled = 1; - optional string default_workspace_image = 2; + string default_workspace_image = 2; } service OrganizationService { @@ -95,7 +96,7 @@ message UpdateOrganizationRequest { string organization_id = 1; // name is the new name of the organization - string name = 2; + optional string name = 2; } message UpdateOrganizationResponse { @@ -107,8 +108,11 @@ message UpdateOrganizationSettingsRequest { // organization_id is the ID of the organization to update the settings for. string organization_id = 1; - // settings are the settings to update - OrganizationSettings settings = 2; + google.protobuf.FieldMask reset_mask = 2; + + optional bool workspace_sharing_disabled = 3; + + optional string default_workspace_image = 4; } message UpdateOrganizationSettingsResponse { @@ -226,7 +230,7 @@ message UpdateOrganizationMemberRequest { string user_id = 2; // role is the new role for the user in the organization - OrganizationRole role = 3; + optional OrganizationRole role = 3; } message UpdateOrganizationMemberResponse { diff --git a/components/public-api/gitpod/v1/workspace.proto b/components/public-api/gitpod/v1/workspace.proto index 70986022d4f117..dc98ce88fb7a29 100644 --- a/components/public-api/gitpod/v1/workspace.proto +++ b/components/public-api/gitpod/v1/workspace.proto @@ -19,15 +19,15 @@ service WorkspaceService { rpc WatchWorkspaceStatus(WatchWorkspaceStatusRequest) returns (stream WatchWorkspaceStatusResponse) {} } -message GetWorkspaceRequest { string id = 1; } +message GetWorkspaceRequest { string workspace_id = 1; } -message GetWorkspaceResponse { Workspace item = 1; } +message GetWorkspaceResponse { Workspace workspace = 1; } message WatchWorkspaceStatusRequest { // workspace_id specifies the workspace to watch // // +optional if empty then watch all workspaces - optional string workspace_id = 1; + string workspace_id = 1; } message WatchWorkspaceStatusResponse { @@ -63,7 +63,7 @@ message Workspace { // Obtain available regions using the ListRegions operation. // // +optional defaults to the user's default region - optional string region = 8; + string region = 8; // workspace_class specifies the workspace class with which to create the // workspace. Obtain available workspace classes using the ListWorkspaceClass @@ -71,13 +71,13 @@ message Workspace { // // +optional defaults to the class configured on the project or the cluster's // default class. - optional string workspace_class = 9; + string workspace_class = 9; // editor specifies the editor that will be used with this workspace. // Obtain available editors using the EditorService.ListEditors operation. // // +optional defaults to the default editor of the user - optional EditorReference editor = 10; + EditorReference editor = 10; // context_url is the normalized URL from which the workspace was created // TODO(ak) replace with resolveContextURL API @@ -86,7 +86,7 @@ message Workspace { // Prebuild ID is the unique identifier of the prebuild // from which this workspace was created // +optional if empty then this workspace was not created from a prebuild - optional string prebuild_id = 12; + string prebuild_id = 12; } message WorkspaceStatus { @@ -97,7 +97,7 @@ message WorkspaceStatus { WorkspacePhase phase = 1; // message is an optional human-readable message detailing the current phase - optional string message = 2; + string message = 2; // workspace_url is the URL of the workspace. Only present when the phase is // running. @@ -124,11 +124,11 @@ message WorkspaceStatus { message WorkspaceConditions { // failed contains technical details for the failure of the workspace. // +optional If this field is empty, the workspace has not failed. - optional string failed = 1; + string failed = 1; // timeout contains the reason the workspace has timed out. // +optional If this field is empty, the workspace has not timed out. - optional string timeout = 2; + string timeout = 2; } // Admission level describes who can access a workspace instance and its ports. @@ -276,5 +276,5 @@ message EditorReference { message WorkspaceEnvironmentVariable { string name = 1; - optional string value = 2; + string value = 2; } diff --git a/components/public-api/go/v1/organization.pb.go b/components/public-api/go/v1/organization.pb.go index f3bede2a109fa1..b23a9abcaa62ff 100644 --- a/components/public-api/go/v1/organization.pb.go +++ b/components/public-api/go/v1/organization.pb.go @@ -13,6 +13,7 @@ package v1 import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" reflect "reflect" sync "sync" @@ -202,9 +203,9 @@ type OrganizationMember struct { UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` Role OrganizationRole `protobuf:"varint,2,opt,name=role,proto3,enum=gitpod.v1.OrganizationRole" json:"role,omitempty"` MemberSince *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=member_since,json=memberSince,proto3" json:"member_since,omitempty"` - AvatarUrl *string `protobuf:"bytes,4,opt,name=avatar_url,json=avatarUrl,proto3,oneof" json:"avatar_url,omitempty"` - FullName *string `protobuf:"bytes,5,opt,name=full_name,json=fullName,proto3,oneof" json:"full_name,omitempty"` - Email *string `protobuf:"bytes,6,opt,name=email,proto3,oneof" json:"email,omitempty"` + AvatarUrl string `protobuf:"bytes,4,opt,name=avatar_url,json=avatarUrl,proto3" json:"avatar_url,omitempty"` + FullName string `protobuf:"bytes,5,opt,name=full_name,json=fullName,proto3" json:"full_name,omitempty"` + Email string `protobuf:"bytes,6,opt,name=email,proto3" json:"email,omitempty"` OwnedByOrganization bool `protobuf:"varint,7,opt,name=owned_by_organization,json=ownedByOrganization,proto3" json:"owned_by_organization,omitempty"` } @@ -262,22 +263,22 @@ func (x *OrganizationMember) GetMemberSince() *timestamppb.Timestamp { } func (x *OrganizationMember) GetAvatarUrl() string { - if x != nil && x.AvatarUrl != nil { - return *x.AvatarUrl + if x != nil { + return x.AvatarUrl } return "" } func (x *OrganizationMember) GetFullName() string { - if x != nil && x.FullName != nil { - return *x.FullName + if x != nil { + return x.FullName } return "" } func (x *OrganizationMember) GetEmail() string { - if x != nil && x.Email != nil { - return *x.Email + if x != nil { + return x.Email } return "" } @@ -294,8 +295,8 @@ type OrganizationSettings struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - WorkspaceSharingDisabled bool `protobuf:"varint,1,opt,name=workspace_sharing_disabled,json=workspaceSharingDisabled,proto3" json:"workspace_sharing_disabled,omitempty"` - DefaultWorkspaceImage *string `protobuf:"bytes,2,opt,name=default_workspace_image,json=defaultWorkspaceImage,proto3,oneof" json:"default_workspace_image,omitempty"` + WorkspaceSharingDisabled bool `protobuf:"varint,1,opt,name=workspace_sharing_disabled,json=workspaceSharingDisabled,proto3" json:"workspace_sharing_disabled,omitempty"` + DefaultWorkspaceImage string `protobuf:"bytes,2,opt,name=default_workspace_image,json=defaultWorkspaceImage,proto3" json:"default_workspace_image,omitempty"` } func (x *OrganizationSettings) Reset() { @@ -338,8 +339,8 @@ func (x *OrganizationSettings) GetWorkspaceSharingDisabled() bool { } func (x *OrganizationSettings) GetDefaultWorkspaceImage() string { - if x != nil && x.DefaultWorkspaceImage != nil { - return *x.DefaultWorkspaceImage + if x != nil { + return x.DefaultWorkspaceImage } return "" } @@ -352,7 +353,7 @@ type UpdateOrganizationRequest struct { // organization_id is the ID of the organization to update the settings for. OrganizationId string `protobuf:"bytes,1,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"` // name is the new name of the organization - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Name *string `protobuf:"bytes,2,opt,name=name,proto3,oneof" json:"name,omitempty"` } func (x *UpdateOrganizationRequest) Reset() { @@ -395,8 +396,8 @@ func (x *UpdateOrganizationRequest) GetOrganizationId() string { } func (x *UpdateOrganizationRequest) GetName() string { - if x != nil { - return x.Name + if x != nil && x.Name != nil { + return *x.Name } return "" } @@ -455,9 +456,10 @@ type UpdateOrganizationSettingsRequest struct { unknownFields protoimpl.UnknownFields // organization_id is the ID of the organization to update the settings for. - OrganizationId string `protobuf:"bytes,1,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"` - // settings are the settings to update - Settings *OrganizationSettings `protobuf:"bytes,2,opt,name=settings,proto3" json:"settings,omitempty"` + OrganizationId string `protobuf:"bytes,1,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"` + ResetMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=reset_mask,json=resetMask,proto3" json:"reset_mask,omitempty"` + WorkspaceSharingDisabled *bool `protobuf:"varint,3,opt,name=workspace_sharing_disabled,json=workspaceSharingDisabled,proto3,oneof" json:"workspace_sharing_disabled,omitempty"` + DefaultWorkspaceImage *string `protobuf:"bytes,4,opt,name=default_workspace_image,json=defaultWorkspaceImage,proto3,oneof" json:"default_workspace_image,omitempty"` } func (x *UpdateOrganizationSettingsRequest) Reset() { @@ -499,13 +501,27 @@ func (x *UpdateOrganizationSettingsRequest) GetOrganizationId() string { return "" } -func (x *UpdateOrganizationSettingsRequest) GetSettings() *OrganizationSettings { +func (x *UpdateOrganizationSettingsRequest) GetResetMask() *fieldmaskpb.FieldMask { if x != nil { - return x.Settings + return x.ResetMask } return nil } +func (x *UpdateOrganizationSettingsRequest) GetWorkspaceSharingDisabled() bool { + if x != nil && x.WorkspaceSharingDisabled != nil { + return *x.WorkspaceSharingDisabled + } + return false +} + +func (x *UpdateOrganizationSettingsRequest) GetDefaultWorkspaceImage() string { + if x != nil && x.DefaultWorkspaceImage != nil { + return *x.DefaultWorkspaceImage + } + return "" +} + type UpdateOrganizationSettingsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1454,7 +1470,7 @@ type UpdateOrganizationMemberRequest struct { // user_id is the user for which the membership shall be updated. UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // role is the new role for the user in the organization - Role OrganizationRole `protobuf:"varint,3,opt,name=role,proto3,enum=gitpod.v1.OrganizationRole" json:"role,omitempty"` + Role *OrganizationRole `protobuf:"varint,3,opt,name=role,proto3,enum=gitpod.v1.OrganizationRole,oneof" json:"role,omitempty"` } func (x *UpdateOrganizationMemberRequest) Reset() { @@ -1504,8 +1520,8 @@ func (x *UpdateOrganizationMemberRequest) GetUserId() string { } func (x *UpdateOrganizationMemberRequest) GetRole() OrganizationRole { - if x != nil { - return x.Role + if x != nil && x.Role != nil { + return *x.Role } return OrganizationRole_ORGANIZATION_ROLE_UNSPECIFIED } @@ -1659,192 +1675,202 @@ var File_gitpod_v1_organization_proto protoreflect.FileDescriptor var file_gitpod_v1_organization_proto_rawDesc = []byte{ 0x0a, 0x1c, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, - 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x67, 0x69, 0x74, 0x70, - 0x6f, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x87, 0x01, 0x0a, 0x0c, 0x4f, 0x72, 0x67, 0x61, 0x6e, - 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3f, 0x0a, 0x0d, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 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, 0x0c, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, - 0x73, 0x6c, 0x75, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x6c, 0x75, 0x67, - 0x22, 0xd9, 0x02, 0x0a, 0x12, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, - 0x12, 0x2f, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, - 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, - 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x72, 0x6f, 0x6c, - 0x65, 0x12, 0x3d, 0x0a, 0x0c, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x73, 0x69, 0x6e, 0x63, - 0x65, 0x18, 0x03, 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, 0x0b, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x53, 0x69, 0x6e, 0x63, 0x65, - 0x12, 0x22, 0x0a, 0x0a, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x09, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x55, 0x72, - 0x6c, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x4e, - 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x88, 0x01, - 0x01, 0x12, 0x32, 0x0a, 0x15, 0x6f, 0x77, 0x6e, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x5f, 0x6f, 0x72, - 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x13, 0x6f, 0x77, 0x6e, 0x65, 0x64, 0x42, 0x79, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, - 0x5f, 0x75, 0x72, 0x6c, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0xad, 0x01, 0x0a, - 0x14, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, - 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3c, 0x0a, 0x1a, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, + 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, + 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x67, 0x69, + 0x74, 0x70, 0x6f, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x87, 0x01, 0x0a, 0x0c, 0x4f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3f, 0x0a, + 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, + 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, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x12, + 0x0a, 0x04, 0x73, 0x6c, 0x75, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x6c, + 0x75, 0x67, 0x22, 0xa3, 0x02, 0x0a, 0x12, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, + 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, + 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x1b, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x72, + 0x6f, 0x6c, 0x65, 0x12, 0x3d, 0x0a, 0x0c, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x73, 0x69, + 0x6e, 0x63, 0x65, 0x18, 0x03, 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, 0x0b, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x53, 0x69, 0x6e, + 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x5f, 0x75, 0x72, 0x6c, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x55, 0x72, + 0x6c, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, + 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, + 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x32, 0x0a, 0x15, 0x6f, 0x77, 0x6e, 0x65, 0x64, 0x5f, 0x62, 0x79, + 0x5f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x13, 0x6f, 0x77, 0x6e, 0x65, 0x64, 0x42, 0x79, 0x4f, 0x72, 0x67, 0x61, + 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x8c, 0x01, 0x0a, 0x14, 0x4f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x12, 0x3c, 0x0a, 0x1a, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x73, + 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x53, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, + 0x36, 0x0a, 0x17, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x15, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x22, 0x66, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x17, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, + 0x59, 0x0a, 0x1a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, + 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, + 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x6f, 0x72, + 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xc2, 0x02, 0x0a, 0x21, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 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, 0x39, 0x0a, 0x0a, 0x72, 0x65, 0x73, + 0x65, 0x74, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 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, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x09, 0x72, 0x65, 0x73, 0x65, 0x74, + 0x4d, 0x61, 0x73, 0x6b, 0x12, 0x41, 0x0a, 0x1a, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, + 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x18, 0x77, 0x6f, 0x72, 0x6b, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x44, 0x69, 0x73, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x17, 0x64, 0x65, 0x66, 0x61, 0x75, + 0x6c, 0x74, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x6d, 0x61, + 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x15, 0x64, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x6d, 0x61, 0x67, + 0x65, 0x88, 0x01, 0x01, 0x42, 0x1d, 0x0a, 0x1b, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x69, 0x73, 0x61, 0x62, - 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x77, 0x6f, 0x72, 0x6b, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x53, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x44, 0x69, 0x73, 0x61, 0x62, - 0x6c, 0x65, 0x64, 0x12, 0x3b, 0x0a, 0x17, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x77, - 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x15, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x57, - 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x88, 0x01, 0x01, - 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x77, 0x6f, 0x72, - 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x22, 0x58, 0x0a, 0x19, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 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, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x59, 0x0a, 0x1a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x69, 0x74, - 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x22, 0x89, 0x01, 0x0a, 0x21, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, - 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, - 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, 0x3b, 0x0a, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x6c, 0x65, 0x64, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, + 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x22, + 0x61, 0x0a, 0x22, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, + 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x22, 0x49, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 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, 0x22, 0x5e, 0x0a, + 0x1f, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x3b, 0x0a, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, - 0x6e, 0x67, 0x73, 0x52, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x61, 0x0a, - 0x22, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, - 0x31, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, - 0x22, 0x49, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 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, 0x22, 0x5e, 0x0a, 0x1f, 0x47, - 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, - 0x0a, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1f, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x67, - 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, - 0x73, 0x52, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x2f, 0x0a, 0x19, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x59, 0x0a, 0x1a, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0c, 0x6f, 0x72, - 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x17, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x67, - 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, - 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x41, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x4f, 0x72, - 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x22, 0x56, 0x0a, 0x17, 0x47, 0x65, - 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x69, - 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x22, 0xda, 0x01, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, - 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x3c, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, - 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x0a, - 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x67, - 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x67, + 0x6e, 0x67, 0x73, 0x52, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x2f, 0x0a, + 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x59, + 0x0a, 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0c, + 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4f, + 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x6f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x41, 0x0a, 0x16, 0x47, 0x65, 0x74, + 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x22, 0x56, 0x0a, 0x17, + 0x47, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, + 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xda, 0x01, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x22, 0x3f, - 0x0a, 0x05, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x43, 0x4f, 0x50, 0x45, - 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, - 0x0a, 0x0c, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x01, - 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x41, 0x4c, 0x4c, 0x10, 0x02, 0x22, - 0x99, 0x01, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, - 0x0d, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, - 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x6f, - 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3d, 0x0a, 0x0a, - 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1d, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x67, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, - 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x44, 0x0a, 0x19, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 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, 0x22, 0x1c, 0x0a, 0x1a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, - 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x4b, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x74, 0x12, 0x3c, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, + 0x31, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x3f, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, + 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, + 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, + 0x22, 0x3f, 0x0a, 0x05, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x43, 0x4f, + 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, + 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, + 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x41, 0x4c, 0x4c, 0x10, + 0x02, 0x22, 0x99, 0x01, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x3d, 0x0a, 0x0d, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, + 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x0d, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3d, + 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x44, 0x0a, + 0x19, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 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, 0x22, 0x1c, 0x0a, 0x1a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x4b, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x22, 0x48, + 0x0a, 0x21, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x76, 0x69, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x3e, 0x0a, 0x17, 0x4a, 0x6f, 0x69, 0x6e, + 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x76, 0x69, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x43, 0x0a, 0x18, 0x4a, 0x6f, 0x69, 0x6e, + 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 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, 0x22, 0x4d, 0x0a, + 0x22, 0x52, 0x65, 0x73, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x22, 0x48, 0x0a, 0x21, - 0x47, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, - 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x3e, 0x0a, 0x17, 0x4a, 0x6f, 0x69, 0x6e, 0x4f, 0x72, - 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x43, 0x0a, 0x18, 0x4a, 0x6f, 0x69, 0x6e, 0x4f, 0x72, - 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x4a, 0x0a, 0x23, + 0x52, 0x65, 0x73, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x76, 0x69, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x87, 0x01, 0x0a, 0x1e, 0x4c, 0x69, 0x73, + 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x73, 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, 0x3c, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, + 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0x99, 0x01, 0x0a, 0x1f, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, + 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, + 0x3d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, + 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa2, + 0x01, 0x0a, 0x1f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 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, 0x22, 0x4d, 0x0a, 0x22, 0x52, - 0x65, 0x73, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x22, 0x4a, 0x0a, 0x23, 0x52, 0x65, - 0x73, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, - 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x87, 0x01, 0x0a, 0x1e, 0x4c, 0x69, 0x73, 0x74, 0x4f, - 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x6d, 0x62, 0x65, - 0x72, 0x73, 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, 0x3c, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, - 0x76, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x22, 0x99, 0x01, 0x0a, 0x1f, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, - 0x31, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, - 0x6d, 0x62, 0x65, 0x72, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x3d, 0x0a, - 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, - 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x94, 0x01, 0x0a, - 0x1f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 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, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, - 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, - 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x1b, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x67, - 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x72, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x75, + 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, + 0x65, 0x72, 0x49, 0x64, 0x12, 0x34, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4f, + 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x48, + 0x00, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x22, 0x59, 0x0a, 0x20, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x06, 0x6d, 0x65, 0x6d, 0x62, 0x65, @@ -2011,26 +2037,27 @@ var file_gitpod_v1_organization_proto_goTypes = []interface{}{ (*DeleteOrganizationMemberRequest)(nil), // 29: gitpod.v1.DeleteOrganizationMemberRequest (*DeleteOrganizationMemberResponse)(nil), // 30: gitpod.v1.DeleteOrganizationMemberResponse (*timestamppb.Timestamp)(nil), // 31: google.protobuf.Timestamp - (*PaginationRequest)(nil), // 32: gitpod.v1.PaginationRequest - (*PaginationResponse)(nil), // 33: gitpod.v1.PaginationResponse + (*fieldmaskpb.FieldMask)(nil), // 32: google.protobuf.FieldMask + (*PaginationRequest)(nil), // 33: gitpod.v1.PaginationRequest + (*PaginationResponse)(nil), // 34: gitpod.v1.PaginationResponse } var file_gitpod_v1_organization_proto_depIdxs = []int32{ 31, // 0: gitpod.v1.Organization.creation_time:type_name -> google.protobuf.Timestamp 0, // 1: gitpod.v1.OrganizationMember.role:type_name -> gitpod.v1.OrganizationRole 31, // 2: gitpod.v1.OrganizationMember.member_since:type_name -> google.protobuf.Timestamp 2, // 3: gitpod.v1.UpdateOrganizationResponse.organization:type_name -> gitpod.v1.Organization - 4, // 4: gitpod.v1.UpdateOrganizationSettingsRequest.settings:type_name -> gitpod.v1.OrganizationSettings + 32, // 4: gitpod.v1.UpdateOrganizationSettingsRequest.reset_mask:type_name -> google.protobuf.FieldMask 4, // 5: gitpod.v1.UpdateOrganizationSettingsResponse.settings:type_name -> gitpod.v1.OrganizationSettings 4, // 6: gitpod.v1.GetOrganizationSettingsResponse.settings:type_name -> gitpod.v1.OrganizationSettings 2, // 7: gitpod.v1.CreateOrganizationResponse.organization:type_name -> gitpod.v1.Organization 2, // 8: gitpod.v1.GetOrganizationResponse.organization:type_name -> gitpod.v1.Organization - 32, // 9: gitpod.v1.ListOrganizationsRequest.pagination:type_name -> gitpod.v1.PaginationRequest + 33, // 9: gitpod.v1.ListOrganizationsRequest.pagination:type_name -> gitpod.v1.PaginationRequest 1, // 10: gitpod.v1.ListOrganizationsRequest.scope:type_name -> gitpod.v1.ListOrganizationsRequest.Scope 2, // 11: gitpod.v1.ListOrganizationsResponse.organizations:type_name -> gitpod.v1.Organization - 33, // 12: gitpod.v1.ListOrganizationsResponse.pagination:type_name -> gitpod.v1.PaginationResponse - 32, // 13: gitpod.v1.ListOrganizationMembersRequest.pagination:type_name -> gitpod.v1.PaginationRequest + 34, // 12: gitpod.v1.ListOrganizationsResponse.pagination:type_name -> gitpod.v1.PaginationResponse + 33, // 13: gitpod.v1.ListOrganizationMembersRequest.pagination:type_name -> gitpod.v1.PaginationRequest 3, // 14: gitpod.v1.ListOrganizationMembersResponse.members:type_name -> gitpod.v1.OrganizationMember - 33, // 15: gitpod.v1.ListOrganizationMembersResponse.pagination:type_name -> gitpod.v1.PaginationResponse + 34, // 15: gitpod.v1.ListOrganizationMembersResponse.pagination:type_name -> gitpod.v1.PaginationResponse 0, // 16: gitpod.v1.UpdateOrganizationMemberRequest.role:type_name -> gitpod.v1.OrganizationRole 3, // 17: gitpod.v1.UpdateOrganizationMemberResponse.member:type_name -> gitpod.v1.OrganizationMember 11, // 18: gitpod.v1.OrganizationService.CreateOrganization:input_type -> gitpod.v1.CreateOrganizationRequest @@ -2422,8 +2449,9 @@ func file_gitpod_v1_organization_proto_init() { } } } - file_gitpod_v1_organization_proto_msgTypes[1].OneofWrappers = []interface{}{} - file_gitpod_v1_organization_proto_msgTypes[2].OneofWrappers = []interface{}{} + file_gitpod_v1_organization_proto_msgTypes[3].OneofWrappers = []interface{}{} + file_gitpod_v1_organization_proto_msgTypes[5].OneofWrappers = []interface{}{} + file_gitpod_v1_organization_proto_msgTypes[25].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/components/public-api/go/v1/workspace.pb.go b/components/public-api/go/v1/workspace.pb.go index ce648e36d7a6fe..2b640f39dc85fd 100644 --- a/components/public-api/go/v1/workspace.pb.go +++ b/components/public-api/go/v1/workspace.pb.go @@ -288,7 +288,7 @@ type GetWorkspaceRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + WorkspaceId string `protobuf:"bytes,1,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` } func (x *GetWorkspaceRequest) Reset() { @@ -323,9 +323,9 @@ func (*GetWorkspaceRequest) Descriptor() ([]byte, []int) { return file_gitpod_v1_workspace_proto_rawDescGZIP(), []int{0} } -func (x *GetWorkspaceRequest) GetId() string { +func (x *GetWorkspaceRequest) GetWorkspaceId() string { if x != nil { - return x.Id + return x.WorkspaceId } return "" } @@ -335,7 +335,7 @@ type GetWorkspaceResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Item *Workspace `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"` + Workspace *Workspace `protobuf:"bytes,1,opt,name=workspace,proto3" json:"workspace,omitempty"` } func (x *GetWorkspaceResponse) Reset() { @@ -370,9 +370,9 @@ func (*GetWorkspaceResponse) Descriptor() ([]byte, []int) { return file_gitpod_v1_workspace_proto_rawDescGZIP(), []int{1} } -func (x *GetWorkspaceResponse) GetItem() *Workspace { +func (x *GetWorkspaceResponse) GetWorkspace() *Workspace { if x != nil { - return x.Item + return x.Workspace } return nil } @@ -385,7 +385,7 @@ type WatchWorkspaceStatusRequest struct { // workspace_id specifies the workspace to watch // // +optional if empty then watch all workspaces - WorkspaceId *string `protobuf:"bytes,1,opt,name=workspace_id,json=workspaceId,proto3,oneof" json:"workspace_id,omitempty"` + WorkspaceId string `protobuf:"bytes,1,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` } func (x *WatchWorkspaceStatusRequest) Reset() { @@ -421,8 +421,8 @@ func (*WatchWorkspaceStatusRequest) Descriptor() ([]byte, []int) { } func (x *WatchWorkspaceStatusRequest) GetWorkspaceId() string { - if x != nil && x.WorkspaceId != nil { - return *x.WorkspaceId + if x != nil { + return x.WorkspaceId } return "" } @@ -508,26 +508,26 @@ type Workspace struct { // Obtain available regions using the ListRegions operation. // // +optional defaults to the user's default region - Region *string `protobuf:"bytes,8,opt,name=region,proto3,oneof" json:"region,omitempty"` + Region string `protobuf:"bytes,8,opt,name=region,proto3" json:"region,omitempty"` // workspace_class specifies the workspace class with which to create the // workspace. Obtain available workspace classes using the ListWorkspaceClass // operation. // // +optional defaults to the class configured on the project or the cluster's // default class. - WorkspaceClass *string `protobuf:"bytes,9,opt,name=workspace_class,json=workspaceClass,proto3,oneof" json:"workspace_class,omitempty"` + WorkspaceClass string `protobuf:"bytes,9,opt,name=workspace_class,json=workspaceClass,proto3" json:"workspace_class,omitempty"` // editor specifies the editor that will be used with this workspace. // Obtain available editors using the EditorService.ListEditors operation. // // +optional defaults to the default editor of the user - Editor *EditorReference `protobuf:"bytes,10,opt,name=editor,proto3,oneof" json:"editor,omitempty"` + Editor *EditorReference `protobuf:"bytes,10,opt,name=editor,proto3" json:"editor,omitempty"` // context_url is the normalized URL from which the workspace was created // TODO(ak) replace with resolveContextURL API ContextUrl string `protobuf:"bytes,11,opt,name=context_url,json=contextUrl,proto3" json:"context_url,omitempty"` // Prebuild ID is the unique identifier of the prebuild // from which this workspace was created // +optional if empty then this workspace was not created from a prebuild - PrebuildId *string `protobuf:"bytes,12,opt,name=prebuild_id,json=prebuildId,proto3,oneof" json:"prebuild_id,omitempty"` + PrebuildId string `protobuf:"bytes,12,opt,name=prebuild_id,json=prebuildId,proto3" json:"prebuild_id,omitempty"` } func (x *Workspace) Reset() { @@ -612,15 +612,15 @@ func (x *Workspace) GetAdditionalEnvironmentVariables() []*WorkspaceEnvironmentV } func (x *Workspace) GetRegion() string { - if x != nil && x.Region != nil { - return *x.Region + if x != nil { + return x.Region } return "" } func (x *Workspace) GetWorkspaceClass() string { - if x != nil && x.WorkspaceClass != nil { - return *x.WorkspaceClass + if x != nil { + return x.WorkspaceClass } return "" } @@ -640,8 +640,8 @@ func (x *Workspace) GetContextUrl() string { } func (x *Workspace) GetPrebuildId() string { - if x != nil && x.PrebuildId != nil { - return *x.PrebuildId + if x != nil { + return x.PrebuildId } return "" } @@ -657,7 +657,7 @@ type WorkspaceStatus struct { // comprehensive state machine. Phase *WorkspacePhase `protobuf:"bytes,1,opt,name=phase,proto3" json:"phase,omitempty"` // message is an optional human-readable message detailing the current phase - Message *string `protobuf:"bytes,2,opt,name=message,proto3,oneof" json:"message,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // workspace_url is the URL of the workspace. Only present when the phase is // running. WorkspaceUrl string `protobuf:"bytes,3,opt,name=workspace_url,json=workspaceUrl,proto3" json:"workspace_url,omitempty"` @@ -715,8 +715,8 @@ func (x *WorkspaceStatus) GetPhase() *WorkspacePhase { } func (x *WorkspaceStatus) GetMessage() string { - if x != nil && x.Message != nil { - return *x.Message + if x != nil { + return x.Message } return "" } @@ -770,10 +770,10 @@ type WorkspaceConditions struct { // failed contains technical details for the failure of the workspace. // +optional If this field is empty, the workspace has not failed. - Failed *string `protobuf:"bytes,1,opt,name=failed,proto3,oneof" json:"failed,omitempty"` + Failed string `protobuf:"bytes,1,opt,name=failed,proto3" json:"failed,omitempty"` // timeout contains the reason the workspace has timed out. // +optional If this field is empty, the workspace has not timed out. - Timeout *string `protobuf:"bytes,2,opt,name=timeout,proto3,oneof" json:"timeout,omitempty"` + Timeout string `protobuf:"bytes,2,opt,name=timeout,proto3" json:"timeout,omitempty"` } func (x *WorkspaceConditions) Reset() { @@ -809,15 +809,15 @@ func (*WorkspaceConditions) Descriptor() ([]byte, []int) { } func (x *WorkspaceConditions) GetFailed() string { - if x != nil && x.Failed != nil { - return *x.Failed + if x != nil { + return x.Failed } return "" } func (x *WorkspaceConditions) GetTimeout() string { - if x != nil && x.Timeout != nil { - return *x.Timeout + if x != nil { + return x.Timeout } return "" } @@ -1135,8 +1135,8 @@ type WorkspaceEnvironmentVariable struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Value *string `protobuf:"bytes,2,opt,name=value,proto3,oneof" json:"value,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` } func (x *WorkspaceEnvironmentVariable) Reset() { @@ -1179,8 +1179,8 @@ func (x *WorkspaceEnvironmentVariable) GetName() string { } func (x *WorkspaceEnvironmentVariable) GetValue() string { - if x != nil && x.Value != nil { - return *x.Value + if x != nil { + return x.Value } return "" } @@ -1192,197 +1192,189 @@ var file_gitpod_v1_workspace_proto_rawDesc = []byte{ 0x73, 0x70, 0x61, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x25, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x57, 0x6f, - 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x40, - 0x0a, 0x14, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 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, 0x04, 0x69, 0x74, 0x65, 0x6d, - 0x22, 0x56, 0x0a, 0x1b, 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, 0x12, - 0x26, 0x0a, 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x49, 0x64, 0x88, 0x01, 0x01, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x77, 0x6f, 0x72, 0x6b, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x22, 0x75, 0x0a, 0x1c, 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, 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, 0x32, 0x0a, 0x06, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x69, + 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x38, 0x0a, 0x13, 0x47, 0x65, 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, 0x22, 0x4a, 0x0a, 0x14, 0x47, 0x65, 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, 0x40, 0x0a, + 0x1b, 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, 0x12, 0x21, 0x0a, 0x0c, + 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x22, + 0x75, 0x0a, 0x1c, 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, 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, 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, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, - 0xb8, 0x04, 0x0a, 0x09, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, - 0x08, 0x70, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x08, 0x70, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, - 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x69, 0x6e, 0x6e, 0x65, 0x64, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x70, 0x69, 0x6e, 0x6e, 0x65, 0x64, 0x12, 0x32, - 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 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, 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, 0x1b, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x88, - 0x01, 0x01, 0x12, 0x2c, 0x0a, 0x0f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, - 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0e, 0x77, - 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x88, 0x01, 0x01, - 0x12, 0x37, 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, 0x48, 0x02, 0x52, 0x06, - 0x65, 0x64, 0x69, 0x74, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, - 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x55, 0x72, 0x6c, 0x12, 0x24, 0x0a, 0x0b, 0x70, 0x72, - 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x03, 0x52, 0x0a, 0x70, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x88, 0x01, 0x01, - 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x42, 0x12, 0x0a, 0x10, 0x5f, - 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x65, 0x64, 0x69, 0x74, 0x6f, 0x72, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x70, - 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x22, 0x9a, 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, - 0x1d, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x00, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x88, 0x01, 0x01, 0x12, 0x23, - 0x0a, 0x0d, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x55, 0x72, 0x6c, 0x12, 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, 0x42, 0x0a, 0x0a, 0x08, 0x5f, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x68, 0x0a, 0x13, 0x57, 0x6f, 0x72, 0x6b, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1b, - 0x0a, 0x06, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, - 0x52, 0x06, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x74, - 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x07, - 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x88, 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x66, - 0x61, 0x69, 0x6c, 0x65, 0x64, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, - 0x74, 0x22, 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, 0x57, 0x0a, 0x1c, 0x57, 0x6f, - 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, - 0x6e, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x19, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x2a, 0x6f, 0x0a, 0x0e, 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x1f, 0x0a, 0x1b, 0x41, 0x44, 0x4d, 0x49, 0x53, 0x53, 0x49, - 0x4f, 0x4e, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, - 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1e, 0x0a, 0x1a, 0x41, 0x44, 0x4d, 0x49, 0x53, 0x53, - 0x49, 0x4f, 0x4e, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x4f, 0x57, 0x4e, 0x45, 0x52, 0x5f, - 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x01, 0x12, 0x1c, 0x0a, 0x18, 0x41, 0x44, 0x4d, 0x49, 0x53, 0x53, - 0x49, 0x4f, 0x4e, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x45, 0x56, 0x45, 0x52, 0x59, 0x4f, - 0x4e, 0x45, 0x10, 0x02, 0x32, 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, + 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, 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, 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, + 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, } var ( @@ -1419,7 +1411,7 @@ var file_gitpod_v1_workspace_proto_goTypes = []interface{}{ (*timestamppb.Timestamp)(nil), // 16: google.protobuf.Timestamp } var file_gitpod_v1_workspace_proto_depIdxs = []int32{ - 8, // 0: gitpod.v1.GetWorkspaceResponse.item:type_name -> gitpod.v1.Workspace + 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 @@ -1595,11 +1587,6 @@ func file_gitpod_v1_workspace_proto_init() { } } } - file_gitpod_v1_workspace_proto_msgTypes[2].OneofWrappers = []interface{}{} - file_gitpod_v1_workspace_proto_msgTypes[4].OneofWrappers = []interface{}{} - file_gitpod_v1_workspace_proto_msgTypes[5].OneofWrappers = []interface{}{} - file_gitpod_v1_workspace_proto_msgTypes[6].OneofWrappers = []interface{}{} - file_gitpod_v1_workspace_proto_msgTypes[11].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/components/public-api/typescript/src/gitpod/experimental/v1/dummy_connect.ts b/components/public-api/typescript/src/gitpod/experimental/v1/dummy_connect.ts index dbcc7f3b0ac803..2f1abf3d2d5db3 100644 --- a/components/public-api/typescript/src/gitpod/experimental/v1/dummy_connect.ts +++ b/components/public-api/typescript/src/gitpod/experimental/v1/dummy_connect.ts @@ -47,3 +47,4 @@ export const HelloService = { }, } } as const; + diff --git a/components/public-api/typescript/src/gitpod/experimental/v1/dummy_pb.ts b/components/public-api/typescript/src/gitpod/experimental/v1/dummy_pb.ts index d7f24499a6dcb2..834292f38784dd 100644 --- a/components/public-api/typescript/src/gitpod/experimental/v1/dummy_pb.ts +++ b/components/public-api/typescript/src/gitpod/experimental/v1/dummy_pb.ts @@ -159,3 +159,4 @@ export class LotsOfRepliesResponse extends Message { return proto3.util.equals(LotsOfRepliesResponse, a, b); } } + diff --git a/components/public-api/typescript/src/gitpod/experimental/v1/editor_service_connect.ts b/components/public-api/typescript/src/gitpod/experimental/v1/editor_service_connect.ts index 27c394a5215884..a5c25dd1297c8b 100644 --- a/components/public-api/typescript/src/gitpod/experimental/v1/editor_service_connect.ts +++ b/components/public-api/typescript/src/gitpod/experimental/v1/editor_service_connect.ts @@ -29,3 +29,4 @@ export const EditorService = { }, } } as const; + diff --git a/components/public-api/typescript/src/gitpod/experimental/v1/editor_service_pb.ts b/components/public-api/typescript/src/gitpod/experimental/v1/editor_service_pb.ts index 362a3e68e8687e..4bc8545d47ec1d 100644 --- a/components/public-api/typescript/src/gitpod/experimental/v1/editor_service_pb.ts +++ b/components/public-api/typescript/src/gitpod/experimental/v1/editor_service_pb.ts @@ -228,3 +228,4 @@ export class EditorOption_Kind extends Message { return proto3.util.equals(EditorOption_Kind, a, b); } } + diff --git a/components/public-api/typescript/src/gitpod/experimental/v1/ide_client_connect.ts b/components/public-api/typescript/src/gitpod/experimental/v1/ide_client_connect.ts index 180bf4bc67e8d4..58af85608323d3 100644 --- a/components/public-api/typescript/src/gitpod/experimental/v1/ide_client_connect.ts +++ b/components/public-api/typescript/src/gitpod/experimental/v1/ide_client_connect.ts @@ -53,3 +53,4 @@ export const IDEClientService = { }, } } as const; + diff --git a/components/public-api/typescript/src/gitpod/experimental/v1/ide_client_pb.ts b/components/public-api/typescript/src/gitpod/experimental/v1/ide_client_pb.ts index b75562141262d9..caff82d47d6d22 100644 --- a/components/public-api/typescript/src/gitpod/experimental/v1/ide_client_pb.ts +++ b/components/public-api/typescript/src/gitpod/experimental/v1/ide_client_pb.ts @@ -222,3 +222,4 @@ export class UpdateGitStatusResponse extends Message { return proto3.util.equals(UpdateGitStatusResponse, a, b); } } + diff --git a/components/public-api/typescript/src/gitpod/experimental/v1/identityprovider_connect.ts b/components/public-api/typescript/src/gitpod/experimental/v1/identityprovider_connect.ts index 8921182005b5ad..e835314000c556 100644 --- a/components/public-api/typescript/src/gitpod/experimental/v1/identityprovider_connect.ts +++ b/components/public-api/typescript/src/gitpod/experimental/v1/identityprovider_connect.ts @@ -31,3 +31,4 @@ export const IdentityProviderService = { }, } } as const; + diff --git a/components/public-api/typescript/src/gitpod/experimental/v1/identityprovider_pb.ts b/components/public-api/typescript/src/gitpod/experimental/v1/identityprovider_pb.ts index 2754254c05e51e..45e28876c1cd05 100644 --- a/components/public-api/typescript/src/gitpod/experimental/v1/identityprovider_pb.ts +++ b/components/public-api/typescript/src/gitpod/experimental/v1/identityprovider_pb.ts @@ -91,3 +91,4 @@ export class GetIDTokenResponse extends Message { return proto3.util.equals(GetIDTokenResponse, a, b); } } + diff --git a/components/public-api/typescript/src/gitpod/experimental/v1/oidc_connect.ts b/components/public-api/typescript/src/gitpod/experimental/v1/oidc_connect.ts index 75bcce80f87947..643e11b27aeeb2 100644 --- a/components/public-api/typescript/src/gitpod/experimental/v1/oidc_connect.ts +++ b/components/public-api/typescript/src/gitpod/experimental/v1/oidc_connect.ts @@ -86,3 +86,4 @@ export const OIDCService = { }, } } as const; + diff --git a/components/public-api/typescript/src/gitpod/experimental/v1/oidc_pb.ts b/components/public-api/typescript/src/gitpod/experimental/v1/oidc_pb.ts index 37457dc5601a10..b1394e004a8131 100644 --- a/components/public-api/typescript/src/gitpod/experimental/v1/oidc_pb.ts +++ b/components/public-api/typescript/src/gitpod/experimental/v1/oidc_pb.ts @@ -972,3 +972,4 @@ export class SetClientConfigActivationResponse extends Message { return proto3.util.equals(Pagination, a, b); } } + diff --git a/components/public-api/typescript/src/gitpod/experimental/v1/projects_connect.ts b/components/public-api/typescript/src/gitpod/experimental/v1/projects_connect.ts index 293839e24743aa..a5a7c4de9f3140 100644 --- a/components/public-api/typescript/src/gitpod/experimental/v1/projects_connect.ts +++ b/components/public-api/typescript/src/gitpod/experimental/v1/projects_connect.ts @@ -64,3 +64,4 @@ export const ProjectsService = { }, } } as const; + diff --git a/components/public-api/typescript/src/gitpod/experimental/v1/projects_pb.ts b/components/public-api/typescript/src/gitpod/experimental/v1/projects_pb.ts index 403bf03a4ed024..e0f6e35a7c628b 100644 --- a/components/public-api/typescript/src/gitpod/experimental/v1/projects_pb.ts +++ b/components/public-api/typescript/src/gitpod/experimental/v1/projects_pb.ts @@ -592,3 +592,4 @@ export class DeleteProjectResponse extends Message { return proto3.util.equals(DeleteProjectResponse, a, b); } } + diff --git a/components/public-api/typescript/src/gitpod/experimental/v1/scm_connect.ts b/components/public-api/typescript/src/gitpod/experimental/v1/scm_connect.ts index 534f29ca57a0cf..4378a2d459d342 100644 --- a/components/public-api/typescript/src/gitpod/experimental/v1/scm_connect.ts +++ b/components/public-api/typescript/src/gitpod/experimental/v1/scm_connect.ts @@ -32,3 +32,4 @@ export const SCMService = { }, } } as const; + diff --git a/components/public-api/typescript/src/gitpod/experimental/v1/scm_pb.ts b/components/public-api/typescript/src/gitpod/experimental/v1/scm_pb.ts index bf2a2209e9ebd8..9b3396c4b58731 100644 --- a/components/public-api/typescript/src/gitpod/experimental/v1/scm_pb.ts +++ b/components/public-api/typescript/src/gitpod/experimental/v1/scm_pb.ts @@ -79,3 +79,4 @@ export class GetSuggestedRepoURLsResponse extends Message { return proto3.util.equals(GetUserStatsResponse, a, b); } } + diff --git a/components/public-api/typescript/src/gitpod/experimental/v1/teams_connect.ts b/components/public-api/typescript/src/gitpod/experimental/v1/teams_connect.ts index 7d7b2b27ae35ef..8790c650172c2f 100644 --- a/components/public-api/typescript/src/gitpod/experimental/v1/teams_connect.ts +++ b/components/public-api/typescript/src/gitpod/experimental/v1/teams_connect.ts @@ -130,3 +130,4 @@ export const TeamsService = { }, } } as const; + diff --git a/components/public-api/typescript/src/gitpod/experimental/v1/teams_pb.ts b/components/public-api/typescript/src/gitpod/experimental/v1/teams_pb.ts index 7badc017d71541..d8a1484f5cdfc5 100644 --- a/components/public-api/typescript/src/gitpod/experimental/v1/teams_pb.ts +++ b/components/public-api/typescript/src/gitpod/experimental/v1/teams_pb.ts @@ -1003,3 +1003,4 @@ export class DeleteTeamMemberResponse extends Message return proto3.util.equals(DeleteTeamMemberResponse, a, b); } } + diff --git a/components/public-api/typescript/src/gitpod/experimental/v1/tokens_connect.ts b/components/public-api/typescript/src/gitpod/experimental/v1/tokens_connect.ts index b1f792cc1a3a5e..1c4a6a0eecca6d 100644 --- a/components/public-api/typescript/src/gitpod/experimental/v1/tokens_connect.ts +++ b/components/public-api/typescript/src/gitpod/experimental/v1/tokens_connect.ts @@ -86,3 +86,4 @@ export const TokensService = { }, } } as const; + diff --git a/components/public-api/typescript/src/gitpod/experimental/v1/tokens_pb.ts b/components/public-api/typescript/src/gitpod/experimental/v1/tokens_pb.ts index 61b4c0c5380507..ab9abd7b3da557 100644 --- a/components/public-api/typescript/src/gitpod/experimental/v1/tokens_pb.ts +++ b/components/public-api/typescript/src/gitpod/experimental/v1/tokens_pb.ts @@ -562,3 +562,4 @@ export class DeletePersonalAccessTokenResponse extends Message { return proto3.util.equals(BlockUserResponse, a, b); } } + diff --git a/components/public-api/typescript/src/gitpod/experimental/v1/workspaces_connect.ts b/components/public-api/typescript/src/gitpod/experimental/v1/workspaces_connect.ts index 31c4cb95782b8a..c4603ff1428156 100644 --- a/components/public-api/typescript/src/gitpod/experimental/v1/workspaces_connect.ts +++ b/components/public-api/typescript/src/gitpod/experimental/v1/workspaces_connect.ts @@ -144,3 +144,4 @@ export const WorkspacesService = { }, } } as const; + diff --git a/components/public-api/typescript/src/gitpod/experimental/v1/workspaces_pb.ts b/components/public-api/typescript/src/gitpod/experimental/v1/workspaces_pb.ts index b53754990e373a..f3c54d8211c9e3 100644 --- a/components/public-api/typescript/src/gitpod/experimental/v1/workspaces_pb.ts +++ b/components/public-api/typescript/src/gitpod/experimental/v1/workspaces_pb.ts @@ -2162,3 +2162,4 @@ proto3.util.setEnumType(GetDefaultWorkspaceImageResponse_ImageSource, "gitpod.ex { no: 1, name: "IMAGE_SOURCE_INSTALLATION" }, { no: 2, name: "IMAGE_SOURCE_ORGANIZATION" }, ]); + diff --git a/components/public-api/typescript/src/gitpod/v1/configuration_connect.ts b/components/public-api/typescript/src/gitpod/v1/configuration_connect.ts index 87454be874be9e..3a7edb7a4d31d2 100644 --- a/components/public-api/typescript/src/gitpod/v1/configuration_connect.ts +++ b/components/public-api/typescript/src/gitpod/v1/configuration_connect.ts @@ -64,3 +64,4 @@ export const ConfigurationService = { }, } } as const; + diff --git a/components/public-api/typescript/src/gitpod/v1/configuration_pb.ts b/components/public-api/typescript/src/gitpod/v1/configuration_pb.ts index 0b29128a7e2c9a..2154f417bd824d 100644 --- a/components/public-api/typescript/src/gitpod/v1/configuration_pb.ts +++ b/components/public-api/typescript/src/gitpod/v1/configuration_pb.ts @@ -535,3 +535,4 @@ export class DeleteConfigurationResponse extends Message { memberSince?: Timestamp; /** - * @generated from field: optional string avatar_url = 4; + * @generated from field: string avatar_url = 4; */ - avatarUrl?: string; + avatarUrl = ""; /** - * @generated from field: optional string full_name = 5; + * @generated from field: string full_name = 5; */ - fullName?: string; + fullName = ""; /** - * @generated from field: optional string email = 6; + * @generated from field: string email = 6; */ - email?: string; + email = ""; /** * @generated from field: bool owned_by_organization = 7; @@ -144,9 +144,9 @@ export class OrganizationMember extends Message { { no: 1, name: "user_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 2, name: "role", kind: "enum", T: proto3.getEnumType(OrganizationRole) }, { no: 3, name: "member_since", kind: "message", T: Timestamp }, - { no: 4, name: "avatar_url", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 5, name: "full_name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 6, name: "email", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 4, name: "avatar_url", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "full_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 6, name: "email", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 7, name: "owned_by_organization", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, ]); @@ -177,9 +177,9 @@ export class OrganizationSettings extends Message { workspaceSharingDisabled = false; /** - * @generated from field: optional string default_workspace_image = 2; + * @generated from field: string default_workspace_image = 2; */ - defaultWorkspaceImage?: string; + defaultWorkspaceImage = ""; constructor(data?: PartialMessage) { super(); @@ -190,7 +190,7 @@ export class OrganizationSettings extends Message { static readonly typeName = "gitpod.v1.OrganizationSettings"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ { no: 1, name: "workspace_sharing_disabled", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 2, name: "default_workspace_image", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 2, name: "default_workspace_image", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): OrganizationSettings { @@ -224,9 +224,9 @@ export class UpdateOrganizationRequest extends Message) { super(); @@ -237,7 +237,7 @@ export class UpdateOrganizationRequest extends Message [ { no: 1, name: "organization_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): UpdateOrganizationRequest { @@ -308,11 +308,19 @@ export class UpdateOrganizationSettingsRequest extends Message) { super(); @@ -323,7 +331,9 @@ export class UpdateOrganizationSettingsRequest extends Message [ { no: 1, name: "organization_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "settings", kind: "message", T: OrganizationSettings }, + { no: 2, name: "reset_mask", kind: "message", T: FieldMask }, + { no: 3, name: "workspace_sharing_disabled", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, + { no: 4, name: "default_workspace_image", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): UpdateOrganizationSettingsRequest { @@ -1153,9 +1163,9 @@ export class UpdateOrganizationMemberRequest extends Message) { super(); @@ -1167,7 +1177,7 @@ export class UpdateOrganizationMemberRequest extends Message [ { no: 1, name: "organization_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 2, name: "user_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "role", kind: "enum", T: proto3.getEnumType(OrganizationRole) }, + { no: 3, name: "role", kind: "enum", T: proto3.getEnumType(OrganizationRole), opt: true }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): UpdateOrganizationMemberRequest { @@ -1304,3 +1314,4 @@ export class DeleteOrganizationMemberResponse extends Message { return proto3.util.equals(PaginationResponse, 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..7f6e2a81aa15b0 100644 --- a/components/public-api/typescript/src/gitpod/v1/workspace_connect.ts +++ b/components/public-api/typescript/src/gitpod/v1/workspace_connect.ts @@ -47,3 +47,4 @@ export const WorkspaceService = { }, } } 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 1247dde0ad94b9..b6f262b0ce612f 100644 --- a/components/public-api/typescript/src/gitpod/v1/workspace_pb.ts +++ b/components/public-api/typescript/src/gitpod/v1/workspace_pb.ts @@ -51,9 +51,9 @@ proto3.util.setEnumType(AdmissionLevel, "gitpod.v1.AdmissionLevel", [ */ export class GetWorkspaceRequest extends Message { /** - * @generated from field: string id = 1; + * @generated from field: string workspace_id = 1; */ - id = ""; + workspaceId = ""; constructor(data?: PartialMessage) { super(); @@ -63,7 +63,7 @@ export class GetWorkspaceRequest extends Message { static readonly runtime: typeof proto3 = proto3; static readonly typeName = "gitpod.v1.GetWorkspaceRequest"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 1, name: "workspace_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): GetWorkspaceRequest { @@ -88,9 +88,9 @@ export class GetWorkspaceRequest extends Message { */ export class GetWorkspaceResponse extends Message { /** - * @generated from field: gitpod.v1.Workspace item = 1; + * @generated from field: gitpod.v1.Workspace workspace = 1; */ - item?: Workspace; + workspace?: Workspace; constructor(data?: PartialMessage) { super(); @@ -100,7 +100,7 @@ export class GetWorkspaceResponse extends Message { static readonly runtime: typeof proto3 = proto3; static readonly typeName = "gitpod.v1.GetWorkspaceResponse"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "item", kind: "message", T: Workspace }, + { no: 1, name: "workspace", kind: "message", T: Workspace }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): GetWorkspaceResponse { @@ -129,9 +129,9 @@ export class WatchWorkspaceStatusRequest extends Message) { super(); @@ -141,7 +141,7 @@ export class WatchWorkspaceStatusRequest extends Message [ - { no: 1, name: "workspace_id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 1, name: "workspace_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): WatchWorkspaceStatusRequest { @@ -264,9 +264,9 @@ export class Workspace extends Message { * * +optional defaults to the user's default region * - * @generated from field: optional string region = 8; + * @generated from field: string region = 8; */ - region?: string; + region = ""; /** * workspace_class specifies the workspace class with which to create the @@ -276,9 +276,9 @@ export class Workspace extends Message { * +optional defaults to the class configured on the project or the cluster's * default class. * - * @generated from field: optional string workspace_class = 9; + * @generated from field: string workspace_class = 9; */ - workspaceClass?: string; + workspaceClass = ""; /** * editor specifies the editor that will be used with this workspace. @@ -286,7 +286,7 @@ export class Workspace extends Message { * * +optional defaults to the default editor of the user * - * @generated from field: optional gitpod.v1.EditorReference editor = 10; + * @generated from field: gitpod.v1.EditorReference editor = 10; */ editor?: EditorReference; @@ -303,9 +303,9 @@ export class Workspace extends Message { * from which this workspace was created * +optional if empty then this workspace was not created from a prebuild * - * @generated from field: optional string prebuild_id = 12; + * @generated from field: string prebuild_id = 12; */ - prebuildId?: string; + prebuildId = ""; constructor(data?: PartialMessage) { super(); @@ -322,11 +322,11 @@ export class Workspace extends Message { { no: 5, name: "pinned", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, { no: 6, name: "status", kind: "message", T: WorkspaceStatus }, { no: 7, name: "additional_environment_variables", kind: "message", T: WorkspaceEnvironmentVariable, repeated: true }, - { no: 8, name: "region", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 9, name: "workspace_class", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 10, name: "editor", kind: "message", T: EditorReference, opt: true }, + { no: 8, name: "region", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 9, name: "workspace_class", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 10, name: "editor", kind: "message", T: EditorReference }, { no: 11, name: "context_url", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 12, name: "prebuild_id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 12, name: "prebuild_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): Workspace { @@ -363,9 +363,9 @@ export class WorkspaceStatus extends Message { /** * message is an optional human-readable message detailing the current phase * - * @generated from field: optional string message = 2; + * @generated from field: string message = 2; */ - message?: string; + message = ""; /** * workspace_url is the URL of the workspace. Only present when the phase is @@ -421,7 +421,7 @@ export class WorkspaceStatus extends Message { static readonly typeName = "gitpod.v1.WorkspaceStatus"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ { no: 1, name: "phase", kind: "message", T: WorkspacePhase }, - { no: 2, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 2, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 3, name: "workspace_url", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 4, name: "git_status", kind: "message", T: WorkspaceGitStatus }, { no: 5, name: "ports", kind: "message", T: WorkspacePort, repeated: true }, @@ -455,17 +455,17 @@ export class WorkspaceConditions extends Message { * failed contains technical details for the failure of the workspace. * +optional If this field is empty, the workspace has not failed. * - * @generated from field: optional string failed = 1; + * @generated from field: string failed = 1; */ - failed?: string; + failed = ""; /** * timeout contains the reason the workspace has timed out. * +optional If this field is empty, the workspace has not timed out. * - * @generated from field: optional string timeout = 2; + * @generated from field: string timeout = 2; */ - timeout?: string; + timeout = ""; constructor(data?: PartialMessage) { super(); @@ -475,8 +475,8 @@ export class WorkspaceConditions extends Message { static readonly runtime: typeof proto3 = proto3; static readonly typeName = "gitpod.v1.WorkspaceConditions"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "failed", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "timeout", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 1, name: "failed", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "timeout", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): WorkspaceConditions { @@ -933,9 +933,9 @@ export class WorkspaceEnvironmentVariable extends Message) { super(); @@ -946,7 +946,7 @@ export class WorkspaceEnvironmentVariable extends Message [ { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 2, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): WorkspaceEnvironmentVariable { diff --git a/components/server/src/api/organization-service-api.ts b/components/server/src/api/organization-service-api.ts index 35ecb1d7743da3..eb0ba08586a1af 100644 --- a/components/server/src/api/organization-service-api.ts +++ b/components/server/src/api/organization-service-api.ts @@ -4,7 +4,7 @@ * See License.AGPL.txt in the project root for license information. */ -import { HandlerContext, ServiceImpl } from "@connectrpc/connect"; +import { Code, ConnectError, HandlerContext, ServiceImpl } from "@connectrpc/connect"; import { inject, injectable } from "inversify"; import { OrganizationService as OrganizationServiceInterface } from "@gitpod/public-api/lib/gitpod/v1/organization_connect"; import { @@ -38,7 +38,9 @@ import { } from "@gitpod/public-api/lib/gitpod/v1/organization_pb"; import { PublicAPIConverter } from "@gitpod/gitpod-protocol/lib/public-api-converter"; import { OrganizationService } from "../orgs/organization-service"; +import { OrganizationSettings as ProtocolOrganizationSettings } from "@gitpod/gitpod-protocol"; import { PaginationResponse } from "@gitpod/public-api/lib/gitpod/v1/pagination_pb"; +import { validate as uuidValidate } from "uuid"; @injectable() export class OrganizationServiceAPI implements ServiceImpl { @@ -60,6 +62,10 @@ export class OrganizationServiceAPI implements ServiceImpl { + if (!uuidValidate(req.organizationId)) { + throw new ConnectError("organizationId is required", Code.InvalidArgument); + } + const org = await this.orgService.getOrganization(context.user.id, req.organizationId); const response = new GetOrganizationResponse(); response.organization = this.apiConverter.toOrganization(org); @@ -70,9 +76,14 @@ export class OrganizationServiceAPI implements ServiceImpl { - const org = await this.orgService.updateOrganization(context.user.id, req.organizationId, { - name: req.name, - }); + if (!uuidValidate(req.organizationId)) { + throw new ConnectError("organizationId is required", Code.InvalidArgument); + } + if (typeof req.name !== "string") { + throw new ConnectError("nothing to update", Code.InvalidArgument); + } + + const org = await this.orgService.updateOrganization(context.user.id, req.organizationId, { name: req.name }); return new UpdateOrganizationResponse({ organization: this.apiConverter.toOrganization(org), }); @@ -101,6 +112,10 @@ export class OrganizationServiceAPI implements ServiceImpl { + if (!uuidValidate(req.organizationId)) { + throw new ConnectError("organizationId is required", Code.InvalidArgument); + } + await this.orgService.deleteOrganization(context.user.id, req.organizationId); return new DeleteOrganizationResponse(); } @@ -109,6 +124,10 @@ export class OrganizationServiceAPI implements ServiceImpl { + if (!uuidValidate(req.organizationId)) { + throw new ConnectError("organizationId is required", Code.InvalidArgument); + } + const invitation = await this.orgService.getOrCreateInvite(context.user.id, req.organizationId); const response = new GetOrganizationInvitationResponse(); response.invitationId = invitation.id; @@ -116,6 +135,10 @@ export class OrganizationServiceAPI implements ServiceImpl { + if (!uuidValidate(req.invitationId)) { + throw new ConnectError("invitationId is required", Code.InvalidArgument); + } + const orgId = await this.orgService.joinOrganization(context.user.id, req.invitationId); const result = new JoinOrganizationResponse(); result.organizationId = orgId; @@ -126,6 +149,10 @@ export class OrganizationServiceAPI implements ServiceImpl { + if (!uuidValidate(req.organizationId)) { + throw new ConnectError("organizationId is required", Code.InvalidArgument); + } + const inviteId = await this.orgService.resetInvite(context.user.id, req.organizationId); const result = new ResetOrganizationInvitationResponse(); result.invitationId = inviteId.id; @@ -136,6 +163,10 @@ export class OrganizationServiceAPI implements ServiceImpl { + if (!uuidValidate(req.organizationId)) { + throw new ConnectError("organizationId is required", Code.InvalidArgument); + } + const members = await this.orgService.listMembers(context.user.id, req.organizationId); //TODO pagination const response = new ListOrganizationMembersResponse(); @@ -149,6 +180,16 @@ export class OrganizationServiceAPI implements ServiceImpl { + if (!uuidValidate(req.organizationId)) { + throw new ConnectError("organizationId is required", Code.InvalidArgument); + } + if (!uuidValidate(req.userId)) { + throw new ConnectError("userId is required", Code.InvalidArgument); + } + if (req.role === undefined) { + throw new ConnectError("nothing to update", Code.InvalidArgument); + } + await this.orgService.addOrUpdateMember( context.user.id, req.organizationId, @@ -167,6 +208,13 @@ export class OrganizationServiceAPI implements ServiceImpl { + if (!uuidValidate(req.organizationId)) { + throw new ConnectError("organizationId is required", Code.InvalidArgument); + } + if (!uuidValidate(req.userId)) { + throw new ConnectError("userId is required", Code.InvalidArgument); + } + await this.orgService.removeOrganizationMember(context.user.id, req.organizationId, req.userId); return new DeleteOrganizationMemberResponse(); } @@ -175,6 +223,10 @@ export class OrganizationServiceAPI implements ServiceImpl { + if (!uuidValidate(req.organizationId)) { + throw new ConnectError("organizationId is required", Code.InvalidArgument); + } + const settings = await this.orgService.getSettings(context.user.id, req.organizationId); const response = new GetOrganizationSettingsResponse(); response.settings = this.apiConverter.toOrganizationSettings(settings); @@ -185,10 +237,34 @@ export class OrganizationServiceAPI implements ServiceImpl { - const settings = await this.orgService.updateSettings(context.user.id, req.organizationId, { - workspaceSharingDisabled: req.settings?.workspaceSharingDisabled, - defaultWorkspaceImage: req.settings?.defaultWorkspaceImage, - }); + if (!uuidValidate(req.organizationId)) { + throw new ConnectError("organizationId is required", Code.InvalidArgument); + } + + const update: Partial = {}; + if (typeof req.workspaceSharingDisabled === "boolean") { + update.workspaceSharingDisabled = req.workspaceSharingDisabled; + } + + const hasDefaultWorkspaceImage = typeof req.defaultWorkspaceImage === "string"; + const resetDefaultWorkspaceImage = req.resetMask?.paths.includes("defaultWorkspaceImage"); + if (hasDefaultWorkspaceImage && resetDefaultWorkspaceImage) { + throw new ConnectError( + "defaultWorkspaceImage cannot be set and reset at the same time", + Code.InvalidArgument, + ); + } + if (resetDefaultWorkspaceImage) { + update.defaultWorkspaceImage = null; + } else if (hasDefaultWorkspaceImage) { + update.defaultWorkspaceImage = req.defaultWorkspaceImage; + } + + if (Object.keys(update).length === 0) { + throw new ConnectError("nothing to update", Code.InvalidArgument); + } + + const settings = await this.orgService.updateSettings(context.user.id, req.organizationId, update); return new UpdateOrganizationSettingsResponse({ settings: this.apiConverter.toOrganizationSettings(settings), }); diff --git a/components/server/src/api/workspace-service-api.ts b/components/server/src/api/workspace-service-api.ts index df0cf114208a62..ca38d16d58d092 100644 --- a/components/server/src/api/workspace-service-api.ts +++ b/components/server/src/api/workspace-service-api.ts @@ -4,7 +4,7 @@ * See License.AGPL.txt in the project root for license information. */ -import { HandlerContext, ServiceImpl } from "@connectrpc/connect"; +import { Code, ConnectError, HandlerContext, ServiceImpl } from "@connectrpc/connect"; import { WorkspaceService as WorkspaceServiceInterface } from "@gitpod/public-api/lib/gitpod/v1/workspace_connect"; import { GetWorkspaceRequest, @@ -25,9 +25,12 @@ export class WorkspaceServiceAPI implements ServiceImpl { - const info = await this.workspaceService.getWorkspace(context.user.id, req.id); + if (!req.workspaceId) { + throw new ConnectError("workspaceId is required", Code.InvalidArgument); + } + const info = await this.workspaceService.getWorkspace(context.user.id, req.workspaceId); const response = new GetWorkspaceResponse(); - response.item = this.apiConverter.toWorkspace(info); + response.workspace = this.apiConverter.toWorkspace(info); return response; } diff --git a/components/server/src/container-module.ts b/components/server/src/container-module.ts index 230c5a35aa5c0d..973eca564ea07b 100644 --- a/components/server/src/container-module.ts +++ b/components/server/src/container-module.ts @@ -129,6 +129,7 @@ import { WorkspaceFactory } from "./workspace/workspace-factory"; import { WorkspaceService } from "./workspace/workspace-service"; import { WorkspaceStartController } from "./workspace/workspace-start-controller"; import { WorkspaceStarter } from "./workspace/workspace-starter"; +import { DefaultWorkspaceImageValidator } from "./orgs/default-workspace-image-validator"; export const productionContainerModule = new ContainerModule( (bind, unbind, isBound, rebind, unbindAsync, onActivation, onDeactivation) => { @@ -375,5 +376,13 @@ export const productionContainerModule = new ContainerModule( bind(RedisMutex).toSelf().inSingletonScope(); bind(RedisSubscriber).toSelf().inSingletonScope(); bind(RedisPublisher).toSelf().inSingletonScope(); + + bind(DefaultWorkspaceImageValidator).toDynamicValue((ctx) => + // lazy load to avoid circular dependency + async (userId: string, imageRef: string) => { + const user = await ctx.container.get(UserService).findUserById(userId, userId); + await ctx.container.get(WorkspaceService).validateImageRef({}, user, imageRef); + }, + ); }, ); diff --git a/components/server/src/orgs/default-workspace-image-validator.ts b/components/server/src/orgs/default-workspace-image-validator.ts new file mode 100644 index 00000000000000..fda29e97c9ce03 --- /dev/null +++ b/components/server/src/orgs/default-workspace-image-validator.ts @@ -0,0 +1,8 @@ +/** + * 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. + */ + +export type DefaultWorkspaceImageValidator = (userId: string, imageRef: string) => Promise; +export const DefaultWorkspaceImageValidator = Symbol("DefaultWorkspaceImageValidator"); diff --git a/components/server/src/orgs/organization-service.spec.db.ts b/components/server/src/orgs/organization-service.spec.db.ts index af58a99fd06093..14880878e08f13 100644 --- a/components/server/src/orgs/organization-service.spec.db.ts +++ b/components/server/src/orgs/organization-service.spec.db.ts @@ -5,7 +5,7 @@ */ import { BUILTIN_INSTLLATION_ADMIN_USER_ID, TypeORM } from "@gitpod/gitpod-db/lib"; -import { Organization, User } from "@gitpod/gitpod-protocol"; +import { Organization, OrganizationSettings, User } from "@gitpod/gitpod-protocol"; import { Experiments } from "@gitpod/gitpod-protocol/lib/experiments/configcat-server"; import { ErrorCodes } from "@gitpod/gitpod-protocol/lib/messaging/error"; import * as chai from "chai"; @@ -16,6 +16,7 @@ import { OrganizationService } from "./organization-service"; import { resetDB } from "@gitpod/gitpod-db/lib/test/reset-db"; import { expectError } from "../test/expect-utils"; import { UserService } from "../user/user-service"; +import { DefaultWorkspaceImageValidator } from "./default-workspace-image-validator"; const expect = chai.expect; @@ -28,12 +29,21 @@ describe("OrganizationService", async () => { let stranger: User; const adminId = BUILTIN_INSTLLATION_ADMIN_USER_ID; let org: Organization; + let validateDefaultWorkspaceImage: DefaultWorkspaceImageValidator | undefined; beforeEach(async () => { container = createTestContainer(); Experiments.configureTestingClient({ centralizedPermissions: true, }); + validateDefaultWorkspaceImage = undefined; + container + .rebind(DefaultWorkspaceImageValidator) + .toDynamicValue(() => async (userId, imageRef) => { + if (validateDefaultWorkspaceImage) { + await validateDefaultWorkspaceImage(userId, imageRef); + } + }); os = container.get(OrganizationService); const userService = container.get(UserService); owner = await userService.createUser({ @@ -232,4 +242,67 @@ describe("OrganizationService", async () => { expect(orgs.rows.some((org) => org.id === strangerOrg.id)).to.be.true; expect(orgs.total).to.eq(2); }); + + it("should manage settings", async () => { + const myOrg = await os.createOrganization(adminId, "My Org"); + const settings = await os.getSettings(adminId, myOrg.id); + expect(settings).to.deep.eq({}, "initial setttings"); + + const assertUpdateSettings = async ( + message: string, + update: Partial, + expected: OrganizationSettings, + ) => { + const updated = await os.updateSettings(adminId, myOrg.id, update); + expect(updated).to.deep.eq(expected, message + " (update)"); + const verified = await os.getSettings(adminId, myOrg.id); + expect(verified).to.deep.eq(expected, message + " (get)"); + }; + + await assertUpdateSettings( + "should disable workspace sharing", + { workspaceSharingDisabled: true }, + { + workspaceSharingDisabled: true, + }, + ); + await assertUpdateSettings( + "should update default workspace image", + { defaultWorkspaceImage: "ubuntu" }, + { + workspaceSharingDisabled: true, + defaultWorkspaceImage: "ubuntu", + }, + ); + + try { + await os.updateSettings(adminId, myOrg.id, { defaultWorkspaceImage: " " }); + expect.fail("should have failed"); + } catch (err) { + expect(err.message).to.equal( + "defaultWorkspaceImage cannot be blank", + "should validate blank default workspace image", + ); + } + + validateDefaultWorkspaceImage = () => { + throw new Error("invalid image"); + }; + try { + await os.updateSettings(adminId, myOrg.id, { defaultWorkspaceImage: "lalala" }); + expect.fail("should have failed"); + } catch (err) { + expect(err.message).to.equal("invalid image", "should validate default workspace image"); + } + + validateDefaultWorkspaceImage = undefined; + await assertUpdateSettings( + "should reset default workspace image", + { defaultWorkspaceImage: null }, + { + workspaceSharingDisabled: true, + }, + ); + await assertUpdateSettings("should enable workspace sharing", { workspaceSharingDisabled: false }, {}); + }); }); diff --git a/components/server/src/orgs/organization-service.ts b/components/server/src/orgs/organization-service.ts index 39f96c93981ed5..001adb3baeb850 100644 --- a/components/server/src/orgs/organization-service.ts +++ b/components/server/src/orgs/organization-service.ts @@ -19,6 +19,7 @@ import { inject, injectable } from "inversify"; import { Authorizer } from "../authorization/authorizer"; import { ProjectsService } from "../projects/projects-service"; import { TransactionalContext } from "@gitpod/gitpod-db/lib/typeorm/transactional-db-impl"; +import { DefaultWorkspaceImageValidator } from "./default-workspace-image-validator"; @injectable() export class OrganizationService { @@ -28,6 +29,8 @@ export class OrganizationService { @inject(ProjectsService) private readonly projectsService: ProjectsService, @inject(Authorizer) private readonly auth: Authorizer, @inject(IAnalyticsWriter) private readonly analytics: IAnalyticsWriter, + @inject(DefaultWorkspaceImageValidator) + private readonly validateDefaultWorkspaceImage: DefaultWorkspaceImageValidator, ) {} async listOrganizations( @@ -360,13 +363,35 @@ export class OrganizationService { async getSettings(userId: string, orgId: string): Promise { await this.auth.checkPermissionOnOrganization(userId, "read_settings", orgId); - const settings = (await this.teamDB.findOrgSettings(orgId)) || {}; - return settings; + const settings = await this.teamDB.findOrgSettings(orgId); + return this.toSettings(settings); } - async updateSettings(userId: string, orgId: string, settings: OrganizationSettings): Promise { + async updateSettings( + userId: string, + orgId: string, + settings: Partial, + ): Promise { await this.auth.checkPermissionOnOrganization(userId, "write_settings", orgId); - await this.teamDB.setOrgSettings(orgId, settings); - return settings; + if (typeof settings.defaultWorkspaceImage === "string") { + const defaultWorkspaceImage = settings.defaultWorkspaceImage.trim(); + if (!defaultWorkspaceImage.length) { + throw new ApplicationError(ErrorCodes.BAD_REQUEST, "defaultWorkspaceImage cannot be blank"); + } + await this.validateDefaultWorkspaceImage(userId, defaultWorkspaceImage); + settings = { ...settings, defaultWorkspaceImage }; + } + return this.toSettings(await this.teamDB.setOrgSettings(orgId, settings)); + } + + private toSettings(settings: OrganizationSettings = {}): OrganizationSettings { + const result: OrganizationSettings = {}; + if (settings.workspaceSharingDisabled) { + result.workspaceSharingDisabled = settings.workspaceSharingDisabled; + } + if (typeof settings.defaultWorkspaceImage === "string") { + result.defaultWorkspaceImage = settings.defaultWorkspaceImage; + } + return result; } } diff --git a/components/server/src/websocket/websocket-connection-manager.ts b/components/server/src/websocket/websocket-connection-manager.ts index 42d44106952c02..7d2e8d4af0e549 100644 --- a/components/server/src/websocket/websocket-connection-manager.ts +++ b/components/server/src/websocket/websocket-connection-manager.ts @@ -446,9 +446,6 @@ class GitpodJsonRpcProxyFactory extends JsonRpcProxyFactory observeAPICallsDuration(method, 200, timer()); return result; } catch (e) { - // TODO(ak) this guard does not look correct - // it checks for a presence of `code`, but other errors also may have code, like all Node.js errors: https://nodejs.org/api/errors.html#errorcode - // instanceof ApplicationError should be more appropriate here if (ApplicationError.hasErrorCode(e)) { increaseApiCallCounter(method, e.code); observeAPICallsDuration(method, e.code, timer()); diff --git a/components/server/src/workspace/gitpod-server-impl.ts b/components/server/src/workspace/gitpod-server-impl.ts index 2bffb0cac6361d..363f1808c6a667 100644 --- a/components/server/src/workspace/gitpod-server-impl.ts +++ b/components/server/src/workspace/gitpod-server-impl.ts @@ -2358,10 +2358,15 @@ export class GitpodServerImpl implements GitpodServerWithTracing, Disposable { const user = await this.checkAndBlockUser("updateOrgSettings"); traceAPIParams(ctx, { orgId, userId: user.id }); await this.guardTeamOperation(orgId, "update"); - if (settings.defaultWorkspaceImage?.trim()) { - await this.workspaceService.resolveBaseImage(ctx, user, settings.defaultWorkspaceImage); - } - return this.organizationService.updateSettings(user.id, orgId, settings); + // backward compatiblity to old dashboard + const update = { ...settings }; + const defaultWorkspaceImage = settings.defaultWorkspaceImage?.trim(); + if (defaultWorkspaceImage) { + update.defaultWorkspaceImage = defaultWorkspaceImage; + } else if (defaultWorkspaceImage === "") { + update.defaultWorkspaceImage = null; + } + return this.organizationService.updateSettings(user.id, orgId, update); } async getDefaultWorkspaceImage( diff --git a/components/server/src/workspace/workspace-service.ts b/components/server/src/workspace/workspace-service.ts index 76d7f3ffe5d458..f870302c861b68 100644 --- a/components/server/src/workspace/workspace-service.ts +++ b/components/server/src/workspace/workspace-service.ts @@ -6,6 +6,7 @@ import { inject, injectable } from "inversify"; import * as grpc from "@grpc/grpc-js"; +import * as niceGrpc from "nice-grpc-common"; import { RedisPublisher, WorkspaceDB } from "@gitpod/gitpod-db/lib"; import { GetWorkspaceTimeoutResult, @@ -924,13 +925,21 @@ export class WorkspaceService { }); } - public async resolveBaseImage(ctx: TraceContext, user: User, imageRef: string) { + public async validateImageRef(ctx: TraceContext, user: User, imageRef: string) { try { return await this.workspaceStarter.resolveBaseImage(ctx, user, imageRef); } catch (e) { - // we could map proper response message according to e.code - // see https://github.com/gitpod-io/gitpod/blob/ef95e6f3ca0bf314c40da1b83251423c2208d175/components/image-builder-mk3/pkg/orchestrator/orchestrator_test.go#L178 - throw ApplicationError.fromGRPCError(e); + // see https://github.com/gitpod-io/gitpod/blob/f3e41f8d86234e4101edff2199c54f50f8cbb656/components/image-builder-mk3/pkg/orchestrator/orchestrator.go#L561 + if ( + e instanceof niceGrpc.ServerError && + // TODO(ak) indeally we won't check here a message, but then it will be internal error + // and it looks weird to show a valid user error about invalid image ref + // as an internal error + (e.code === grpc.status.INVALID_ARGUMENT || e.message.startsWith("cannot resolve image")) + ) { + throw new ApplicationError(ErrorCodes.BAD_REQUEST, e.message); + } + throw e; } } }