Skip to content

Commit b2faa03

Browse files
committed
try to use the google protobuf field mask
Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
1 parent 63c2cee commit b2faa03

File tree

9 files changed

+378
-17247
lines changed

9 files changed

+378
-17247
lines changed

cs3/sharing/collaboration/v1beta1/collaboration_api.proto

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import "cs3/rpc/v1beta1/status.proto";
3232
import "cs3/sharing/collaboration/v1beta1/resources.proto";
3333
import "cs3/storage/provider/v1beta1/resources.proto";
3434
import "cs3/types/v1beta1/types.proto";
35+
import "google/protobuf/field_mask.proto";
3536

3637
// User Share Provider API
3738
//
@@ -225,19 +226,11 @@ message UpdateReceivedShareRequest {
225226
// Opaque information.
226227
cs3.types.v1beta1.Opaque opaque = 1;
227228
// REQUIRED.
228-
ShareReference ref = 2;
229-
// REQUIRED.
230-
// The field to update.
231-
message UpdateField {
232-
// One of the update fields MUST be specified.
233-
oneof field {
234-
// Update the display name.
235-
string display_name = 1;
236-
// Update the share state
237-
ShareState state = 2;
238-
}
239-
}
240-
UpdateField field = 3;
229+
// The share to update.
230+
Share share = 2;
231+
// The update mask applies to the resource. For the `FieldMask` definition,
232+
// see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
233+
google.protobuf.FieldMask update_mask = 3;
241234
}
242235

243236
message UpdateReceivedShareResponse {

cs3/sharing/collaboration/v1beta1/resources.proto

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,17 @@ message SharePermissions {
7979
// A received share is the share that a grantee will receive.
8080
// It expands the original share by adding state to the share,
8181
// a display name from the perspective of the grantee and a
82-
// resource mount path in case the share will be mounted
83-
// in a path in a storage provider.
82+
// resource mount point in case the share will be mounted
83+
// in a storage provider.
8484
message ReceivedShare {
8585
// REQUIRED.
8686
Share share = 1;
8787
// REQUIRED.
8888
// The state of the share.
8989
ShareState state = 2;
90+
// REQUIRED.
91+
// The mount point of the share.
92+
storage.provider.v1beta1.Reference mount_point = 3;
9093
}
9194

9295
// The state of the share.

cs3/sharing/ocm/v1beta1/ocm_api.proto

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import "cs3/rpc/v1beta1/status.proto";
3434
import "cs3/sharing/ocm/v1beta1/resources.proto";
3535
import "cs3/storage/provider/v1beta1/resources.proto";
3636
import "cs3/types/v1beta1/types.proto";
37+
import "google/protobuf/field_mask.proto";
3738

3839
// OCM Share Provider API
3940
//
@@ -245,18 +246,11 @@ message UpdateReceivedOCMShareRequest {
245246
// Opaque information.
246247
cs3.types.v1beta1.Opaque opaque = 1;
247248
// REQUIRED.
248-
ShareReference ref = 2;
249-
// REQUIRED.
250-
message UpdateField {
251-
// One of the update fields MUST be specified.
252-
oneof field {
253-
// Update the display name.
254-
string display_name = 1;
255-
// Update the share state
256-
ShareState state = 2;
257-
}
258-
}
259-
UpdateField field = 3;
249+
// The share to update.
250+
Share share = 2;
251+
// The update mask applies to the resource. For the `FieldMask` definition,
252+
// see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
253+
google.protobuf.FieldMask update_mask = 3;
260254
}
261255

262256
message UpdateReceivedOCMShareResponse {

cs3/sharing/ocm/v1beta1/resources.proto

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,17 @@ message SharePermissions {
9191
// A received share is the share that a grantee will receive.
9292
// It expands the original share by adding state to the share,
9393
// a display name from the perspective of the grantee and a
94-
// resource mount path in case the share will be mounted
95-
// in a path in a storage provider.
94+
// resource mount point in case the share will be mounted
95+
// in a storage provider.
9696
message ReceivedShare {
9797
// REQUIRED.
9898
Share share = 1;
9999
// REQUIRED.
100100
// The state of the share.
101101
ShareState state = 2;
102+
// REQUIRED.
103+
// The mount point of the share.
104+
storage.provider.v1beta1.Reference mount_point = 3;
102105
}
103106

104107
// The state of the share.

0 commit comments

Comments
 (0)