From 9952ce68c830139b1b9d98cefa836be49cd1f039 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 8 Aug 2022 15:16:12 +0000 Subject: [PATCH 01/28] chore(main): release 2.11.4-SNAPSHOT (#1553) :robot: 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). --- gapic-google-cloud-storage-v2/pom.xml | 4 ++-- google-cloud-storage/pom.xml | 4 ++-- grpc-google-cloud-storage-v2/pom.xml | 4 ++-- pom.xml | 10 +++++----- proto-google-cloud-storage-v2/pom.xml | 4 ++-- samples/snapshot/pom.xml | 2 +- versions.txt | 8 ++++---- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/gapic-google-cloud-storage-v2/pom.xml b/gapic-google-cloud-storage-v2/pom.xml index 37fc83b72d..026229dc85 100644 --- a/gapic-google-cloud-storage-v2/pom.xml +++ b/gapic-google-cloud-storage-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc gapic-google-cloud-storage-v2 - 2.11.3-alpha + 2.11.4-alpha-SNAPSHOT gapic-google-cloud-storage-v2 GRPC library for gapic-google-cloud-storage-v2 com.google.cloud google-cloud-storage-parent - 2.11.3 + 2.11.4-SNAPSHOT diff --git a/google-cloud-storage/pom.xml b/google-cloud-storage/pom.xml index 1c2772633d..c477b6ca7b 100644 --- a/google-cloud-storage/pom.xml +++ b/google-cloud-storage/pom.xml @@ -2,7 +2,7 @@ 4.0.0 google-cloud-storage - 2.11.3 + 2.11.4-SNAPSHOT jar Google Cloud Storage https://github.com/googleapis/java-storage @@ -12,7 +12,7 @@ com.google.cloud google-cloud-storage-parent - 2.11.3 + 2.11.4-SNAPSHOT google-cloud-storage diff --git a/grpc-google-cloud-storage-v2/pom.xml b/grpc-google-cloud-storage-v2/pom.xml index 958d26ccd6..ee2fcc8444 100644 --- a/grpc-google-cloud-storage-v2/pom.xml +++ b/grpc-google-cloud-storage-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-storage-v2 - 2.11.3-alpha + 2.11.4-alpha-SNAPSHOT grpc-google-cloud-storage-v2 GRPC library for grpc-google-cloud-storage-v2 com.google.cloud google-cloud-storage-parent - 2.11.3 + 2.11.4-SNAPSHOT diff --git a/pom.xml b/pom.xml index ce7b86e2f6..3f4c6ffac1 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-storage-parent pom - 2.11.3 + 2.11.4-SNAPSHOT Storage Parent https://github.com/googleapis/java-storage @@ -70,7 +70,7 @@ com.google.cloud google-cloud-storage - 2.11.3 + 2.11.4-SNAPSHOT com.google.apis @@ -111,17 +111,17 @@ com.google.api.grpc proto-google-cloud-storage-v2 - 2.11.3-alpha + 2.11.4-alpha-SNAPSHOT com.google.api.grpc grpc-google-cloud-storage-v2 - 2.11.3-alpha + 2.11.4-alpha-SNAPSHOT com.google.api.grpc gapic-google-cloud-storage-v2 - 2.11.3-alpha + 2.11.4-alpha-SNAPSHOT com.google.cloud diff --git a/proto-google-cloud-storage-v2/pom.xml b/proto-google-cloud-storage-v2/pom.xml index b50c8be924..f21f96988b 100644 --- a/proto-google-cloud-storage-v2/pom.xml +++ b/proto-google-cloud-storage-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-storage-v2 - 2.11.3-alpha + 2.11.4-alpha-SNAPSHOT proto-google-cloud-storage-v2 PROTO library for proto-google-cloud-storage-v2 com.google.cloud google-cloud-storage-parent - 2.11.3 + 2.11.4-SNAPSHOT diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index cc6aba633a..f05d6c01bc 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-storage - 2.11.3 + 2.11.4-SNAPSHOT diff --git a/versions.txt b/versions.txt index 92c6073ced..564b12cef4 100644 --- a/versions.txt +++ b/versions.txt @@ -1,7 +1,7 @@ # Format: # module:released-version:current-version -google-cloud-storage:2.11.3:2.11.3 -gapic-google-cloud-storage-v2:2.11.3-alpha:2.11.3-alpha -grpc-google-cloud-storage-v2:2.11.3-alpha:2.11.3-alpha -proto-google-cloud-storage-v2:2.11.3-alpha:2.11.3-alpha +google-cloud-storage:2.11.3:2.11.4-SNAPSHOT +gapic-google-cloud-storage-v2:2.11.3-alpha:2.11.4-alpha-SNAPSHOT +grpc-google-cloud-storage-v2:2.11.3-alpha:2.11.4-alpha-SNAPSHOT +proto-google-cloud-storage-v2:2.11.3-alpha:2.11.4-alpha-SNAPSHOT From cb00ad6b99973f7206fdda65f075fc7a380c7cba Mon Sep 17 00:00:00 2001 From: BenWhitehead Date: Mon, 8 Aug 2022 13:26:23 -0400 Subject: [PATCH 02/28] chore: disable auto-release (#1555) * Set pubsub dependency bumps as test scope We only use pubsub for tests and samples, so renovate gets confused and will propose a deps instead of test(deps) resulting in auto-release cutting a release with no actual change. --- .github/workflows/auto-release.yaml | 103 ---------------------------- README.md | 4 +- owlbot.py | 4 +- renovate.json | 7 ++ 4 files changed, 12 insertions(+), 106 deletions(-) delete mode 100644 .github/workflows/auto-release.yaml diff --git a/.github/workflows/auto-release.yaml b/.github/workflows/auto-release.yaml deleted file mode 100644 index 7a106d007e..0000000000 --- a/.github/workflows/auto-release.yaml +++ /dev/null @@ -1,103 +0,0 @@ -# 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. -# Github action job to test core java library features on -# downstream client libraries before they are released. -on: - pull_request: -name: auto-release -jobs: - approve: - runs-on: ubuntu-latest - if: contains(github.head_ref, 'release-please') - steps: - - uses: actions/github-script@v6 - with: - github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} - debug: true - script: | - // only approve PRs from release-please[bot] - if (context.payload.pull_request.user.login !== "release-please[bot]") { - return; - } - - // only approve PRs like "chore(main): release " - if ( !context.payload.pull_request.title.startsWith("chore(main): release") ) { - return; - } - - // only approve PRs with pom.xml and versions.txt changes - const filesPromise = github.rest.pulls.listFiles.endpoint({ - owner: context.repo.owner, - repo: context.repo.repo, - pull_number: context.payload.pull_request.number, - }); - const changed_files = await github.paginate(filesPromise) - - if ( changed_files.length < 1 ) { - console.log( "Not proceeding since PR is empty!" ) - return; - } - - if ( !changed_files.some(v => v.filename.includes("pom")) || !changed_files.some(v => v.filename.includes("versions.txt")) ) { - console.log( "PR file changes do not have pom.xml or versions.txt -- something is wrong. PTAL!" ) - return; - } - - // trigger auto-release when - // 1) it is a SNAPSHOT release (auto-generated post regular release) - // 2) there are dependency updates only - // 3) there are no open dependency update PRs in this repo (to avoid multiple releases) - if ( - context.payload.pull_request.body.includes("Fix") || - context.payload.pull_request.body.includes("Build") || - context.payload.pull_request.body.includes("Documentation") || - context.payload.pull_request.body.includes("BREAKING CHANGES") || - context.payload.pull_request.body.includes("Features") - ) { - console.log( "Not auto-releasing since it is not a dependency-update-only release." ); - return; - } - - const promise = github.rest.pulls.list.endpoint({ - owner: context.repo.owner, - repo: context.repo.repo, - state: 'open' - }); - const open_pulls = await github.paginate(promise) - - if ( open_pulls.length > 1 && !context.payload.pull_request.title.includes("SNAPSHOT") ) { - for ( const pull of open_pulls ) { - if ( pull.title.startsWith("deps: update dependency") ) { - console.log( "Not auto-releasing yet since there are dependency update PRs open in this repo." ); - return; - } - } - } - - // approve release PR - await github.rest.pulls.createReview({ - owner: context.repo.owner, - repo: context.repo.repo, - body: 'Rubber stamped release!', - pull_number: context.payload.pull_request.number, - event: 'APPROVE' - }); - - // attach kokoro:force-run and automerge labels - await github.rest.issues.addLabels({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.payload.pull_request.number, - labels: ['kokoro:force-run', 'automerge'] - }); diff --git a/README.md b/README.md index b713fdadd5..22ad508e9d 100644 --- a/README.md +++ b/README.md @@ -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.11.2' +implementation 'com.google.cloud:google-cloud-storage:2.11.3' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-storage" % "2.11.2" +libraryDependencies += "com.google.cloud" % "google-cloud-storage" % "2.11.3" ``` ## Authentication diff --git a/owlbot.py b/owlbot.py index 825f69c7af..6f17975f65 100644 --- a/owlbot.py +++ b/owlbot.py @@ -35,5 +35,7 @@ '.kokoro/presubmit/samples.cfg', '.kokoro/presubmit/graalvm-native.cfg', '.kokoro/presubmit/graalvm-native-17.cfg', - 'CONTRIBUTING.md' + '.github/workflows/auto-release.yaml', + 'CONTRIBUTING.md', + 'renovate.json' ]) diff --git a/renovate.json b/renovate.json index f249b081c8..2447089095 100644 --- a/renovate.json +++ b/renovate.json @@ -67,6 +67,13 @@ "^com.fasterxml.jackson.core" ], "groupName": "jackson dependencies" + }, + { + "packagePatterns": [ + "^com.google.cloud:google-cloud-pubsub" + ], + "semanticCommitType": "test", + "semanticCommitScope": "deps" } ], "semanticCommits": true, From 8c6e3fe6aba9e4a0188f5792d481d86f0c8fa234 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 8 Aug 2022 19:26:54 +0200 Subject: [PATCH 03/28] chore(deps): update dependency com.google.cloud:google-cloud-storage to v2.11.3 (#1556) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): update dependency com.google.cloud:google-cloud-storage to v2.11.3 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- README.md | 2 +- samples/install-without-bom/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 22ad508e9d..4efd58f5d5 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ If you are using Maven without BOM, add this to your dependencies: com.google.cloud google-cloud-storage - 2.11.2 + 2.11.3 ``` diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 7036d40bf9..4f313643f8 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -30,7 +30,7 @@ com.google.cloud google-cloud-storage - 2.11.2 + 2.11.3 From 20887ddaf153bf73e6b7c4eeb1cd5408139c25b0 Mon Sep 17 00:00:00 2001 From: BenWhitehead Date: Mon, 8 Aug 2022 14:57:25 -0400 Subject: [PATCH 04/28] chore: add internal blobWriteChannel hook to override StorageOptions (#1557) For some upcoming testing we will need to swap the instance of StorageOptions on BlobWriteChannel to verify cross configuration compatibliity. --- .../java/com/google/cloud/storage/BlobWriteChannel.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/google-cloud-storage/src/main/java/com/google/cloud/storage/BlobWriteChannel.java b/google-cloud-storage/src/main/java/com/google/cloud/storage/BlobWriteChannel.java index e19d013486..e9f6b3bdb9 100644 --- a/google-cloud-storage/src/main/java/com/google/cloud/storage/BlobWriteChannel.java +++ b/google-cloud-storage/src/main/java/com/google/cloud/storage/BlobWriteChannel.java @@ -20,6 +20,7 @@ import static java.util.Objects.requireNonNull; import static java.util.concurrent.Executors.callable; +import com.google.api.core.InternalApi; import com.google.api.gax.retrying.ResultRetryAlgorithm; import com.google.api.services.storage.model.StorageObject; import com.google.cloud.BaseWriteChannel; @@ -332,6 +333,13 @@ static class StateImpl extends BaseWriteChannel.BaseState { private ResultRetryAlgorithm algorithmForWrite; From b27008b948cf2d532c0e63201beff53c28e43f8f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 9 Aug 2022 17:32:27 +0200 Subject: [PATCH 05/28] test(deps): update kms.version to v0.97.2 (#1562) * deps: update kms.version to v0.97.2 * chore: add kms artifacts to renovate config as test(deps) Co-authored-by: BenWhitehead --- google-cloud-storage/pom.xml | 2 +- renovate.json | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/google-cloud-storage/pom.xml b/google-cloud-storage/pom.xml index c477b6ca7b..82e7a5d0cd 100644 --- a/google-cloud-storage/pom.xml +++ b/google-cloud-storage/pom.xml @@ -16,7 +16,7 @@ google-cloud-storage - 0.97.0 + 0.97.2 diff --git a/renovate.json b/renovate.json index 2447089095..1761d70a59 100644 --- a/renovate.json +++ b/renovate.json @@ -70,7 +70,9 @@ }, { "packagePatterns": [ - "^com.google.cloud:google-cloud-pubsub" + "^com.google.cloud:google-cloud-pubsub", + "^com.google.api.grpc:grpc-google-cloud-kms-v1", + "^com.google.api.grpc:proto-google-cloud-kms-v1" ], "semanticCommitType": "test", "semanticCommitScope": "deps" From 840b08a03fa7c0535855140244c282f79403b458 Mon Sep 17 00:00:00 2001 From: JesseLovelace <43148100+JesseLovelace@users.noreply.github.com> Date: Wed, 10 Aug 2022 13:14:10 -0700 Subject: [PATCH 06/28] docs: Fix broken links in readme (#1520) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix broken links in README * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * update partials yaml * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix javadoc * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot Co-authored-by: Alice <65933803+alicejli@users.noreply.github.com> --- .readme-partials.yaml | 17 ++++------------- README.md | 17 ++++------------- .../com/google/cloud/storage/package-info.java | 14 ++++++-------- 3 files changed, 14 insertions(+), 34 deletions(-) diff --git a/.readme-partials.yaml b/.readme-partials.yaml index 792c7985a9..c95759f5b2 100644 --- a/.readme-partials.yaml +++ b/.readme-partials.yaml @@ -14,7 +14,7 @@ custom_content: | Storage storage = StorageOptions.getDefaultInstance().getService(); ``` - For other authentication options, see the [Authentication](https://github.com/googleapis/google-cloud-java#authentication) page. + For other authentication options, see the [Authentication](https://github.com/googleapis/google-cloud-java#authentication) page in Google Cloud Java. #### Storing data Stored objects are called "blobs" in `google-cloud` and are organized into containers called "buckets". `Blob`, a @@ -51,7 +51,7 @@ custom_content: | ``` A complete example for creating a blob can be found at - [CreateBlob.java](https://github.com/googleapis/google-cloud-java/tree/main/google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/CreateBlob.java). + [UploadObject.java](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/UploadObject.java). At this point, you will be able to see your newly created bucket and blob on the Google Developers Console. @@ -66,7 +66,7 @@ custom_content: | ``` A complete example for accessing blobs can be found at - [CreateBlob.java](https://github.com/googleapis/google-cloud-java/tree/main/google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/CreateBlob.java). + [DownloadObject.java](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/DownloadObject.java). #### Updating data Another thing we may want to do is update a blob. The following snippet shows how to update a Storage blob if it exists. @@ -83,9 +83,6 @@ custom_content: | } ``` - The complete source code can be found at - [UpdateBlob.java](https://github.com/googleapis/google-cloud-java/tree/main/google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/UpdateBlob.java). - #### Listing buckets and contents of buckets Suppose that you've added more buckets and blobs, and now you want to see the names of your buckets and the contents of each one. Add the following code to list all your buckets and all the blobs inside each bucket. @@ -106,16 +103,10 @@ custom_content: | #### Complete source code - In - [CreateAndListBucketsAndBlobs.java](https://github.com/googleapis/google-cloud-java/tree/main/google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/CreateAndListBucketsAndBlobs.java) - we put together examples creating and listing buckets and blobs into one program. The program assumes that you are - running on Compute Engine or from your own desktop. To run the example on App Engine, simply move - the code from the main method to your application's servlet class and change the print statements to - display on your webpage. + See [ListObjects.java](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/ListObjects.java) for a complete example. ### Example Applications - - [`StorageExample`](https://github.com/googleapis/google-cloud-java/tree/main/google-cloud-examples/src/main/java/com/google/cloud/examples/storage/StorageExample.java) is a simple command line interface that provides some of Cloud Storage's functionality. Read more about using the application on the [`StorageExample` docs page](https://github.com/googleapis/google-cloud-java/blob/main/google-cloud-examples/README.md). - [`Bookshelf`](https://github.com/GoogleCloudPlatform/getting-started-java/tree/main/bookshelf) - An App Engine application that manages a virtual bookshelf. - This app uses `google-cloud` to interface with Cloud Datastore and Cloud Storage. It also uses Cloud SQL, another Google Cloud Platform service. - [`Flexible Environment/Storage example`](https://github.com/GoogleCloudPlatform/java-docs-samples/tree/main/flexible/cloudstorage) - An app that uploads files to a public Cloud Storage bucket on the App Engine Flexible Environment runtime. diff --git a/README.md b/README.md index 4efd58f5d5..05ffac31e4 100644 --- a/README.md +++ b/README.md @@ -112,7 +112,7 @@ import com.google.cloud.storage.StorageOptions; Storage storage = StorageOptions.getDefaultInstance().getService(); ``` -For other authentication options, see the [Authentication](https://github.com/googleapis/google-cloud-java#authentication) page. +For other authentication options, see the [Authentication](https://github.com/googleapis/google-cloud-java#authentication) page in Google Cloud Java. #### Storing data Stored objects are called "blobs" in `google-cloud` and are organized into containers called "buckets". `Blob`, a @@ -149,7 +149,7 @@ Blob blob = storage.create(blobInfo, "a simple blob".getBytes(UTF_8)); ``` A complete example for creating a blob can be found at -[CreateBlob.java](https://github.com/googleapis/google-cloud-java/tree/main/google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/CreateBlob.java). +[UploadObject.java](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/UploadObject.java). At this point, you will be able to see your newly created bucket and blob on the Google Developers Console. @@ -164,7 +164,7 @@ String contentString = new String(content, UTF_8); ``` A complete example for accessing blobs can be found at -[CreateBlob.java](https://github.com/googleapis/google-cloud-java/tree/main/google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/CreateBlob.java). +[DownloadObject.java](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/DownloadObject.java). #### Updating data Another thing we may want to do is update a blob. The following snippet shows how to update a Storage blob if it exists. @@ -181,9 +181,6 @@ if (blob != null) { } ``` -The complete source code can be found at -[UpdateBlob.java](https://github.com/googleapis/google-cloud-java/tree/main/google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/UpdateBlob.java). - #### Listing buckets and contents of buckets Suppose that you've added more buckets and blobs, and now you want to see the names of your buckets and the contents of each one. Add the following code to list all your buckets and all the blobs inside each bucket. @@ -204,16 +201,10 @@ for (Bucket bucket : storage.list().iterateAll()) { #### Complete source code -In -[CreateAndListBucketsAndBlobs.java](https://github.com/googleapis/google-cloud-java/tree/main/google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/CreateAndListBucketsAndBlobs.java) -we put together examples creating and listing buckets and blobs into one program. The program assumes that you are -running on Compute Engine or from your own desktop. To run the example on App Engine, simply move -the code from the main method to your application's servlet class and change the print statements to -display on your webpage. +See [ListObjects.java](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/ListObjects.java) for a complete example. ### Example Applications -- [`StorageExample`](https://github.com/googleapis/google-cloud-java/tree/main/google-cloud-examples/src/main/java/com/google/cloud/examples/storage/StorageExample.java) is a simple command line interface that provides some of Cloud Storage's functionality. Read more about using the application on the [`StorageExample` docs page](https://github.com/googleapis/google-cloud-java/blob/main/google-cloud-examples/README.md). - [`Bookshelf`](https://github.com/GoogleCloudPlatform/getting-started-java/tree/main/bookshelf) - An App Engine application that manages a virtual bookshelf. - This app uses `google-cloud` to interface with Cloud Datastore and Cloud Storage. It also uses Cloud SQL, another Google Cloud Platform service. - [`Flexible Environment/Storage example`](https://github.com/GoogleCloudPlatform/java-docs-samples/tree/main/flexible/cloudstorage) - An app that uploads files to a public Cloud Storage bucket on the App Engine Flexible Environment runtime. diff --git a/google-cloud-storage/src/main/java/com/google/cloud/storage/package-info.java b/google-cloud-storage/src/main/java/com/google/cloud/storage/package-info.java index ace8f6611f..1c17ee7013 100644 --- a/google-cloud-storage/src/main/java/com/google/cloud/storage/package-info.java +++ b/google-cloud-storage/src/main/java/com/google/cloud/storage/package-info.java @@ -17,10 +17,8 @@ /** * A client for Cloud Storage - Unified object storage. * - *

Here's a simple usage example for using google-cloud from App/Compute Engine. This example - * shows how to create a Storage blob. For the complete source code see - * CreateBlob.java. + *

Here's a simple usage example the Java Storage client. This example shows how to create a + * Storage object. * *

{@code
  * Storage storage = StorageOptions.getDefaultInstance().getService();
@@ -29,10 +27,7 @@
  * Blob blob = storage.create(blobInfo, "Hello, Cloud Storage!".getBytes(UTF_8));
  * }
* - *

This second example shows how to update the blob's content if the blob exists. For the - * complete source code see - * UpdateBlob.java. + *

This second example shows how to update an object's content if the object exists. * *

{@code
  * Storage storage = StorageOptions.getDefaultInstance().getService();
@@ -47,6 +42,9 @@
  * }
  * }
