@@ -771,7 +771,7 @@ public final Bucket lockBucketRetentionPolicy(LockBucketRetentionPolicyRequest r
771
771
772
772
// AUTO-GENERATED DOCUMENTATION AND METHOD.
773
773
/**
774
- * Gets the IAM policy for a specified bucket.
774
+ * Gets the IAM policy for a specified bucket or object .
775
775
*
776
776
* <p>Sample code:
777
777
*
@@ -799,7 +799,7 @@ public final Policy getIamPolicy(ResourceName resource) {
799
799
800
800
// AUTO-GENERATED DOCUMENTATION AND METHOD.
801
801
/**
802
- * Gets the IAM policy for a specified bucket.
802
+ * Gets the IAM policy for a specified bucket or object .
803
803
*
804
804
* <p>Sample code:
805
805
*
@@ -824,7 +824,7 @@ public final Policy getIamPolicy(String resource) {
824
824
825
825
// AUTO-GENERATED DOCUMENTATION AND METHOD.
826
826
/**
827
- * Gets the IAM policy for a specified bucket.
827
+ * Gets the IAM policy for a specified bucket or object .
828
828
*
829
829
* <p>Sample code:
830
830
*
@@ -852,7 +852,7 @@ public final Policy getIamPolicy(GetIamPolicyRequest request) {
852
852
853
853
// AUTO-GENERATED DOCUMENTATION AND METHOD.
854
854
/**
855
- * Gets the IAM policy for a specified bucket.
855
+ * Gets the IAM policy for a specified bucket or object .
856
856
*
857
857
* <p>Sample code:
858
858
*
@@ -879,7 +879,7 @@ public final UnaryCallable<GetIamPolicyRequest, Policy> getIamPolicyCallable() {
879
879
880
880
// AUTO-GENERATED DOCUMENTATION AND METHOD.
881
881
/**
882
- * Updates an IAM policy for the specified bucket.
882
+ * Updates an IAM policy for the specified bucket or object .
883
883
*
884
884
* <p>Sample code:
885
885
*
@@ -912,7 +912,7 @@ public final Policy setIamPolicy(ResourceName resource, Policy policy) {
912
912
913
913
// AUTO-GENERATED DOCUMENTATION AND METHOD.
914
914
/**
915
- * Updates an IAM policy for the specified bucket.
915
+ * Updates an IAM policy for the specified bucket or object .
916
916
*
917
917
* <p>Sample code:
918
918
*
@@ -942,7 +942,7 @@ public final Policy setIamPolicy(String resource, Policy policy) {
942
942
943
943
// AUTO-GENERATED DOCUMENTATION AND METHOD.
944
944
/**
945
- * Updates an IAM policy for the specified bucket.
945
+ * Updates an IAM policy for the specified bucket or object .
946
946
*
947
947
* <p>Sample code:
948
948
*
@@ -971,7 +971,7 @@ public final Policy setIamPolicy(SetIamPolicyRequest request) {
971
971
972
972
// AUTO-GENERATED DOCUMENTATION AND METHOD.
973
973
/**
974
- * Updates an IAM policy for the specified bucket.
974
+ * Updates an IAM policy for the specified bucket or object .
975
975
*
976
976
* <p>Sample code:
977
977
*
@@ -999,7 +999,8 @@ public final UnaryCallable<SetIamPolicyRequest, Policy> setIamPolicyCallable() {
999
999
1000
1000
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1001
1001
/**
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.
1003
1004
*
1004
1005
* <p>Sample code:
1005
1006
*
@@ -1033,7 +1034,8 @@ public final TestIamPermissionsResponse testIamPermissions(
1033
1034
1034
1035
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1035
1036
/**
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.
1037
1039
*
1038
1040
* <p>Sample code:
1039
1041
*
@@ -1067,7 +1069,8 @@ public final TestIamPermissionsResponse testIamPermissions(
1067
1069
1068
1070
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1069
1071
/**
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.
1071
1074
*
1072
1075
* <p>Sample code:
1073
1076
*
@@ -1095,7 +1098,8 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq
1095
1098
1096
1099
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1097
1100
/**
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.
1099
1103
*
1100
1104
* <p>Sample code:
1101
1105
*
@@ -1820,7 +1824,6 @@ public final void deleteObject(String bucket, String object, long generation) {
1820
1824
* DeleteObjectRequest.newBuilder()
1821
1825
* .setBucket("bucket-1378203158")
1822
1826
* .setObject("object-1023368385")
1823
- * .setUploadId("uploadId1563990780")
1824
1827
* .setGeneration(305703192)
1825
1828
* .setIfGenerationMatch(-1086241088)
1826
1829
* .setIfGenerationNotMatch(1475720404)
@@ -1854,7 +1857,6 @@ public final void deleteObject(DeleteObjectRequest request) {
1854
1857
* DeleteObjectRequest.newBuilder()
1855
1858
* .setBucket("bucket-1378203158")
1856
1859
* .setObject("object-1023368385")
1857
- * .setUploadId("uploadId1563990780")
1858
1860
* .setGeneration(305703192)
1859
1861
* .setIfGenerationMatch(-1086241088)
1860
1862
* .setIfGenerationNotMatch(1475720404)
@@ -1872,6 +1874,79 @@ public final UnaryCallable<DeleteObjectRequest, Empty> deleteObjectCallable() {
1872
1874
return stub .deleteObjectCallable ();
1873
1875
}
1874
1876
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
+
1875
1950
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1876
1951
/**
1877
1952
* Retrieves an object's metadata.
@@ -2653,7 +2728,8 @@ public final QueryWriteStatusResponse queryWriteStatus(QueryWriteStatusRequest r
2653
2728
* }
2654
2729
* }</pre>
2655
2730
*
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.
2657
2733
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
2658
2734
*/
2659
2735
public final ServiceAccount getServiceAccount (ProjectName project ) {
@@ -2679,7 +2755,8 @@ public final ServiceAccount getServiceAccount(ProjectName project) {
2679
2755
* }
2680
2756
* }</pre>
2681
2757
*
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.
2683
2760
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
2684
2761
*/
2685
2762
public final ServiceAccount getServiceAccount (String project ) {
@@ -2754,7 +2831,9 @@ public final UnaryCallable<GetServiceAccountRequest, ServiceAccount> getServiceA
2754
2831
* }
2755
2832
* }</pre>
2756
2833
*
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.
2758
2837
* @param serviceAccountEmail Required. The service account to create the HMAC for.
2759
2838
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
2760
2839
*/
@@ -2784,7 +2863,9 @@ public final CreateHmacKeyResponse createHmacKey(
2784
2863
* }
2785
2864
* }</pre>
2786
2865
*
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.
2788
2869
* @param serviceAccountEmail Required. The service account to create the HMAC for.
2789
2870
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
2790
2871
*/
@@ -2866,7 +2947,9 @@ public final UnaryCallable<CreateHmacKeyRequest, CreateHmacKeyResponse> createHm
2866
2947
* }</pre>
2867
2948
*
2868
2949
* @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.
2870
2953
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
2871
2954
*/
2872
2955
public final void deleteHmacKey (String accessId , ProjectName project ) {
@@ -2895,7 +2978,9 @@ public final void deleteHmacKey(String accessId, ProjectName project) {
2895
2978
* }</pre>
2896
2979
*
2897
2980
* @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.
2899
2984
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
2900
2985
*/
2901
2986
public final void deleteHmacKey (String accessId , String project ) {
@@ -2972,7 +3057,9 @@ public final UnaryCallable<DeleteHmacKeyRequest, Empty> deleteHmacKeyCallable()
2972
3057
* }</pre>
2973
3058
*
2974
3059
* @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.
2976
3063
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
2977
3064
*/
2978
3065
public final HmacKeyMetadata getHmacKey (String accessId , ProjectName project ) {
@@ -3001,7 +3088,9 @@ public final HmacKeyMetadata getHmacKey(String accessId, ProjectName project) {
3001
3088
* }</pre>
3002
3089
*
3003
3090
* @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.
3005
3094
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
3006
3095
*/
3007
3096
public final HmacKeyMetadata getHmacKey (String accessId , String project ) {
@@ -3078,7 +3167,9 @@ public final UnaryCallable<GetHmacKeyRequest, HmacKeyMetadata> getHmacKeyCallabl
3078
3167
* }
3079
3168
* }</pre>
3080
3169
*
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.
3082
3173
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
3083
3174
*/
3084
3175
public final ListHmacKeysPagedResponse listHmacKeys (ProjectName project ) {
@@ -3106,7 +3197,9 @@ public final ListHmacKeysPagedResponse listHmacKeys(ProjectName project) {
3106
3197
* }
3107
3198
* }</pre>
3108
3199
*
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.
3110
3203
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
3111
3204
*/
3112
3205
public final ListHmacKeysPagedResponse listHmacKeys (String project ) {
@@ -3233,7 +3326,8 @@ public final UnaryCallable<ListHmacKeysRequest, ListHmacKeysResponse> listHmacKe
3233
3326
* @param hmacKey Required. The HMAC key to update. If present, the hmac_key's `id` field will be
3234
3327
* used to identify the key. Otherwise, the hmac_key's access_id and project fields will be
3235
3328
* 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`.
3237
3331
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
3238
3332
*/
3239
3333
public final HmacKeyMetadata updateHmacKey (HmacKeyMetadata hmacKey , FieldMask updateMask ) {
0 commit comments