Skip to content

Commit

Permalink
fix!: rename committed_size to persisted_size
Browse files Browse the repository at this point in the history
fix!: replace string key_sha256 with bytes key_sha256_bytes
fix: deprecate zone_affinity field
fix: add INHERITED to PublicAccessPrevention enum

PiperOrigin-RevId: 402986756
  • Loading branch information
Google APIs authored and Copybara-Service committed Oct 14, 2021
1 parent 4a5dad7 commit 877d3d9
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions google/storage/v2/storage.proto
Expand Up @@ -66,7 +66,7 @@ service Storage {
// each following call to `Create`. If there is an error or the connection is
// broken during the resumable `Create()`, the client should check the status
// of the `Create()` by calling `QueryWriteStatus()` and continue writing from
// the returned `committed_size`. This may be less than the amount of data the
// the returned `persisted_size`. This may be less than the amount of data the
// client previously sent.
//
// The service will not view the object as complete until the client has
Expand All @@ -84,7 +84,7 @@ service Storage {
rpc StartResumableWrite(StartResumableWriteRequest) returns (StartResumableWriteResponse) {
}

// Determines the `committed_size` for an object that is being written, which
// Determines the `persisted_size` for an object that is being written, which
// can then be used as the `write_offset` for the next `Write()` call.
//
// If the object does not exist (i.e., the object has been deleted, or the
Expand All @@ -95,7 +95,7 @@ service Storage {
// much data has been processed for this object. This is useful if the
// client is buffering data and needs to know which data can be safely
// evicted. For any sequence of `QueryWriteStatus()` calls for a given
// object name, the sequence of returned `committed_size` values will be
// object name, the sequence of returned `persisted_size` values will be
// non-decreasing.
rpc QueryWriteStatus(QueryWriteStatusRequest) returns (QueryWriteStatusResponse) {
option (google.api.method_signature) = "upload_id";
Expand Down Expand Up @@ -236,7 +236,7 @@ message WriteObjectRequest {
//
// In the first `WriteObjectRequest` of a `WriteObject()` action, it
// indicates the initial offset for the `Write()` call. The value **must** be
// equal to the `committed_size` that a call to `QueryWriteStatus()` would
// equal to the `persisted_size` that a call to `QueryWriteStatus()` would
// return (0 if this is the first write to the object).
//
// On subsequent calls, this value **must** be no larger than the sum of the
Expand Down Expand Up @@ -280,7 +280,7 @@ message WriteObjectResponse {
oneof write_status {
// The total number of bytes that have been processed for the given object
// from all `WriteObject` calls. Only set if the upload has not finalized.
int64 committed_size = 1;
int64 persisted_size = 1;

// A resource containing the metadata for the uploaded object. Only set if
// the upload has finalized.
Expand Down Expand Up @@ -309,7 +309,7 @@ message QueryWriteStatusResponse {
// from all `WriteObject` calls. This is the correct value for the
// 'write_offset' field to use when resuming the `WriteObject` operation.
// Only set if the upload has not finalized.
int64 committed_size = 1;
int64 persisted_size = 1;

// A resource containing the metadata for the uploaded object. Only set if
// the upload has finalized.
Expand Down Expand Up @@ -512,15 +512,17 @@ message Bucket {

// Public Access Prevention config values.
enum PublicAccessPrevention {
// Does not prevent access from being granted to public members 'allUsers'
// or 'allAuthenticatedUsers'. This setting may be enforced by Org Policy
// at the project/folder/organization level.
// No specified PublicAccessPrevention.
PUBLIC_ACCESS_PREVENTION_UNSPECIFIED = 0;

// Prevents access from being granted to public members 'allUsers' and
// 'allAuthenticatedUsers'. Prevents attempts to grant new access to
// public members.
ENFORCED = 1;

// This setting is inherited from Org Policy. Does not prevent access from
// being granted to public members 'allUsers' or 'allAuthenticatedUsers'.
INHERITED = 2;
}

// Bucket restriction options currently enforced on the bucket.
Expand Down Expand Up @@ -796,7 +798,10 @@ message Bucket {
// but won't be able to use zonal quota. The values are case-insensitive.
// Attempting to update this field after bucket is created will result in an
// error.
repeated string zone_affinity = 24 [(google.api.field_behavior) = IMMUTABLE];
repeated string zone_affinity = 24 [
deprecated = true,
(google.api.field_behavior) = IMMUTABLE
];

// Reserved for future use.
bool satisfies_pzs = 25;
Expand Down Expand Up @@ -876,7 +881,8 @@ message Object {
string encryption_algorithm = 1;

// SHA256 hash value of the encryption key.
string key_sha256 = 2;
// In raw bytes format (not base64-encoded).
bytes key_sha256_bytes = 3;
}

// Immutable. The name of this object. Nearly any sequence of unicode characters is
Expand Down

0 comments on commit 877d3d9

Please sign in to comment.