* + *

For more detailed code examples, see the sample library. + * *

When using google-cloud from outside of App/Compute Engine, you have to specify a project * ID and provide From 583bf73f5d58aa5d79fbaa12b24407c558235eed Mon Sep 17 00:00:00 2001 From: JesseLovelace <43148100+JesseLovelace@users.noreply.github.com> Date: Thu, 11 Aug 2022 11:54:53 -0700 Subject: [PATCH 07/28] docs: add batch sample (#1559) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: add batch sample * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * copyright * fix whitespace Co-authored-by: Owl Bot --- README.md | 1 + .../object/BatchSetObjectMetadata.java | 67 +++++++++++++++++++ .../com/example/storage/ITObjectSnippets.java | 15 +++++ 3 files changed, 83 insertions(+) create mode 100644 samples/snippets/src/main/java/com/example/storage/object/BatchSetObjectMetadata.java diff --git a/README.md b/README.md index 05ffac31e4..036b3d152f 100644 --- a/README.md +++ b/README.md @@ -285,6 +285,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/java-storage/tree/ | Get Hmac Key | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/hmac/GetHmacKey.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/hmac/GetHmacKey.java) | | List Hmac Keys | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/hmac/ListHmacKeys.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/hmac/ListHmacKeys.java) | | 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) | +| 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) | | 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) | | 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) | | Compose Object | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/ComposeObject.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/ComposeObject.java) | diff --git a/samples/snippets/src/main/java/com/example/storage/object/BatchSetObjectMetadata.java b/samples/snippets/src/main/java/com/example/storage/object/BatchSetObjectMetadata.java new file mode 100644 index 0000000000..d7db73597b --- /dev/null +++ b/samples/snippets/src/main/java/com/example/storage/object/BatchSetObjectMetadata.java @@ -0,0 +1,67 @@ +/* + * 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.object; + +// [START storage_batch_request] +import com.google.api.gax.paging.Page; +import com.google.cloud.storage.Blob; +import com.google.cloud.storage.Storage; +import com.google.cloud.storage.StorageBatch; +import com.google.cloud.storage.StorageOptions; +import java.util.HashMap; +import java.util.Map; + +public class BatchSetObjectMetadata { + public static void batchSetObjectMetadata( + String projectId, String bucketName, String directoryPrefix) { + // The ID of your GCP project + // String projectId = "your-project-id"; + + // The ID of your GCS bucket + // String bucketName = "your-unique-bucket-name"; + + // The directory prefix. All objects in the bucket with this prefix will have their metadata + // updated + // String directoryPrefix = "yourDirectory/"; + + Storage storage = StorageOptions.newBuilder().setProjectId(projectId).build().getService(); + Map newMetadata = new HashMap<>(); + newMetadata.put("keyToAddOrUpdate", "value"); + Page blobs = + storage.list( + bucketName, + Storage.BlobListOption.prefix(directoryPrefix), + Storage.BlobListOption.currentDirectory()); + StorageBatch batchRequest = storage.batch(); + + // Add all blobs with the given prefix to the batch request + for (Blob blob : blobs.iterateAll()) { + batchRequest.update(blob.toBuilder().setMetadata(newMetadata).build()); + } + + // Execute the batch request + batchRequest.submit(); + + System.out.println( + "All blobs in bucket " + + bucketName + + " with prefix '" + + directoryPrefix + + "' had their metadata updated."); + } +} +// [END storage_batch_request] diff --git a/samples/snippets/src/test/java/com/example/storage/ITObjectSnippets.java b/samples/snippets/src/test/java/com/example/storage/ITObjectSnippets.java index 3cb572dc94..5f1d1e9394 100644 --- a/samples/snippets/src/test/java/com/example/storage/ITObjectSnippets.java +++ b/samples/snippets/src/test/java/com/example/storage/ITObjectSnippets.java @@ -24,6 +24,7 @@ import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; +import com.example.storage.object.BatchSetObjectMetadata; import com.example.storage.object.ChangeObjectCsekToKms; import com.example.storage.object.ChangeObjectStorageClass; import com.example.storage.object.ComposeObject; @@ -416,4 +417,18 @@ public void testUploadKMSEncryptedObject() { UploadKmsEncryptedObject.uploadKmsEncryptedObject(PROJECT_ID, BUCKET, blobName, KMS_KEY_NAME); assertNotNull(storage.get(BUCKET, blobName)); } + + @Test + public void testBatchSetObjectMetadata() { + storage.create(BlobInfo.newBuilder(BUCKET, "b/1.txt").build()); + storage.create(BlobInfo.newBuilder(BUCKET, "b/2.txt").build()); + + BatchSetObjectMetadata.batchSetObjectMetadata(PROJECT_ID, BUCKET, "b/"); + + Map firstBlobMetadata = storage.get(BUCKET, "b/1.txt").getMetadata(); + Map secondBlobMetadata = storage.get(BUCKET, "b/2.txt").getMetadata(); + + assertEquals("value", firstBlobMetadata.get("keyToAddOrUpdate")); + assertEquals("value", secondBlobMetadata.get("keyToAddOrUpdate")); + } } From 00155638d3605254fcbba2f64619f7f4ea3ac53f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 12 Aug 2022 17:15:46 +0200 Subject: [PATCH 08/28] test(deps): update kms.version to v0.97.3 (#1567) --- google-cloud-storage/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-cloud-storage/pom.xml b/google-cloud-storage/pom.xml index 82e7a5d0cd..1de28c4e57 100644 --- a/google-cloud-storage/pom.xml +++ b/google-cloud-storage/pom.xml @@ -16,7 +16,7 @@ google-cloud-storage - 0.97.2 + 0.97.3 From c7408999e811ba917edb0c136432afa29075e0f2 Mon Sep 17 00:00:00 2001 From: JesseLovelace <43148100+JesseLovelace@users.noreply.github.com> Date: Fri, 12 Aug 2022 10:26:01 -0700 Subject: [PATCH 09/28] docs: Document thread safety of library (#1566) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Document thread safety of library * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../main/java/com/google/cloud/storage/package-info.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/google-cloud-storage/src/main/java/com/google/cloud/storage/package-info.java b/google-cloud-storage/src/main/java/com/google/cloud/storage/package-info.java index 1c17ee7013..e35607001b 100644 --- a/google-cloud-storage/src/main/java/com/google/cloud/storage/package-info.java +++ b/google-cloud-storage/src/main/java/com/google/cloud/storage/package-info.java @@ -50,6 +50,12 @@ * ID and provide * credentials. * + *

Operations in this library are generally thread safe, except for the use of + * BlobReadChannel and + * BlobWriteChannel. + * * @see Google Cloud Storage */ package com.google.cloud.storage; From 9d94ea2fe4e023ebab40976be9d47101856d1670 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 15 Aug 2022 17:17:51 +0200 Subject: [PATCH 10/28] test(deps): update dependency com.google.cloud:google-cloud-conformance-tests to v0.3.4 (#1569) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3f4c6ffac1..1f502bca6a 100644 --- a/pom.xml +++ b/pom.xml @@ -126,7 +126,7 @@ com.google.cloud google-cloud-conformance-tests - 0.3.3 + 0.3.4 test From df7edf010f2d85660625143b8023e21b201b455b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 15 Aug 2022 17:18:22 +0200 Subject: [PATCH 11/28] chore(deps): update dependency com.google.cloud:libraries-bom to v26.1.0 (#1570) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): update dependency com.google.cloud:libraries-bom to v26.1.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- README.md | 4 ++-- samples/native-image-sample/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 036b3d152f..90e51d7089 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.0.0 + 26.1.0 pom import @@ -49,7 +49,7 @@ If you are using Maven without BOM, add this to your dependencies: If you are using Gradle 5.x or later, add this to your dependencies: ```Groovy -implementation platform('com.google.cloud:libraries-bom:26.0.0') +implementation platform('com.google.cloud:libraries-bom:26.1.0') implementation 'com.google.cloud:google-cloud-storage' ``` diff --git a/samples/native-image-sample/pom.xml b/samples/native-image-sample/pom.xml index 5547f0f0c2..9bffd3f33f 100644 --- a/samples/native-image-sample/pom.xml +++ b/samples/native-image-sample/pom.xml @@ -29,7 +29,7 @@ com.google.cloud libraries-bom - 26.0.0 + 26.1.0 pom import diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 550fd5ce39..6925063737 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -31,7 +31,7 @@ com.google.cloud libraries-bom - 26.0.0 + 26.1.0 pom import From cb232b0f82b1607b4d5e64b5513f33191d6dbb0d Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 15 Aug 2022 20:16:27 +0200 Subject: [PATCH 12/28] test(deps): update dependency org.mockito:mockito-core to v4.7.0 (#1572) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1f502bca6a..452b754d8c 100644 --- a/pom.xml +++ b/pom.xml @@ -92,7 +92,7 @@ org.mockito mockito-core - 4.6.1 + 4.7.0 test From 6d1e37d25843d3c11f012b2804741669812c0911 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 19 Aug 2022 15:30:19 +0200 Subject: [PATCH 13/28] test(deps): update kms.version to v0.97.4 (#1575) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend 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.api.grpc:proto-google-cloud-kms-v1](https://togithub.com/googleapis/java-kms) | `0.97.3` -> `0.97.4` | [![age](https://badges.renovateapi.com/packages/maven/com.google.api.grpc:proto-google-cloud-kms-v1/0.97.4/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.api.grpc:proto-google-cloud-kms-v1/0.97.4/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.api.grpc:proto-google-cloud-kms-v1/0.97.4/compatibility-slim/0.97.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.api.grpc:proto-google-cloud-kms-v1/0.97.4/confidence-slim/0.97.3)](https://docs.renovatebot.com/merge-confidence/) | | [com.google.api.grpc:grpc-google-cloud-kms-v1](https://togithub.com/googleapis/java-kms) | `0.97.3` -> `0.97.4` | [![age](https://badges.renovateapi.com/packages/maven/com.google.api.grpc:grpc-google-cloud-kms-v1/0.97.4/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.api.grpc:grpc-google-cloud-kms-v1/0.97.4/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.api.grpc:grpc-google-cloud-kms-v1/0.97.4/compatibility-slim/0.97.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.api.grpc:grpc-google-cloud-kms-v1/0.97.4/confidence-slim/0.97.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-storage). --- google-cloud-storage/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-cloud-storage/pom.xml b/google-cloud-storage/pom.xml index 1de28c4e57..e56917c5f8 100644 --- a/google-cloud-storage/pom.xml +++ b/google-cloud-storage/pom.xml @@ -16,7 +16,7 @@ google-cloud-storage - 0.97.3 + 0.97.4 From f9550cc98f11dbd0404cb1dcd3b4382c18b8988f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 19 Aug 2022 18:36:12 +0200 Subject: [PATCH 14/28] test(deps): update dependency com.google.cloud:google-cloud-pubsub to v1.120.12 (#1574) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend 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-pubsub](https://togithub.com/googleapis/java-pubsub) | `1.120.11` -> `1.120.12` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.12/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.12/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.12/compatibility-slim/1.120.11)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.12/confidence-slim/1.120.11)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes

googleapis/java-pubsub ### [`v1.120.12`](https://togithub.com/googleapis/java-pubsub/blob/HEAD/CHANGELOG.md#​112012-httpsgithubcomgoogleapisjava-pubsubcomparev112011v112012-2022-08-18) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.120.11...v1.120.12) ##### Dependencies - update dependency com.google.cloud:google-cloud-bigquery to v2.14.4 ([#​1242](https://togithub.com/googleapis/java-pubsub/issues/1242)) ([08cfe80](https://togithub.com/googleapis/java-pubsub/commit/08cfe805e71831e040f63755acde17ec45c21418)) - update dependency com.google.cloud:google-cloud-bigquery to v2.14.6 ([#​1245](https://togithub.com/googleapis/java-pubsub/issues/1245)) ([7f933ee](https://togithub.com/googleapis/java-pubsub/commit/7f933ee35055c608e9f5b72251583060943a79ea)) - update dependency com.google.cloud:google-cloud-core to v2.8.9 ([#​1250](https://togithub.com/googleapis/java-pubsub/issues/1250)) ([7c8fd41](https://togithub.com/googleapis/java-pubsub/commit/7c8fd4183523b876983c89d4b7994746b11964c3)) - update dependency com.google.protobuf:protobuf-java-util to v3.21.5 ([#​1243](https://togithub.com/googleapis/java-pubsub/issues/1243)) ([37eaff8](https://togithub.com/googleapis/java-pubsub/commit/37eaff859422bb215ace202ffd0adf8a651dadb5))
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-storage). --- pom.xml | 2 +- samples/install-without-bom/pom.xml | 2 +- samples/native-image-sample/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 452b754d8c..0f74d57783 100644 --- a/pom.xml +++ b/pom.xml @@ -80,7 +80,7 @@ com.google.cloud google-cloud-pubsub - 1.120.11 + 1.120.12 test diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 4f313643f8..c9319bf3fb 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -61,7 +61,7 @@ com.google.cloud google-cloud-pubsub - 1.120.11 + 1.120.12 test
diff --git a/samples/native-image-sample/pom.xml b/samples/native-image-sample/pom.xml index 9bffd3f33f..7b42ac4bf1 100644 --- a/samples/native-image-sample/pom.xml +++ b/samples/native-image-sample/pom.xml @@ -61,7 +61,7 @@ com.google.cloud google-cloud-pubsub - 1.120.11 + 1.120.12 test
diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index f05d6c01bc..cf2321dbdc 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -52,7 +52,7 @@ com.google.cloud google-cloud-pubsub - 1.120.11 + 1.120.12 test
diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 6925063737..ca9ad87524 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -72,7 +72,7 @@ com.google.cloud google-cloud-pubsub - 1.120.11 + 1.120.12 test
From 7ac6206e11fc405f58039ba854dcb649ef03c101 Mon Sep 17 00:00:00 2001 From: Sydney Munro <97561403+sydney-munro@users.noreply.github.com> Date: Wed, 24 Aug 2022 11:56:05 -0700 Subject: [PATCH 15/28] samples: Adding Metadata to dual-region sample (#1581) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Adding Metadata to dual-region sample * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../src/main/java/com/google/cloud/storage/BucketInfo.java | 5 +++++ .../com/example/storage/bucket/CreateBucketDualRegion.java | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/google-cloud-storage/src/main/java/com/google/cloud/storage/BucketInfo.java b/google-cloud-storage/src/main/java/com/google/cloud/storage/BucketInfo.java index 70a9817c8d..bee76fd0f7 100644 --- a/google-cloud-storage/src/main/java/com/google/cloud/storage/BucketInfo.java +++ b/google-cloud-storage/src/main/java/com/google/cloud/storage/BucketInfo.java @@ -353,6 +353,11 @@ public int hashCode() { return Objects.hashCode(dataLocations); } + @Override + public String toString() { + return MoreObjects.toStringHelper(this).add("dataLocations", dataLocations).toString(); + } + public static Builder newBuilder() { return new Builder(); } diff --git a/samples/snippets/src/main/java/com/example/storage/bucket/CreateBucketDualRegion.java b/samples/snippets/src/main/java/com/example/storage/bucket/CreateBucketDualRegion.java index 292aeaa11b..6c5be68d45 100644 --- a/samples/snippets/src/main/java/com/example/storage/bucket/CreateBucketDualRegion.java +++ b/samples/snippets/src/main/java/com/example/storage/bucket/CreateBucketDualRegion.java @@ -71,8 +71,10 @@ public static void createBucketDualRegion( + bucket.getName() + " in location " + bucket.getLocation() - + " with regions " - + bucket.getCustomPlacementConfig().getDataLocations().toString()); + + " with location type " + + bucket.getLocationType() + + " with Custom Placement Config " + + bucket.getCustomPlacementConfig().toString()); } } // [END storage_create_bucket_dual_region] From 980018623393e4921f3e63c8f04c26c491102d51 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 24 Aug 2022 23:48:18 +0200 Subject: [PATCH 16/28] test(deps): update dependency com.google.cloud:google-cloud-pubsub to v1.120.13 (#1583) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend 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-pubsub](https://togithub.com/googleapis/java-pubsub) | `1.120.12` -> `1.120.13` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.13/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.13/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.13/compatibility-slim/1.120.12)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.13/confidence-slim/1.120.12)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-pubsub ### [`v1.120.13`](https://togithub.com/googleapis/java-pubsub/blob/HEAD/CHANGELOG.md#​112013-httpsgithubcomgoogleapisjava-pubsubcomparev112012v112013-2022-08-24) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.120.12...v1.120.13) ##### Dependencies - update dependency com.google.cloud:google-cloud-bigquery to v2.14.7 ([#​1254](https://togithub.com/googleapis/java-pubsub/issues/1254)) ([775c993](https://togithub.com/googleapis/java-pubsub/commit/775c99353d96bcbc0704626999a7af79cf0e557f))
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-storage). --- pom.xml | 2 +- samples/install-without-bom/pom.xml | 2 +- samples/native-image-sample/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 0f74d57783..7c6e09dfa2 100644 --- a/pom.xml +++ b/pom.xml @@ -80,7 +80,7 @@ com.google.cloud google-cloud-pubsub - 1.120.12 + 1.120.13 test diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index c9319bf3fb..87af237d19 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -61,7 +61,7 @@ com.google.cloud google-cloud-pubsub - 1.120.12 + 1.120.13 test diff --git a/samples/native-image-sample/pom.xml b/samples/native-image-sample/pom.xml index 7b42ac4bf1..9b14caf703 100644 --- a/samples/native-image-sample/pom.xml +++ b/samples/native-image-sample/pom.xml @@ -61,7 +61,7 @@ com.google.cloud google-cloud-pubsub - 1.120.12 + 1.120.13 test diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index cf2321dbdc..e9ea72cc42 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -52,7 +52,7 @@ com.google.cloud google-cloud-pubsub - 1.120.12 + 1.120.13 test diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index ca9ad87524..2fc1b525ac 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -72,7 +72,7 @@ com.google.cloud google-cloud-pubsub - 1.120.12 + 1.120.13 test From 8b5f9b5762a3fa9591b3089bfed3e962f83b5a76 Mon Sep 17 00:00:00 2001 From: Frank Natividad Date: Tue, 30 Aug 2022 16:44:12 -0700 Subject: [PATCH 17/28] test: add retries to flaky sample tests (#1595) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #1412, #1580, #1502 ☕️ --- README.md | 2 +- .../src/test/java/com/example/storage/ITHmacSnippets.java | 3 +-- .../src/test/java/com/example/storage/ITObjectSnippets.java | 3 +++ .../storage/bucket/DeleteBucketPubSubNotificationTest.java | 4 ++++ .../example/storage/bucket/ListPubSubNotificationsTest.java | 4 ++++ .../java/com/example/storage/object/RemoveFileOwnerTest.java | 4 ++++ 6 files changed, 17 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 90e51d7089..6f7ca8db68 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ If you are using Maven without BOM, add this to your dependencies: If you are using Gradle 5.x or later, add this to your dependencies: ```Groovy -implementation platform('com.google.cloud:libraries-bom:26.1.0') +implementation platform('com.google.cloud:libraries-bom:26.1.1') implementation 'com.google.cloud:google-cloud-storage' ``` diff --git a/samples/snippets/src/test/java/com/example/storage/ITHmacSnippets.java b/samples/snippets/src/test/java/com/example/storage/ITHmacSnippets.java index 57cc6009d7..4e27749621 100644 --- a/samples/snippets/src/test/java/com/example/storage/ITHmacSnippets.java +++ b/samples/snippets/src/test/java/com/example/storage/ITHmacSnippets.java @@ -49,7 +49,7 @@ public void before() { cleanUpHmacKeys(ServiceAccount.of(HMAC_KEY_TEST_SERVICE_ACCOUNT)); } - @Rule public MultipleAttemptsRule multipleAttemptsRule = new MultipleAttemptsRule(5); + @Rule public MultipleAttemptsRule multipleAttemptsRule = new MultipleAttemptsRule(5, 2000L); private void cleanUpHmacKeys(ServiceAccount serviceAccount) { Page metadatas = @@ -66,7 +66,6 @@ private void cleanUpHmacKeys(ServiceAccount serviceAccount) { @Test public void testCreateHmacKey() throws Exception { - ; CreateHmacKey.createHmacKey(HMAC_KEY_TEST_SERVICE_ACCOUNT, PROJECT_ID); String snippetOutput = stdOut.getCapturedOutputAsUtf8String(); String accessId = snippetOutput.split("Access ID: ")[1].split("\n")[0]; diff --git a/samples/snippets/src/test/java/com/example/storage/ITObjectSnippets.java b/samples/snippets/src/test/java/com/example/storage/ITObjectSnippets.java index 5f1d1e9394..7d7b69d46d 100644 --- a/samples/snippets/src/test/java/com/example/storage/ITObjectSnippets.java +++ b/samples/snippets/src/test/java/com/example/storage/ITObjectSnippets.java @@ -62,6 +62,7 @@ import com.google.cloud.storage.Storage.BlobListOption; import com.google.cloud.storage.StorageClass; import com.google.cloud.storage.testing.RemoteStorageHelper; +import com.google.cloud.testing.junit4.MultipleAttemptsRule; import com.google.cloud.testing.junit4.StdOutCaptureRule; import com.google.common.collect.ImmutableMap; import com.google.common.io.BaseEncoding; @@ -102,6 +103,8 @@ public class ITObjectSnippets { @Rule public final StdOutCaptureRule stdOutCaptureRule = new StdOutCaptureRule(); + @Rule public MultipleAttemptsRule multipleAttemptsRule = new MultipleAttemptsRule(5); + @Rule public ExpectedException thrown = ExpectedException.none(); @BeforeClass diff --git a/samples/snippets/src/test/java/com/example/storage/bucket/DeleteBucketPubSubNotificationTest.java b/samples/snippets/src/test/java/com/example/storage/bucket/DeleteBucketPubSubNotificationTest.java index ef02d29c89..d83960c44c 100644 --- a/samples/snippets/src/test/java/com/example/storage/bucket/DeleteBucketPubSubNotificationTest.java +++ b/samples/snippets/src/test/java/com/example/storage/bucket/DeleteBucketPubSubNotificationTest.java @@ -23,6 +23,7 @@ import com.google.cloud.pubsub.v1.TopicAdminClient; import com.google.cloud.storage.Notification; import com.google.cloud.storage.NotificationInfo; +import com.google.cloud.testing.junit4.MultipleAttemptsRule; import com.google.common.collect.ImmutableMap; import com.google.iam.v1.Binding; import com.google.iam.v1.GetIamPolicyRequest; @@ -32,10 +33,13 @@ import java.util.UUID; import org.junit.AfterClass; import org.junit.BeforeClass; +import org.junit.Rule; import org.junit.Test; public class DeleteBucketPubSubNotificationTest extends TestBase { + @Rule public MultipleAttemptsRule multipleAttemptsRule = new MultipleAttemptsRule(5); + private static final Notification.PayloadFormat PAYLOAD_FORMAT = Notification.PayloadFormat.JSON_API_V1.JSON_API_V1; private static final Map CUSTOM_ATTRIBUTES = ImmutableMap.of("label1", "value1"); diff --git a/samples/snippets/src/test/java/com/example/storage/bucket/ListPubSubNotificationsTest.java b/samples/snippets/src/test/java/com/example/storage/bucket/ListPubSubNotificationsTest.java index e6dc394d64..643c51bfd6 100644 --- a/samples/snippets/src/test/java/com/example/storage/bucket/ListPubSubNotificationsTest.java +++ b/samples/snippets/src/test/java/com/example/storage/bucket/ListPubSubNotificationsTest.java @@ -23,6 +23,7 @@ import com.google.cloud.pubsub.v1.TopicAdminClient; import com.google.cloud.storage.Notification; import com.google.cloud.storage.NotificationInfo; +import com.google.cloud.testing.junit4.MultipleAttemptsRule; import com.google.common.collect.ImmutableMap; import com.google.iam.v1.Binding; import com.google.iam.v1.GetIamPolicyRequest; @@ -32,10 +33,13 @@ import java.util.UUID; import org.junit.AfterClass; import org.junit.BeforeClass; +import org.junit.Rule; import org.junit.Test; public class ListPubSubNotificationsTest extends TestBase { + @Rule public MultipleAttemptsRule multipleAttemptsRule = new MultipleAttemptsRule(5); + private static final Notification.PayloadFormat PAYLOAD_FORMAT = Notification.PayloadFormat.JSON_API_V1.JSON_API_V1; private static final Map CUSTOM_ATTRIBUTES = ImmutableMap.of("label1", "value1"); diff --git a/samples/snippets/src/test/java/com/example/storage/object/RemoveFileOwnerTest.java b/samples/snippets/src/test/java/com/example/storage/object/RemoveFileOwnerTest.java index edc077fe15..9d8936c789 100644 --- a/samples/snippets/src/test/java/com/example/storage/object/RemoveFileOwnerTest.java +++ b/samples/snippets/src/test/java/com/example/storage/object/RemoveFileOwnerTest.java @@ -23,10 +23,14 @@ import com.google.cloud.storage.Acl; import com.google.cloud.storage.Acl.Role; import com.google.cloud.storage.Acl.User; +import com.google.cloud.testing.junit4.MultipleAttemptsRule; +import org.junit.Rule; import org.junit.Test; public class RemoveFileOwnerTest extends TestBase { + @Rule public MultipleAttemptsRule multipleAttemptsRule = new MultipleAttemptsRule(5); + public static final String IT_SERVICE_ACCOUNT_EMAIL = System.getenv("IT_SERVICE_ACCOUNT_EMAIL"); @Test From 91375966fe4fb75e8e47dadddf992abb4a1b0261 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 31 Aug 2022 22:44:11 +0200 Subject: [PATCH 18/28] chore(deps): update dependency com.google.cloud:libraries-bom to v26.1.1 (#1599) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend 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:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://togithub.com/googleapis/java-cloud-bom)) | `26.1.0` -> `26.1.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.1/compatibility-slim/26.1.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.1/confidence-slim/26.1.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - 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 these updates again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-storage). --- README.md | 2 +- samples/native-image-sample/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6f7ca8db68..73a8f8f4cf 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.1.0 + 26.1.1 pom import diff --git a/samples/native-image-sample/pom.xml b/samples/native-image-sample/pom.xml index 9b14caf703..fb8045a4b2 100644 --- a/samples/native-image-sample/pom.xml +++ b/samples/native-image-sample/pom.xml @@ -29,7 +29,7 @@ com.google.cloud libraries-bom - 26.1.0 + 26.1.1 pom import diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 2fc1b525ac..8c0d2286a9 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -31,7 +31,7 @@ com.google.cloud libraries-bom - 26.1.0 + 26.1.1 pom import From 950358b4ad7cb560e3c1d2a6578eaade2ff49afe Mon Sep 17 00:00:00 2001 From: Sydney Munro <97561403+sydney-munro@users.noreply.github.com> Date: Thu, 1 Sep 2022 16:01:23 -0700 Subject: [PATCH 19/28] Revert "samples: Adding Metadata to dual-region sample (#1581)" (#1596) * Revert "samples: Adding Metadata to dual-region sample (#1581)" --- .../src/main/java/com/google/cloud/storage/BucketInfo.java | 5 ----- .../com/example/storage/bucket/CreateBucketDualRegion.java | 6 ++---- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/google-cloud-storage/src/main/java/com/google/cloud/storage/BucketInfo.java b/google-cloud-storage/src/main/java/com/google/cloud/storage/BucketInfo.java index bee76fd0f7..70a9817c8d 100644 --- a/google-cloud-storage/src/main/java/com/google/cloud/storage/BucketInfo.java +++ b/google-cloud-storage/src/main/java/com/google/cloud/storage/BucketInfo.java @@ -353,11 +353,6 @@ public int hashCode() { return Objects.hashCode(dataLocations); } - @Override - public String toString() { - return MoreObjects.toStringHelper(this).add("dataLocations", dataLocations).toString(); - } - public static Builder newBuilder() { return new Builder(); } diff --git a/samples/snippets/src/main/java/com/example/storage/bucket/CreateBucketDualRegion.java b/samples/snippets/src/main/java/com/example/storage/bucket/CreateBucketDualRegion.java index 6c5be68d45..292aeaa11b 100644 --- a/samples/snippets/src/main/java/com/example/storage/bucket/CreateBucketDualRegion.java +++ b/samples/snippets/src/main/java/com/example/storage/bucket/CreateBucketDualRegion.java @@ -71,10 +71,8 @@ public static void createBucketDualRegion( + bucket.getName() + " in location " + bucket.getLocation() - + " with location type " - + bucket.getLocationType() - + " with Custom Placement Config " - + bucket.getCustomPlacementConfig().toString()); + + " with regions " + + bucket.getCustomPlacementConfig().getDataLocations().toString()); } } // [END storage_create_bucket_dual_region] From 51aca10fafe685ed9e7cb41bc4ae79be10feb080 Mon Sep 17 00:00:00 2001 From: Sydney Munro <97561403+sydney-munro@users.noreply.github.com> Date: Fri, 2 Sep 2022 11:11:52 -0700 Subject: [PATCH 20/28] feat: Add toString method for CustomPlacementConfig (#1602) --- .../src/main/java/com/google/cloud/storage/BucketInfo.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/google-cloud-storage/src/main/java/com/google/cloud/storage/BucketInfo.java b/google-cloud-storage/src/main/java/com/google/cloud/storage/BucketInfo.java index 70a9817c8d..bee76fd0f7 100644 --- a/google-cloud-storage/src/main/java/com/google/cloud/storage/BucketInfo.java +++ b/google-cloud-storage/src/main/java/com/google/cloud/storage/BucketInfo.java @@ -353,6 +353,11 @@ public int hashCode() { return Objects.hashCode(dataLocations); } + @Override + public String toString() { + return MoreObjects.toStringHelper(this).add("dataLocations", dataLocations).toString(); + } + public static Builder newBuilder() { return new Builder(); } From 8a48aea7e0049c64ef944b532a2874115b1e2323 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 9 Sep 2022 05:42:11 +0200 Subject: [PATCH 21/28] deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.2 (#1611) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend 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-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | `3.0.1` -> `3.0.2` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.2/compatibility-slim/3.0.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.2/confidence-slim/3.0.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-shared-dependencies ### [`v3.0.2`](https://togithub.com/googleapis/java-shared-dependencies/blob/HEAD/CHANGELOG.md#​302-httpsgithubcomgoogleapisjava-shared-dependenciescomparev301v302-2022-09-08) [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v3.0.1...v3.0.2) ##### Dependencies - Update dependency com.fasterxml.jackson:jackson-bom to v2.13.4 ([#​789](https://togithub.com/googleapis/java-shared-dependencies/issues/789)) ([6cf91a9](https://togithub.com/googleapis/java-shared-dependencies/commit/6cf91a96b9ea6af0fb845b50582dac7aa2892cab)) - Update dependency com.google.auth:google-auth-library-bom to v1.10.0 ([#​781](https://togithub.com/googleapis/java-shared-dependencies/issues/781)) ([8859e61](https://togithub.com/googleapis/java-shared-dependencies/commit/8859e61808bfc5cd9546e27e945fc855b36d2554)) - Update dependency com.google.auth:google-auth-library-bom to v1.11.0 ([#​790](https://togithub.com/googleapis/java-shared-dependencies/issues/790)) ([3431a47](https://togithub.com/googleapis/java-shared-dependencies/commit/3431a471cbf874a67a4f1a42e31f0ed891dedc92)) - Update dependency com.google.auth:google-auth-library-bom to v1.9.0 ([#​773](https://togithub.com/googleapis/java-shared-dependencies/issues/773)) ([27fc79f](https://togithub.com/googleapis/java-shared-dependencies/commit/27fc79f00ee70011df6a368bb8fcfad7f0ce41f0)) - Update dependency com.google.errorprone:error_prone_annotations to v2.15.0 ([#​776](https://togithub.com/googleapis/java-shared-dependencies/issues/776)) ([bf333b8](https://togithub.com/googleapis/java-shared-dependencies/commit/bf333b8c88072d21cb959db4d3328bbb55d9ef5c)) - Update dependency com.google.protobuf:protobuf-bom to v3.21.5 ([#​780](https://togithub.com/googleapis/java-shared-dependencies/issues/780)) ([da7f44d](https://togithub.com/googleapis/java-shared-dependencies/commit/da7f44d71d6d7f372b5313dab68ce220308614d4)) - Update dependency io.grpc:grpc-bom to v1.48.1 ([#​768](https://togithub.com/googleapis/java-shared-dependencies/issues/768)) ([5c7768d](https://togithub.com/googleapis/java-shared-dependencies/commit/5c7768d3c9665dd356de6c39c0a6a5fa6e992f2e)) - Update dependency io.grpc:grpc-bom to v1.49.0 ([#​786](https://togithub.com/googleapis/java-shared-dependencies/issues/786)) ([8734812](https://togithub.com/googleapis/java-shared-dependencies/commit/8734812f1b4e2faaa48caf41eff59a85892ae344)) - Update dependency org.checkerframework:checker-qual to v3.24.0 ([#​775](https://togithub.com/googleapis/java-shared-dependencies/issues/775)) ([df74b7b](https://togithub.com/googleapis/java-shared-dependencies/commit/df74b7b0dd5dd592523f302d9fb36adb5991cb0b)) - Update dependency org.checkerframework:checker-qual to v3.25.0 ([#​788](https://togithub.com/googleapis/java-shared-dependencies/issues/788)) ([207035b](https://togithub.com/googleapis/java-shared-dependencies/commit/207035bd04c9305899eea540acbefaf06a7b1ec9)) - Update dependency org.threeten:threetenbp to v1.6.1 ([#​782](https://togithub.com/googleapis/java-shared-dependencies/issues/782)) ([0f218ae](https://togithub.com/googleapis/java-shared-dependencies/commit/0f218aeb6aa33cf1da4a8b1d6c82bbf87946dab9)) - Update gax.version to v2.19.0 ([#​785](https://togithub.com/googleapis/java-shared-dependencies/issues/785)) ([4448331](https://togithub.com/googleapis/java-shared-dependencies/commit/4448331c4c6d88ea8076260776d1d47d24aa19fa)) - Update google.core.version to v2.8.10 ([#​787](https://togithub.com/googleapis/java-shared-dependencies/issues/787)) ([3c344d5](https://togithub.com/googleapis/java-shared-dependencies/commit/3c344d515e3b9215db5a1f8ef550d800d974e558)) - Update google.core.version to v2.8.7 ([#​774](https://togithub.com/googleapis/java-shared-dependencies/issues/774)) ([d0cd5e8](https://togithub.com/googleapis/java-shared-dependencies/commit/d0cd5e8f6ca88787fe0dbf7f30c849cb4c4fae5e)) - Update google.core.version to v2.8.8 ([#​777](https://togithub.com/googleapis/java-shared-dependencies/issues/777)) ([f00571c](https://togithub.com/googleapis/java-shared-dependencies/commit/f00571cd1e9f1c4e011fba4a1e1674c1d8d60200)) - Update google.core.version to v2.8.9 ([#​784](https://togithub.com/googleapis/java-shared-dependencies/issues/784)) ([aa8e505](https://togithub.com/googleapis/java-shared-dependencies/commit/aa8e505dbb1214b2239e55d5ac83b00c167d77e4))
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-storage). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7c6e09dfa2..a24b1f97d6 100644 --- a/pom.xml +++ b/pom.xml @@ -54,7 +54,7 @@ UTF-8 github google-cloud-storage-parent - 3.0.1 + 3.0.2 From 34f2aa85e975293c7358be9b955b3bea257e9815 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Sat, 10 Sep 2022 02:08:36 +0000 Subject: [PATCH 22/28] chore: Generated snippets should not be owned by samples reviewers (#1575) (#1612) Source-Link: https://github.com/googleapis/synthtool/commit/2e9ac19d5b8181af77cdc5337cf922517813cc49 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:8175681a918181d306d9c370d3262f16b4c724cc73d74111b7d42fc985ca7f93 --- .github/.OwlBot.lock.yaml | 3 +-- .github/CODEOWNERS | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 6610882f83..6259292301 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:04f254abfe5f47fe73ae6f91d68d55c3b76e722a4943066c3bb0ce03573b4ad9 -# created: 2022-07-18T21:44:23.94208526Z + digest: sha256:8175681a918181d306d9c370d3262f16b4c724cc73d74111b7d42fc985ca7f93 diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 87c357205c..46f7ababf4 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -13,3 +13,6 @@ # The java-samples-reviewers team is the default owner for samples changes samples/**/*.java @googleapis/java-samples-reviewers + +# Generated snippets should not be owned by samples reviewers +samples/snippets/generated/ @googleapis/yoshi-java From 3ef792fd180023ed63e2790554e2cfb772651f5a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sat, 10 Sep 2022 06:38:40 +0200 Subject: [PATCH 23/28] test(deps): update dependency org.mockito:mockito-core to v4.8.0 (#1609) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.mockito:mockito-core](https://togithub.com/mockito/mockito) | `4.7.0` -> `4.8.0` | [![age](https://badges.renovateapi.com/packages/maven/org.mockito:mockito-core/4.8.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.mockito:mockito-core/4.8.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.mockito:mockito-core/4.8.0/compatibility-slim/4.7.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.mockito:mockito-core/4.8.0/confidence-slim/4.7.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
mockito/mockito ### [`v4.8.0`](https://togithub.com/mockito/mockito/releases/tag/v4.8.0) [Compare Source](https://togithub.com/mockito/mockito/compare/v4.7.0...v4.8.0) *Changelog generated by [Shipkit Changelog Gradle Plugin](https://togithub.com/shipkit/shipkit-changelog)* ##### 4.8.0 - 2022-09-07 - [10 commit(s)](https://togithub.com/mockito/mockito/compare/v4.7.0...v4.8.0) by Alex, James Baker, Johannes Spangenberg, Kurt Alfred Kluever, Rafael Winterhalter, Thibault Helsmoortel, dependabot\[bot] - GitHub Workflows security hardening [(#​2744)](https://togithub.com/mockito/mockito/pull/2744) - Assign GlobalConfiguration initializer to unused variable [(#​2742)](https://togithub.com/mockito/mockito/pull/2742) - Bump com.diffplug.spotless from 6.9.1 to 6.10.0 [(#​2738)](https://togithub.com/mockito/mockito/pull/2738) - Drop varargs collector before invoking a user method. [(#​2736)](https://togithub.com/mockito/mockito/pull/2736) - Bump versions.bytebuddy from 1.12.13 to 1.12.14 [(#​2734)](https://togithub.com/mockito/mockito/pull/2734) - Remove useless thrown exception from constructor [(#​2732)](https://togithub.com/mockito/mockito/pull/2732) - TypeSafeMatching no longer iterates over class methods inefficiently [(#​2729)](https://togithub.com/mockito/mockito/pull/2729) - Fixes [#​2720](https://togithub.com/mockito/mockito/issues/2720): Use StackWalker on Java 9+ to create Locations [(#​2723)](https://togithub.com/mockito/mockito/pull/2723) - LocationImpl adds performance overheads due to instantiating a stack trace [(#​2720)](https://togithub.com/mockito/mockito/issues/2720) - Fixes [#​2626](https://togithub.com/mockito/mockito/issues/2626) : Introduce MockSettings.mockMaker [(#​2701)](https://togithub.com/mockito/mockito/pull/2701) - Introduce option to disable inline-mock-maker for a specific instance [(#​2626)](https://togithub.com/mockito/mockito/issues/2626)
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-storage). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a24b1f97d6..d0d55c13aa 100644 --- a/pom.xml +++ b/pom.xml @@ -92,7 +92,7 @@ org.mockito mockito-core - 4.7.0 + 4.8.0 test From c779dde5724ddc2153be06c6fae72ac4bb325e07 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sat, 10 Sep 2022 22:32:31 +0200 Subject: [PATCH 24/28] test(deps): update dependency com.google.cloud:google-cloud-pubsub to v1.120.14 (#1613) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend 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-pubsub](https://togithub.com/googleapis/java-pubsub) | `1.120.13` -> `1.120.14` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.14/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.14/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.14/compatibility-slim/1.120.13)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.14/confidence-slim/1.120.13)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-pubsub ### [`v1.120.14`](https://togithub.com/googleapis/java-pubsub/blob/HEAD/CHANGELOG.md#​112014-httpsgithubcomgoogleapisjava-pubsubcomparev112013v112014-2022-09-10) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.120.13...v1.120.14) ##### Dependencies - Update dependency com.google.cloud:google-cloud-bigquery to v2.15.0 ([#​1259](https://togithub.com/googleapis/java-pubsub/issues/1259)) ([257cb8f](https://togithub.com/googleapis/java-pubsub/commit/257cb8f1b38a885dc4c8fb473a79fee1f01a2b57)) - Update dependency com.google.cloud:google-cloud-core to v2.8.10 ([#​1258](https://togithub.com/googleapis/java-pubsub/issues/1258)) ([37e0034](https://togithub.com/googleapis/java-pubsub/commit/37e0034660855fc327d3843f8aa78bcda03fe158)) - Update dependency com.google.cloud:google-cloud-core to v2.8.11 ([#​1264](https://togithub.com/googleapis/java-pubsub/issues/1264)) ([a19bc7a](https://togithub.com/googleapis/java-pubsub/commit/a19bc7a6bd54a9223575c23df1cac7b2583eb61a)) - Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.2 ([#​1265](https://togithub.com/googleapis/java-pubsub/issues/1265)) ([52da9da](https://togithub.com/googleapis/java-pubsub/commit/52da9dae19399e03af8d20c0c29aa600b7e31ed3))
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-storage). --- pom.xml | 2 +- samples/install-without-bom/pom.xml | 2 +- samples/native-image-sample/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index d0d55c13aa..6f6656b394 100644 --- a/pom.xml +++ b/pom.xml @@ -80,7 +80,7 @@ com.google.cloud google-cloud-pubsub - 1.120.13 + 1.120.14 test diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 87af237d19..9f2e925b8a 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -61,7 +61,7 @@ com.google.cloud google-cloud-pubsub - 1.120.13 + 1.120.14 test diff --git a/samples/native-image-sample/pom.xml b/samples/native-image-sample/pom.xml index fb8045a4b2..d29ef63bb6 100644 --- a/samples/native-image-sample/pom.xml +++ b/samples/native-image-sample/pom.xml @@ -61,7 +61,7 @@ com.google.cloud google-cloud-pubsub - 1.120.13 + 1.120.14 test diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index e9ea72cc42..84aad6e281 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -52,7 +52,7 @@ com.google.cloud google-cloud-pubsub - 1.120.13 + 1.120.14 test diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 8c0d2286a9..25d730fac1 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -72,7 +72,7 @@ com.google.cloud google-cloud-pubsub - 1.120.13 + 1.120.14 test From c4432fda450b9cb6f03c984e0c0d89e4d71f3c6c Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 13 Sep 2022 16:26:05 -0400 Subject: [PATCH 25/28] chore(bazel): Update WORKSPACE files for rules_gapic, gax_java, generator_java versions (#1608) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(bazel): Update WORKSPACE files for rules_gapic, gax_java, generator_java versions PiperOrigin-RevId: 472750037 Source-Link: https://github.com/googleapis/googleapis/commit/88f2ea3f53b9712f2e04f28f06210f6f77fa7e24 Source-Link: https://github.com/googleapis/googleapis-gen/commit/230a5588306aae18fe8f2a57f14d4039ad72c901 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjMwYTU1ODgzMDZhYWUxOGZlOGYyYTU3ZjE0ZDQwMzlhZDcyYzkwMSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../com/google/storage/v2/StorageClient.java | 777 +++++++++++++----- .../google/storage/v2/StorageSettings.java | 12 +- .../com/google/storage/v2/package-info.java | 7 +- .../storage/v2/stub/StorageStubSettings.java | 12 +- 4 files changed, 572 insertions(+), 236 deletions(-) diff --git a/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageClient.java b/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageClient.java index e65845b85b..efea613631 100644 --- a/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageClient.java +++ b/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageClient.java @@ -64,8 +64,11 @@ * calls that map to API methods. Sample code to get started: * *
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (StorageClient storageClient = StorageClient.create()) {
  *   BucketName name = BucketName.of("[PROJECT]", "[BUCKET]");
  *   storageClient.deleteBucket(name);
@@ -101,8 +104,11 @@
  * 

To customize credentials: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * StorageSettings storageSettings =
  *     StorageSettings.newBuilder()
  *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
@@ -113,8 +119,11 @@
  * 

To customize the endpoint: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * StorageSettings storageSettings = StorageSettings.newBuilder().setEndpoint(myEndpoint).build();
  * StorageClient storageClient = StorageClient.create(storageSettings);
  * }
@@ -123,8 +132,11 @@ * the wire: * *
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * StorageSettings storageSettings =
  *     StorageSettings.newBuilder()
  *         .setTransportChannelProvider(
@@ -190,8 +202,11 @@ public StorageStub getStub() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   BucketName name = BucketName.of("[PROJECT]", "[BUCKET]");
    *   storageClient.deleteBucket(name);
@@ -214,8 +229,11 @@ public final void deleteBucket(BucketName name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   String name = BucketName.of("[PROJECT]", "[BUCKET]").toString();
    *   storageClient.deleteBucket(name);
@@ -237,8 +255,11 @@ public final void deleteBucket(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   DeleteBucketRequest request =
    *       DeleteBucketRequest.newBuilder()
@@ -264,8 +285,11 @@ public final void deleteBucket(DeleteBucketRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   DeleteBucketRequest request =
    *       DeleteBucketRequest.newBuilder()
@@ -290,8 +314,11 @@ public final UnaryCallable deleteBucketCallable() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   BucketName name = BucketName.of("[PROJECT]", "[BUCKET]");
    *   Bucket response = storageClient.getBucket(name);
@@ -314,8 +341,11 @@ public final Bucket getBucket(BucketName name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   String name = BucketName.of("[PROJECT]", "[BUCKET]").toString();
    *   Bucket response = storageClient.getBucket(name);
@@ -337,8 +367,11 @@ public final Bucket getBucket(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   GetBucketRequest request =
    *       GetBucketRequest.newBuilder()
@@ -365,8 +398,11 @@ public final Bucket getBucket(GetBucketRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   GetBucketRequest request =
    *       GetBucketRequest.newBuilder()
@@ -392,8 +428,11 @@ public final UnaryCallable getBucketCallable() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   ProjectName parent = ProjectName.of("[PROJECT]");
    *   Bucket bucket = Bucket.newBuilder().build();
@@ -428,8 +467,11 @@ public final Bucket createBucket(ProjectName parent, Bucket bucket, String bucke
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   String parent = ProjectName.of("[PROJECT]").toString();
    *   Bucket bucket = Bucket.newBuilder().build();
@@ -464,8 +506,11 @@ public final Bucket createBucket(String parent, Bucket bucket, String bucketId)
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   CreateBucketRequest request =
    *       CreateBucketRequest.newBuilder()
@@ -493,8 +538,11 @@ public final Bucket createBucket(CreateBucketRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   CreateBucketRequest request =
    *       CreateBucketRequest.newBuilder()
@@ -521,8 +569,11 @@ public final UnaryCallable createBucketCallable() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   ProjectName parent = ProjectName.of("[PROJECT]");
    *   for (Bucket element : storageClient.listBuckets(parent).iterateAll()) {
@@ -549,8 +600,11 @@ public final ListBucketsPagedResponse listBuckets(ProjectName parent) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   String parent = ProjectName.of("[PROJECT]").toString();
    *   for (Bucket element : storageClient.listBuckets(parent).iterateAll()) {
@@ -574,8 +628,11 @@ public final ListBucketsPagedResponse listBuckets(String parent) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   ListBucketsRequest request =
    *       ListBucketsRequest.newBuilder()
@@ -605,8 +662,11 @@ public final ListBucketsPagedResponse listBuckets(ListBucketsRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   ListBucketsRequest request =
    *       ListBucketsRequest.newBuilder()
@@ -636,8 +696,11 @@ public final ListBucketsPagedResponse listBuckets(ListBucketsRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   ListBucketsRequest request =
    *       ListBucketsRequest.newBuilder()
@@ -673,8 +736,11 @@ public final UnaryCallable listBucketsC
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   BucketName bucket = BucketName.of("[PROJECT]", "[BUCKET]");
    *   Bucket response = storageClient.lockBucketRetentionPolicy(bucket);
@@ -699,8 +765,11 @@ public final Bucket lockBucketRetentionPolicy(BucketName bucket) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   String bucket = BucketName.of("[PROJECT]", "[BUCKET]").toString();
    *   Bucket response = storageClient.lockBucketRetentionPolicy(bucket);
@@ -723,8 +792,11 @@ public final Bucket lockBucketRetentionPolicy(String bucket) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   LockBucketRetentionPolicyRequest request =
    *       LockBucketRetentionPolicyRequest.newBuilder()
@@ -749,8 +821,11 @@ public final Bucket lockBucketRetentionPolicy(LockBucketRetentionPolicyRequest r
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   LockBucketRetentionPolicyRequest request =
    *       LockBucketRetentionPolicyRequest.newBuilder()
@@ -776,8 +851,11 @@ public final Bucket lockBucketRetentionPolicy(LockBucketRetentionPolicyRequest r
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   ResourceName resource =
    *       CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]");
@@ -804,8 +882,11 @@ public final Policy getIamPolicy(ResourceName resource) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   String resource =
    *       CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]").toString();
@@ -829,8 +910,11 @@ public final Policy getIamPolicy(String resource) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   GetIamPolicyRequest request =
    *       GetIamPolicyRequest.newBuilder()
@@ -857,8 +941,11 @@ public final Policy getIamPolicy(GetIamPolicyRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   GetIamPolicyRequest request =
    *       GetIamPolicyRequest.newBuilder()
@@ -884,8 +971,11 @@ public final UnaryCallable getIamPolicyCallable() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   ResourceName resource =
    *       CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]");
@@ -917,8 +1007,11 @@ public final Policy setIamPolicy(ResourceName resource, Policy policy) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   String resource =
    *       CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]").toString();
@@ -947,8 +1040,11 @@ public final Policy setIamPolicy(String resource, Policy policy) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   SetIamPolicyRequest request =
    *       SetIamPolicyRequest.newBuilder()
@@ -976,8 +1072,11 @@ public final Policy setIamPolicy(SetIamPolicyRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   SetIamPolicyRequest request =
    *       SetIamPolicyRequest.newBuilder()
@@ -1005,8 +1104,11 @@ public final UnaryCallable setIamPolicyCallable() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   ResourceName resource =
    *       CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]");
@@ -1040,8 +1142,11 @@ public final TestIamPermissionsResponse testIamPermissions(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   String resource =
    *       CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]").toString();
@@ -1075,8 +1180,11 @@ public final TestIamPermissionsResponse testIamPermissions(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   TestIamPermissionsRequest request =
    *       TestIamPermissionsRequest.newBuilder()
@@ -1104,8 +1212,11 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   TestIamPermissionsRequest request =
    *       TestIamPermissionsRequest.newBuilder()
@@ -1133,8 +1244,11 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   Bucket bucket = Bucket.newBuilder().build();
    *   FieldMask updateMask = FieldMask.newBuilder().build();
@@ -1166,8 +1280,11 @@ public final Bucket updateBucket(Bucket bucket, FieldMask updateMask) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   UpdateBucketRequest request =
    *       UpdateBucketRequest.newBuilder()
@@ -1196,8 +1313,11 @@ public final Bucket updateBucket(UpdateBucketRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   UpdateBucketRequest request =
    *       UpdateBucketRequest.newBuilder()
@@ -1225,8 +1345,11 @@ public final UnaryCallable updateBucketCallable() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   NotificationName name = NotificationName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION]");
    *   storageClient.deleteNotification(name);
@@ -1251,8 +1374,11 @@ public final void deleteNotification(NotificationName name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   String name = NotificationName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION]").toString();
    *   storageClient.deleteNotification(name);
@@ -1275,8 +1401,11 @@ public final void deleteNotification(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   DeleteNotificationRequest request =
    *       DeleteNotificationRequest.newBuilder()
@@ -1300,8 +1429,11 @@ public final void deleteNotification(DeleteNotificationRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   DeleteNotificationRequest request =
    *       DeleteNotificationRequest.newBuilder()
@@ -1324,8 +1456,11 @@ public final UnaryCallable deleteNotificationC
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   BucketName name = BucketName.of("[PROJECT]", "[BUCKET]");
    *   Notification response = storageClient.getNotification(name);
@@ -1349,8 +1484,11 @@ public final Notification getNotification(BucketName name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   String name = BucketName.of("[PROJECT]", "[BUCKET]").toString();
    *   Notification response = storageClient.getNotification(name);
@@ -1373,8 +1511,11 @@ public final Notification getNotification(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   GetNotificationRequest request =
    *       GetNotificationRequest.newBuilder()
@@ -1398,8 +1539,11 @@ public final Notification getNotification(GetNotificationRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   GetNotificationRequest request =
    *       GetNotificationRequest.newBuilder()
@@ -1424,8 +1568,11 @@ public final UnaryCallable getNotification
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   ProjectName parent = ProjectName.of("[PROJECT]");
    *   Notification notification = Notification.newBuilder().build();
@@ -1455,8 +1602,11 @@ public final Notification createNotification(ProjectName parent, Notification no
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   String parent = ProjectName.of("[PROJECT]").toString();
    *   Notification notification = Notification.newBuilder().build();
@@ -1486,8 +1636,11 @@ public final Notification createNotification(String parent, Notification notific
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   CreateNotificationRequest request =
    *       CreateNotificationRequest.newBuilder()
@@ -1514,8 +1667,11 @@ public final Notification createNotification(CreateNotificationRequest request)
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   CreateNotificationRequest request =
    *       CreateNotificationRequest.newBuilder()
@@ -1540,8 +1696,11 @@ public final UnaryCallable createNotifi
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   ProjectName parent = ProjectName.of("[PROJECT]");
    *   for (Notification element : storageClient.listNotifications(parent).iterateAll()) {
@@ -1568,8 +1727,11 @@ public final ListNotificationsPagedResponse listNotifications(ProjectName parent
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   String parent = ProjectName.of("[PROJECT]").toString();
    *   for (Notification element : storageClient.listNotifications(parent).iterateAll()) {
@@ -1594,8 +1756,11 @@ public final ListNotificationsPagedResponse listNotifications(String parent) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   ListNotificationsRequest request =
    *       ListNotificationsRequest.newBuilder()
@@ -1623,8 +1788,11 @@ public final ListNotificationsPagedResponse listNotifications(ListNotificationsR
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   ListNotificationsRequest request =
    *       ListNotificationsRequest.newBuilder()
@@ -1653,8 +1821,11 @@ public final ListNotificationsPagedResponse listNotifications(ListNotificationsR
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   ListNotificationsRequest request =
    *       ListNotificationsRequest.newBuilder()
@@ -1690,8 +1861,11 @@ public final ListNotificationsPagedResponse listNotifications(ListNotificationsR
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   ComposeObjectRequest request =
    *       ComposeObjectRequest.newBuilder()
@@ -1723,8 +1897,11 @@ public final Object composeObject(ComposeObjectRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   ComposeObjectRequest request =
    *       ComposeObjectRequest.newBuilder()
@@ -1756,8 +1933,11 @@ public final UnaryCallable composeObjectCallable()
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   String bucket = "bucket-1378203158";
    *   String object = "object-1023368385";
@@ -1783,8 +1963,11 @@ public final void deleteObject(String bucket, String object) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   String bucket = "bucket-1378203158";
    *   String object = "object-1023368385";
@@ -1817,8 +2000,11 @@ public final void deleteObject(String bucket, String object, long generation) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   DeleteObjectRequest request =
    *       DeleteObjectRequest.newBuilder()
@@ -1850,8 +2036,11 @@ public final void deleteObject(DeleteObjectRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   DeleteObjectRequest request =
    *       DeleteObjectRequest.newBuilder()
@@ -1881,8 +2070,11 @@ public final UnaryCallable deleteObjectCallable() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   String uploadId = "uploadId1563990780";
    *   CancelResumableWriteResponse response = storageClient.cancelResumableWrite(uploadId);
@@ -1906,8 +2098,11 @@ public final CancelResumableWriteResponse cancelResumableWrite(String uploadId)
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   CancelResumableWriteRequest request =
    *       CancelResumableWriteRequest.newBuilder().setUploadId("uploadId1563990780").build();
@@ -1930,8 +2125,11 @@ public final CancelResumableWriteResponse cancelResumableWrite(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   CancelResumableWriteRequest request =
    *       CancelResumableWriteRequest.newBuilder().setUploadId("uploadId1563990780").build();
@@ -1954,8 +2152,11 @@ public final CancelResumableWriteResponse cancelResumableWrite(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   String bucket = "bucket-1378203158";
    *   String object = "object-1023368385";
@@ -1980,8 +2181,11 @@ public final Object getObject(String bucket, String object) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   String bucket = "bucket-1378203158";
    *   String object = "object-1023368385";
@@ -2013,8 +2217,11 @@ public final Object getObject(String bucket, String object, long generation) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   GetObjectRequest request =
    *       GetObjectRequest.newBuilder()
@@ -2046,8 +2253,11 @@ public final Object getObject(GetObjectRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   GetObjectRequest request =
    *       GetObjectRequest.newBuilder()
@@ -2078,8 +2288,11 @@ public final UnaryCallable getObjectCallable() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   ReadObjectRequest request =
    *       ReadObjectRequest.newBuilder()
@@ -2113,8 +2326,11 @@ public final ServerStreamingCallable read
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   Object object = Object.newBuilder().build();
    *   FieldMask updateMask = FieldMask.newBuilder().build();
@@ -2148,8 +2364,11 @@ public final Object updateObject(Object object, FieldMask updateMask) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   UpdateObjectRequest request =
    *       UpdateObjectRequest.newBuilder()
@@ -2180,8 +2399,11 @@ public final Object updateObject(UpdateObjectRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   UpdateObjectRequest request =
    *       UpdateObjectRequest.newBuilder()
@@ -2250,8 +2472,11 @@ public final UnaryCallable updateObjectCallable() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   ApiStreamObserver responseObserver =
    *       new ApiStreamObserver() {
@@ -2295,8 +2520,11 @@ public final UnaryCallable updateObjectCallable() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   ProjectName parent = ProjectName.of("[PROJECT]");
    *   for (Object element : storageClient.listObjects(parent).iterateAll()) {
@@ -2323,8 +2551,11 @@ public final ListObjectsPagedResponse listObjects(ProjectName parent) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   String parent = ProjectName.of("[PROJECT]").toString();
    *   for (Object element : storageClient.listObjects(parent).iterateAll()) {
@@ -2348,8 +2579,11 @@ public final ListObjectsPagedResponse listObjects(String parent) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   ListObjectsRequest request =
    *       ListObjectsRequest.newBuilder()
@@ -2384,8 +2618,11 @@ public final ListObjectsPagedResponse listObjects(ListObjectsRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   ListObjectsRequest request =
    *       ListObjectsRequest.newBuilder()
@@ -2420,8 +2657,11 @@ public final ListObjectsPagedResponse listObjects(ListObjectsRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   ListObjectsRequest request =
    *       ListObjectsRequest.newBuilder()
@@ -2462,8 +2702,11 @@ public final UnaryCallable listObjectsC
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   RewriteObjectRequest request =
    *       RewriteObjectRequest.newBuilder()
@@ -2510,8 +2753,11 @@ public final RewriteResponse rewriteObject(RewriteObjectRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   RewriteObjectRequest request =
    *       RewriteObjectRequest.newBuilder()
@@ -2558,8 +2804,11 @@ public final UnaryCallable rewriteObjectC
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   StartResumableWriteRequest request =
    *       StartResumableWriteRequest.newBuilder()
@@ -2585,8 +2834,11 @@ public final StartResumableWriteResponse startResumableWrite(StartResumableWrite
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   StartResumableWriteRequest request =
    *       StartResumableWriteRequest.newBuilder()
@@ -2622,8 +2874,11 @@ public final StartResumableWriteResponse startResumableWrite(StartResumableWrite
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   String uploadId = "uploadId1563990780";
    *   QueryWriteStatusResponse response = storageClient.queryWriteStatus(uploadId);
@@ -2657,8 +2912,11 @@ public final QueryWriteStatusResponse queryWriteStatus(String uploadId) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   QueryWriteStatusRequest request =
    *       QueryWriteStatusRequest.newBuilder()
@@ -2693,8 +2951,11 @@ public final QueryWriteStatusResponse queryWriteStatus(QueryWriteStatusRequest r
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   QueryWriteStatusRequest request =
    *       QueryWriteStatusRequest.newBuilder()
@@ -2720,8 +2981,11 @@ public final QueryWriteStatusResponse queryWriteStatus(QueryWriteStatusRequest r
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   ProjectName project = ProjectName.of("[PROJECT]");
    *   ServiceAccount response = storageClient.getServiceAccount(project);
@@ -2747,8 +3011,11 @@ public final ServiceAccount getServiceAccount(ProjectName project) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   String project = ProjectName.of("[PROJECT]").toString();
    *   ServiceAccount response = storageClient.getServiceAccount(project);
@@ -2772,8 +3039,11 @@ public final ServiceAccount getServiceAccount(String project) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   GetServiceAccountRequest request =
    *       GetServiceAccountRequest.newBuilder()
@@ -2797,8 +3067,11 @@ public final ServiceAccount getServiceAccount(GetServiceAccountRequest request)
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   GetServiceAccountRequest request =
    *       GetServiceAccountRequest.newBuilder()
@@ -2822,8 +3095,11 @@ public final UnaryCallable getServiceA
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   ProjectName project = ProjectName.of("[PROJECT]");
    *   String serviceAccountEmail = "serviceAccountEmail1825953988";
@@ -2854,8 +3130,11 @@ public final CreateHmacKeyResponse createHmacKey(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   String project = ProjectName.of("[PROJECT]").toString();
    *   String serviceAccountEmail = "serviceAccountEmail1825953988";
@@ -2885,8 +3164,11 @@ public final CreateHmacKeyResponse createHmacKey(String project, String serviceA
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   CreateHmacKeyRequest request =
    *       CreateHmacKeyRequest.newBuilder()
@@ -2911,8 +3193,11 @@ public final CreateHmacKeyResponse createHmacKey(CreateHmacKeyRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   CreateHmacKeyRequest request =
    *       CreateHmacKeyRequest.newBuilder()
@@ -2937,8 +3222,11 @@ public final UnaryCallable createHm
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   String accessId = "accessId-2146437729";
    *   ProjectName project = ProjectName.of("[PROJECT]");
@@ -2968,8 +3256,11 @@ public final void deleteHmacKey(String accessId, ProjectName project) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   String accessId = "accessId-2146437729";
    *   String project = ProjectName.of("[PROJECT]").toString();
@@ -2996,8 +3287,11 @@ public final void deleteHmacKey(String accessId, String project) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   DeleteHmacKeyRequest request =
    *       DeleteHmacKeyRequest.newBuilder()
@@ -3022,8 +3316,11 @@ public final void deleteHmacKey(DeleteHmacKeyRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   DeleteHmacKeyRequest request =
    *       DeleteHmacKeyRequest.newBuilder()
@@ -3047,8 +3344,11 @@ public final UnaryCallable deleteHmacKeyCallable()
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   String accessId = "accessId-2146437729";
    *   ProjectName project = ProjectName.of("[PROJECT]");
@@ -3078,8 +3378,11 @@ public final HmacKeyMetadata getHmacKey(String accessId, ProjectName project) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   String accessId = "accessId-2146437729";
    *   String project = ProjectName.of("[PROJECT]").toString();
@@ -3106,8 +3409,11 @@ public final HmacKeyMetadata getHmacKey(String accessId, String project) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   GetHmacKeyRequest request =
    *       GetHmacKeyRequest.newBuilder()
@@ -3132,8 +3438,11 @@ public final HmacKeyMetadata getHmacKey(GetHmacKeyRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   GetHmacKeyRequest request =
    *       GetHmacKeyRequest.newBuilder()
@@ -3157,8 +3466,11 @@ public final UnaryCallable getHmacKeyCallabl
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   ProjectName project = ProjectName.of("[PROJECT]");
    *   for (HmacKeyMetadata element : storageClient.listHmacKeys(project).iterateAll()) {
@@ -3187,8 +3499,11 @@ public final ListHmacKeysPagedResponse listHmacKeys(ProjectName project) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   String project = ProjectName.of("[PROJECT]").toString();
    *   for (HmacKeyMetadata element : storageClient.listHmacKeys(project).iterateAll()) {
@@ -3214,8 +3529,11 @@ public final ListHmacKeysPagedResponse listHmacKeys(String project) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   ListHmacKeysRequest request =
    *       ListHmacKeysRequest.newBuilder()
@@ -3245,8 +3563,11 @@ public final ListHmacKeysPagedResponse listHmacKeys(ListHmacKeysRequest request)
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   ListHmacKeysRequest request =
    *       ListHmacKeysRequest.newBuilder()
@@ -3277,8 +3598,11 @@ public final ListHmacKeysPagedResponse listHmacKeys(ListHmacKeysRequest request)
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   ListHmacKeysRequest request =
    *       ListHmacKeysRequest.newBuilder()
@@ -3314,8 +3638,11 @@ public final UnaryCallable listHmacKe
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   HmacKeyMetadata hmacKey = HmacKeyMetadata.newBuilder().build();
    *   FieldMask updateMask = FieldMask.newBuilder().build();
@@ -3343,8 +3670,11 @@ public final HmacKeyMetadata updateHmacKey(HmacKeyMetadata hmacKey, FieldMask up
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   UpdateHmacKeyRequest request =
    *       UpdateHmacKeyRequest.newBuilder()
@@ -3369,8 +3699,11 @@ public final HmacKeyMetadata updateHmacKey(UpdateHmacKeyRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (StorageClient storageClient = StorageClient.create()) {
    *   UpdateHmacKeyRequest request =
    *       UpdateHmacKeyRequest.newBuilder()
diff --git a/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageSettings.java b/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageSettings.java
index 43c6e85528..23fc6ac91b 100644
--- a/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageSettings.java
+++ b/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageSettings.java
@@ -64,16 +64,16 @@
  * 

For example, to set the total timeout of deleteBucket to 30 seconds: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * StorageSettings.Builder storageSettingsBuilder = StorageSettings.newBuilder();
  * storageSettingsBuilder
  *     .deleteBucketSettings()
  *     .setRetrySettings(
- *         storageSettingsBuilder
- *             .deleteBucketSettings()
- *             .getRetrySettings()
- *             .toBuilder()
+ *         storageSettingsBuilder.deleteBucketSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * StorageSettings storageSettings = storageSettingsBuilder.build();
diff --git a/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/package-info.java b/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/package-info.java
index b303dd1e34..5f909765e1 100644
--- a/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/package-info.java
+++ b/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/package-info.java
@@ -38,8 +38,11 @@
  * 

Sample for StorageClient: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (StorageClient storageClient = StorageClient.create()) {
  *   BucketName name = BucketName.of("[PROJECT]", "[BUCKET]");
  *   storageClient.deleteBucket(name);
diff --git a/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/StorageStubSettings.java b/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/StorageStubSettings.java
index c49a9d89ab..2a0c7cb538 100644
--- a/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/StorageStubSettings.java
+++ b/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/StorageStubSettings.java
@@ -124,16 +124,16 @@
  * 

For example, to set the total timeout of deleteBucket to 30 seconds: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * StorageStubSettings.Builder storageSettingsBuilder = StorageStubSettings.newBuilder();
  * storageSettingsBuilder
  *     .deleteBucketSettings()
  *     .setRetrySettings(
- *         storageSettingsBuilder
- *             .deleteBucketSettings()
- *             .getRetrySettings()
- *             .toBuilder()
+ *         storageSettingsBuilder.deleteBucketSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * StorageStubSettings storageSettings = storageSettingsBuilder.build();

From 5915383e68cb99d416f2b50b7f924a91b788ad13 Mon Sep 17 00:00:00 2001
From: WhiteSource Renovate 
Date: Wed, 14 Sep 2022 17:09:37 +0200
Subject: [PATCH 26/28] test(deps): update dependency
 com.google.cloud:google-cloud-pubsub to v1.120.15 (#1616)

---
 pom.xml                             | 2 +-
 samples/install-without-bom/pom.xml | 2 +-
 samples/native-image-sample/pom.xml | 2 +-
 samples/snapshot/pom.xml            | 2 +-
 samples/snippets/pom.xml            | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/pom.xml b/pom.xml
index 6f6656b394..867a29cc3f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -80,7 +80,7 @@
       
         com.google.cloud
         google-cloud-pubsub
-        1.120.14
+        1.120.15
         test
       
       
diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml
index 9f2e925b8a..e1d62f5d2e 100644
--- a/samples/install-without-bom/pom.xml
+++ b/samples/install-without-bom/pom.xml
@@ -61,7 +61,7 @@
     
       com.google.cloud
       google-cloud-pubsub
-      1.120.14
+      1.120.15
       test
     
   
diff --git a/samples/native-image-sample/pom.xml b/samples/native-image-sample/pom.xml
index d29ef63bb6..d596b0d589 100644
--- a/samples/native-image-sample/pom.xml
+++ b/samples/native-image-sample/pom.xml
@@ -61,7 +61,7 @@
     
       com.google.cloud
       google-cloud-pubsub
-      1.120.14
+      1.120.15
       test
     
   
diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml
index 84aad6e281..024146a795 100644
--- a/samples/snapshot/pom.xml
+++ b/samples/snapshot/pom.xml
@@ -52,7 +52,7 @@
     
       com.google.cloud
       google-cloud-pubsub
-      1.120.14
+      1.120.15
       test
     
   
diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml
index 25d730fac1..26847551a1 100644
--- a/samples/snippets/pom.xml
+++ b/samples/snippets/pom.xml
@@ -72,7 +72,7 @@
     
       com.google.cloud
       google-cloud-pubsub
-      1.120.14
+      1.120.15
       test
     
   

From 20e63785462e7876a7ff0ceeeea1363007cc160f Mon Sep 17 00:00:00 2001
From: WhiteSource Renovate 
Date: Thu, 15 Sep 2022 14:18:31 +0200
Subject: [PATCH 27/28] deps: update dependency
 com.google.cloud:google-cloud-shared-dependencies to v3.0.3 (#1620)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[![Mend 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-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | `3.0.2` -> `3.0.3` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.3/compatibility-slim/3.0.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.3/confidence-slim/3.0.2)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

googleapis/java-shared-dependencies ### [`v3.0.3`](https://togithub.com/googleapis/java-shared-dependencies/blob/HEAD/CHANGELOG.md#​303-httpsgithubcomgoogleapisjava-shared-dependenciescomparev302v303-2022-09-14) [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v3.0.2...v3.0.3) ##### Dependencies - Google-cloud-core 2.8.12 ([#​799](https://togithub.com/googleapis/java-shared-dependencies/issues/799)) ([1b3db8d](https://togithub.com/googleapis/java-shared-dependencies/commit/1b3db8d1e17c49ebae79fc96164fa9058e1df6e3)) - Moving gson to first-party-dependencies ([#​800](https://togithub.com/googleapis/java-shared-dependencies/issues/800)) ([a41fcc1](https://togithub.com/googleapis/java-shared-dependencies/commit/a41fcc11d32e02e5af2837561792e3919f6d4b3f)) - Update dependency com.google.protobuf:protobuf-bom to v3.21.6 ([#​797](https://togithub.com/googleapis/java-shared-dependencies/issues/797)) ([bc5fdc9](https://togithub.com/googleapis/java-shared-dependencies/commit/bc5fdc9b3af7973c28f063a9ac156fe2af562814)) - Update gax.version to v2.19.1 ([#​798](https://togithub.com/googleapis/java-shared-dependencies/issues/798)) ([84e5487](https://togithub.com/googleapis/java-shared-dependencies/commit/84e5487b2e3dce4bb60badecebde788c3cb702b8)) - Update google.core.version to v2.8.11 ([#​793](https://togithub.com/googleapis/java-shared-dependencies/issues/793)) ([63c1297](https://togithub.com/googleapis/java-shared-dependencies/commit/63c129722aa0b821031ff5b4c11004adf7b12044))
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-storage). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 867a29cc3f..464daae85d 100644 --- a/pom.xml +++ b/pom.xml @@ -54,7 +54,7 @@ UTF-8 github google-cloud-storage-parent - 3.0.2 + 3.0.3 From 932259e9a744081b5416c9fb582af519b4360146 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 15 Sep 2022 16:06:17 +0000 Subject: [PATCH 28/28] chore(main): release 2.12.0 (#1565) :robot: I have created a release *beep* *boop* --- ## [2.12.0](https://github.com/googleapis/java-storage/compare/v2.11.3...v2.12.0) (2022-09-15) ### Features * Add toString method for CustomPlacementConfig ([#1602](https://github.com/googleapis/java-storage/issues/1602)) ([51aca10](https://github.com/googleapis/java-storage/commit/51aca10fafe685ed9e7cb41bc4ae79be10feb080)) ### Documentation * Add batch sample ([#1559](https://github.com/googleapis/java-storage/issues/1559)) ([583bf73](https://github.com/googleapis/java-storage/commit/583bf73f5d58aa5d79fbaa12b24407c558235eed)) * Document thread safety of library ([#1566](https://github.com/googleapis/java-storage/issues/1566)) ([c740899](https://github.com/googleapis/java-storage/commit/c7408999e811ba917edb0c136432afa29075e0f2)) * Fix broken links in readme ([#1520](https://github.com/googleapis/java-storage/issues/1520)) ([840b08a](https://github.com/googleapis/java-storage/commit/840b08a03fa7c0535855140244c282f79403b458)) ### Dependencies * Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.2 ([#1611](https://github.com/googleapis/java-storage/issues/1611)) ([8a48aea](https://github.com/googleapis/java-storage/commit/8a48aea7e0049c64ef944b532a2874115b1e2323)) * Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.3 ([#1620](https://github.com/googleapis/java-storage/issues/1620)) ([20e6378](https://github.com/googleapis/java-storage/commit/20e63785462e7876a7ff0ceeeea1363007cc160f)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 20 ++++++++++++++++++++ gapic-google-cloud-storage-v2/pom.xml | 4 ++-- google-cloud-storage/pom.xml | 4 ++-- grpc-google-cloud-storage-v2/pom.xml | 4 ++-- pom.xml | 10 +++++----- proto-google-cloud-storage-v2/pom.xml | 4 ++-- samples/snapshot/pom.xml | 2 +- versions.txt | 8 ++++---- 8 files changed, 38 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1033b943b7..58d808c620 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,25 @@ # Changelog +## [2.12.0](https://github.com/googleapis/java-storage/compare/v2.11.3...v2.12.0) (2022-09-15) + + +### Features + +* Add toString method for CustomPlacementConfig ([#1602](https://github.com/googleapis/java-storage/issues/1602)) ([51aca10](https://github.com/googleapis/java-storage/commit/51aca10fafe685ed9e7cb41bc4ae79be10feb080)) + + +### Documentation + +* Add batch sample ([#1559](https://github.com/googleapis/java-storage/issues/1559)) ([583bf73](https://github.com/googleapis/java-storage/commit/583bf73f5d58aa5d79fbaa12b24407c558235eed)) +* Document thread safety of library ([#1566](https://github.com/googleapis/java-storage/issues/1566)) ([c740899](https://github.com/googleapis/java-storage/commit/c7408999e811ba917edb0c136432afa29075e0f2)) +* Fix broken links in readme ([#1520](https://github.com/googleapis/java-storage/issues/1520)) ([840b08a](https://github.com/googleapis/java-storage/commit/840b08a03fa7c0535855140244c282f79403b458)) + + +### Dependencies + +* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.2 ([#1611](https://github.com/googleapis/java-storage/issues/1611)) ([8a48aea](https://github.com/googleapis/java-storage/commit/8a48aea7e0049c64ef944b532a2874115b1e2323)) +* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.3 ([#1620](https://github.com/googleapis/java-storage/issues/1620)) ([20e6378](https://github.com/googleapis/java-storage/commit/20e63785462e7876a7ff0ceeeea1363007cc160f)) + ## [2.11.3](https://github.com/googleapis/java-storage/compare/v2.11.2...v2.11.3) (2022-08-08) diff --git a/gapic-google-cloud-storage-v2/pom.xml b/gapic-google-cloud-storage-v2/pom.xml index 026229dc85..5bb31083e0 100644 --- a/gapic-google-cloud-storage-v2/pom.xml +++ b/gapic-google-cloud-storage-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc gapic-google-cloud-storage-v2 - 2.11.4-alpha-SNAPSHOT + 2.12.0-alpha gapic-google-cloud-storage-v2 GRPC library for gapic-google-cloud-storage-v2 com.google.cloud google-cloud-storage-parent - 2.11.4-SNAPSHOT + 2.12.0 diff --git a/google-cloud-storage/pom.xml b/google-cloud-storage/pom.xml index e56917c5f8..d285f5cbca 100644 --- a/google-cloud-storage/pom.xml +++ b/google-cloud-storage/pom.xml @@ -2,7 +2,7 @@ 4.0.0 google-cloud-storage - 2.11.4-SNAPSHOT + 2.12.0 jar Google Cloud Storage https://github.com/googleapis/java-storage @@ -12,7 +12,7 @@ com.google.cloud google-cloud-storage-parent - 2.11.4-SNAPSHOT + 2.12.0 google-cloud-storage diff --git a/grpc-google-cloud-storage-v2/pom.xml b/grpc-google-cloud-storage-v2/pom.xml index ee2fcc8444..24454f038b 100644 --- a/grpc-google-cloud-storage-v2/pom.xml +++ b/grpc-google-cloud-storage-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-storage-v2 - 2.11.4-alpha-SNAPSHOT + 2.12.0-alpha grpc-google-cloud-storage-v2 GRPC library for grpc-google-cloud-storage-v2 com.google.cloud google-cloud-storage-parent - 2.11.4-SNAPSHOT + 2.12.0 diff --git a/pom.xml b/pom.xml index 464daae85d..357baa6526 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-storage-parent pom - 2.11.4-SNAPSHOT + 2.12.0 Storage Parent https://github.com/googleapis/java-storage @@ -70,7 +70,7 @@ com.google.cloud google-cloud-storage - 2.11.4-SNAPSHOT + 2.12.0 com.google.apis @@ -111,17 +111,17 @@ com.google.api.grpc proto-google-cloud-storage-v2 - 2.11.4-alpha-SNAPSHOT + 2.12.0-alpha com.google.api.grpc grpc-google-cloud-storage-v2 - 2.11.4-alpha-SNAPSHOT + 2.12.0-alpha com.google.api.grpc gapic-google-cloud-storage-v2 - 2.11.4-alpha-SNAPSHOT + 2.12.0-alpha com.google.cloud diff --git a/proto-google-cloud-storage-v2/pom.xml b/proto-google-cloud-storage-v2/pom.xml index f21f96988b..383e47acba 100644 --- a/proto-google-cloud-storage-v2/pom.xml +++ b/proto-google-cloud-storage-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-storage-v2 - 2.11.4-alpha-SNAPSHOT + 2.12.0-alpha proto-google-cloud-storage-v2 PROTO library for proto-google-cloud-storage-v2 com.google.cloud google-cloud-storage-parent - 2.11.4-SNAPSHOT + 2.12.0 diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 024146a795..5abdb6f444 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-storage - 2.11.4-SNAPSHOT + 2.12.0 diff --git a/versions.txt b/versions.txt index 564b12cef4..334e0f4a24 100644 --- a/versions.txt +++ b/versions.txt @@ -1,7 +1,7 @@ # Format: # module:released-version:current-version -google-cloud-storage:2.11.3:2.11.4-SNAPSHOT -gapic-google-cloud-storage-v2:2.11.3-alpha:2.11.4-alpha-SNAPSHOT -grpc-google-cloud-storage-v2:2.11.3-alpha:2.11.4-alpha-SNAPSHOT -proto-google-cloud-storage-v2:2.11.3-alpha:2.11.4-alpha-SNAPSHOT +google-cloud-storage:2.12.0:2.12.0 +gapic-google-cloud-storage-v2:2.12.0-alpha:2.12.0-alpha +grpc-google-cloud-storage-v2:2.12.0-alpha:2.12.0-alpha +proto-google-cloud-storage-v2:2.12.0-alpha:2.12.0-alpha