diff --git a/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageClient.java b/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageClient.java index 78b7fd7e0..41da80132 100644 --- a/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageClient.java +++ b/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageClient.java @@ -190,7 +190,7 @@ public final ServerStreamingCallable read * that method an `WriteObjectSpec.` They should then attach the returned `upload_id` to the first * message of 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 + * calling `QueryWriteStatus()` and continue writing from 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 sent a @@ -294,7 +294,7 @@ public final StartResumableWriteResponse startResumableWrite(StartResumableWrite // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Determines the `committed_size` for an object that is being written, which can then be used as + * 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 first `Write()` has @@ -303,7 +303,7 @@ public final StartResumableWriteResponse startResumableWrite(StartResumableWrite *

The client **may** call `QueryWriteStatus()` at any time to determine how * 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 + * calls for a given object name, the sequence of returned `persisted_size` values will be * non-decreasing. * *

Sample code: @@ -327,7 +327,7 @@ public final QueryWriteStatusResponse queryWriteStatus(String uploadId) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Determines the `committed_size` for an object that is being written, which can then be used as + * 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 first `Write()` has @@ -336,7 +336,7 @@ public final QueryWriteStatusResponse queryWriteStatus(String uploadId) { *

The client **may** call `QueryWriteStatus()` at any time to determine how * 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 + * calls for a given object name, the sequence of returned `persisted_size` values will be * non-decreasing. * *

Sample code: @@ -362,7 +362,7 @@ public final QueryWriteStatusResponse queryWriteStatus(QueryWriteStatusRequest r // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Determines the `committed_size` for an object that is being written, which can then be used as + * 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 first `Write()` has @@ -371,7 +371,7 @@ public final QueryWriteStatusResponse queryWriteStatus(QueryWriteStatusRequest r *

The client **may** call `QueryWriteStatus()` at any time to determine how * 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 + * calls for a given object name, the sequence of returned `persisted_size` values will be * non-decreasing. * *

Sample code: diff --git a/grpc-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageGrpc.java b/grpc-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageGrpc.java index c0add7579..0875e1a65 100644 --- a/grpc-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageGrpc.java +++ b/grpc-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageGrpc.java @@ -287,7 +287,7 @@ public void readObject( * 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 * sent a `WriteObjectRequest` with `finish_write` set to `true`. Sending any @@ -324,7 +324,7 @@ public void startResumableWrite( * * *

-     * 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
      * first `Write()` has not yet reached the service), this method returns the
@@ -333,7 +333,7 @@ public void startResumableWrite(
      * 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.
      * 
*/ @@ -426,7 +426,7 @@ public void readObject( * 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 * sent a `WriteObjectRequest` with `finish_write` set to `true`. Sending any @@ -465,7 +465,7 @@ public void startResumableWrite( * * *
-     * 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
      * first `Write()` has not yet reached the service), this method returns the
@@ -474,7 +474,7 @@ public void startResumableWrite(
      * 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.
      * 
*/ @@ -539,7 +539,7 @@ public com.google.storage.v2.StartResumableWriteResponse startResumableWrite( * * *
-     * 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
      * first `Write()` has not yet reached the service), this method returns the
@@ -548,7 +548,7 @@ public com.google.storage.v2.StartResumableWriteResponse startResumableWrite(
      * 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.
      * 
*/ @@ -597,7 +597,7 @@ protected StorageFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions c * * *
-     * 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
      * first `Write()` has not yet reached the service), this method returns the
@@ -606,7 +606,7 @@ protected StorageFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions c
      * 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.
      * 
*/ diff --git a/proto-google-cloud-storage-v2/clirr-ignored-differences.xml b/proto-google-cloud-storage-v2/clirr-ignored-differences.xml new file mode 100644 index 000000000..7aa1b87fd --- /dev/null +++ b/proto-google-cloud-storage-v2/clirr-ignored-differences.xml @@ -0,0 +1,56 @@ + + + + + + + + 6001 + com/google/storage/v2/* + COMMITTED_SIZE + + + 6011 + com/google/storage/v2/* + COMMITTED_SIZE_FIELD_NUMBER + + + 7002 + com/google/storage/v2/* + * *CommittedSize(*) + + + + 7012 + com/google/storage/v2/* + * *PersistedSize(*) + + + + + + + + 6011 + com/google/storage/v2/Object$CustomerEncryption* + KEY_SHA256_FIELD_NUMBER + + + 7002 + com/google/storage/v2/Object$CustomerEncryption* + * *KeySha256(*) + + + + 7012 + com/google/storage/v2/Object$CustomerEncryption* + * *KeySha256Bytes(*) + + diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/Bucket.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/Bucket.java index ebe211fd8..39842b0a0 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/Bucket.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/Bucket.java @@ -3475,9 +3475,7 @@ public enum PublicAccessPrevention implements com.google.protobuf.ProtocolMessag * * *
-       * 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; @@ -3495,6 +3493,17 @@ public enum PublicAccessPrevention implements com.google.protobuf.ProtocolMessag * ENFORCED = 1; */ ENFORCED(1), + /** + * + * + *
+       * This setting is inherited from Org Policy. Does not prevent access from
+       * being granted to public members 'allUsers' or 'allAuthenticatedUsers'.
+       * 
+ * + * INHERITED = 2; + */ + INHERITED(2), UNRECOGNIZED(-1), ; @@ -3502,9 +3511,7 @@ public enum PublicAccessPrevention implements com.google.protobuf.ProtocolMessag * * *
-       * 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; @@ -3522,6 +3529,17 @@ public enum PublicAccessPrevention implements com.google.protobuf.ProtocolMessag * ENFORCED = 1; */ public static final int ENFORCED_VALUE = 1; + /** + * + * + *
+       * This setting is inherited from Org Policy. Does not prevent access from
+       * being granted to public members 'allUsers' or 'allAuthenticatedUsers'.
+       * 
+ * + * INHERITED = 2; + */ + public static final int INHERITED_VALUE = 2; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -3551,6 +3569,8 @@ public static PublicAccessPrevention forNumber(int value) { return PUBLIC_ACCESS_PREVENTION_UNSPECIFIED; case 1: return ENFORCED; + case 2: + return INHERITED; default: return null; } @@ -15664,10 +15684,13 @@ public com.google.storage.v2.Bucket.IamConfigOrBuilder getIamConfigOrBuilder() { * error. * * - * repeated string zone_affinity = 24 [(.google.api.field_behavior) = IMMUTABLE]; + * + * repeated string zone_affinity = 24 [deprecated = true, (.google.api.field_behavior) = IMMUTABLE]; + * * * @return A list containing the zoneAffinity. */ + @java.lang.Deprecated public com.google.protobuf.ProtocolStringList getZoneAffinityList() { return zoneAffinity_; } @@ -15682,10 +15705,13 @@ public com.google.protobuf.ProtocolStringList getZoneAffinityList() { * error. * * - * repeated string zone_affinity = 24 [(.google.api.field_behavior) = IMMUTABLE]; + * + * repeated string zone_affinity = 24 [deprecated = true, (.google.api.field_behavior) = IMMUTABLE]; + * * * @return The count of zoneAffinity. */ + @java.lang.Deprecated public int getZoneAffinityCount() { return zoneAffinity_.size(); } @@ -15700,11 +15726,14 @@ public int getZoneAffinityCount() { * error. * * - * repeated string zone_affinity = 24 [(.google.api.field_behavior) = IMMUTABLE]; + * + * repeated string zone_affinity = 24 [deprecated = true, (.google.api.field_behavior) = IMMUTABLE]; + * * * @param index The index of the element to return. * @return The zoneAffinity at the given index. */ + @java.lang.Deprecated public java.lang.String getZoneAffinity(int index) { return zoneAffinity_.get(index); } @@ -15719,11 +15748,14 @@ public java.lang.String getZoneAffinity(int index) { * error. * * - * repeated string zone_affinity = 24 [(.google.api.field_behavior) = IMMUTABLE]; + * + * repeated string zone_affinity = 24 [deprecated = true, (.google.api.field_behavior) = IMMUTABLE]; + * * * @param index The index of the value to return. * @return The bytes of the zoneAffinity at the given index. */ + @java.lang.Deprecated public com.google.protobuf.ByteString getZoneAffinityBytes(int index) { return zoneAffinity_.getByteString(index); } @@ -21168,10 +21200,13 @@ private void ensureZoneAffinityIsMutable() { * error. * * - * repeated string zone_affinity = 24 [(.google.api.field_behavior) = IMMUTABLE]; + * + * repeated string zone_affinity = 24 [deprecated = true, (.google.api.field_behavior) = IMMUTABLE]; + * * * @return A list containing the zoneAffinity. */ + @java.lang.Deprecated public com.google.protobuf.ProtocolStringList getZoneAffinityList() { return zoneAffinity_.getUnmodifiableView(); } @@ -21186,10 +21221,13 @@ public com.google.protobuf.ProtocolStringList getZoneAffinityList() { * error. * * - * repeated string zone_affinity = 24 [(.google.api.field_behavior) = IMMUTABLE]; + * + * repeated string zone_affinity = 24 [deprecated = true, (.google.api.field_behavior) = IMMUTABLE]; + * * * @return The count of zoneAffinity. */ + @java.lang.Deprecated public int getZoneAffinityCount() { return zoneAffinity_.size(); } @@ -21204,11 +21242,14 @@ public int getZoneAffinityCount() { * error. * * - * repeated string zone_affinity = 24 [(.google.api.field_behavior) = IMMUTABLE]; + * + * repeated string zone_affinity = 24 [deprecated = true, (.google.api.field_behavior) = IMMUTABLE]; + * * * @param index The index of the element to return. * @return The zoneAffinity at the given index. */ + @java.lang.Deprecated public java.lang.String getZoneAffinity(int index) { return zoneAffinity_.get(index); } @@ -21223,11 +21264,14 @@ public java.lang.String getZoneAffinity(int index) { * error. * * - * repeated string zone_affinity = 24 [(.google.api.field_behavior) = IMMUTABLE]; + * + * repeated string zone_affinity = 24 [deprecated = true, (.google.api.field_behavior) = IMMUTABLE]; + * * * @param index The index of the value to return. * @return The bytes of the zoneAffinity at the given index. */ + @java.lang.Deprecated public com.google.protobuf.ByteString getZoneAffinityBytes(int index) { return zoneAffinity_.getByteString(index); } @@ -21242,12 +21286,15 @@ public com.google.protobuf.ByteString getZoneAffinityBytes(int index) { * error. * * - * repeated string zone_affinity = 24 [(.google.api.field_behavior) = IMMUTABLE]; + * + * repeated string zone_affinity = 24 [deprecated = true, (.google.api.field_behavior) = IMMUTABLE]; + * * * @param index The index to set the value at. * @param value The zoneAffinity to set. * @return This builder for chaining. */ + @java.lang.Deprecated public Builder setZoneAffinity(int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); @@ -21268,11 +21315,14 @@ public Builder setZoneAffinity(int index, java.lang.String value) { * error. * * - * repeated string zone_affinity = 24 [(.google.api.field_behavior) = IMMUTABLE]; + * + * repeated string zone_affinity = 24 [deprecated = true, (.google.api.field_behavior) = IMMUTABLE]; + * * * @param value The zoneAffinity to add. * @return This builder for chaining. */ + @java.lang.Deprecated public Builder addZoneAffinity(java.lang.String value) { if (value == null) { throw new NullPointerException(); @@ -21293,11 +21343,14 @@ public Builder addZoneAffinity(java.lang.String value) { * error. * * - * repeated string zone_affinity = 24 [(.google.api.field_behavior) = IMMUTABLE]; + * + * repeated string zone_affinity = 24 [deprecated = true, (.google.api.field_behavior) = IMMUTABLE]; + * * * @param values The zoneAffinity to add. * @return This builder for chaining. */ + @java.lang.Deprecated public Builder addAllZoneAffinity(java.lang.Iterable values) { ensureZoneAffinityIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, zoneAffinity_); @@ -21315,10 +21368,13 @@ public Builder addAllZoneAffinity(java.lang.Iterable values) { * error. * * - * repeated string zone_affinity = 24 [(.google.api.field_behavior) = IMMUTABLE]; + * + * repeated string zone_affinity = 24 [deprecated = true, (.google.api.field_behavior) = IMMUTABLE]; + * * * @return This builder for chaining. */ + @java.lang.Deprecated public Builder clearZoneAffinity() { zoneAffinity_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000010); @@ -21336,11 +21392,14 @@ public Builder clearZoneAffinity() { * error. * * - * repeated string zone_affinity = 24 [(.google.api.field_behavior) = IMMUTABLE]; + * + * repeated string zone_affinity = 24 [deprecated = true, (.google.api.field_behavior) = IMMUTABLE]; + * * * @param value The bytes of the zoneAffinity to add. * @return This builder for chaining. */ + @java.lang.Deprecated public Builder addZoneAffinityBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BucketOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BucketOrBuilder.java index 5ca0553c4..9cfd286d1 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BucketOrBuilder.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BucketOrBuilder.java @@ -946,10 +946,13 @@ public interface BucketOrBuilder * error. * * - * repeated string zone_affinity = 24 [(.google.api.field_behavior) = IMMUTABLE]; + * + * repeated string zone_affinity = 24 [deprecated = true, (.google.api.field_behavior) = IMMUTABLE]; + * * * @return A list containing the zoneAffinity. */ + @java.lang.Deprecated java.util.List getZoneAffinityList(); /** * @@ -962,10 +965,13 @@ public interface BucketOrBuilder * error. * * - * repeated string zone_affinity = 24 [(.google.api.field_behavior) = IMMUTABLE]; + * + * repeated string zone_affinity = 24 [deprecated = true, (.google.api.field_behavior) = IMMUTABLE]; + * * * @return The count of zoneAffinity. */ + @java.lang.Deprecated int getZoneAffinityCount(); /** * @@ -978,11 +984,14 @@ public interface BucketOrBuilder * error. * * - * repeated string zone_affinity = 24 [(.google.api.field_behavior) = IMMUTABLE]; + * + * repeated string zone_affinity = 24 [deprecated = true, (.google.api.field_behavior) = IMMUTABLE]; + * * * @param index The index of the element to return. * @return The zoneAffinity at the given index. */ + @java.lang.Deprecated java.lang.String getZoneAffinity(int index); /** * @@ -995,11 +1004,14 @@ public interface BucketOrBuilder * error. * * - * repeated string zone_affinity = 24 [(.google.api.field_behavior) = IMMUTABLE]; + * + * repeated string zone_affinity = 24 [deprecated = true, (.google.api.field_behavior) = IMMUTABLE]; + * * * @param index The index of the value to return. * @return The bytes of the zoneAffinity at the given index. */ + @java.lang.Deprecated com.google.protobuf.ByteString getZoneAffinityBytes(int index); /** diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/Object.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/Object.java index 368eaf510..b63778579 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/Object.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/Object.java @@ -417,23 +417,12 @@ public interface CustomerEncryptionOrBuilder * *
      * SHA256 hash value of the encryption key.
+     * In raw bytes format (not base64-encoded).
      * 
* - * string key_sha256 = 2; + * bytes key_sha256_bytes = 3; * - * @return The keySha256. - */ - java.lang.String getKeySha256(); - /** - * - * - *
-     * SHA256 hash value of the encryption key.
-     * 
- * - * string key_sha256 = 2; - * - * @return The bytes for keySha256. + * @return The keySha256Bytes. */ com.google.protobuf.ByteString getKeySha256Bytes(); } @@ -458,7 +447,7 @@ private CustomerEncryption(com.google.protobuf.GeneratedMessageV3.Builder bui private CustomerEncryption() { encryptionAlgorithm_ = ""; - keySha256_ = ""; + keySha256Bytes_ = com.google.protobuf.ByteString.EMPTY; } @java.lang.Override @@ -497,11 +486,9 @@ private CustomerEncryption( encryptionAlgorithm_ = s; break; } - case 18: + case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - keySha256_ = s; + keySha256Bytes_ = input.readBytes(); break; } default: @@ -587,53 +574,23 @@ public com.google.protobuf.ByteString getEncryptionAlgorithmBytes() { } } - public static final int KEY_SHA256_FIELD_NUMBER = 2; - private volatile java.lang.Object keySha256_; + public static final int KEY_SHA256_BYTES_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString keySha256Bytes_; /** * * *
      * SHA256 hash value of the encryption key.
+     * In raw bytes format (not base64-encoded).
      * 
* - * string key_sha256 = 2; + * bytes key_sha256_bytes = 3; * - * @return The keySha256. - */ - @java.lang.Override - public java.lang.String getKeySha256() { - java.lang.Object ref = keySha256_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - keySha256_ = s; - return s; - } - } - /** - * - * - *
-     * SHA256 hash value of the encryption key.
-     * 
- * - * string key_sha256 = 2; - * - * @return The bytes for keySha256. + * @return The keySha256Bytes. */ @java.lang.Override public com.google.protobuf.ByteString getKeySha256Bytes() { - java.lang.Object ref = keySha256_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - keySha256_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + return keySha256Bytes_; } private byte memoizedIsInitialized = -1; @@ -653,8 +610,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!getEncryptionAlgorithmBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, encryptionAlgorithm_); } - if (!getKeySha256Bytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, keySha256_); + if (!keySha256Bytes_.isEmpty()) { + output.writeBytes(3, keySha256Bytes_); } unknownFields.writeTo(output); } @@ -668,8 +625,8 @@ public int getSerializedSize() { if (!getEncryptionAlgorithmBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, encryptionAlgorithm_); } - if (!getKeySha256Bytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, keySha256_); + if (!keySha256Bytes_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(3, keySha256Bytes_); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -688,7 +645,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.storage.v2.Object.CustomerEncryption) obj; if (!getEncryptionAlgorithm().equals(other.getEncryptionAlgorithm())) return false; - if (!getKeySha256().equals(other.getKeySha256())) return false; + if (!getKeySha256Bytes().equals(other.getKeySha256Bytes())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -702,8 +659,8 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + ENCRYPTION_ALGORITHM_FIELD_NUMBER; hash = (53 * hash) + getEncryptionAlgorithm().hashCode(); - hash = (37 * hash) + KEY_SHA256_FIELD_NUMBER; - hash = (53 * hash) + getKeySha256().hashCode(); + hash = (37 * hash) + KEY_SHA256_BYTES_FIELD_NUMBER; + hash = (53 * hash) + getKeySha256Bytes().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -853,7 +810,7 @@ public Builder clear() { super.clear(); encryptionAlgorithm_ = ""; - keySha256_ = ""; + keySha256Bytes_ = com.google.protobuf.ByteString.EMPTY; return this; } @@ -883,7 +840,7 @@ public com.google.storage.v2.Object.CustomerEncryption buildPartial() { com.google.storage.v2.Object.CustomerEncryption result = new com.google.storage.v2.Object.CustomerEncryption(this); result.encryptionAlgorithm_ = encryptionAlgorithm_; - result.keySha256_ = keySha256_; + result.keySha256Bytes_ = keySha256Bytes_; onBuilt(); return result; } @@ -940,9 +897,8 @@ public Builder mergeFrom(com.google.storage.v2.Object.CustomerEncryption other) encryptionAlgorithm_ = other.encryptionAlgorithm_; onChanged(); } - if (!other.getKeySha256().isEmpty()) { - keySha256_ = other.keySha256_; - onChanged(); + if (other.getKeySha256Bytes() != com.google.protobuf.ByteString.EMPTY) { + setKeySha256Bytes(other.getKeySha256Bytes()); } this.mergeUnknownFields(other.unknownFields); onChanged(); @@ -1080,86 +1036,42 @@ public Builder setEncryptionAlgorithmBytes(com.google.protobuf.ByteString value) return this; } - private java.lang.Object keySha256_ = ""; - /** - * - * - *
-       * SHA256 hash value of the encryption key.
-       * 
- * - * string key_sha256 = 2; - * - * @return The keySha256. - */ - public java.lang.String getKeySha256() { - java.lang.Object ref = keySha256_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - keySha256_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } + private com.google.protobuf.ByteString keySha256Bytes_ = com.google.protobuf.ByteString.EMPTY; /** * * *
        * SHA256 hash value of the encryption key.
+       * In raw bytes format (not base64-encoded).
        * 
* - * string key_sha256 = 2; + * bytes key_sha256_bytes = 3; * - * @return The bytes for keySha256. + * @return The keySha256Bytes. */ + @java.lang.Override public com.google.protobuf.ByteString getKeySha256Bytes() { - java.lang.Object ref = keySha256_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - keySha256_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + return keySha256Bytes_; } /** * * *
        * SHA256 hash value of the encryption key.
+       * In raw bytes format (not base64-encoded).
        * 
* - * string key_sha256 = 2; + * bytes key_sha256_bytes = 3; * - * @param value The keySha256 to set. + * @param value The keySha256Bytes to set. * @return This builder for chaining. */ - public Builder setKeySha256(java.lang.String value) { + public Builder setKeySha256Bytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - keySha256_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * SHA256 hash value of the encryption key.
-       * 
- * - * string key_sha256 = 2; - * - * @return This builder for chaining. - */ - public Builder clearKeySha256() { - - keySha256_ = getDefaultInstance().getKeySha256(); + keySha256Bytes_ = value; onChanged(); return this; } @@ -1168,20 +1080,16 @@ public Builder clearKeySha256() { * *
        * SHA256 hash value of the encryption key.
+       * In raw bytes format (not base64-encoded).
        * 
* - * string key_sha256 = 2; + * bytes key_sha256_bytes = 3; * - * @param value The bytes for keySha256 to set. * @return This builder for chaining. */ - public Builder setKeySha256Bytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); + public Builder clearKeySha256Bytes() { - keySha256_ = value; + keySha256Bytes_ = getDefaultInstance().getKeySha256Bytes(); onChanged(); return this; } diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/QueryWriteStatusResponse.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/QueryWriteStatusResponse.java index 3deb1d541..73b684dbe 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/QueryWriteStatusResponse.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/QueryWriteStatusResponse.java @@ -130,7 +130,7 @@ public enum WriteStatusCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { - COMMITTED_SIZE(1), + PERSISTED_SIZE(1), RESOURCE(2), WRITESTATUS_NOT_SET(0); private final int value; @@ -151,7 +151,7 @@ public static WriteStatusCase valueOf(int value) { public static WriteStatusCase forNumber(int value) { switch (value) { case 1: - return COMMITTED_SIZE; + return PERSISTED_SIZE; case 2: return RESOURCE; case 0: @@ -170,7 +170,7 @@ public WriteStatusCase getWriteStatusCase() { return WriteStatusCase.forNumber(writeStatusCase_); } - public static final int COMMITTED_SIZE_FIELD_NUMBER = 1; + public static final int PERSISTED_SIZE_FIELD_NUMBER = 1; /** * * @@ -181,12 +181,12 @@ public WriteStatusCase getWriteStatusCase() { * Only set if the upload has not finalized. * * - * int64 committed_size = 1; + * int64 persisted_size = 1; * - * @return Whether the committedSize field is set. + * @return Whether the persistedSize field is set. */ @java.lang.Override - public boolean hasCommittedSize() { + public boolean hasPersistedSize() { return writeStatusCase_ == 1; } /** @@ -199,12 +199,12 @@ public boolean hasCommittedSize() { * Only set if the upload has not finalized. * * - * int64 committed_size = 1; + * int64 persisted_size = 1; * - * @return The committedSize. + * @return The persistedSize. */ @java.lang.Override - public long getCommittedSize() { + public long getPersistedSize() { if (writeStatusCase_ == 1) { return (java.lang.Long) writeStatus_; } @@ -323,7 +323,7 @@ public boolean equals(final java.lang.Object obj) { if (!getWriteStatusCase().equals(other.getWriteStatusCase())) return false; switch (writeStatusCase_) { case 1: - if (getCommittedSize() != other.getCommittedSize()) return false; + if (getPersistedSize() != other.getPersistedSize()) return false; break; case 2: if (!getResource().equals(other.getResource())) return false; @@ -344,8 +344,8 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); switch (writeStatusCase_) { case 1: - hash = (37 * hash) + COMMITTED_SIZE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCommittedSize()); + hash = (37 * hash) + PERSISTED_SIZE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getPersistedSize()); break; case 2: hash = (37 * hash) + RESOURCE_FIELD_NUMBER; @@ -589,9 +589,9 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.storage.v2.QueryWriteStatusResponse other) { if (other == com.google.storage.v2.QueryWriteStatusResponse.getDefaultInstance()) return this; switch (other.getWriteStatusCase()) { - case COMMITTED_SIZE: + case PERSISTED_SIZE: { - setCommittedSize(other.getCommittedSize()); + setPersistedSize(other.getPersistedSize()); break; } case RESOURCE: @@ -657,11 +657,11 @@ public Builder clearWriteStatus() { * Only set if the upload has not finalized. * * - * int64 committed_size = 1; + * int64 persisted_size = 1; * - * @return Whether the committedSize field is set. + * @return Whether the persistedSize field is set. */ - public boolean hasCommittedSize() { + public boolean hasPersistedSize() { return writeStatusCase_ == 1; } /** @@ -674,11 +674,11 @@ public boolean hasCommittedSize() { * Only set if the upload has not finalized. * * - * int64 committed_size = 1; + * int64 persisted_size = 1; * - * @return The committedSize. + * @return The persistedSize. */ - public long getCommittedSize() { + public long getPersistedSize() { if (writeStatusCase_ == 1) { return (java.lang.Long) writeStatus_; } @@ -694,12 +694,12 @@ public long getCommittedSize() { * Only set if the upload has not finalized. * * - * int64 committed_size = 1; + * int64 persisted_size = 1; * - * @param value The committedSize to set. + * @param value The persistedSize to set. * @return This builder for chaining. */ - public Builder setCommittedSize(long value) { + public Builder setPersistedSize(long value) { writeStatusCase_ = 1; writeStatus_ = value; onChanged(); @@ -715,11 +715,11 @@ public Builder setCommittedSize(long value) { * Only set if the upload has not finalized. * * - * int64 committed_size = 1; + * int64 persisted_size = 1; * * @return This builder for chaining. */ - public Builder clearCommittedSize() { + public Builder clearPersistedSize() { if (writeStatusCase_ == 1) { writeStatusCase_ = 0; writeStatus_ = null; diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/QueryWriteStatusResponseOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/QueryWriteStatusResponseOrBuilder.java index d700c3165..27f5c79b5 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/QueryWriteStatusResponseOrBuilder.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/QueryWriteStatusResponseOrBuilder.java @@ -33,11 +33,11 @@ public interface QueryWriteStatusResponseOrBuilder * Only set if the upload has not finalized. * * - * int64 committed_size = 1; + * int64 persisted_size = 1; * - * @return Whether the committedSize field is set. + * @return Whether the persistedSize field is set. */ - boolean hasCommittedSize(); + boolean hasPersistedSize(); /** * * @@ -48,11 +48,11 @@ public interface QueryWriteStatusResponseOrBuilder * Only set if the upload has not finalized. * * - * int64 committed_size = 1; + * int64 persisted_size = 1; * - * @return The committedSize. + * @return The persistedSize. */ - long getCommittedSize(); + long getPersistedSize(); /** * diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageProto.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageProto.java index a4db7e2ed..1e0a060dc 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageProto.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageProto.java @@ -235,7 +235,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "Params\022E\n\025common_request_params\030\t \001(\0132&." + "google.storage.v2.CommonRequestParamsB\017\n" + "\rfirst_messageB\006\n\004data\"n\n\023WriteObjectRes" - + "ponse\022\030\n\016committed_size\030\001 \001(\003H\000\022-\n\010resou" + + "ponse\022\030\n\016persisted_size\030\001 \001(\003H\000\022-\n\010resou" + "rce\030\002 \001(\0132\031.google.storage.v2.ObjectH\000B\016" + "\n\014write_status\"\314\001\n\027QueryWriteStatusReque" + "st\022\026\n\tupload_id\030\001 \001(\tB\003\340A\002\022R\n\034common_obj" @@ -243,7 +243,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "e.v2.CommonObjectRequestParams\022E\n\025common" + "_request_params\030\003 \001(\0132&.google.storage.v" + "2.CommonRequestParams\"s\n\030QueryWriteStatu" - + "sResponse\022\030\n\016committed_size\030\001 \001(\003H\000\022-\n\010r" + + "sResponse\022\030\n\016persisted_size\030\001 \001(\003H\000\022-\n\010r" + "esource\030\002 \001(\0132\031.google.storage.v2.Object" + "H\000B\016\n\014write_status\"\366\001\n\032StartResumableWri" + "teRequest\022=\n\021write_object_spec\030\001 \001(\0132\".g" @@ -276,7 +276,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "LS_KEY_VALUE_LENGTH\020?\022\037\n\032MAX_LABELS_KEY_" + "VALUE_BYTES\020\200\001\022.\n)MAX_OBJECT_IDS_PER_DEL" + "ETE_OBJECTS_REQUEST\020\350\007\022\036\n\032SPLIT_TOKEN_MA" - + "X_VALID_DAYS\020\016\032\002\020\001\"\204\026\n\006Bucket\022\021\n\004name\030\001 " + + "X_VALID_DAYS\020\016\032\002\020\001\"\225\026\n\006Bucket\022\021\n\004name\030\001 " + "\001(\tB\003\340A\005\022\026\n\tbucket_id\030\002 \001(\tB\003\340A\003\022D\n\007proj" + "ect\030\003 \001(\tB3\340A\005\372A-\n+cloudresourcemanager." + "googleapis.com/Project\022\033\n\016metageneration" @@ -303,129 +303,130 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "orage.v2.Bucket.Billing\022C\n\020retention_pol" + "icy\030\026 \001(\0132).google.storage.v2.Bucket.Ret" + "entionPolicy\0227\n\niam_config\030\027 \001(\0132#.googl" - + "e.storage.v2.Bucket.IamConfig\022\032\n\rzone_af" - + "finity\030\030 \003(\tB\003\340A\005\022\025\n\rsatisfies_pzs\030\031 \001(\010" - + "\032!\n\007Billing\022\026\n\016requester_pays\030\001 \001(\010\032X\n\004C" - + "ors\022\016\n\006origin\030\001 \003(\t\022\016\n\006method\030\002 \003(\t\022\027\n\017r" - + "esponse_header\030\003 \003(\t\022\027\n\017max_age_seconds\030" - + "\004 \001(\005\032M\n\nEncryption\022?\n\017default_kms_key\030\001" - + " \001(\tB&\372A#\n!cloudkms.googleapis.com/Crypt" - + "oKey\032\372\002\n\tIamConfig\022a\n\033uniform_bucket_lev" - + "el_access\030\001 \001(\0132<.google.storage.v2.Buck" - + "et.IamConfig.UniformBucketLevelAccess\022\\\n" - + "\030public_access_prevention\030\002 \001(\0162:.google" - + ".storage.v2.Bucket.IamConfig.PublicAcces" - + "sPrevention\032Z\n\030UniformBucketLevelAccess\022" - + "\017\n\007enabled\030\001 \001(\010\022-\n\tlock_time\030\002 \001(\0132\032.go" - + "ogle.protobuf.Timestamp\"P\n\026PublicAccessP" - + "revention\022(\n$PUBLIC_ACCESS_PREVENTION_UN" - + "SPECIFIED\020\000\022\014\n\010ENFORCED\020\001\032\303\005\n\tLifecycle\022" - + "6\n\004rule\030\001 \003(\0132(.google.storage.v2.Bucket" - + ".Lifecycle.Rule\032\375\004\n\004Rule\022?\n\006action\030\001 \001(\013" - + "2/.google.storage.v2.Bucket.Lifecycle.Ru" - + "le.Action\022E\n\tcondition\030\002 \001(\01322.google.st" - + "orage.v2.Bucket.Lifecycle.Rule.Condition" - + "\032-\n\006Action\022\014\n\004type\030\001 \001(\t\022\025\n\rstorage_clas" - + "s\030\002 \001(\t\032\275\003\n\tCondition\022\025\n\010age_days\030\001 \001(\005H" - + "\000\210\001\001\022)\n\016created_before\030\002 \001(\0132\021.google.ty" - + "pe.Date\022\024\n\007is_live\030\003 \001(\010H\001\210\001\001\022\037\n\022num_new" - + "er_versions\030\004 \001(\005H\002\210\001\001\022\035\n\025matches_storag" - + "e_class\030\005 \003(\t\022#\n\026days_since_custom_time\030" - + "\007 \001(\005H\003\210\001\001\022-\n\022custom_time_before\030\010 \001(\0132\021" - + ".google.type.Date\022\'\n\032days_since_noncurre" - + "nt_time\030\t \001(\005H\004\210\001\001\0221\n\026noncurrent_time_be" - + "fore\030\n \001(\0132\021.google.type.DateB\013\n\t_age_da" - + "ysB\n\n\010_is_liveB\025\n\023_num_newer_versionsB\031\n" - + "\027_days_since_custom_timeB\035\n\033_days_since_" - + "noncurrent_time\0328\n\007Logging\022\022\n\nlog_bucket" - + "\030\001 \001(\t\022\031\n\021log_object_prefix\030\002 \001(\t\032r\n\017Ret" - + "entionPolicy\0222\n\016effective_time\030\001 \001(\0132\032.g" - + "oogle.protobuf.Timestamp\022\021\n\tis_locked\030\002 " - + "\001(\010\022\030\n\020retention_period\030\003 \001(\003\032\035\n\nVersion" - + "ing\022\017\n\007enabled\030\001 \001(\010\032;\n\007Website\022\030\n\020main_" - + "page_suffix\030\001 \001(\t\022\026\n\016not_found_page\030\002 \001(" - + "\t\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002" - + " \001(\t:\0028\001:G\352AD\n\035storage.googleapis.com/Bu" - + "cket\022#projects/{project}/buckets/{bucket" - + "}\"\247\001\n\023BucketAccessControl\022\014\n\004role\030\001 \001(\t\022" - + "\n\n\002id\030\002 \001(\t\022\016\n\006entity\030\003 \001(\t\022\021\n\tentity_id" - + "\030\004 \001(\t\022\r\n\005email\030\005 \001(\t\022\016\n\006domain\030\006 \001(\t\0224\n" - + "\014project_team\030\007 \001(\0132\036.google.storage.v2." - + "ProjectTeam\"B\n\017ChecksummedData\022\017\n\007conten" - + "t\030\001 \001(\014\022\023\n\006crc32c\030\002 \001(\007H\000\210\001\001B\t\n\007_crc32c\"" - + "C\n\017ObjectChecksums\022\023\n\006crc32c\030\001 \001(\007H\000\210\001\001\022" - + "\020\n\010md5_hash\030\002 \001(\014B\t\n\007_crc32c\"\303\t\n\006Object\022" - + "\021\n\004name\030\001 \001(\tB\003\340A\005\0225\n\006bucket\030\002 \001(\tB%\340A\005\372" - + "A\037\n\035storage.googleapis.com/Bucket\022\027\n\ngen" - + "eration\030\003 \001(\003B\003\340A\005\022\033\n\016metageneration\030\004 \001" - + "(\003B\003\340A\003\022\025\n\rstorage_class\030\005 \001(\t\022\021\n\004size\030\006" - + " \001(\003B\003\340A\003\022\030\n\020content_encoding\030\007 \001(\t\022\033\n\023c" - + "ontent_disposition\030\010 \001(\t\022\025\n\rcache_contro" - + "l\030\t \001(\t\0223\n\003acl\030\n \003(\0132&.google.storage.v2" - + ".ObjectAccessControl\022\030\n\020content_language" - + "\030\013 \001(\t\0224\n\013delete_time\030\014 \001(\0132\032.google.pro" - + "tobuf.TimestampB\003\340A\003\022\024\n\014content_type\030\r \001" - + "(\t\0224\n\013create_time\030\016 \001(\0132\032.google.protobu" - + "f.TimestampB\003\340A\003\022\034\n\017component_count\030\017 \001(" - + "\005B\003\340A\003\022:\n\tchecksums\030\020 \001(\0132\".google.stora" - + "ge.v2.ObjectChecksumsB\003\340A\003\0224\n\013update_tim" - + "e\030\021 \001(\0132\032.google.protobuf.TimestampB\003\340A\003" - + "\0227\n\007kms_key\030\022 \001(\tB&\372A#\n!cloudkms.googlea" - + "pis.com/CryptoKey\022B\n\031update_storage_clas" - + "s_time\030\023 \001(\0132\032.google.protobuf.Timestamp" - + "B\003\340A\003\022\026\n\016temporary_hold\030\024 \001(\010\0229\n\025retenti" - + "on_expire_time\030\025 \001(\0132\032.google.protobuf.T" - + "imestamp\0229\n\010metadata\030\026 \003(\0132\'.google.stor" - + "age.v2.Object.MetadataEntry\022\035\n\020event_bas" - + "ed_hold\030\027 \001(\010H\000\210\001\001\022,\n\005owner\030\030 \001(\0132\030.goog" - + "le.storage.v2.OwnerB\003\340A\003\022I\n\023customer_enc" - + "ryption\030\031 \001(\0132,.google.storage.v2.Object" - + ".CustomerEncryption\022/\n\013custom_time\030\032 \001(\013" - + "2\032.google.protobuf.Timestamp\032F\n\022Customer" - + "Encryption\022\034\n\024encryption_algorithm\030\001 \001(\t" - + "\022\022\n\nkey_sha256\030\002 \001(\t\032/\n\rMetadataEntry\022\013\n" - + "\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\023\n\021_event_" - + "based_hold\"\247\001\n\023ObjectAccessControl\022\014\n\004ro" - + "le\030\001 \001(\t\022\n\n\002id\030\002 \001(\t\022\016\n\006entity\030\003 \001(\t\022\021\n\t" - + "entity_id\030\004 \001(\t\022\r\n\005email\030\005 \001(\t\022\016\n\006domain" - + "\030\006 \001(\t\0224\n\014project_team\030\007 \001(\0132\036.google.st" - + "orage.v2.ProjectTeam\"3\n\013ProjectTeam\022\026\n\016p" - + "roject_number\030\001 \001(\t\022\014\n\004team\030\002 \001(\t\"*\n\005Own" - + "er\022\016\n\006entity\030\001 \001(\t\022\021\n\tentity_id\030\002 \001(\t\"C\n" - + "\014ContentRange\022\r\n\005start\030\001 \001(\003\022\013\n\003end\030\002 \001(" - + "\003\022\027\n\017complete_length\030\003 \001(\003*\377\001\n\023Predefine" - + "dObjectAcl\022%\n!PREDEFINED_OBJECT_ACL_UNSP" - + "ECIFIED\020\000\022!\n\035OBJECT_ACL_AUTHENTICATED_RE" - + "AD\020\001\022(\n$OBJECT_ACL_BUCKET_OWNER_FULL_CON" - + "TROL\020\002\022 \n\034OBJECT_ACL_BUCKET_OWNER_READ\020\003" - + "\022\026\n\022OBJECT_ACL_PRIVATE\020\004\022\036\n\032OBJECT_ACL_P" - + "ROJECT_PRIVATE\020\005\022\032\n\026OBJECT_ACL_PUBLIC_RE" - + "AD\020\0062\223\006\n\007Storage\022\210\001\n\nReadObject\022$.google" - + ".storage.v2.ReadObjectRequest\032%.google.s" - + "torage.v2.ReadObjectResponse\"+\332A\rbucket," - + "object\332A\030bucket,object,generation0\001\022`\n\013W" - + "riteObject\022%.google.storage.v2.WriteObje" - + "ctRequest\032&.google.storage.v2.WriteObjec" - + "tResponse\"\000(\001\022v\n\023StartResumableWrite\022-.g" - + "oogle.storage.v2.StartResumableWriteRequ" - + "est\032..google.storage.v2.StartResumableWr" - + "iteResponse\"\000\022y\n\020QueryWriteStatus\022*.goog" - + "le.storage.v2.QueryWriteStatusRequest\032+." - + "google.storage.v2.QueryWriteStatusRespon" - + "se\"\014\332A\tupload_id\032\247\002\312A\026storage.googleapis" - + ".com\322A\212\002https://www.googleapis.com/auth/" - + "cloud-platform,https://www.googleapis.co" - + "m/auth/cloud-platform.read-only,https://" - + "www.googleapis.com/auth/devstorage.full_" - + "control,https://www.googleapis.com/auth/" - + "devstorage.read_only,https://www.googlea" - + "pis.com/auth/devstorage.read_writeB\334\001\n\025c" - + "om.google.storage.v2B\014StorageProtoP\001Z8go" - + "ogle.golang.org/genproto/googleapis/stor" - + "age/v2;storage\352Ax\n!cloudkms.googleapis.c" - + "om/CryptoKey\022Sprojects/{project}/locatio" - + "ns/{location}/keyRings/{key_ring}/crypto" - + "Keys/{crypto_key}b\006proto3" + + "e.storage.v2.Bucket.IamConfig\022\034\n\rzone_af" + + "finity\030\030 \003(\tB\005\030\001\340A\005\022\025\n\rsatisfies_pzs\030\031 \001" + + "(\010\032!\n\007Billing\022\026\n\016requester_pays\030\001 \001(\010\032X\n" + + "\004Cors\022\016\n\006origin\030\001 \003(\t\022\016\n\006method\030\002 \003(\t\022\027\n" + + "\017response_header\030\003 \003(\t\022\027\n\017max_age_second" + + "s\030\004 \001(\005\032M\n\nEncryption\022?\n\017default_kms_key" + + "\030\001 \001(\tB&\372A#\n!cloudkms.googleapis.com/Cry" + + "ptoKey\032\211\003\n\tIamConfig\022a\n\033uniform_bucket_l" + + "evel_access\030\001 \001(\0132<.google.storage.v2.Bu" + + "cket.IamConfig.UniformBucketLevelAccess\022" + + "\\\n\030public_access_prevention\030\002 \001(\0162:.goog" + + "le.storage.v2.Bucket.IamConfig.PublicAcc" + + "essPrevention\032Z\n\030UniformBucketLevelAcces" + + "s\022\017\n\007enabled\030\001 \001(\010\022-\n\tlock_time\030\002 \001(\0132\032." + + "google.protobuf.Timestamp\"_\n\026PublicAcces" + + "sPrevention\022(\n$PUBLIC_ACCESS_PREVENTION_" + + "UNSPECIFIED\020\000\022\014\n\010ENFORCED\020\001\022\r\n\tINHERITED" + + "\020\002\032\303\005\n\tLifecycle\0226\n\004rule\030\001 \003(\0132(.google." + + "storage.v2.Bucket.Lifecycle.Rule\032\375\004\n\004Rul" + + "e\022?\n\006action\030\001 \001(\0132/.google.storage.v2.Bu" + + "cket.Lifecycle.Rule.Action\022E\n\tcondition\030" + + "\002 \001(\01322.google.storage.v2.Bucket.Lifecyc" + + "le.Rule.Condition\032-\n\006Action\022\014\n\004type\030\001 \001(" + + "\t\022\025\n\rstorage_class\030\002 \001(\t\032\275\003\n\tCondition\022\025" + + "\n\010age_days\030\001 \001(\005H\000\210\001\001\022)\n\016created_before\030" + + "\002 \001(\0132\021.google.type.Date\022\024\n\007is_live\030\003 \001(" + + "\010H\001\210\001\001\022\037\n\022num_newer_versions\030\004 \001(\005H\002\210\001\001\022" + + "\035\n\025matches_storage_class\030\005 \003(\t\022#\n\026days_s" + + "ince_custom_time\030\007 \001(\005H\003\210\001\001\022-\n\022custom_ti" + + "me_before\030\010 \001(\0132\021.google.type.Date\022\'\n\032da" + + "ys_since_noncurrent_time\030\t \001(\005H\004\210\001\001\0221\n\026n" + + "oncurrent_time_before\030\n \001(\0132\021.google.typ" + + "e.DateB\013\n\t_age_daysB\n\n\010_is_liveB\025\n\023_num_" + + "newer_versionsB\031\n\027_days_since_custom_tim" + + "eB\035\n\033_days_since_noncurrent_time\0328\n\007Logg" + + "ing\022\022\n\nlog_bucket\030\001 \001(\t\022\031\n\021log_object_pr" + + "efix\030\002 \001(\t\032r\n\017RetentionPolicy\0222\n\016effecti" + + "ve_time\030\001 \001(\0132\032.google.protobuf.Timestam" + + "p\022\021\n\tis_locked\030\002 \001(\010\022\030\n\020retention_period" + + "\030\003 \001(\003\032\035\n\nVersioning\022\017\n\007enabled\030\001 \001(\010\032;\n" + + "\007Website\022\030\n\020main_page_suffix\030\001 \001(\t\022\026\n\016no" + + "t_found_page\030\002 \001(\t\032-\n\013LabelsEntry\022\013\n\003key" + + "\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:G\352AD\n\035storage." + + "googleapis.com/Bucket\022#projects/{project" + + "}/buckets/{bucket}\"\247\001\n\023BucketAccessContr" + + "ol\022\014\n\004role\030\001 \001(\t\022\n\n\002id\030\002 \001(\t\022\016\n\006entity\030\003" + + " \001(\t\022\021\n\tentity_id\030\004 \001(\t\022\r\n\005email\030\005 \001(\t\022\016" + + "\n\006domain\030\006 \001(\t\0224\n\014project_team\030\007 \001(\0132\036.g" + + "oogle.storage.v2.ProjectTeam\"B\n\017Checksum" + + "medData\022\017\n\007content\030\001 \001(\014\022\023\n\006crc32c\030\002 \001(\007" + + "H\000\210\001\001B\t\n\007_crc32c\"C\n\017ObjectChecksums\022\023\n\006c" + + "rc32c\030\001 \001(\007H\000\210\001\001\022\020\n\010md5_hash\030\002 \001(\014B\t\n\007_c" + + "rc32c\"\311\t\n\006Object\022\021\n\004name\030\001 \001(\tB\003\340A\005\0225\n\006b" + + "ucket\030\002 \001(\tB%\340A\005\372A\037\n\035storage.googleapis." + + "com/Bucket\022\027\n\ngeneration\030\003 \001(\003B\003\340A\005\022\033\n\016m" + + "etageneration\030\004 \001(\003B\003\340A\003\022\025\n\rstorage_clas" + + "s\030\005 \001(\t\022\021\n\004size\030\006 \001(\003B\003\340A\003\022\030\n\020content_en" + + "coding\030\007 \001(\t\022\033\n\023content_disposition\030\010 \001(" + + "\t\022\025\n\rcache_control\030\t \001(\t\0223\n\003acl\030\n \003(\0132&." + + "google.storage.v2.ObjectAccessControl\022\030\n" + + "\020content_language\030\013 \001(\t\0224\n\013delete_time\030\014" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022\024\n" + + "\014content_type\030\r \001(\t\0224\n\013create_time\030\016 \001(\013" + + "2\032.google.protobuf.TimestampB\003\340A\003\022\034\n\017com" + + "ponent_count\030\017 \001(\005B\003\340A\003\022:\n\tchecksums\030\020 \001" + + "(\0132\".google.storage.v2.ObjectChecksumsB\003" + + "\340A\003\0224\n\013update_time\030\021 \001(\0132\032.google.protob" + + "uf.TimestampB\003\340A\003\0227\n\007kms_key\030\022 \001(\tB&\372A#\n" + + "!cloudkms.googleapis.com/CryptoKey\022B\n\031up" + + "date_storage_class_time\030\023 \001(\0132\032.google.p" + + "rotobuf.TimestampB\003\340A\003\022\026\n\016temporary_hold" + + "\030\024 \001(\010\0229\n\025retention_expire_time\030\025 \001(\0132\032." + + "google.protobuf.Timestamp\0229\n\010metadata\030\026 " + + "\003(\0132\'.google.storage.v2.Object.MetadataE" + + "ntry\022\035\n\020event_based_hold\030\027 \001(\010H\000\210\001\001\022,\n\005o" + + "wner\030\030 \001(\0132\030.google.storage.v2.OwnerB\003\340A" + + "\003\022I\n\023customer_encryption\030\031 \001(\0132,.google." + + "storage.v2.Object.CustomerEncryption\022/\n\013" + + "custom_time\030\032 \001(\0132\032.google.protobuf.Time" + + "stamp\032L\n\022CustomerEncryption\022\034\n\024encryptio" + + "n_algorithm\030\001 \001(\t\022\030\n\020key_sha256_bytes\030\003 " + + "\001(\014\032/\n\rMetadataEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005val" + + "ue\030\002 \001(\t:\0028\001B\023\n\021_event_based_hold\"\247\001\n\023Ob" + + "jectAccessControl\022\014\n\004role\030\001 \001(\t\022\n\n\002id\030\002 " + + "\001(\t\022\016\n\006entity\030\003 \001(\t\022\021\n\tentity_id\030\004 \001(\t\022\r" + + "\n\005email\030\005 \001(\t\022\016\n\006domain\030\006 \001(\t\0224\n\014project" + + "_team\030\007 \001(\0132\036.google.storage.v2.ProjectT" + + "eam\"3\n\013ProjectTeam\022\026\n\016project_number\030\001 \001" + + "(\t\022\014\n\004team\030\002 \001(\t\"*\n\005Owner\022\016\n\006entity\030\001 \001(" + + "\t\022\021\n\tentity_id\030\002 \001(\t\"C\n\014ContentRange\022\r\n\005" + + "start\030\001 \001(\003\022\013\n\003end\030\002 \001(\003\022\027\n\017complete_len" + + "gth\030\003 \001(\003*\377\001\n\023PredefinedObjectAcl\022%\n!PRE" + + "DEFINED_OBJECT_ACL_UNSPECIFIED\020\000\022!\n\035OBJE" + + "CT_ACL_AUTHENTICATED_READ\020\001\022(\n$OBJECT_AC" + + "L_BUCKET_OWNER_FULL_CONTROL\020\002\022 \n\034OBJECT_" + + "ACL_BUCKET_OWNER_READ\020\003\022\026\n\022OBJECT_ACL_PR" + + "IVATE\020\004\022\036\n\032OBJECT_ACL_PROJECT_PRIVATE\020\005\022" + + "\032\n\026OBJECT_ACL_PUBLIC_READ\020\0062\223\006\n\007Storage\022" + + "\210\001\n\nReadObject\022$.google.storage.v2.ReadO" + + "bjectRequest\032%.google.storage.v2.ReadObj" + + "ectResponse\"+\332A\rbucket,object\332A\030bucket,o" + + "bject,generation0\001\022`\n\013WriteObject\022%.goog" + + "le.storage.v2.WriteObjectRequest\032&.googl" + + "e.storage.v2.WriteObjectResponse\"\000(\001\022v\n\023" + + "StartResumableWrite\022-.google.storage.v2." + + "StartResumableWriteRequest\032..google.stor" + + "age.v2.StartResumableWriteResponse\"\000\022y\n\020" + + "QueryWriteStatus\022*.google.storage.v2.Que" + + "ryWriteStatusRequest\032+.google.storage.v2" + + ".QueryWriteStatusResponse\"\014\332A\tupload_id\032" + + "\247\002\312A\026storage.googleapis.com\322A\212\002https://w" + + "ww.googleapis.com/auth/cloud-platform,ht" + + "tps://www.googleapis.com/auth/cloud-plat" + + "form.read-only,https://www.googleapis.co" + + "m/auth/devstorage.full_control,https://w" + + "ww.googleapis.com/auth/devstorage.read_o" + + "nly,https://www.googleapis.com/auth/devs" + + "torage.read_writeB\334\001\n\025com.google.storage" + + ".v2B\014StorageProtoP\001Z8google.golang.org/g" + + "enproto/googleapis/storage/v2;storage\352Ax" + + "\n!cloudkms.googleapis.com/CryptoKey\022Spro" + + "jects/{project}/locations/{location}/key" + + "Rings/{key_ring}/cryptoKeys/{crypto_key}" + + "b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -513,7 +514,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_storage_v2_WriteObjectResponse_descriptor, new java.lang.String[] { - "CommittedSize", "Resource", "WriteStatus", + "PersistedSize", "Resource", "WriteStatus", }); internal_static_google_storage_v2_QueryWriteStatusRequest_descriptor = getDescriptor().getMessageTypes().get(5); @@ -529,7 +530,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_storage_v2_QueryWriteStatusResponse_descriptor, new java.lang.String[] { - "CommittedSize", "Resource", "WriteStatus", + "PersistedSize", "Resource", "WriteStatus", }); internal_static_google_storage_v2_StartResumableWriteRequest_descriptor = getDescriptor().getMessageTypes().get(7); @@ -788,7 +789,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_storage_v2_Object_CustomerEncryption_descriptor, new java.lang.String[] { - "EncryptionAlgorithm", "KeySha256", + "EncryptionAlgorithm", "KeySha256Bytes", }); internal_static_google_storage_v2_Object_MetadataEntry_descriptor = internal_static_google_storage_v2_Object_descriptor.getNestedTypes().get(1); diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/WriteObjectRequest.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/WriteObjectRequest.java index 34f53ff18..d7ec58b07 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/WriteObjectRequest.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/WriteObjectRequest.java @@ -427,7 +427,7 @@ public com.google.storage.v2.WriteObjectSpecOrBuilder getWriteObjectSpecOrBuilde * written. * 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 * first `write_offset` and the sizes of all `data` chunks sent previously on @@ -1599,7 +1599,7 @@ public com.google.storage.v2.WriteObjectSpecOrBuilder getWriteObjectSpecOrBuilde * written. * 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 * first `write_offset` and the sizes of all `data` chunks sent previously on @@ -1623,7 +1623,7 @@ public long getWriteOffset() { * written. * 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 * first `write_offset` and the sizes of all `data` chunks sent previously on @@ -1650,7 +1650,7 @@ public Builder setWriteOffset(long value) { * written. * 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 * first `write_offset` and the sizes of all `data` chunks sent previously on diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/WriteObjectRequestOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/WriteObjectRequestOrBuilder.java index 2e787f95c..175e2c48a 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/WriteObjectRequestOrBuilder.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/WriteObjectRequestOrBuilder.java @@ -109,7 +109,7 @@ public interface WriteObjectRequestOrBuilder * written. * 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 * first `write_offset` and the sizes of all `data` chunks sent previously on diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/WriteObjectResponse.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/WriteObjectResponse.java index 4c3b8c4cf..06576899b 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/WriteObjectResponse.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/WriteObjectResponse.java @@ -130,7 +130,7 @@ public enum WriteStatusCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { - COMMITTED_SIZE(1), + PERSISTED_SIZE(1), RESOURCE(2), WRITESTATUS_NOT_SET(0); private final int value; @@ -151,7 +151,7 @@ public static WriteStatusCase valueOf(int value) { public static WriteStatusCase forNumber(int value) { switch (value) { case 1: - return COMMITTED_SIZE; + return PERSISTED_SIZE; case 2: return RESOURCE; case 0: @@ -170,7 +170,7 @@ public WriteStatusCase getWriteStatusCase() { return WriteStatusCase.forNumber(writeStatusCase_); } - public static final int COMMITTED_SIZE_FIELD_NUMBER = 1; + public static final int PERSISTED_SIZE_FIELD_NUMBER = 1; /** * * @@ -179,12 +179,12 @@ public WriteStatusCase getWriteStatusCase() { * from all `WriteObject` calls. Only set if the upload has not finalized. * * - * int64 committed_size = 1; + * int64 persisted_size = 1; * - * @return Whether the committedSize field is set. + * @return Whether the persistedSize field is set. */ @java.lang.Override - public boolean hasCommittedSize() { + public boolean hasPersistedSize() { return writeStatusCase_ == 1; } /** @@ -195,12 +195,12 @@ public boolean hasCommittedSize() { * from all `WriteObject` calls. Only set if the upload has not finalized. * * - * int64 committed_size = 1; + * int64 persisted_size = 1; * - * @return The committedSize. + * @return The persistedSize. */ @java.lang.Override - public long getCommittedSize() { + public long getPersistedSize() { if (writeStatusCase_ == 1) { return (java.lang.Long) writeStatus_; } @@ -319,7 +319,7 @@ public boolean equals(final java.lang.Object obj) { if (!getWriteStatusCase().equals(other.getWriteStatusCase())) return false; switch (writeStatusCase_) { case 1: - if (getCommittedSize() != other.getCommittedSize()) return false; + if (getPersistedSize() != other.getPersistedSize()) return false; break; case 2: if (!getResource().equals(other.getResource())) return false; @@ -340,8 +340,8 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); switch (writeStatusCase_) { case 1: - hash = (37 * hash) + COMMITTED_SIZE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCommittedSize()); + hash = (37 * hash) + PERSISTED_SIZE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getPersistedSize()); break; case 2: hash = (37 * hash) + RESOURCE_FIELD_NUMBER; @@ -585,9 +585,9 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.storage.v2.WriteObjectResponse other) { if (other == com.google.storage.v2.WriteObjectResponse.getDefaultInstance()) return this; switch (other.getWriteStatusCase()) { - case COMMITTED_SIZE: + case PERSISTED_SIZE: { - setCommittedSize(other.getCommittedSize()); + setPersistedSize(other.getPersistedSize()); break; } case RESOURCE: @@ -651,11 +651,11 @@ public Builder clearWriteStatus() { * from all `WriteObject` calls. Only set if the upload has not finalized. * * - * int64 committed_size = 1; + * int64 persisted_size = 1; * - * @return Whether the committedSize field is set. + * @return Whether the persistedSize field is set. */ - public boolean hasCommittedSize() { + public boolean hasPersistedSize() { return writeStatusCase_ == 1; } /** @@ -666,11 +666,11 @@ public boolean hasCommittedSize() { * from all `WriteObject` calls. Only set if the upload has not finalized. * * - * int64 committed_size = 1; + * int64 persisted_size = 1; * - * @return The committedSize. + * @return The persistedSize. */ - public long getCommittedSize() { + public long getPersistedSize() { if (writeStatusCase_ == 1) { return (java.lang.Long) writeStatus_; } @@ -684,12 +684,12 @@ public long getCommittedSize() { * from all `WriteObject` calls. Only set if the upload has not finalized. * * - * int64 committed_size = 1; + * int64 persisted_size = 1; * - * @param value The committedSize to set. + * @param value The persistedSize to set. * @return This builder for chaining. */ - public Builder setCommittedSize(long value) { + public Builder setPersistedSize(long value) { writeStatusCase_ = 1; writeStatus_ = value; onChanged(); @@ -703,11 +703,11 @@ public Builder setCommittedSize(long value) { * from all `WriteObject` calls. Only set if the upload has not finalized. * * - * int64 committed_size = 1; + * int64 persisted_size = 1; * * @return This builder for chaining. */ - public Builder clearCommittedSize() { + public Builder clearPersistedSize() { if (writeStatusCase_ == 1) { writeStatusCase_ = 0; writeStatus_ = null; diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/WriteObjectResponseOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/WriteObjectResponseOrBuilder.java index e587777b3..fe718a776 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/WriteObjectResponseOrBuilder.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/WriteObjectResponseOrBuilder.java @@ -31,11 +31,11 @@ public interface WriteObjectResponseOrBuilder * from all `WriteObject` calls. Only set if the upload has not finalized. * * - * int64 committed_size = 1; + * int64 persisted_size = 1; * - * @return Whether the committedSize field is set. + * @return Whether the persistedSize field is set. */ - boolean hasCommittedSize(); + boolean hasPersistedSize(); /** * * @@ -44,11 +44,11 @@ public interface WriteObjectResponseOrBuilder * from all `WriteObject` calls. Only set if the upload has not finalized. * * - * int64 committed_size = 1; + * int64 persisted_size = 1; * - * @return The committedSize. + * @return The persistedSize. */ - long getCommittedSize(); + long getPersistedSize(); /** * diff --git a/proto-google-cloud-storage-v2/src/main/proto/google/storage/v2/storage.proto b/proto-google-cloud-storage-v2/src/main/proto/google/storage/v2/storage.proto index a5fca6984..46170df1c 100644 --- a/proto-google-cloud-storage-v2/src/main/proto/google/storage/v2/storage.proto +++ b/proto-google-cloud-storage-v2/src/main/proto/google/storage/v2/storage.proto @@ -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 @@ -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 @@ -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"; @@ -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 @@ -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. @@ -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. @@ -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. @@ -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; @@ -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 diff --git a/synth.metadata b/synth.metadata index 40a98002e..962316f57 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-storage.git", - "sha": "2e7f041ef7873ede8c2d1ebb526639d1aff61963" + "sha": "cdb86dcca17636ff7be59208361f8d42ab0858ba" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "e1738ee972b49fd0c4d4718b035444495142b781", - "internalRef": "391407209" + "sha": "877d3d9d02591ad612a2c8654b42c37ba09ff9ec", + "internalRef": "402986756" } }, {