From 316b137b6a6d040249a0e2c08234c53fc0b05578 Mon Sep 17 00:00:00 2001 From: JesseLovelace <43148100+JesseLovelace@users.noreply.github.com> Date: Wed, 25 May 2022 11:37:44 -0700 Subject: [PATCH 1/6] fix broken links in README --- README.md | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index cc5fc2222..f7780c1cc 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ libraryDependencies += "com.google.cloud" % "google-cloud-storage" % "2.6.1" ## Authentication -See the [Authentication][authentication] section in the base directory's README. +See the [Authentication][authentication] section in Google Cloud Java's README. ## Authorization @@ -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,8 +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). - +[UploadObject.java](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/UploadObject.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,8 +180,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 @@ -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. From d487d1b65e9c77bd0017cc9c6ac26e3a7d835ec5 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 25 May 2022 18:43:40 +0000 Subject: [PATCH 2/6] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- README.md | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index f7780c1cc..7c8b2bc4a 100644 --- a/README.md +++ b/README.md @@ -56,18 +56,18 @@ 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.6.1' +implementation 'com.google.cloud:google-cloud-storage:2.7.1' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-storage" % "2.6.1" +libraryDependencies += "com.google.cloud" % "google-cloud-storage" % "2.7.1" ``` ## Authentication -See the [Authentication][authentication] section in Google Cloud Java's README. +See the [Authentication][authentication] section in the base directory's README. ## Authorization @@ -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 in Google Cloud Java. +For other authentication options, see the [Authentication](https://github.com/googleapis/google-cloud-java#authentication) page. #### 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 -[UploadObject.java](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/UploadObject.java). +[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). At this point, you will be able to see your newly created bucket and blob on the Google Developers Console. @@ -164,7 +164,8 @@ String contentString = new String(content, UTF_8); ``` A complete example for accessing blobs can be found at -[UploadObject.java](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/UploadObject.java). +[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). + #### 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. @@ -180,6 +181,8 @@ 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 @@ -201,10 +204,16 @@ for (Bucket bucket : storage.list().iterateAll()) { #### Complete source code -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. +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. ### 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. From f24c2945846e59f6206bb606f84fcd5ee2f7f59e Mon Sep 17 00:00:00 2001 From: JesseLovelace <43148100+JesseLovelace@users.noreply.github.com> Date: Wed, 20 Jul 2022 15:00:59 -0700 Subject: [PATCH 3/6] update partials yaml --- .readme-partials.yaml | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/.readme-partials.yaml b/.readme-partials.yaml index 792c7985a..c95759f5b 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. From ac47c105bc4a392d87966b7e96f61190be702146 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 20 Jul 2022 22:05:23 +0000 Subject: [PATCH 4/6] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- README.md | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index e9704ac4e..3cd245dc0 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.9.3' +implementation 'com.google.cloud:google-cloud-storage:2.10.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-storage" % "2.9.3" +libraryDependencies += "com.google.cloud" % "google-cloud-storage" % "2.10.0" ``` ## Authentication @@ -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. From 32c41ed0b1b1518ca6de7cb6c76489ae9d9d5ce8 Mon Sep 17 00:00:00 2001 From: JesseLovelace <43148100+JesseLovelace@users.noreply.github.com> Date: Mon, 8 Aug 2022 15:38:26 -0700 Subject: [PATCH 5/6] fix javadoc --- .../java/com/google/cloud/storage/package-info.java | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) 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 ace8f6611..7242b2f1e 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,8 @@
  * }
  * }
* + *

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 ea7e27361d41d2d5884e5f77737e2d29ff92fa95 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 8 Aug 2022 22:41:31 +0000 Subject: [PATCH 6/6] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- README.md | 4 ++-- .../main/java/com/google/cloud/storage/package-info.java | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 3cd245dc0..2c5e9e192 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.10.0' +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.10.0" +libraryDependencies += "com.google.cloud" % "google-cloud-storage" % "2.11.3" ``` ## Authentication 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 7242b2f1e..1c17ee701 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,8 +17,8 @@ /** * A client for Cloud Storage - Unified object storage. * - *

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

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();
@@ -42,7 +42,8 @@
  * }
  * }
* - *

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

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