Skip to content

Commit

Permalink
🦉 Updates from OwlBot post-processor
Browse files Browse the repository at this point in the history
  • Loading branch information
gcf-owl-bot[bot] committed Apr 11, 2024
1 parent 75c7048 commit 85390ab
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 deletions.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage</artifactId>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage-control</artifactId>
</dependency>

```

Expand All @@ -44,13 +48,18 @@ If you are using Maven without the BOM, add this to your dependencies:
<artifactId>google-cloud-storage</artifactId>
<version>2.36.0</version>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage-control</artifactId>
<version>2.36.0-alpha</version><!-- {x-version-update:google-cloud-storage:current} -->
</dependency>

```

If you are using Gradle 5.x or later, add this to your dependencies:

```Groovy
implementation platform('com.google.cloud:libraries-bom:26.35.0')
implementation platform('com.google.cloud:libraries-bom:26.37.0')
implementation 'com.google.cloud:google-cloud-storage'
```
Expand Down Expand Up @@ -233,6 +242,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/java-storage/tree/
| Quickstart Grpc Dp Sample | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/QuickstartGrpcDpSample.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/QuickstartGrpcDpSample.java) |
| Quickstart Grpc Sample | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/QuickstartGrpcSample.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/QuickstartGrpcSample.java) |
| Quickstart Sample | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/QuickstartSample.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/QuickstartSample.java) |
| Quickstart Storage Control Sample | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/QuickstartStorageControlSample.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/QuickstartStorageControlSample.java) |
| Add Bucket Default Owner | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/bucket/AddBucketDefaultOwner.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/bucket/AddBucketDefaultOwner.java) |
| Add Bucket Iam Conditional Binding | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/bucket/AddBucketIamConditionalBinding.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/bucket/AddBucketIamConditionalBinding.java) |
| Add Bucket Iam Member | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/bucket/AddBucketIamMember.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/bucket/AddBucketIamMember.java) |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ public static void main(String... args) throws Exception {

// Instantiates a client in a try-with-resource to automatically cleanup underlying resources
try (StorageControlClient storageControlClient = StorageControlClient.create()) {
GetStorageLayoutRequest request = GetStorageLayoutRequest.newBuilder()
// Set project to "_" to signify global bucket
.setName(StorageLayoutName.format("_", bucketName))
.build();
GetStorageLayoutRequest request =
GetStorageLayoutRequest.newBuilder()
// Set project to "_" to signify global bucket
.setName(StorageLayoutName.format("_", bucketName))
.build();
StorageLayout response = storageControlClient.getStorageLayout(request);
System.out.printf("Performed getStorageLayout request for %s", response.getName());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ public void testQuickstartStorageControl() throws Exception {
QuickstartStorageControlSample.main(bucketName);
String got = stdOutCaptureRule.getCapturedOutputAsUtf8String();
assertThat(got)
.contains(String.format("Performed getStorageLayout request for %s",
StorageLayoutName.format("_", bucketName)));
.contains(
String.format(
"Performed getStorageLayout request for %s",
StorageLayoutName.format("_", bucketName)));
}
}

0 comments on commit 85390ab

Please sign in to comment.