Skip to content

Commit af4e727

Browse files
committed
use the google protobuf field mask
Signed-off-by: Jörn Friedrich Dreyer <[email protected]> use received share Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
1 parent 5e29c7c commit af4e727

File tree

9 files changed

+412
-156
lines changed

9 files changed

+412
-156
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 received share to update.
230+
ReceivedShare 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 received share to update.
250+
ReceivedShare 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.

docs/index.html

Lines changed: 34 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1168,10 +1168,6 @@ <h2>Table of Contents</h2>
11681168
<a href="#cs3.sharing.collaboration.v1beta1.UpdateReceivedShareRequest"><span class="badge">M</span>UpdateReceivedShareRequest</a>
11691169
</li>
11701170

1171-
<li>
1172-
<a href="#cs3.sharing.collaboration.v1beta1.UpdateReceivedShareRequest.UpdateField"><span class="badge">M</span>UpdateReceivedShareRequest.UpdateField</a>
1173-
</li>
1174-
11751171
<li>
11761172
<a href="#cs3.sharing.collaboration.v1beta1.UpdateReceivedShareResponse"><span class="badge">M</span>UpdateReceivedShareResponse</a>
11771173
</li>
@@ -1440,10 +1436,6 @@ <h2>Table of Contents</h2>
14401436
<a href="#cs3.sharing.ocm.v1beta1.UpdateReceivedOCMShareRequest"><span class="badge">M</span>UpdateReceivedOCMShareRequest</a>
14411437
</li>
14421438

1443-
<li>
1444-
<a href="#cs3.sharing.ocm.v1beta1.UpdateReceivedOCMShareRequest.UpdateField"><span class="badge">M</span>UpdateReceivedOCMShareRequest.UpdateField</a>
1445-
</li>
1446-
14471439
<li>
14481440
<a href="#cs3.sharing.ocm.v1beta1.UpdateReceivedOCMShareResponse"><span class="badge">M</span>UpdateReceivedOCMShareResponse</a>
14491441
</li>
@@ -9833,48 +9825,19 @@ <h3 id="cs3.sharing.collaboration.v1beta1.UpdateReceivedShareRequest">UpdateRece
98339825
</tr>
98349826

98359827
<tr>
9836-
<td>ref</td>
9837-
<td><a href="#cs3.sharing.collaboration.v1beta1.ShareReference">ShareReference</a></td>
9838-
<td></td>
9839-
<td><p>REQUIRED. </p></td>
9840-
</tr>
9841-
9842-
<tr>
9843-
<td>field</td>
9844-
<td><a href="#cs3.sharing.collaboration.v1beta1.UpdateReceivedShareRequest.UpdateField">UpdateReceivedShareRequest.UpdateField</a></td>
9845-
<td></td>
9846-
<td><p> </p></td>
9847-
</tr>
9848-
9849-
</tbody>
9850-
</table>
9851-
9852-
9853-
9854-
9855-
9856-
<h3 id="cs3.sharing.collaboration.v1beta1.UpdateReceivedShareRequest.UpdateField">UpdateReceivedShareRequest.UpdateField</h3>
9857-
<p>REQUIRED.</p><p>The field to update.</p>
9858-
9859-
9860-
<table class="field-table">
9861-
<thead>
9862-
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
9863-
</thead>
9864-
<tbody>
9865-
9866-
<tr>
9867-
<td>display_name</td>
9868-
<td><a href="#string">string</a></td>
9828+
<td>share</td>
9829+
<td><a href="#cs3.sharing.collaboration.v1beta1.ReceivedShare">ReceivedShare</a></td>
98699830
<td></td>
9870-
<td><p>Update the display name. </p></td>
9831+
<td><p>REQUIRED.
9832+
The received share to update. </p></td>
98719833
</tr>
98729834

98739835
<tr>
9874-
<td>state</td>
9875-
<td><a href="#cs3.sharing.collaboration.v1beta1.ShareState">ShareState</a></td>
9836+
<td>update_mask</td>
9837+
<td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
98769838
<td></td>
9877-
<td><p>Update the share state </p></td>
9839+
<td><p>The update mask applies to the resource. For the `FieldMask` definition,
9840+
see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask </p></td>
98789841
</tr>
98799842

98809843
</tbody>
@@ -10184,7 +10147,7 @@ <h3 id="cs3.sharing.collaboration.v1beta1.Filter">Filter</h3>
1018410147

1018510148

1018610149
<h3 id="cs3.sharing.collaboration.v1beta1.ReceivedShare">ReceivedShare</h3>
10187-
<p>A received share is the share that a grantee will receive.</p><p>It expands the original share by adding state to the share,</p><p>a display name from the perspective of the grantee and a</p><p>resource mount path in case the share will be mounted</p><p>in a path in a storage provider.</p>
10150+
<p>A received share is the share that a grantee will receive.</p><p>It expands the original share by adding state to the share,</p><p>a display name from the perspective of the grantee and a</p><p>resource mount point in case the share will be mounted</p><p>in a storage provider.</p>
1018810151

