Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: googleapis/java-storage
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.4.2
Choose a base ref
...
head repository: googleapis/java-storage
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.4.3
Choose a head ref
  • 14 commits
  • 30 files changed
  • 7 contributors

Commits on Feb 11, 2022

  1. chore(main): release 2.4.3-SNAPSHOT (#1244)

    🤖 I have created a release *beep* *boop*
    ---
    
    
    ### Updating meta-information for bleeding-edge SNAPSHOT release.
    
    ---
    This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
    release-please[bot] authored Feb 11, 2022
    Copy the full SHA
    73b1d54 View commit details

Commits on Feb 14, 2022

  1. chore(deps): update dependency com.google.cloud:google-cloud-storage …

    …to v2.4.2 (#1246)
    
    [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)
    
    This PR contains the following updates:
    
    | Package | Change | Age | Adoption | Passing | Confidence |
    |---|---|---|---|---|---|
    | [com.google.cloud:google-cloud-storage](https://togithub.com/googleapis/java-storage) | `2.4.1` -> `2.4.2` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-storage/2.4.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-storage/2.4.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-storage/2.4.2/compatibility-slim/2.4.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-storage/2.4.2/confidence-slim/2.4.1)](https://docs.renovatebot.com/merge-confidence/) |
    
    ---
    
    ### Release Notes
    
    <details>
    <summary>googleapis/java-storage</summary>
    
    ### [`v2.4.2`](https://togithub.com/googleapis/java-storage/blob/HEAD/CHANGELOG.md#&#8203;242-httpsgithubcomgoogleapisjava-storagecomparev241v242-2022-02-11)
    
    [Compare Source](https://togithub.com/googleapis/java-storage/compare/v2.4.1...v2.4.2)
    
    </details>
    
    ---
    
    ### Configuration
    
    📅 **Schedule**: At any time (no schedule defined).
    
    🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
    
    ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found.
    
    🔕 **Ignore**: Close this PR and you won't be reminded about this update again.
    
    ---
    
     - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox.
    
    ---
    
    This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-storage).
    renovate-bot authored Feb 14, 2022
    Copy the full SHA
    9056f29 View commit details
  2. build(deps): update dependency org.sonatype.plugins:nexus-staging-mav…

    …en-plugin to v1.6.9 (#1245)
    
    [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)
    
    This PR contains the following updates:
    
    | Package | Change | Age | Adoption | Passing | Confidence |
    |---|---|---|---|---|---|
    | org.sonatype.plugins:nexus-staging-maven-plugin | `1.6.8` -> `1.6.9` | [![age](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.9/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.9/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.9/compatibility-slim/1.6.8)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.9/confidence-slim/1.6.8)](https://docs.renovatebot.com/merge-confidence/) |
    
    ---
    
    ### Configuration
    
    📅 **Schedule**: At any time (no schedule defined).
    
    🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
    
    ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found.
    
    🔕 **Ignore**: Close this PR and you won't be reminded about this update again.
    
    ---
    
     - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox.
    
    ---
    
    This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-storage).
    renovate-bot authored Feb 14, 2022
    Copy the full SHA
    82db6fc View commit details

Commits on Feb 15, 2022

  1. Copy the full SHA
    fd004e6 View commit details
  2. Copy the full SHA
    923ea5b View commit details

Commits on Feb 16, 2022

  1. Copy the full SHA
    6b08589 View commit details

Commits on Feb 17, 2022

  1. docs: Adding Samples for Printing Bucket ACLs and Printing Bucket ACL…

    … for a specific user. (#1236)
    
    Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
    Co-authored-by: BenWhitehead <BenWhitehead@users.noreply.github.com>
    3 people authored Feb 17, 2022
    Copy the full SHA
    d82333b View commit details
  2. docs: Adding Samples for Add/Remove Bucket Default Owner (#1260)

    * docs: Adding Samples for Add/Remove Bucket Default Owner
    
    * 🦉 Updates from OwlBot
    
    See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
    
    Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
    sydney-munro and gcf-owl-bot[bot] authored Feb 17, 2022
    Copy the full SHA
    7223626 View commit details

Commits on Feb 18, 2022

  1. Copy the full SHA
    b3933be View commit details

Commits on Feb 22, 2022

  1. Copy the full SHA
    1a76c06 View commit details

Commits on Feb 23, 2022

  1. Copy the full SHA
    d5def96 View commit details

Commits on Feb 24, 2022

  1. docs: Adding Samples for Add/Remove Bucket Owner (#1272)

    Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
    sydney-munro and gcf-owl-bot[bot] authored Feb 24, 2022
    Copy the full SHA
    9d25fa9 View commit details

Commits on Feb 25, 2022

  1. ci: pull request template includes sample format (#1357) (#1275)

    Source-Link: googleapis/synthtool@e122cb0
    Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:387835a1375a0049ec44e02542c844302854c732d8291bdf8e472c0ff70a8f67
    gcf-owl-bot[bot] authored Feb 25, 2022
    Copy the full SHA
    3e02ad8 View commit details

Commits on Feb 28, 2022

  1. chore(main): release 2.4.3 (#1259)

    Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
    release-please[bot] authored Feb 28, 2022
    Copy the full SHA
    dce730d View commit details
Showing with 674 additions and 28 deletions.
  1. +1 −1 .github/.OwlBot.lock.yaml
  2. +3 −0 .github/PULL_REQUEST_TEMPLATE.md
  3. +5 −0 .kokoro/nightly/samples.cfg
  4. +6 −1 .kokoro/presubmit/samples.cfg
  5. +14 −0 CHANGELOG.md
  6. +9 −3 README.md
  7. +2 −2 gapic-google-cloud-storage-v2/pom.xml
  8. +2 −2 google-cloud-storage/pom.xml
  9. +0 −2 google-cloud-storage/src/test/java/com/google/cloud/storage/it/ITStorageTest.java
  10. +2 −2 grpc-google-cloud-storage-v2/pom.xml
  11. +2 −0 owlbot.py
  12. +6 −6 pom.xml
  13. +2 −2 proto-google-cloud-storage-v2/pom.xml
  14. +1 −1 samples/install-without-bom/pom.xml
  15. +1 −1 samples/pom.xml
  16. +1 −1 samples/snapshot/pom.xml
  17. +46 −0 samples/snippets/src/main/java/com/example/storage/bucket/AddBucketDefaultOwner.java
  18. +46 −0 samples/snippets/src/main/java/com/example/storage/bucket/AddBucketOwner.java
  19. +52 −0 samples/snippets/src/main/java/com/example/storage/bucket/PrintBucketAcl.java
  20. +46 −0 samples/snippets/src/main/java/com/example/storage/bucket/PrintBucketAclFilterByUser.java
  21. +48 −0 samples/snippets/src/main/java/com/example/storage/bucket/RemoveBucketDefaultOwner.java
  22. +48 −0 samples/snippets/src/main/java/com/example/storage/bucket/RemoveBucketOwner.java
  23. +54 −0 samples/snippets/src/test/java/com/example/storage/TestBase.java
  24. +39 −0 samples/snippets/src/test/java/com/example/storage/bucket/AddBucketDefaultOwnerTest.java
  25. +39 −0 samples/snippets/src/test/java/com/example/storage/bucket/AddBucketOwnerTest.java
  26. +44 −0 samples/snippets/src/test/java/com/example/storage/bucket/PrintBucketAclFilterByUserTest.java
  27. +43 −0 samples/snippets/src/test/java/com/example/storage/bucket/PrintBucketAclTest.java
  28. +54 −0 samples/snippets/src/test/java/com/example/storage/bucket/RemoveBucketDefaultOwnerTest.java
  29. +54 −0 samples/snippets/src/test/java/com/example/storage/bucket/RemoveBucketOwnerTest.java
  30. +4 −4 versions.txt
2 changes: 1 addition & 1 deletion .github/.OwlBot.lock.yaml
Original file line number Diff line number Diff line change
@@ -13,4 +13,4 @@
# limitations under the License.
docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest
digest: sha256:3c950ed12391ebaffd1ee66d0374766a1c50144ebe6a7a0042300b2e6bb5856b
digest: sha256:387835a1375a0049ec44e02542c844302854c732d8291bdf8e472c0ff70a8f67
3 changes: 3 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -5,3 +5,6 @@ Thank you for opening a Pull Request! Before submitting your PR, there are a few
- [ ] Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> ☕️

If you write sample code, please follow the [samples format](
https://github.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md).
5 changes: 5 additions & 0 deletions .kokoro/nightly/samples.cfg
Original file line number Diff line number Diff line change
@@ -36,3 +36,8 @@ env_vars: {
key: "ENABLE_FLAKYBOT"
value: "true"
}

env_vars: {
key: "IT_SERVICE_ACCOUNT_EMAIL"
value: "java-docs-samples-testing@java-docs-samples-testing.iam.gserviceaccount.com"
}
7 changes: 6 additions & 1 deletion .kokoro/presubmit/samples.cfg
Original file line number Diff line number Diff line change
@@ -30,4 +30,9 @@ env_vars: {
env_vars: {
key: "SECRET_MANAGER_KEYS"
value: "java-docs-samples-service-account"
}
}

env_vars: {
key: "IT_SERVICE_ACCOUNT_EMAIL"
value: "java-docs-samples-testing@java-docs-samples-testing.iam.gserviceaccount.com"
}
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

### [2.4.3](https://github.com/googleapis/java-storage/compare/v2.4.2...v2.4.3) (2022-02-25)


### Dependencies

* update dependency com.google.apis:google-api-services-storage to v1-rev20220210-1.32.1 ([#1269](https://github.com/googleapis/java-storage/issues/1269)) ([b3933be](https://github.com/googleapis/java-storage/commit/b3933be393bcb8850e39635d28211159a3d0a091))


### Documentation

* Adding Samples for Add/Remove Bucket Default Owner ([#1260](https://github.com/googleapis/java-storage/issues/1260)) ([7223626](https://github.com/googleapis/java-storage/commit/7223626481930bf4442a04ccf49536f7f9e5fd32))
* Adding Samples for Add/Remove Bucket Owner ([#1272](https://github.com/googleapis/java-storage/issues/1272)) ([9d25fa9](https://github.com/googleapis/java-storage/commit/9d25fa986ec6116eeb16ac5773b46e7fdbe10647))
* Adding Samples for Printing Bucket ACLs and Printing Bucket ACL for a specific user. ([#1236](https://github.com/googleapis/java-storage/issues/1236)) ([d82333b](https://github.com/googleapis/java-storage/commit/d82333b01eadd9afd0c9d58455f86bc6457c99e3))

### [2.4.2](https://github.com/googleapis/java-storage/compare/v2.4.1...v2.4.2) (2022-02-11)


12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -41,7 +41,7 @@ If you are using Maven without BOM, add this to your dependencies:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage</artifactId>
<version>2.4.1</version>
<version>2.4.2</version>
</dependency>

```
@@ -56,13 +56,13 @@ implementation 'com.google.cloud:google-cloud-storage'
If you are using Gradle without BOM, add this to your dependencies

```Groovy
implementation 'com.google.cloud:google-cloud-storage:2.4.1'
implementation 'com.google.cloud:google-cloud-storage:2.4.2'
```

If you are using SBT, add this to your dependencies

```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-storage" % "2.4.1"
libraryDependencies += "com.google.cloud" % "google-cloud-storage" % "2.4.2"
```

## Authentication
@@ -229,6 +229,12 @@ Samples are in the [`samples/`](https://github.com/googleapis/java-storage/tree/
| --------------------------- | --------------------------------- | ------ |
| Configure Retries | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/ConfigureRetries.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/ConfigureRetries.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) |
| 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 Owner | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/bucket/AddBucketOwner.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/AddBucketOwner.java) |
| Print Bucket Acl | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/bucket/PrintBucketAcl.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/PrintBucketAcl.java) |
| Print Bucket Acl Filter By User | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/bucket/PrintBucketAclFilterByUser.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/PrintBucketAclFilterByUser.java) |
| Remove Bucket Default Owner | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/bucket/RemoveBucketDefaultOwner.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/RemoveBucketDefaultOwner.java) |
| Remove Bucket Owner | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/bucket/RemoveBucketOwner.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/RemoveBucketOwner.java) |



4 changes: 2 additions & 2 deletions gapic-google-cloud-storage-v2/pom.xml
Original file line number Diff line number Diff line change
@@ -4,13 +4,13 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.google.api.grpc</groupId>
<artifactId>gapic-google-cloud-storage-v2</artifactId>
<version>2.4.2-alpha</version><!-- {x-version-update:gapic-google-cloud-storage-v2:current} -->
<version>2.4.3-alpha</version><!-- {x-version-update:gapic-google-cloud-storage-v2:current} -->
<name>gapic-google-cloud-storage-v2</name>
<description>GRPC library for gapic-google-cloud-storage-v2</description>
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage-parent</artifactId>
<version>2.4.2</version><!-- {x-version-update:google-cloud-storage:current} -->
<version>2.4.3</version><!-- {x-version-update:google-cloud-storage:current} -->
</parent>
<dependencies>
<dependency>
4 changes: 2 additions & 2 deletions google-cloud-storage/pom.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>google-cloud-storage</artifactId>
<version>2.4.2</version><!-- {x-version-update:google-cloud-storage:current} -->
<version>2.4.3</version><!-- {x-version-update:google-cloud-storage:current} -->
<packaging>jar</packaging>
<name>Google Cloud Storage</name>
<url>https://github.com/googleapis/java-storage</url>
@@ -12,7 +12,7 @@
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage-parent</artifactId>
<version>2.4.2</version><!-- {x-version-update:google-cloud-storage:current} -->
<version>2.4.3</version><!-- {x-version-update:google-cloud-storage:current} -->
</parent>
<properties>
<site.installationModule>google-cloud-storage</site.installationModule>
Original file line number Diff line number Diff line change
@@ -149,7 +149,6 @@
import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TestName;
@@ -2427,7 +2426,6 @@ public void testBlobAcl() {
}
}

@Ignore // TODO(#1240): Remove once HMAC Key IT are fixed
@Test
public void testHmacKey() {
String serviceAccountEmail = System.getenv("IT_SERVICE_ACCOUNT_EMAIL");
4 changes: 2 additions & 2 deletions grpc-google-cloud-storage-v2/pom.xml
Original file line number Diff line number Diff line change
@@ -4,13 +4,13 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.google.api.grpc</groupId>
<artifactId>grpc-google-cloud-storage-v2</artifactId>
<version>2.4.2-alpha</version><!-- {x-version-update:grpc-google-cloud-storage-v2:current} -->
<version>2.4.3-alpha</version><!-- {x-version-update:grpc-google-cloud-storage-v2:current} -->
<name>grpc-google-cloud-storage-v2</name>
<description>GRPC library for grpc-google-cloud-storage-v2</description>
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage-parent</artifactId>
<version>2.4.2</version><!-- {x-version-update:google-cloud-storage:current} -->
<version>2.4.3</version><!-- {x-version-update:google-cloud-storage:current} -->
</parent>
<dependencies>
<dependency>
2 changes: 2 additions & 0 deletions owlbot.py
Original file line number Diff line number Diff line change
@@ -30,6 +30,8 @@
java.common_templates(excludes=[
'.kokoro/nightly/integration.cfg',
'.kokoro/nightly/java11-integration.cfg',
'.kokoro/nightly/samples.cfg',
'.kokoro/presubmit/integration.cfg',
'.kokoro/presubmit/samples.cfg',
'CONTRIBUTING.md'
])
12 changes: 6 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage-parent</artifactId>
<packaging>pom</packaging>
<version>2.4.2</version><!-- {x-version-update:google-cloud-storage:current} -->
<version>2.4.3</version><!-- {x-version-update:google-cloud-storage:current} -->
<name>Storage Parent</name>
<url>https://github.com/googleapis/java-storage</url>
<description>
@@ -70,12 +70,12 @@
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage</artifactId>
<version>2.4.2</version><!-- {x-version-update:google-cloud-storage:current} -->
<version>2.4.3</version><!-- {x-version-update:google-cloud-storage:current} -->
</dependency>
<dependency>
<groupId>com.google.apis</groupId>
<artifactId>google-api-services-storage</artifactId>
<version>v1-rev20211201-1.32.1</version>
<version>v1-rev20220210-1.32.1</version>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
@@ -105,17 +105,17 @@
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>proto-google-cloud-storage-v2</artifactId>
<version>2.4.2-alpha</version><!-- {x-version-update:proto-google-cloud-storage-v2:current} -->
<version>2.4.3-alpha</version><!-- {x-version-update:proto-google-cloud-storage-v2:current} -->
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>grpc-google-cloud-storage-v2</artifactId>
<version>2.4.2-alpha</version><!-- {x-version-update:grpc-google-cloud-storage-v2:current} -->
<version>2.4.3-alpha</version><!-- {x-version-update:grpc-google-cloud-storage-v2:current} -->
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>gapic-google-cloud-storage-v2</artifactId>
<version>2.4.2-alpha</version><!-- {x-version-update:grpc-google-cloud-storage-v2:current} -->
<version>2.4.3-alpha</version><!-- {x-version-update:grpc-google-cloud-storage-v2:current} -->
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
4 changes: 2 additions & 2 deletions proto-google-cloud-storage-v2/pom.xml
Original file line number Diff line number Diff line change
@@ -4,13 +4,13 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.google.api.grpc</groupId>
<artifactId>proto-google-cloud-storage-v2</artifactId>
<version>2.4.2-alpha</version><!-- {x-version-update:proto-google-cloud-storage-v2:current} -->
<version>2.4.3-alpha</version><!-- {x-version-update:proto-google-cloud-storage-v2:current} -->
<name>proto-google-cloud-storage-v2</name>
<description>PROTO library for proto-google-cloud-storage-v2</description>
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage-parent</artifactId>
<version>2.4.2</version><!-- {x-version-update:google-cloud-storage:current} -->
<version>2.4.3</version><!-- {x-version-update:google-cloud-storage:current} -->
</parent>
<dependencies>
<dependency>
2 changes: 1 addition & 1 deletion samples/install-without-bom/pom.xml
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage</artifactId>
<version>2.4.1</version>
<version>2.4.2</version>
</dependency>
<!-- [END storage_install_without_bom] -->

2 changes: 1 addition & 1 deletion samples/pom.xml
Original file line number Diff line number Diff line change
@@ -46,7 +46,7 @@
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.8</version>
<version>1.6.12</version>
<configuration>
<skipNexusStagingDeployMojo>true</skipNexusStagingDeployMojo>
</configuration>
2 changes: 1 addition & 1 deletion samples/snapshot/pom.xml
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage</artifactId>
<version>2.4.1</version>
<version>2.4.2</version>
</dependency>

<dependency>
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.example.storage.bucket;

// [START storage_add_bucket_default_owner]

import com.google.cloud.storage.Acl;
import com.google.cloud.storage.Acl.Role;
import com.google.cloud.storage.Acl.User;
import com.google.cloud.storage.Bucket;
import com.google.cloud.storage.Storage;
import com.google.cloud.storage.StorageOptions;

public class AddBucketDefaultOwner {

public static void addBucketDefaultOwner(String bucketName, String userEmail) {

// The ID to give your GCS bucket
// String bucketName = "your-unique-bucket-name";

// Email of the user you wish to add as a default owner
// String userEmail = "someuser@domain.com"

Storage storage = StorageOptions.newBuilder().build().getService();
Bucket bucket = storage.get(bucketName);
Acl newDefaultOwner = Acl.of(new User(userEmail), Role.OWNER);

bucket.createDefaultAcl(newDefaultOwner);
System.out.println("Added user " + userEmail + " as an owner on " + bucketName);
}
}
// [END storage_add_bucket_default_owner]
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.example.storage.bucket;

// [START storage_add_bucket_owner]

import com.google.cloud.storage.Acl;
import com.google.cloud.storage.Acl.Role;
import com.google.cloud.storage.Acl.User;
import com.google.cloud.storage.Bucket;
import com.google.cloud.storage.Storage;
import com.google.cloud.storage.StorageOptions;

public class AddBucketOwner {

public static void addBucketOwner(String bucketName, String userEmail) {
// The ID to give your GCS bucket
// String bucketName = "your-unique-bucket-name";

// Email of the user you wish to add as an owner
// String userEmail = "someuser@domain.com"

Storage storage = StorageOptions.newBuilder().build().getService();
Bucket bucket = storage.get(bucketName);
Acl newOwner = Acl.of(new User(userEmail), Role.OWNER);

bucket.createAcl(newOwner);
System.out.println("Added user " + userEmail + " as an owner on " + bucketName);
}
}

// [END storage_add_bucket_owner]
Loading