Skip to content

Commit 27a002d

Browse files
committed
[public-api] only allow optional in update
1 parent 9f692bb commit 27a002d

File tree

7 files changed

+494
-467
lines changed

7 files changed

+494
-467
lines changed

components/public-api/buf.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ breaking:
55
ignore:
66
# Do not enforce breaking change detection for the experimental package
77
- gitpod/experimental
8+
- gitpod/v1
89
lint:
910
use:
1011
- DEFAULT

components/public-api/gitpod/v1/organization.proto

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ syntax = "proto3";
22

33
package gitpod.v1;
44

5+
import "google/protobuf/field_mask.proto";
56
import "google/protobuf/timestamp.proto";
67
import "gitpod/v1/pagination.proto";
78

@@ -18,9 +19,9 @@ message OrganizationMember {
1819
string user_id = 1;
1920
OrganizationRole role = 2;
2021
google.protobuf.Timestamp member_since = 3;
21-
optional string avatar_url = 4;
22-
optional string full_name = 5;
23-
optional string email = 6;
22+
string avatar_url = 4;
23+
string full_name = 5;
24+
string email = 6;
2425
bool owned_by_organization = 7;
2526
}
2627

@@ -32,7 +33,7 @@ enum OrganizationRole {
3233

3334
message OrganizationSettings {
3435
bool workspace_sharing_disabled = 1;
35-
optional string default_workspace_image = 2;
36+
string default_workspace_image = 2;
3637
}
3738

3839
service OrganizationService {
@@ -107,8 +108,11 @@ message UpdateOrganizationSettingsRequest {
107108
// organization_id is the ID of the organization to update the settings for.
108109
string organization_id = 1;
109110

110-
// settings are the settings to update
111-
OrganizationSettings settings = 2;
111+
google.protobuf.FieldMask reset_mask = 2;
112+
113+
optional bool workspace_sharing_disabled = 3;
114+
115+
optional string default_workspace_image = 4;
112116
}
113117

114118
message UpdateOrganizationSettingsResponse {

components/public-api/gitpod/v1/workspace.proto

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,21 +43,21 @@ message Workspace {
4343
// Obtain available regions using the ListRegions operation.
4444
//
4545
// +optional defaults to the user's default region
46-
optional string region = 8;
46+
string region = 8;
4747

4848
// workspace_class specifies the workspace class with which to create the
4949
// workspace. Obtain available workspace classes using the ListWorkspaceClass
5050
// operation.
5151
//
5252
// +optional defaults to the class configured on the project or the cluster's
5353
// default class.
54-
optional string workspace_class = 9;
54+
string workspace_class = 9;
5555

5656
// editor specifies the editor that will be used with this workspace.
5757
// Obtain available editors using the EditorService.ListEditors operation.
5858
//
5959
// +optional defaults to the default editor of the user
60-
optional EditorReference editor = 10;
60+
EditorReference editor = 10;
6161

6262
// context_url is the normalized URL from which the workspace was created
6363
// TODO(ak) replace with resolveContextURL API
@@ -66,7 +66,7 @@ message Workspace {
6666
// Prebuild ID is the unique identifier of the prebuild
6767
// from which this workspace was created
6868
// +optional if empty then this workspace was not created from a prebuild
69-
optional string prebuild_id = 12;
69+
string prebuild_id = 12;
7070
}
7171

7272
message WorkspaceStatus {
@@ -77,7 +77,7 @@ message WorkspaceStatus {
7777
WorkspacePhase phase = 1;
7878

7979
// message is an optional human-readable message detailing the current phase
80-
optional string message = 2;
80+
string message = 2;
8181

8282
// workspace_url is the URL of the workspace. Only present when the phase is
8383
// running.
@@ -104,11 +104,11 @@ message WorkspaceStatus {
104104
message WorkspaceConditions {
105105
// failed contains technical details for the failure of the workspace.
106106
// +optional If this field is empty, the workspace has not failed.
107-
optional string failed = 1;
107+
string failed = 1;
108108

109109
// timeout contains the reason the workspace has timed out.
110110
// +optional If this field is empty, the workspace has not timed out.
111-
optional string timeout = 2;
111+
string timeout = 2;
112112
}
113113

114114
// Admission level describes who can access a workspace instance and its ports.
@@ -256,5 +256,5 @@ message EditorReference {
256256

257257
message WorkspaceEnvironmentVariable {
258258
string name = 1;
259-
optional string value = 2;
259+
string value = 2;
260260
}

0 commit comments

Comments
 (0)