1018910152

1019010153
<table class="field-table">
@@ -10208,6 +10171,14 @@ <h3 id="cs3.sharing.collaboration.v1beta1.ReceivedShare">ReceivedShare</h3>
1020810171
The state of the share. </p></td>
1020910172
</tr>
1021010173

10174+
<tr>
10175+
<td>mount_point</td>
10176+
<td><a href="#cs3.storage.provider.v1beta1.Reference">cs3.storage.provider.v1beta1.Reference</a></td>
10177+
<td></td>
10178+
<td><p>REQUIRED.
10179+
The mount point of the share. </p></td>
10180+
</tr>
10181+
1021110182
</tbody>
1021210183
</table>
1021310184

@@ -12260,48 +12231,19 @@ <h3 id="cs3.sharing.ocm.v1beta1.UpdateReceivedOCMShareRequest">UpdateReceivedOCM
1226012231
</tr>
1226112232

1226212233
<tr>
12263-
<td>ref</td>
12264-
<td><a href="#cs3.sharing.ocm.v1beta1.ShareReference">ShareReference</a></td>
12265-
<td></td>
12266-
<td><p>REQUIRED. </p></td>
12267-
</tr>
12268-
12269-
<tr>
12270-
<td>field</td>
12271-
<td><a href="#cs3.sharing.ocm.v1beta1.UpdateReceivedOCMShareRequest.UpdateField">UpdateReceivedOCMShareRequest.UpdateField</a></td>
12272-
<td></td>
12273-
<td><p> </p></td>
12274-
</tr>
12275-
12276-
</tbody>
12277-
</table>
12278-
12279-
12280-
12281-
12282-
12283-
<h3 id="cs3.sharing.ocm.v1beta1.UpdateReceivedOCMShareRequest.UpdateField">UpdateReceivedOCMShareRequest.UpdateField</h3>
12284-
<p>REQUIRED.</p>
12285-
12286-
12287-
<table class="field-table">
12288-
<thead>
12289-
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
12290-
</thead>
12291-
<tbody>
12292-
12293-
<tr>
12294-
<td>display_name</td>
12295-
<td><a href="#string">string</a></td>
12234+
<td>share</td>
12235+
<td><a href="#cs3.sharing.ocm.v1beta1.ReceivedShare">ReceivedShare</a></td>
1229612236
<td></td>
12297-
<td><p>Update the display name. </p></td>
12237+
<td><p>REQUIRED.
12238+
The received share to update. </p></td>
1229812239
</tr>
1229912240

1230012241
<tr>
12301-
<td>state</td>
12302-
<td><a href="#cs3.sharing.ocm.v1beta1.ShareState">ShareState</a></td>
12242+
<td>update_mask</td>
12243+
<td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>
1230312244
<td></td>
12304-
<td><p>Update the share state </p></td>
12245+
<td><p>The update mask applies to the resource. For the `FieldMask` definition,
12246+
see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask </p></td>
1230512247
</tr>
1230612248

1230712249
</tbody>
@@ -12491,7 +12433,7 @@ <h2 id="cs3/sharing/ocm/v1beta1/resources.proto">cs3/sharing/ocm/v1beta1/resourc
1249112433

1249212434

1249312435
<h3 id="cs3.sharing.ocm.v1beta1.ReceivedShare">ReceivedShare</h3>
12494-
<p>A received share is the share that a grantee will receive.</p><p>It expands the original share by adding state to the share,</p><p>a display name from the perspective of the grantee and a</p><p>resource mount path in case the share will be mounted</p><p>in a path in a storage provider.</p>
12436+
<p>A received share is the share that a grantee will receive.</p><p>It expands the original share by adding state to the share,</p><p>a display name from the perspective of the grantee and a</p><p>resource mount point in case the share will be mounted</p><p>in a storage provider.</p>
1249512437

1249612438

1249712439
<table class="field-table">
@@ -12515,6 +12457,14 @@ <h3 id="cs3.sharing.ocm.v1beta1.ReceivedShare">ReceivedShare</h3>
1251512457
The state of the share. </p></td>
1251612458
</tr>
1251712459

12460+
<tr>
12461+
<td>mount_point</td>
12462+
<td><a href="#cs3.storage.provider.v1beta1.Reference">cs3.storage.provider.v1beta1.Reference</a></td>
12463+
<td></td>
12464+
<td><p>REQUIRED.
12465+
The mount point of the share. </p></td>
12466+
</tr>
12467+
1251812468
</tbody>
1251912469
</table>
1252012470

0 commit comments

Comments
 (0)