Skip to content

Commit

Permalink
[public-api] only allow optional in update
Browse files Browse the repository at this point in the history
  • Loading branch information
akosyakov committed Nov 8, 2023
1 parent 9f692bb commit 27a002d
Show file tree
Hide file tree
Showing 7 changed files with 494 additions and 467 deletions.
1 change: 1 addition & 0 deletions components/public-api/buf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ breaking:
ignore:
# Do not enforce breaking change detection for the experimental package
- gitpod/experimental
- gitpod/v1
lint:
use:
- DEFAULT
Expand Down
16 changes: 10 additions & 6 deletions components/public-api/gitpod/v1/organization.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand All @@ -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;
}

Expand All @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down
16 changes: 8 additions & 8 deletions components/public-api/gitpod/v1/workspace.proto
Original file line number Diff line number Diff line change
Expand Up @@ -43,21 +43,21 @@ 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
// operation.
//
// +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
Expand All @@ -66,7 +66,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 {
Expand All @@ -77,7 +77,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.
Expand All @@ -104,11 +104,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.
Expand Down Expand Up @@ -256,5 +256,5 @@ message EditorReference {

message WorkspaceEnvironmentVariable {
string name = 1;
optional string value = 2;
string value = 2;
}
Loading

0 comments on commit 27a002d

Please sign in to comment.