Skip to content

Commit

Permalink
feat: Update definition of RewriteObjectRequest to bring to parity wi…
Browse files Browse the repository at this point in the history
…th JSON API support (#1220)

* feat!: Update definition of RewriteObjectRequest to bring to parity with JSON API support

PiperOrigin-RevId: 425656197

Source-Link: googleapis/googleapis@903e011

Source-Link: googleapis/googleapis-gen@b9bdb52
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjliZGI1MjdjZjY2OWM0N2YyMWYzYmNlMzdiYmZkM2Q4ZWFhMWFjNCJ9

* 🦉 Updates from OwlBot

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] committed Feb 1, 2022
1 parent 623e68b commit 7845c0e
Show file tree
Hide file tree
Showing 12 changed files with 731 additions and 766 deletions.
Expand Up @@ -2230,7 +2230,9 @@ public final UnaryCallable<ListObjectsRequest, ListObjectsResponse> listObjectsC
* RewriteObjectRequest.newBuilder()
* .setDestinationName("destinationName-1762755655")
* .setDestinationBucket(BucketName.of("[PROJECT]", "[BUCKET]").toString())
* .setDestinationCustomerEncryption(CustomerEncryption.newBuilder().build())
* .setDestinationKmsKey(
* CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]")
* .toString())
* .setDestination(Object.newBuilder().build())
* .setSourceBucket("sourceBucket841604581")
* .setSourceObject("sourceObject1196439354")
Expand Down Expand Up @@ -2275,7 +2277,9 @@ public final RewriteResponse rewriteObject(RewriteObjectRequest request) {
* RewriteObjectRequest.newBuilder()
* .setDestinationName("destinationName-1762755655")
* .setDestinationBucket(BucketName.of("[PROJECT]", "[BUCKET]").toString())
* .setDestinationCustomerEncryption(CustomerEncryption.newBuilder().build())
* .setDestinationKmsKey(
* CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]")
* .toString())
* .setDestination(Object.newBuilder().build())
* .setSourceBucket("sourceBucket841604581")
* .setSourceObject("sourceObject1196439354")
Expand Down
Expand Up @@ -1918,7 +1918,9 @@ public void rewriteObjectTest() throws Exception {
RewriteObjectRequest.newBuilder()
.setDestinationName("destinationName-1762755655")
.setDestinationBucket(BucketName.of("[PROJECT]", "[BUCKET]").toString())
.setDestinationCustomerEncryption(CustomerEncryption.newBuilder().build())
.setDestinationKmsKey(
CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]")
.toString())
.setDestination(Object.newBuilder().build())
.setSourceBucket("sourceBucket841604581")
.setSourceObject("sourceObject1196439354")
Expand Down Expand Up @@ -1950,9 +1952,7 @@ public void rewriteObjectTest() throws Exception {

Assert.assertEquals(request.getDestinationName(), actualRequest.getDestinationName());
Assert.assertEquals(request.getDestinationBucket(), actualRequest.getDestinationBucket());
Assert.assertEquals(
request.getDestinationCustomerEncryption(),
actualRequest.getDestinationCustomerEncryption());
Assert.assertEquals(request.getDestinationKmsKey(), actualRequest.getDestinationKmsKey());
Assert.assertEquals(request.getDestination(), actualRequest.getDestination());
Assert.assertEquals(request.getSourceBucket(), actualRequest.getSourceBucket());
Assert.assertEquals(request.getSourceObject(), actualRequest.getSourceObject());
Expand Down Expand Up @@ -2004,7 +2004,9 @@ public void rewriteObjectExceptionTest() throws Exception {
RewriteObjectRequest.newBuilder()
.setDestinationName("destinationName-1762755655")
.setDestinationBucket(BucketName.of("[PROJECT]", "[BUCKET]").toString())
.setDestinationCustomerEncryption(CustomerEncryption.newBuilder().build())
.setDestinationKmsKey(
CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]")
.toString())
.setDestination(Object.newBuilder().build())
.setSourceBucket("sourceBucket841604581")
.setSourceObject("sourceObject1196439354")
Expand Down
Expand Up @@ -2636,8 +2636,8 @@ public interface EncryptionOrBuilder
*
*
* <pre>
* A Cloud KMS key that will be used to encrypt objects inserted into this
* bucket, if no encryption method is specified.
* The name of the Cloud KMS key that will be used to encrypt objects
* inserted into this bucket, if no encryption method is specified.
* </pre>
*
* <code>string default_kms_key = 1 [(.google.api.resource_reference) = { ... }</code>
Expand All @@ -2649,8 +2649,8 @@ public interface EncryptionOrBuilder
*
*
* <pre>
* A Cloud KMS key that will be used to encrypt objects inserted into this
* bucket, if no encryption method is specified.
* The name of the Cloud KMS key that will be used to encrypt objects
* inserted into this bucket, if no encryption method is specified.
* </pre>
*
* <code>string default_kms_key = 1 [(.google.api.resource_reference) = { ... }</code>
Expand Down Expand Up @@ -2758,8 +2758,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
*
*
* <pre>
* A Cloud KMS key that will be used to encrypt objects inserted into this
* bucket, if no encryption method is specified.
* The name of the Cloud KMS key that will be used to encrypt objects
* inserted into this bucket, if no encryption method is specified.
* </pre>
*
* <code>string default_kms_key = 1 [(.google.api.resource_reference) = { ... }</code>
Expand All @@ -2782,8 +2782,8 @@ public java.lang.String getDefaultKmsKey() {
*
*
* <pre>
* A Cloud KMS key that will be used to encrypt objects inserted into this
* bucket, if no encryption method is specified.
* The name of the Cloud KMS key that will be used to encrypt objects
* inserted into this bucket, if no encryption method is specified.
* </pre>
*
* <code>string default_kms_key = 1 [(.google.api.resource_reference) = { ... }</code>
Expand Down Expand Up @@ -3127,8 +3127,8 @@ public Builder mergeFrom(
*
*
* <pre>
* A Cloud KMS key that will be used to encrypt objects inserted into this
* bucket, if no encryption method is specified.
* The name of the Cloud KMS key that will be used to encrypt objects
* inserted into this bucket, if no encryption method is specified.
* </pre>
*
* <code>string default_kms_key = 1 [(.google.api.resource_reference) = { ... }</code>
Expand All @@ -3150,8 +3150,8 @@ public java.lang.String getDefaultKmsKey() {
*
*
* <pre>
* A Cloud KMS key that will be used to encrypt objects inserted into this
* bucket, if no encryption method is specified.
* The name of the Cloud KMS key that will be used to encrypt objects
* inserted into this bucket, if no encryption method is specified.
* </pre>
*
* <code>string default_kms_key = 1 [(.google.api.resource_reference) = { ... }</code>
Expand All @@ -3173,8 +3173,8 @@ public com.google.protobuf.ByteString getDefaultKmsKeyBytes() {
*
*
* <pre>
* A Cloud KMS key that will be used to encrypt objects inserted into this
* bucket, if no encryption method is specified.
* The name of the Cloud KMS key that will be used to encrypt objects
* inserted into this bucket, if no encryption method is specified.
* </pre>
*
* <code>string default_kms_key = 1 [(.google.api.resource_reference) = { ... }</code>
Expand All @@ -3195,8 +3195,8 @@ public Builder setDefaultKmsKey(java.lang.String value) {
*
*
* <pre>
* A Cloud KMS key that will be used to encrypt objects inserted into this
* bucket, if no encryption method is specified.
* The name of the Cloud KMS key that will be used to encrypt objects
* inserted into this bucket, if no encryption method is specified.
* </pre>
*
* <code>string default_kms_key = 1 [(.google.api.resource_reference) = { ... }</code>
Expand All @@ -3213,8 +3213,8 @@ public Builder clearDefaultKmsKey() {
*
*
* <pre>
* A Cloud KMS key that will be used to encrypt objects inserted into this
* bucket, if no encryption method is specified.
* The name of the Cloud KMS key that will be used to encrypt objects
* inserted into this bucket, if no encryption method is specified.
* </pre>
*
* <code>string default_kms_key = 1 [(.google.api.resource_reference) = { ... }</code>
Expand Down
Expand Up @@ -129,7 +129,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
*
*
* <pre>
* Encryption algorithm used with Customer-Supplied Encryption Keys feature.
* Encryption algorithm used with the Customer-Supplied Encryption Keys
* feature.
* </pre>
*
* <code>string encryption_algorithm = 1;</code>
Expand All @@ -152,7 +153,8 @@ public java.lang.String getEncryptionAlgorithm() {
*
*
* <pre>
* Encryption algorithm used with Customer-Supplied Encryption Keys feature.
* Encryption algorithm used with the Customer-Supplied Encryption Keys
* feature.
* </pre>
*
* <code>string encryption_algorithm = 1;</code>
Expand All @@ -178,7 +180,7 @@ public com.google.protobuf.ByteString getEncryptionAlgorithmBytes() {
*
*
* <pre>
* Encryption key used with Customer-Supplied Encryption Keys feature.
* Encryption key used with the Customer-Supplied Encryption Keys feature.
* In raw bytes format (not base64-encoded).
* </pre>
*
Expand All @@ -197,8 +199,8 @@ public com.google.protobuf.ByteString getEncryptionKeyBytes() {
*
*
* <pre>
* SHA256 hash of encryption key used with Customer-Supplied Encryption Keys
* feature.
* SHA256 hash of encryption key used with the Customer-Supplied Encryption
* Keys feature.
* </pre>
*
* <code>bytes encryption_key_sha256_bytes = 5;</code>
Expand Down Expand Up @@ -562,7 +564,8 @@ public Builder mergeFrom(
*
*
* <pre>
* Encryption algorithm used with Customer-Supplied Encryption Keys feature.
* Encryption algorithm used with the Customer-Supplied Encryption Keys
* feature.
* </pre>
*
* <code>string encryption_algorithm = 1;</code>
Expand All @@ -584,7 +587,8 @@ public java.lang.String getEncryptionAlgorithm() {
*
*
* <pre>
* Encryption algorithm used with Customer-Supplied Encryption Keys feature.
* Encryption algorithm used with the Customer-Supplied Encryption Keys
* feature.
* </pre>
*
* <code>string encryption_algorithm = 1;</code>
Expand All @@ -606,7 +610,8 @@ public com.google.protobuf.ByteString getEncryptionAlgorithmBytes() {
*
*
* <pre>
* Encryption algorithm used with Customer-Supplied Encryption Keys feature.
* Encryption algorithm used with the Customer-Supplied Encryption Keys
* feature.
* </pre>
*
* <code>string encryption_algorithm = 1;</code>
Expand All @@ -627,7 +632,8 @@ public Builder setEncryptionAlgorithm(java.lang.String value) {
*
*
* <pre>
* Encryption algorithm used with Customer-Supplied Encryption Keys feature.
* Encryption algorithm used with the Customer-Supplied Encryption Keys
* feature.
* </pre>
*
* <code>string encryption_algorithm = 1;</code>
Expand All @@ -644,7 +650,8 @@ public Builder clearEncryptionAlgorithm() {
*
*
* <pre>
* Encryption algorithm used with Customer-Supplied Encryption Keys feature.
* Encryption algorithm used with the Customer-Supplied Encryption Keys
* feature.
* </pre>
*
* <code>string encryption_algorithm = 1;</code>
Expand All @@ -669,7 +676,7 @@ public Builder setEncryptionAlgorithmBytes(com.google.protobuf.ByteString value)
*
*
* <pre>
* Encryption key used with Customer-Supplied Encryption Keys feature.
* Encryption key used with the Customer-Supplied Encryption Keys feature.
* In raw bytes format (not base64-encoded).
* </pre>
*
Expand All @@ -685,7 +692,7 @@ public com.google.protobuf.ByteString getEncryptionKeyBytes() {
*
*
* <pre>
* Encryption key used with Customer-Supplied Encryption Keys feature.
* Encryption key used with the Customer-Supplied Encryption Keys feature.
* In raw bytes format (not base64-encoded).
* </pre>
*
Expand All @@ -707,7 +714,7 @@ public Builder setEncryptionKeyBytes(com.google.protobuf.ByteString value) {
*
*
* <pre>
* Encryption key used with Customer-Supplied Encryption Keys feature.
* Encryption key used with the Customer-Supplied Encryption Keys feature.
* In raw bytes format (not base64-encoded).
* </pre>
*
Expand All @@ -728,8 +735,8 @@ public Builder clearEncryptionKeyBytes() {
*
*
* <pre>
* SHA256 hash of encryption key used with Customer-Supplied Encryption Keys
* feature.
* SHA256 hash of encryption key used with the Customer-Supplied Encryption
* Keys feature.
* </pre>
*
* <code>bytes encryption_key_sha256_bytes = 5;</code>
Expand All @@ -744,8 +751,8 @@ public com.google.protobuf.ByteString getEncryptionKeySha256Bytes() {
*
*
* <pre>
* SHA256 hash of encryption key used with Customer-Supplied Encryption Keys
* feature.
* SHA256 hash of encryption key used with the Customer-Supplied Encryption
* Keys feature.
* </pre>
*
* <code>bytes encryption_key_sha256_bytes = 5;</code>
Expand All @@ -766,8 +773,8 @@ public Builder setEncryptionKeySha256Bytes(com.google.protobuf.ByteString value)
*
*
* <pre>
* SHA256 hash of encryption key used with Customer-Supplied Encryption Keys
* feature.
* SHA256 hash of encryption key used with the Customer-Supplied Encryption
* Keys feature.
* </pre>
*
* <code>bytes encryption_key_sha256_bytes = 5;</code>
Expand Down
Expand Up @@ -27,7 +27,8 @@ public interface CommonObjectRequestParamsOrBuilder
*
*
* <pre>
* Encryption algorithm used with Customer-Supplied Encryption Keys feature.
* Encryption algorithm used with the Customer-Supplied Encryption Keys
* feature.
* </pre>
*
* <code>string encryption_algorithm = 1;</code>
Expand All @@ -39,7 +40,8 @@ public interface CommonObjectRequestParamsOrBuilder
*
*
* <pre>
* Encryption algorithm used with Customer-Supplied Encryption Keys feature.
* Encryption algorithm used with the Customer-Supplied Encryption Keys
* feature.
* </pre>
*
* <code>string encryption_algorithm = 1;</code>
Expand All @@ -52,7 +54,7 @@ public interface CommonObjectRequestParamsOrBuilder
*
*
* <pre>
* Encryption key used with Customer-Supplied Encryption Keys feature.
* Encryption key used with the Customer-Supplied Encryption Keys feature.
* In raw bytes format (not base64-encoded).
* </pre>
*
Expand All @@ -66,8 +68,8 @@ public interface CommonObjectRequestParamsOrBuilder
*
*
* <pre>
* SHA256 hash of encryption key used with Customer-Supplied Encryption Keys
* feature.
* SHA256 hash of encryption key used with the Customer-Supplied Encryption
* Keys feature.
* </pre>
*
* <code>bytes encryption_key_sha256_bytes = 5;</code>
Expand Down
Expand Up @@ -22,8 +22,8 @@
*
*
* <pre>
* Describes the customer-specified mechanism used to store an Object's data at
* rest.
* Describes the Customer-Supplied Encryption Key mechanism used to store an
* Object's data at rest.
* </pre>
*
* Protobuf type {@code google.storage.v2.CustomerEncryption}
Expand Down Expand Up @@ -357,8 +357,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build
*
*
* <pre>
* Describes the customer-specified mechanism used to store an Object's data at
* rest.
* Describes the Customer-Supplied Encryption Key mechanism used to store an
* Object's data at rest.
* </pre>
*
* Protobuf type {@code google.storage.v2.CustomerEncryption}
Expand Down

0 comments on commit 7845c0e

Please sign in to comment.