Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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