@@ -771,7 +771,7 @@ public final Bucket lockBucketRetentionPolicy(LockBucketRetentionPolicyRequest r
771771
772772 // AUTO-GENERATED DOCUMENTATION AND METHOD.
773773 /**
774- * Gets the IAM policy for a specified bucket.
774+ * Gets the IAM policy for a specified bucket or object .
775775 *
776776 * <p>Sample code:
777777 *
@@ -799,7 +799,7 @@ public final Policy getIamPolicy(ResourceName resource) {
799799
800800 // AUTO-GENERATED DOCUMENTATION AND METHOD.
801801 /**
802- * Gets the IAM policy for a specified bucket.
802+ * Gets the IAM policy for a specified bucket or object .
803803 *
804804 * <p>Sample code:
805805 *
@@ -824,7 +824,7 @@ public final Policy getIamPolicy(String resource) {
824824
825825 // AUTO-GENERATED DOCUMENTATION AND METHOD.
826826 /**
827- * Gets the IAM policy for a specified bucket.
827+ * Gets the IAM policy for a specified bucket or object .
828828 *
829829 * <p>Sample code:
830830 *
@@ -852,7 +852,7 @@ public final Policy getIamPolicy(GetIamPolicyRequest request) {
852852
853853 // AUTO-GENERATED DOCUMENTATION AND METHOD.
854854 /**
855- * Gets the IAM policy for a specified bucket.
855+ * Gets the IAM policy for a specified bucket or object .
856856 *
857857 * <p>Sample code:
858858 *
@@ -879,7 +879,7 @@ public final UnaryCallable<GetIamPolicyRequest, Policy> getIamPolicyCallable() {
879879
880880 // AUTO-GENERATED DOCUMENTATION AND METHOD.
881881 /**
882- * Updates an IAM policy for the specified bucket.
882+ * Updates an IAM policy for the specified bucket or object .
883883 *
884884 * <p>Sample code:
885885 *
@@ -912,7 +912,7 @@ public final Policy setIamPolicy(ResourceName resource, Policy policy) {
912912
913913 // AUTO-GENERATED DOCUMENTATION AND METHOD.
914914 /**
915- * Updates an IAM policy for the specified bucket.
915+ * Updates an IAM policy for the specified bucket or object .
916916 *
917917 * <p>Sample code:
918918 *
@@ -942,7 +942,7 @@ public final Policy setIamPolicy(String resource, Policy policy) {
942942
943943 // AUTO-GENERATED DOCUMENTATION AND METHOD.
944944 /**
945- * Updates an IAM policy for the specified bucket.
945+ * Updates an IAM policy for the specified bucket or object .
946946 *
947947 * <p>Sample code:
948948 *
@@ -971,7 +971,7 @@ public final Policy setIamPolicy(SetIamPolicyRequest request) {
971971
972972 // AUTO-GENERATED DOCUMENTATION AND METHOD.
973973 /**
974- * Updates an IAM policy for the specified bucket.
974+ * Updates an IAM policy for the specified bucket or object .
975975 *
976976 * <p>Sample code:
977977 *
@@ -999,7 +999,8 @@ public final UnaryCallable<SetIamPolicyRequest, Policy> setIamPolicyCallable() {
999999
10001000 // AUTO-GENERATED DOCUMENTATION AND METHOD.
10011001 /**
1002- * Tests a set of permissions on the given bucket to see which, if any, are held by the caller.
1002+ * Tests a set of permissions on the given bucket or object to see which, if any, are held by the
1003+ * caller.
10031004 *
10041005 * <p>Sample code:
10051006 *
@@ -1033,7 +1034,8 @@ public final TestIamPermissionsResponse testIamPermissions(
10331034
10341035 // AUTO-GENERATED DOCUMENTATION AND METHOD.
10351036 /**
1036- * Tests a set of permissions on the given bucket to see which, if any, are held by the caller.
1037+ * Tests a set of permissions on the given bucket or object to see which, if any, are held by the
1038+ * caller.
10371039 *
10381040 * <p>Sample code:
10391041 *
@@ -1067,7 +1069,8 @@ public final TestIamPermissionsResponse testIamPermissions(
10671069
10681070 // AUTO-GENERATED DOCUMENTATION AND METHOD.
10691071 /**
1070- * Tests a set of permissions on the given bucket to see which, if any, are held by the caller.
1072+ * Tests a set of permissions on the given bucket or object to see which, if any, are held by the
1073+ * caller.
10711074 *
10721075 * <p>Sample code:
10731076 *
@@ -1095,7 +1098,8 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq
10951098
10961099 // AUTO-GENERATED DOCUMENTATION AND METHOD.
10971100 /**
1098- * Tests a set of permissions on the given bucket to see which, if any, are held by the caller.
1101+ * Tests a set of permissions on the given bucket or object to see which, if any, are held by the
1102+ * caller.
10991103 *
11001104 * <p>Sample code:
11011105 *
@@ -1820,7 +1824,6 @@ public final void deleteObject(String bucket, String object, long generation) {
18201824 * DeleteObjectRequest.newBuilder()
18211825 * .setBucket("bucket-1378203158")
18221826 * .setObject("object-1023368385")
1823- * .setUploadId("uploadId1563990780")
18241827 * .setGeneration(305703192)
18251828 * .setIfGenerationMatch(-1086241088)
18261829 * .setIfGenerationNotMatch(1475720404)
@@ -1854,7 +1857,6 @@ public final void deleteObject(DeleteObjectRequest request) {
18541857 * DeleteObjectRequest.newBuilder()
18551858 * .setBucket("bucket-1378203158")
18561859 * .setObject("object-1023368385")
1857- * .setUploadId("uploadId1563990780")
18581860 * .setGeneration(305703192)
18591861 * .setIfGenerationMatch(-1086241088)
18601862 * .setIfGenerationNotMatch(1475720404)
@@ -1872,6 +1874,79 @@ public final UnaryCallable<DeleteObjectRequest, Empty> deleteObjectCallable() {
18721874 return stub .deleteObjectCallable ();
18731875 }
18741876
1877+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
1878+ /**
1879+ * Cancels an in-progress resumable upload.
1880+ *
1881+ * <p>Sample code:
1882+ *
1883+ * <pre>{@code
1884+ * // This snippet has been automatically generated for illustrative purposes only.
1885+ * // It may require modifications to work in your environment.
1886+ * try (StorageClient storageClient = StorageClient.create()) {
1887+ * String uploadId = "uploadId1563990780";
1888+ * CancelResumableWriteResponse response = storageClient.cancelResumableWrite(uploadId);
1889+ * }
1890+ * }</pre>
1891+ *
1892+ * @param uploadId Required. The upload_id of the resumable upload to cancel. This should be
1893+ * copied from the `upload_id` field of `StartResumableWriteResponse`.
1894+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1895+ */
1896+ public final CancelResumableWriteResponse cancelResumableWrite (String uploadId ) {
1897+ CancelResumableWriteRequest request =
1898+ CancelResumableWriteRequest .newBuilder ().setUploadId (uploadId ).build ();
1899+ return cancelResumableWrite (request );
1900+ }
1901+
1902+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
1903+ /**
1904+ * Cancels an in-progress resumable upload.
1905+ *
1906+ * <p>Sample code:
1907+ *
1908+ * <pre>{@code
1909+ * // This snippet has been automatically generated for illustrative purposes only.
1910+ * // It may require modifications to work in your environment.
1911+ * try (StorageClient storageClient = StorageClient.create()) {
1912+ * CancelResumableWriteRequest request =
1913+ * CancelResumableWriteRequest.newBuilder().setUploadId("uploadId1563990780").build();
1914+ * CancelResumableWriteResponse response = storageClient.cancelResumableWrite(request);
1915+ * }
1916+ * }</pre>
1917+ *
1918+ * @param request The request object containing all of the parameters for the API call.
1919+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1920+ */
1921+ public final CancelResumableWriteResponse cancelResumableWrite (
1922+ CancelResumableWriteRequest request ) {
1923+ return cancelResumableWriteCallable ().call (request );
1924+ }
1925+
1926+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
1927+ /**
1928+ * Cancels an in-progress resumable upload.
1929+ *
1930+ * <p>Sample code:
1931+ *
1932+ * <pre>{@code
1933+ * // This snippet has been automatically generated for illustrative purposes only.
1934+ * // It may require modifications to work in your environment.
1935+ * try (StorageClient storageClient = StorageClient.create()) {
1936+ * CancelResumableWriteRequest request =
1937+ * CancelResumableWriteRequest.newBuilder().setUploadId("uploadId1563990780").build();
1938+ * ApiFuture<CancelResumableWriteResponse> future =
1939+ * storageClient.cancelResumableWriteCallable().futureCall(request);
1940+ * // Do something.
1941+ * CancelResumableWriteResponse response = future.get();
1942+ * }
1943+ * }</pre>
1944+ */
1945+ public final UnaryCallable <CancelResumableWriteRequest , CancelResumableWriteResponse >
1946+ cancelResumableWriteCallable () {
1947+ return stub .cancelResumableWriteCallable ();
1948+ }
1949+
18751950 // AUTO-GENERATED DOCUMENTATION AND METHOD.
18761951 /**
18771952 * Retrieves an object's metadata.
@@ -2653,7 +2728,8 @@ public final QueryWriteStatusResponse queryWriteStatus(QueryWriteStatusRequest r
26532728 * }
26542729 * }</pre>
26552730 *
2656- * @param project Required. Project ID.
2731+ * @param project Required. Project ID, in the format of "projects/<projectIdentifier>".
2732+ * <projectIdentifier> can be the project ID or project number.
26572733 * @throws com.google.api.gax.rpc.ApiException if the remote call fails
26582734 */
26592735 public final ServiceAccount getServiceAccount (ProjectName project ) {
@@ -2679,7 +2755,8 @@ public final ServiceAccount getServiceAccount(ProjectName project) {
26792755 * }
26802756 * }</pre>
26812757 *
2682- * @param project Required. Project ID.
2758+ * @param project Required. Project ID, in the format of "projects/<projectIdentifier>".
2759+ * <projectIdentifier> can be the project ID or project number.
26832760 * @throws com.google.api.gax.rpc.ApiException if the remote call fails
26842761 */
26852762 public final ServiceAccount getServiceAccount (String project ) {
@@ -2754,7 +2831,9 @@ public final UnaryCallable<GetServiceAccountRequest, ServiceAccount> getServiceA
27542831 * }
27552832 * }</pre>
27562833 *
2757- * @param project Required. The project that the HMAC-owning service account lives in.
2834+ * @param project Required. The project that the HMAC-owning service account lives in, in the
2835+ * format of "projects/<projectIdentifier>". <projectIdentifier> can be the
2836+ * project ID or project number.
27582837 * @param serviceAccountEmail Required. The service account to create the HMAC for.
27592838 * @throws com.google.api.gax.rpc.ApiException if the remote call fails
27602839 */
@@ -2784,7 +2863,9 @@ public final CreateHmacKeyResponse createHmacKey(
27842863 * }
27852864 * }</pre>
27862865 *
2787- * @param project Required. The project that the HMAC-owning service account lives in.
2866+ * @param project Required. The project that the HMAC-owning service account lives in, in the
2867+ * format of "projects/<projectIdentifier>". <projectIdentifier> can be the
2868+ * project ID or project number.
27882869 * @param serviceAccountEmail Required. The service account to create the HMAC for.
27892870 * @throws com.google.api.gax.rpc.ApiException if the remote call fails
27902871 */
@@ -2866,7 +2947,9 @@ public final UnaryCallable<CreateHmacKeyRequest, CreateHmacKeyResponse> createHm
28662947 * }</pre>
28672948 *
28682949 * @param accessId Required. The identifying key for the HMAC to delete.
2869- * @param project Required. The project id the HMAC key lies in.
2950+ * @param project Required. The project that owns the HMAC key, in the format of
2951+ * "projects/<projectIdentifier>". <projectIdentifier> can be the project ID or
2952+ * project number.
28702953 * @throws com.google.api.gax.rpc.ApiException if the remote call fails
28712954 */
28722955 public final void deleteHmacKey (String accessId , ProjectName project ) {
@@ -2895,7 +2978,9 @@ public final void deleteHmacKey(String accessId, ProjectName project) {
28952978 * }</pre>
28962979 *
28972980 * @param accessId Required. The identifying key for the HMAC to delete.
2898- * @param project Required. The project id the HMAC key lies in.
2981+ * @param project Required. The project that owns the HMAC key, in the format of
2982+ * "projects/<projectIdentifier>". <projectIdentifier> can be the project ID or
2983+ * project number.
28992984 * @throws com.google.api.gax.rpc.ApiException if the remote call fails
29002985 */
29012986 public final void deleteHmacKey (String accessId , String project ) {
@@ -2972,7 +3057,9 @@ public final UnaryCallable<DeleteHmacKeyRequest, Empty> deleteHmacKeyCallable()
29723057 * }</pre>
29733058 *
29743059 * @param accessId Required. The identifying key for the HMAC to delete.
2975- * @param project Required. The project id the HMAC key lies in.
3060+ * @param project Required. The project the HMAC key lies in, in the format of
3061+ * "projects/<projectIdentifier>". <projectIdentifier> can be the project ID or
3062+ * project number.
29763063 * @throws com.google.api.gax.rpc.ApiException if the remote call fails
29773064 */
29783065 public final HmacKeyMetadata getHmacKey (String accessId , ProjectName project ) {
@@ -3001,7 +3088,9 @@ public final HmacKeyMetadata getHmacKey(String accessId, ProjectName project) {
30013088 * }</pre>
30023089 *
30033090 * @param accessId Required. The identifying key for the HMAC to delete.
3004- * @param project Required. The project id the HMAC key lies in.
3091+ * @param project Required. The project the HMAC key lies in, in the format of
3092+ * "projects/<projectIdentifier>". <projectIdentifier> can be the project ID or
3093+ * project number.
30053094 * @throws com.google.api.gax.rpc.ApiException if the remote call fails
30063095 */
30073096 public final HmacKeyMetadata getHmacKey (String accessId , String project ) {
@@ -3078,7 +3167,9 @@ public final UnaryCallable<GetHmacKeyRequest, HmacKeyMetadata> getHmacKeyCallabl
30783167 * }
30793168 * }</pre>
30803169 *
3081- * @param project Required. The project id to list HMAC keys for.
3170+ * @param project Required. The project to list HMAC keys for, in the format of
3171+ * "projects/<projectIdentifier>". <projectIdentifier> can be the project ID or
3172+ * project number.
30823173 * @throws com.google.api.gax.rpc.ApiException if the remote call fails
30833174 */
30843175 public final ListHmacKeysPagedResponse listHmacKeys (ProjectName project ) {
@@ -3106,7 +3197,9 @@ public final ListHmacKeysPagedResponse listHmacKeys(ProjectName project) {
31063197 * }
31073198 * }</pre>
31083199 *
3109- * @param project Required. The project id to list HMAC keys for.
3200+ * @param project Required. The project to list HMAC keys for, in the format of
3201+ * "projects/<projectIdentifier>". <projectIdentifier> can be the project ID or
3202+ * project number.
31103203 * @throws com.google.api.gax.rpc.ApiException if the remote call fails
31113204 */
31123205 public final ListHmacKeysPagedResponse listHmacKeys (String project ) {
@@ -3233,7 +3326,8 @@ public final UnaryCallable<ListHmacKeysRequest, ListHmacKeysResponse> listHmacKe
32333326 * @param hmacKey Required. The HMAC key to update. If present, the hmac_key's `id` field will be
32343327 * used to identify the key. Otherwise, the hmac_key's access_id and project fields will be
32353328 * used to identify the key.
3236- * @param updateMask Update mask for hmac_key.
3329+ * @param updateMask Update mask for hmac_key. Not specifying any fields will mean only the
3330+ * `state` field is updated to the value specified in `hmac_key`.
32373331 * @throws com.google.api.gax.rpc.ApiException if the remote call fails
32383332 */
32393333 public final HmacKeyMetadata updateHmacKey (HmacKeyMetadata hmacKey , FieldMask updateMask ) {
0 commit comments