Skip to content

Commit a9115e4

Browse files
chore: Update generation configuration at Thu May 29 02:30:15 UTC 2025 (googleapis#3124)
* chore: Update generation configuration at Thu May 29 02:30:15 UTC 2025 * chore: generate libraries at Thu May 29 02:30:49 UTC 2025 * chore: reformat samples
1 parent e09e199 commit a9115e4

13 files changed

+172
-159
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/java-storage/tree/
363363
| Delete Managed Folder | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/managedfolders/DeleteManagedFolder.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-storage&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/storage/managedfolders/DeleteManagedFolder.java) |
364364
| Get Managed Folder | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/managedfolders/GetManagedFolder.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-storage&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/storage/managedfolders/GetManagedFolder.java) |
365365
| List Managed Folders | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/managedfolders/ListManagedFolders.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-storage&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/storage/managedfolders/ListManagedFolders.java) |
366-
| Add File Owner | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/AddFileOwner.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-storage&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/storage/object/AddFileOwner.java) |
366+
| Add Blob Owner | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/AddBlobOwner.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-storage&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/storage/object/AddBlobOwner.java) |
367367
| Batch Set Object Metadata | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/BatchSetObjectMetadata.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-storage&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/storage/object/BatchSetObjectMetadata.java) |
368368
| Change Object Csek To Kms | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/ChangeObjectCsekToKms.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-storage&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/storage/object/ChangeObjectCsekToKms.java) |
369369
| Change Object Storage Class | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/ChangeObjectStorageClass.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-storage&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/storage/object/ChangeObjectStorageClass.java) |
@@ -389,11 +389,11 @@ Samples are in the [`samples/`](https://github.com/googleapis/java-storage/tree/
389389
| List Soft Deleted Versions Of Object | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/ListSoftDeletedVersionsOfObject.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-storage&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/storage/object/ListSoftDeletedVersionsOfObject.java) |
390390
| Make Object Public | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/MakeObjectPublic.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-storage&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/storage/object/MakeObjectPublic.java) |
391391
| Move Object | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/MoveObject.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-storage&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/storage/object/MoveObject.java) |
392-
| Print File Acl | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/PrintFileAcl.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-storage&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/storage/object/PrintFileAcl.java) |
393-
| Print File Acl For User | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/PrintFileAclForUser.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-storage&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/storage/object/PrintFileAclForUser.java) |
392+
| Print Blob Acl | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/PrintBlobAcl.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-storage&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/storage/object/PrintBlobAcl.java) |
393+
| Print Blob Acl For User | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/PrintBlobAclForUser.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-storage&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/storage/object/PrintBlobAclForUser.java) |
394394
| Release Event Based Hold | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/ReleaseEventBasedHold.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-storage&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/storage/object/ReleaseEventBasedHold.java) |
395395
| Release Temporary Hold | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/ReleaseTemporaryHold.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-storage&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/storage/object/ReleaseTemporaryHold.java) |
396-
| Remove File Owner | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/RemoveFileOwner.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-storage&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/storage/object/RemoveFileOwner.java) |
396+
| Remove Blob Owner | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/RemoveBlobOwner.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-storage&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/storage/object/RemoveBlobOwner.java) |
397397
| Restore Soft Deleted Object | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/RestoreSoftDeletedObject.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-storage&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/storage/object/RestoreSoftDeletedObject.java) |
398398
| Rotate Object Encryption Key | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/RotateObjectEncryptionKey.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-storage&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/storage/object/RotateObjectEncryptionKey.java) |
399399
| Set Event Based Hold | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/SetEventBasedHold.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-storage&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/storage/object/SetEventBasedHold.java) |

generation_config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
gapic_generator_version: 2.58.0
2-
googleapis_commitish: 361c4941ccff4b02f608a0c1af63dcb65a888358
2+
googleapis_commitish: ea40277431fb821fd5a9b1eb8227535846388770
33
libraries_bom_version: 26.61.0
44
libraries:
55
- api_shortname: storage

samples/snippets/src/test/java/com/example/storage/ITCleanupOldBucketsTest.java

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -45,31 +45,32 @@ public final class ITCleanupOldBucketsTest {
4545
@Inject
4646
@StorageFixture(Transport.HTTP)
4747
public Storage storage;
48-
@Inject
49-
public StorageControlClient ctrl;
50-
@Inject
51-
public BucketInfo bucket;
48+
49+
@Inject public StorageControlClient ctrl;
50+
@Inject public BucketInfo bucket;
5251

5352
@Test
5453
public void cleanupOldBuckets() {
55-
Page<Bucket> page = storage.list(
56-
BucketListOption.fields(BucketField.NAME, BucketField.TIME_CREATED));
54+
Page<Bucket> page =
55+
storage.list(BucketListOption.fields(BucketField.NAME, BucketField.TIME_CREATED));
5756

5857
String bucketNamePrefix = bucket.getName().substring(0, UUID.randomUUID().toString().length());
5958

6059
OffsetDateTime now = Instant.now().atOffset(ZoneOffset.UTC);
6160
OffsetDateTime twentyFourHoursAgo = now.minusHours(24);
6261

63-
ImmutableList<String> bucketsToClean = page.streamAll()
64-
.map(Bucket::asBucketInfo)
65-
.filter(bucket -> {
66-
OffsetDateTime ctime = bucket.getCreateTimeOffsetDateTime();
67-
String name = bucket.getName();
68-
return ctime.isBefore(twentyFourHoursAgo)
69-
&& (name.startsWith("gcloud") || name.startsWith(bucketNamePrefix));
70-
})
71-
.map(BucketInfo::getName)
72-
.collect(ImmutableList.toImmutableList());
62+
ImmutableList<String> bucketsToClean =
63+
page.streamAll()
64+
.map(Bucket::asBucketInfo)
65+
.filter(
66+
bucket -> {
67+
OffsetDateTime ctime = bucket.getCreateTimeOffsetDateTime();
68+
String name = bucket.getName();
69+
return ctime.isBefore(twentyFourHoursAgo)
70+
&& (name.startsWith("gcloud") || name.startsWith(bucketNamePrefix));
71+
})
72+
.map(BucketInfo::getName)
73+
.collect(ImmutableList.toImmutableList());
7374

7475
for (String bucketName : bucketsToClean) {
7576
BucketCleaner.doCleanup(bucketName, storage, ctrl);

samples/snippets/src/test/java/com/example/storage/ITHmacSnippets.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ public void before() {
5353
// These samples have not materially changed since 2022-03 (as of 2025-05).
5454
// Additionally, we have more robust integration tests for HMAC operations in the library
5555
// itself.
56-
assumeFalse("skipping hmac snippet tests in CI due to racy interactions",
56+
assumeFalse(
57+
"skipping hmac snippet tests in CI due to racy interactions",
5758
"samples".equals(Env.JOB_TYPE));
5859
cleanUpHmacKeys(ServiceAccount.of(HMAC_KEY_TEST_SERVICE_ACCOUNT));
5960
}

0 commit comments

Comments
 (0)