Skip to content

Commit

Permalink
feat: regenerate gapic storage v2 client as of googleapis/googleapis@8…
Browse files Browse the repository at this point in the history
…44d0f7 (#1673)

feat: Add routing annotations

feat!: Update CreateBucket spec to state that bucket field is not REQUIRED

feat!: Update UpdateBucketRequest to state that bucket and update_mask fields are REQUIRED

feat!: Update ReadObjectRequest to state that bucket and object fields are REQUIRED

feat!: Update WriteObjectSpec to state that resource field is REQUIRED

feat!: Update RewriteObjectRequest to state that destination_name and destination_bucket fields are REQUIRED

feat!: Update StartResumableWriteRequest to state that write_object_spec field is REQUIRED

feat!: Update UpdateObjectRequest to state that object and update_mask fields are REQUIRED

docs: Remove OPTIONAL annotations on fields where the fields aren't required, and to remove proto-optional annotations

feat!: Update BucketAccessControl and specs to include new entity_alt field.

PiperOrigin-RevId: 477175825

Source-Link: googleapis/googleapis@844d0f7

Source-Link: googleapis/googleapis-gen@603a9c8
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjAzYTljOGEyZWYzNmE0MDhiMDk5NjEzMDAzMDQ0NDZlYWQ5YWE0MyJ9

* 🦉 Updates from OwlBot post-processor

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

* chore: update clirr rules for new proto definition

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: BenWhitehead <[email protected]>
  • Loading branch information
3 people committed Sep 28, 2022
1 parent f74d1ee commit bd818b3
Show file tree
Hide file tree
Showing 31 changed files with 1,859 additions and 1,085 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -442,9 +442,9 @@ public final UnaryCallable<GetBucketRequest, Bucket> getBucketCallable() {
* }</pre>
*
* @param parent Required. The project to which this bucket will belong.
* @param bucket Required. Properties of the new bucket being inserted. The project and name of
* the bucket are specified in the parent and bucket_id fields, respectively. Populating those
* fields in `bucket` will result in an error.
* @param bucket Properties of the new bucket being inserted. The project and name of the bucket
* are specified in the parent and bucket_id fields, respectively. Populating those fields in
* `bucket` will result in an error.
* @param bucketId Required. The ID to use for this bucket, which will become the final component
* of the bucket's resource name. For example, the value `foo` might result in a bucket with
* the name `projects/123456/buckets/foo`.
Expand Down Expand Up @@ -481,9 +481,9 @@ public final Bucket createBucket(ProjectName parent, Bucket bucket, String bucke
* }</pre>
*
* @param parent Required. The project to which this bucket will belong.
* @param bucket Required. Properties of the new bucket being inserted. The project and name of
* the bucket are specified in the parent and bucket_id fields, respectively. Populating those
* fields in `bucket` will result in an error.
* @param bucket Properties of the new bucket being inserted. The project and name of the bucket
* are specified in the parent and bucket_id fields, respectively. Populating those fields in
* `bucket` will result in an error.
* @param bucketId Required. The ID to use for this bucket, which will become the final component
* of the bucket's resource name. For example, the value `foo` might result in a bucket with
* the name `projects/123456/buckets/foo`.
Expand Down Expand Up @@ -1256,9 +1256,9 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq
* }
* }</pre>
*
* @param bucket The bucket to update. The bucket's `name` field will be used to identify the
* bucket.
* @param updateMask List of fields to be updated.
* @param bucket Required. The bucket to update. The bucket's `name` field will be used to
* identify the bucket.
* @param updateMask Required. List of fields to be updated.
* <p>To specify ALL fields, equivalent to the JSON API's "update" function, specify a single
* field with the value `&#42;`. Note: not recommended. If a new field is introduced at a
* later time, an older client updating with the `&#42;` may accidentally reset the new
Expand Down Expand Up @@ -2338,11 +2338,11 @@ public final ServerStreamingCallable<ReadObjectRequest, ReadObjectResponse> read
* }
* }</pre>
*
* @param object The object to update. The object's bucket and name fields are used to identify
* the object to update. If present, the object's generation field selects a specific revision
* of this object whose metadata should be updated. Otherwise, assumes the live version of the
* object.
* @param updateMask List of fields to be updated.
* @param object Required. The object to update. The object's bucket and name fields are used to
* identify the object to update. If present, the object's generation field selects a specific
* revision of this object whose metadata should be updated. Otherwise, assumes the live
* version of the object.
* @param updateMask Required. List of fields to be updated.
* <p>To specify ALL fields, equivalent to the JSON API's "update" function, specify a single
* field with the value `&#42;`. Note: not recommended. If a new field is introduced at a
* later time, an older client updating with the `&#42;` may accidentally reset the new
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,10 @@ public class GrpcStorageStub extends StorageStub {
private static final PathTemplate DELETE_BUCKET_0_PATH_TEMPLATE =
PathTemplate.create("{bucket=**}");
private static final PathTemplate GET_BUCKET_0_PATH_TEMPLATE = PathTemplate.create("{bucket=**}");
private static final PathTemplate CREATE_BUCKET_0_PATH_TEMPLATE =
PathTemplate.create("{project=**}");
private static final PathTemplate LIST_BUCKETS_0_PATH_TEMPLATE =
PathTemplate.create("{project=**}");
private static final PathTemplate LOCK_BUCKET_RETENTION_POLICY_0_PATH_TEMPLATE =
PathTemplate.create("{bucket=**}");
private static final PathTemplate GET_IAM_POLICY_0_PATH_TEMPLATE =
Expand Down Expand Up @@ -481,6 +485,18 @@ public class GrpcStorageStub extends StorageStub {
PathTemplate.create("{bucket=**}");
private static final PathTemplate QUERY_WRITE_STATUS_0_PATH_TEMPLATE =
PathTemplate.create("{bucket=projects/*/buckets/*}/**");
private static final PathTemplate GET_SERVICE_ACCOUNT_0_PATH_TEMPLATE =
PathTemplate.create("{project=**}");
private static final PathTemplate CREATE_HMAC_KEY_0_PATH_TEMPLATE =
PathTemplate.create("{project=**}");
private static final PathTemplate DELETE_HMAC_KEY_0_PATH_TEMPLATE =
PathTemplate.create("{project=**}");
private static final PathTemplate GET_HMAC_KEY_0_PATH_TEMPLATE =
PathTemplate.create("{project=**}");
private static final PathTemplate LIST_HMAC_KEYS_0_PATH_TEMPLATE =
PathTemplate.create("{project=**}");
private static final PathTemplate UPDATE_HMAC_KEY_0_PATH_TEMPLATE =
PathTemplate.create("{project=**}");

public static final GrpcStorageStub create(StorageStubSettings settings) throws IOException {
return new GrpcStorageStub(settings, ClientContext.create(settings));
Expand Down Expand Up @@ -540,10 +556,22 @@ protected GrpcStorageStub(
GrpcCallSettings<CreateBucketRequest, Bucket> createBucketTransportSettings =
GrpcCallSettings.<CreateBucketRequest, Bucket>newBuilder()
.setMethodDescriptor(createBucketMethodDescriptor)
.setParamsExtractor(
request -> {
RequestParamsBuilder builder = RequestParamsBuilder.create();
builder.add(request.getParent(), "project", CREATE_BUCKET_0_PATH_TEMPLATE);
return builder.build();
})
.build();
GrpcCallSettings<ListBucketsRequest, ListBucketsResponse> listBucketsTransportSettings =
GrpcCallSettings.<ListBucketsRequest, ListBucketsResponse>newBuilder()
.setMethodDescriptor(listBucketsMethodDescriptor)
.setParamsExtractor(
request -> {
RequestParamsBuilder builder = RequestParamsBuilder.create();
builder.add(request.getParent(), "project", LIST_BUCKETS_0_PATH_TEMPLATE);
return builder.build();
})
.build();
GrpcCallSettings<LockBucketRetentionPolicyRequest, Bucket>
lockBucketRetentionPolicyTransportSettings =
Expand Down Expand Up @@ -792,26 +820,67 @@ protected GrpcStorageStub(
GrpcCallSettings<GetServiceAccountRequest, ServiceAccount> getServiceAccountTransportSettings =
GrpcCallSettings.<GetServiceAccountRequest, ServiceAccount>newBuilder()
.setMethodDescriptor(getServiceAccountMethodDescriptor)
.setParamsExtractor(
request -> {
RequestParamsBuilder builder = RequestParamsBuilder.create();
builder.add(request.getProject(), "project", GET_SERVICE_ACCOUNT_0_PATH_TEMPLATE);
return builder.build();
})
.build();
GrpcCallSettings<CreateHmacKeyRequest, CreateHmacKeyResponse> createHmacKeyTransportSettings =
GrpcCallSettings.<CreateHmacKeyRequest, CreateHmacKeyResponse>newBuilder()
.setMethodDescriptor(createHmacKeyMethodDescriptor)
.setParamsExtractor(
request -> {
RequestParamsBuilder builder = RequestParamsBuilder.create();
builder.add(request.getProject(), "project", CREATE_HMAC_KEY_0_PATH_TEMPLATE);
return builder.build();
})
.build();
GrpcCallSettings<DeleteHmacKeyRequest, Empty> deleteHmacKeyTransportSettings =
GrpcCallSettings.<DeleteHmacKeyRequest, Empty>newBuilder()
.setMethodDescriptor(deleteHmacKeyMethodDescriptor)
.setParamsExtractor(
request -> {
RequestParamsBuilder builder = RequestParamsBuilder.create();
builder.add(request.getProject(), "project", DELETE_HMAC_KEY_0_PATH_TEMPLATE);
return builder.build();
})
.build();
GrpcCallSettings<GetHmacKeyRequest, HmacKeyMetadata> getHmacKeyTransportSettings =
GrpcCallSettings.<GetHmacKeyRequest, HmacKeyMetadata>newBuilder()
.setMethodDescriptor(getHmacKeyMethodDescriptor)
.setParamsExtractor(
request -> {
RequestParamsBuilder builder = RequestParamsBuilder.create();
builder.add(request.getProject(), "project", GET_HMAC_KEY_0_PATH_TEMPLATE);
return builder.build();
})
.build();
GrpcCallSettings<ListHmacKeysRequest, ListHmacKeysResponse> listHmacKeysTransportSettings =
GrpcCallSettings.<ListHmacKeysRequest, ListHmacKeysResponse>newBuilder()
.setMethodDescriptor(listHmacKeysMethodDescriptor)
.setParamsExtractor(
request -> {
RequestParamsBuilder builder = RequestParamsBuilder.create();
builder.add(request.getProject(), "project", LIST_HMAC_KEYS_0_PATH_TEMPLATE);
return builder.build();
})
.build();
GrpcCallSettings<UpdateHmacKeyRequest, HmacKeyMetadata> updateHmacKeyTransportSettings =
GrpcCallSettings.<UpdateHmacKeyRequest, HmacKeyMetadata>newBuilder()
.setMethodDescriptor(updateHmacKeyMethodDescriptor)
.setParamsExtractor(
request -> {
RequestParamsBuilder builder = RequestParamsBuilder.create();
if (request.getHmacKey() != null) {
builder.add(
request.getHmacKey().getProject(),
"project",
UPDATE_HMAC_KEY_0_PATH_TEMPLATE);
}
return builder.build();
})
.build();

this.deleteBucketCallable =
Expand Down
19 changes: 19 additions & 0 deletions proto-google-cloud-storage-v2/clirr-ignored-differences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,23 @@
<method>* *ObjectSize()</method>
</difference>

<!-- Allow adding new entity_alt field to Acls -->
<difference>
<differenceType>7012</differenceType>
<className>com/google/storage/v2/BucketAccessControlOrBuilder</className>
<method>* *EntityAlt*()</method>
</difference>
<difference>
<differenceType>7012</differenceType>
<className>com/google/storage/v2/ObjectAccessControlOrBuilder</className>
<method>* *EntityAlt*()</method>
</difference>

<!-- Allow Bucket.RetentionPolicy.retention_period to be optional -->
<difference>
<differenceType>7012</differenceType>
<className>com/google/storage/v2/Bucket$RetentionPolicyOrBuilder</className>
<method>boolean hasRetentionPeriod()</method>
</difference>

</differences>
Loading

0 comments on commit bd818b3

Please sign in to comment.