Repository: googleapis/java-storage
Pull request #1142 (2021-11-10 22:07:37)

fix: update StorageOptions to not overwrite any previously set host
When calling `StorageOptions#toBuilder()` after creating the builder the host was explicitly set to the default host. This change removes that behavior instead moving the setting of the default host to the instantiation of a new builder.

Add unit tests to ensure host is set to the expected values based on different ways of creating an instance of StorageOptions.

Related:
* https://github.com/googleapis/google-cloud-java/pull/6579
* https://github.com/googleapis/google-cloud-java/issues/7004
* https://github.com/googleapis/google-cloud-java/pull/7034



Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ad954789..781b0b6a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,12 @@
 # Changelog
 
+### [2.2.1](https://www.github.com/googleapis/java-storage/compare/v2.2.0...v2.2.1) (2021-11-15)
+
+
+### Dependencies
+
+* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.5.0 ([#1146](https://www.github.com/googleapis/java-storage/issues/1146)) ([a5d13a9](https://www.github.com/googleapis/java-storage/commit/a5d13a97bae50b4ee8a2fcef180ddc26b77e3d16))
+
 ## [2.2.0](https://www.github.com/googleapis/java-storage/compare/v2.1.9...v2.2.0) (2021-11-02)
 
 
diff --git a/gapic-google-cloud-storage-v2/pom.xml b/gapic-google-cloud-storage-v2/pom.xml
index f48a4c58..d037fc5e 100644
--- a/gapic-google-cloud-storage-v2/pom.xml
+++ b/gapic-google-cloud-storage-v2/pom.xml
@@ -4,13 +4,13 @@
   <modelVersion>4.0.0</modelVersion>
   <groupId>com.google.api.grpc</groupId>
   <artifactId>gapic-google-cloud-storage-v2</artifactId>
-  <version>2.2.1-alpha-SNAPSHOT</version><!-- {x-version-update:gapic-google-cloud-storage-v2:current} -->
+  <version>2.2.2-alpha-SNAPSHOT</version><!-- {x-version-update:gapic-google-cloud-storage-v2:current} -->
   <name>gapic-google-cloud-storage-v2</name>
   <description>GRPC library for gapic-google-cloud-storage-v2</description>
   <parent>
     <groupId>com.google.cloud</groupId>
     <artifactId>google-cloud-storage-parent</artifactId>
-    <version>2.2.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage:current} -->
+    <version>2.2.2-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage:current} -->
   </parent>
   <dependencies>
     <dependency>
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 41da8013..5d98a7f5 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
@@ -29,7 +29,21 @@ import javax.annotation.Generated;
 
 // AUTO-GENERATED DOCUMENTATION AND CLASS.
 /**
- * Service Description: Manages Google Cloud Storage resources.
+ * Service Description: ## API Overview and Naming Syntax
+ *
+ * <p>The GCS gRPC API allows applications to read and write data through the abstractions of
+ * buckets and objects. For a description of these abstractions please see
+ * https://cloud.google.com/storage/docs.
+ *
+ * <p>Resources are named as follows: - Projects are referred to as they are defined by the Resource
+ * Manager API, using strings like `projects/123456` or `projects/my-string-id`. - Buckets are named
+ * using string names of the form: `projects/{project}/buckets/{bucket}` For globally unique
+ * buckets, `_` may be substituted for the project. - Objects are uniquely identified by their name
+ * along with the name of the bucket they belong to, as separate strings in this API. For example:
+ *
+ * <p>ReadObjectRequest { bucket: 'projects/_/buckets/my-bucket' object: 'my-object' } Note that
+ * object names can contain `/` characters, which are treated as any other character (no special
+ * directory semantics).
  *
  * <p>This class provides the ability to make remote calls to the backing service through method
  * calls that map to API methods. Sample code to get started:
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 bfb389cc..2bc5db08 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
@@ -19,7 +19,21 @@
  *
  * <p>======================= StorageClient =======================
  *
- * <p>Service Description: Manages Google Cloud Storage resources.
+ * <p>Service Description: ## API Overview and Naming Syntax
+ *
+ * <p>The GCS gRPC API allows applications to read and write data through the abstractions of
+ * buckets and objects. For a description of these abstractions please see
+ * https://cloud.google.com/storage/docs.
+ *
+ * <p>Resources are named as follows: - Projects are referred to as they are defined by the Resource
+ * Manager API, using strings like `projects/123456` or `projects/my-string-id`. - Buckets are named
+ * using string names of the form: `projects/{project}/buckets/{bucket}` For globally unique
+ * buckets, `_` may be substituted for the project. - Objects are uniquely identified by their name
+ * along with the name of the bucket they belong to, as separate strings in this API. For example:
+ *
+ * <p>ReadObjectRequest { bucket: 'projects/_/buckets/my-bucket' object: 'my-object' } Note that
+ * object names can contain `/` characters, which are treated as any other character (no special
+ * directory semantics).
  *
  * <p>Sample for StorageClient:
  *
diff --git a/google-cloud-storage/pom.xml b/google-cloud-storage/pom.xml
index 2b835ee3..82d90c89 100644
--- a/google-cloud-storage/pom.xml
+++ b/google-cloud-storage/pom.xml
@@ -2,7 +2,7 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>
   <artifactId>google-cloud-storage</artifactId>
-  <version>2.2.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage:current} -->
+  <version>2.2.2-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage:current} -->
   <packaging>jar</packaging>
   <name>Google Cloud Storage</name>
   <url>https://github.com/googleapis/java-storage</url>
@@ -12,7 +12,7 @@
   <parent>
     <groupId>com.google.cloud</groupId>
     <artifactId>google-cloud-storage-parent</artifactId>
-    <version>2.2.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage:current} -->
+    <version>2.2.2-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage:current} -->
   </parent>
   <properties>
     <site.installationModule>google-cloud-storage</site.installationModule>
diff --git a/google-cloud-storage/src/main/java/com/google/cloud/storage/StorageOptions.java b/google-cloud-storage/src/main/java/com/google/cloud/storage/StorageOptions.java
index a15a9038..f3de842f 100644
--- a/google-cloud-storage/src/main/java/com/google/cloud/storage/StorageOptions.java
+++ b/google-cloud-storage/src/main/java/com/google/cloud/storage/StorageOptions.java
@@ -166,7 +166,7 @@ public class StorageOptions extends ServiceOptions<Storage, StorageOptions> {
   @SuppressWarnings("unchecked")
   @Override
   public Builder toBuilder() {
-    return new Builder(this).setHost(DEFAULT_HOST);
+    return new Builder(this);
   }
 
   @Override
diff --git a/grpc-google-cloud-storage-v2/pom.xml b/grpc-google-cloud-storage-v2/pom.xml
index c89e56af..a053e3b8 100644
--- a/grpc-google-cloud-storage-v2/pom.xml
+++ b/grpc-google-cloud-storage-v2/pom.xml
@@ -4,13 +4,13 @@
   <modelVersion>4.0.0</modelVersion>
   <groupId>com.google.api.grpc</groupId>
   <artifactId>grpc-google-cloud-storage-v2</artifactId>
-  <version>2.2.1-alpha-SNAPSHOT</version><!-- {x-version-update:grpc-google-cloud-storage-v2:current} -->
+  <version>2.2.2-alpha-SNAPSHOT</version><!-- {x-version-update:grpc-google-cloud-storage-v2:current} -->
   <name>grpc-google-cloud-storage-v2</name>
   <description>GRPC library for grpc-google-cloud-storage-v2</description>
   <parent>
     <groupId>com.google.cloud</groupId>
     <artifactId>google-cloud-storage-parent</artifactId>
-    <version>2.2.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage:current} -->
+    <version>2.2.2-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage:current} -->
   </parent>
   <dependencies>
     <dependency>
diff --git a/grpc-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageGrpc.java b/grpc-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageGrpc.java
index 0875e1a6..d589fa88 100644
--- a/grpc-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageGrpc.java
+++ b/grpc-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageGrpc.java
@@ -21,12 +21,30 @@ import static io.grpc.MethodDescriptor.generateFullMethodName;
  *
  *
  * <pre>
- * Manages Google Cloud Storage resources.
+ * ## API Overview and Naming Syntax
+ * The GCS gRPC API allows applications to read and write data through the
+ * abstractions of buckets and objects. For a description of these abstractions
+ * please see https://cloud.google.com/storage/docs.
+ * Resources are named as follows:
+ *   - Projects are referred to as they are defined by the Resource Manager API,
+ *     using strings like `projects/123456` or `projects/my-string-id`.
+ *   - Buckets are named using string names of the form:
+ *     `projects/{project}/buckets/{bucket}`
+ *     For globally unique buckets, `_` may be substituted for the project.
+ *   - Objects are uniquely identified by their name along with the name of the
+ *     bucket they belong to, as separate strings in this API. For example:
+ *       ReadObjectRequest {
+ *         bucket: 'projects/_/buckets/my-bucket'
+ *         object: 'my-object'
+ *       }
+ *     Note that object names can contain `/` characters, which are treated as
+ *     any other character (no special directory semantics).
  * </pre>
  */
 @javax.annotation.Generated(
     value = "by gRPC proto compiler",
     comments = "Source: google/storage/v2/storage.proto")
+@io.grpc.stub.annotations.GrpcGenerated
 public final class StorageGrpc {
 
   private StorageGrpc() {}
@@ -252,7 +270,24 @@ public final class StorageGrpc {
    *
    *
    * <pre>
-   * Manages Google Cloud Storage resources.
+   * ## API Overview and Naming Syntax
+   * The GCS gRPC API allows applications to read and write data through the
+   * abstractions of buckets and objects. For a description of these abstractions
+   * please see https://cloud.google.com/storage/docs.
+   * Resources are named as follows:
+   *   - Projects are referred to as they are defined by the Resource Manager API,
+   *     using strings like `projects/123456` or `projects/my-string-id`.
+   *   - Buckets are named using string names of the form:
+   *     `projects/{project}/buckets/{bucket}`
+   *     For globally unique buckets, `_` may be substituted for the project.
+   *   - Objects are uniquely identified by their name along with the name of the
+   *     bucket they belong to, as separate strings in this API. For example:
+   *       ReadObjectRequest {
+   *         bucket: 'projects/_/buckets/my-bucket'
+   *         object: 'my-object'
+   *       }
+   *     Note that object names can contain `/` characters, which are treated as
+   *     any other character (no special directory semantics).
    * </pre>
    */
   public abstract static class StorageImplBase implements io.grpc.BindableService {
@@ -382,7 +417,24 @@ public final class StorageGrpc {
    *
    *
    * <pre>
-   * Manages Google Cloud Storage resources.
+   * ## API Overview and Naming Syntax
+   * The GCS gRPC API allows applications to read and write data through the
+   * abstractions of buckets and objects. For a description of these abstractions
+   * please see https://cloud.google.com/storage/docs.
+   * Resources are named as follows:
+   *   - Projects are referred to as they are defined by the Resource Manager API,
+   *     using strings like `projects/123456` or `projects/my-string-id`.
+   *   - Buckets are named using string names of the form:
+   *     `projects/{project}/buckets/{bucket}`
+   *     For globally unique buckets, `_` may be substituted for the project.
+   *   - Objects are uniquely identified by their name along with the name of the
+   *     bucket they belong to, as separate strings in this API. For example:
+   *       ReadObjectRequest {
+   *         bucket: 'projects/_/buckets/my-bucket'
+   *         object: 'my-object'
+   *       }
+   *     Note that object names can contain `/` characters, which are treated as
+   *     any other character (no special directory semantics).
    * </pre>
    */
   public static final class StorageStub extends io.grpc.stub.AbstractAsyncStub<StorageStub> {
@@ -493,7 +545,24 @@ public final class StorageGrpc {
    *
    *
    * <pre>
-   * Manages Google Cloud Storage resources.
+   * ## API Overview and Naming Syntax
+   * The GCS gRPC API allows applications to read and write data through the
+   * abstractions of buckets and objects. For a description of these abstractions
+   * please see https://cloud.google.com/storage/docs.
+   * Resources are named as follows:
+   *   - Projects are referred to as they are defined by the Resource Manager API,
+   *     using strings like `projects/123456` or `projects/my-string-id`.
+   *   - Buckets are named using string names of the form:
+   *     `projects/{project}/buckets/{bucket}`
+   *     For globally unique buckets, `_` may be substituted for the project.
+   *   - Objects are uniquely identified by their name along with the name of the
+   *     bucket they belong to, as separate strings in this API. For example:
+   *       ReadObjectRequest {
+   *         bucket: 'projects/_/buckets/my-bucket'
+   *         object: 'my-object'
+   *       }
+   *     Note that object names can contain `/` characters, which are treated as
+   *     any other character (no special directory semantics).
    * </pre>
    */
   public static final class StorageBlockingStub
@@ -563,7 +632,24 @@ public final class StorageGrpc {
    *
    *
    * <pre>
-   * Manages Google Cloud Storage resources.
+   * ## API Overview and Naming Syntax
+   * The GCS gRPC API allows applications to read and write data through the
+   * abstractions of buckets and objects. For a description of these abstractions
+   * please see https://cloud.google.com/storage/docs.
+   * Resources are named as follows:
+   *   - Projects are referred to as they are defined by the Resource Manager API,
+   *     using strings like `projects/123456` or `projects/my-string-id`.
+   *   - Buckets are named using string names of the form:
+   *     `projects/{project}/buckets/{bucket}`
+   *     For globally unique buckets, `_` may be substituted for the project.
+   *   - Objects are uniquely identified by their name along with the name of the
+   *     bucket they belong to, as separate strings in this API. For example:
+   *       ReadObjectRequest {
+   *         bucket: 'projects/_/buckets/my-bucket'
+   *         object: 'my-object'
+   *       }
+   *     Note that object names can contain `/` characters, which are treated as
+   *     any other character (no special directory semantics).
    * </pre>
    */
   public static final class StorageFutureStub
diff --git a/pom.xml b/pom.xml
index 71ab7e20..7e61a8f1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
   <groupId>com.google.cloud</groupId>
   <artifactId>google-cloud-storage-parent</artifactId>
   <packaging>pom</packaging>
-  <version>2.2.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage:current} -->
+  <version>2.2.2-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage:current} -->
   <name>Storage Parent</name>
   <url>https://github.com/googleapis/java-storage</url>
   <description>
@@ -14,7 +14,7 @@
   <parent>
     <groupId>com.google.cloud</groupId>
     <artifactId>google-cloud-shared-config</artifactId>
-    <version>1.2.1</version>
+    <version>1.2.2</version>
   </parent>
 
   <developers>
@@ -54,7 +54,7 @@
     <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
     <github.global.server>github</github.global.server>
     <site.installationModule>google-cloud-storage-parent</site.installationModule>
-    <google.cloud.shared-dependencies.version>2.4.0</google.cloud.shared-dependencies.version>
+    <google.cloud.shared-dependencies.version>2.5.0</google.cloud.shared-dependencies.version>
   </properties>
 
   <dependencyManagement>
@@ -100,17 +100,17 @@
       <dependency>
         <groupId>com.google.api.grpc</groupId>
         <artifactId>proto-google-cloud-storage-v2</artifactId>
-        <version>2.2.1-alpha-SNAPSHOT</version><!-- {x-version-update:proto-google-cloud-storage-v2:current} -->
+        <version>2.2.2-alpha-SNAPSHOT</version><!-- {x-version-update:proto-google-cloud-storage-v2:current} -->
       </dependency>
       <dependency>
         <groupId>com.google.api.grpc</groupId>
         <artifactId>grpc-google-cloud-storage-v2</artifactId>
-        <version>2.2.1-alpha-SNAPSHOT</version><!-- {x-version-update:grpc-google-cloud-storage-v2:current} -->
+        <version>2.2.2-alpha-SNAPSHOT</version><!-- {x-version-update:grpc-google-cloud-storage-v2:current} -->
       </dependency>
       <dependency>
         <groupId>com.google.api.grpc</groupId>
         <artifactId>gapic-google-cloud-storage-v2</artifactId>
-        <version>2.2.1-alpha-SNAPSHOT</version><!-- {x-version-update:grpc-google-cloud-storage-v2:current} -->
+        <version>2.2.2-alpha-SNAPSHOT</version><!-- {x-version-update:grpc-google-cloud-storage-v2:current} -->
       </dependency>
       <dependency>
         <groupId>com.google.cloud</groupId>
diff --git a/proto-google-cloud-storage-v2/pom.xml b/proto-google-cloud-storage-v2/pom.xml
index d3aa188c..ab2ee6bb 100644
--- a/proto-google-cloud-storage-v2/pom.xml
+++ b/proto-google-cloud-storage-v2/pom.xml
@@ -4,13 +4,13 @@
   <modelVersion>4.0.0</modelVersion>
   <groupId>com.google.api.grpc</groupId>
   <artifactId>proto-google-cloud-storage-v2</artifactId>
-  <version>2.2.1-alpha-SNAPSHOT</version><!-- {x-version-update:proto-google-cloud-storage-v2:current} -->
+  <version>2.2.2-alpha-SNAPSHOT</version><!-- {x-version-update:proto-google-cloud-storage-v2:current} -->
   <name>proto-google-cloud-storage-v2</name>
   <description>PROTO library for proto-google-cloud-storage-v2</description>
   <parent>
     <groupId>com.google.cloud</groupId>
     <artifactId>google-cloud-storage-parent</artifactId>
-    <version>2.2.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage:current} -->
+    <version>2.2.2-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage:current} -->
   </parent>
   <dependencies>
     <dependency>
diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/Bucket.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/Bucket.java
index 91808f23..72acdc83 100644
--- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/Bucket.java
+++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/Bucket.java
@@ -14384,11 +14384,6 @@ public final class Bucket extends com.google.protobuf.GeneratedMessageV3
    *
    * <pre>
    * Immutable. The name of the bucket.
-   * Global buckets will be of the format `projects/{project}/buckets/{bucket}`.
-   * Other sorts of buckets in the future are not guaranteed to follow this
-   * pattern.
-   * For globally unique bucket names, a `_` may be substituted for the project
-   * ID.
    * </pre>
    *
    * <code>string name = 1 [(.google.api.field_behavior) = IMMUTABLE];</code>
@@ -14412,11 +14407,6 @@ public final class Bucket extends com.google.protobuf.GeneratedMessageV3
    *
    * <pre>
    * Immutable. The name of the bucket.
-   * Global buckets will be of the format `projects/{project}/buckets/{bucket}`.
-   * Other sorts of buckets in the future are not guaranteed to follow this
-   * pattern.
-   * For globally unique bucket names, a `_` may be substituted for the project
-   * ID.
    * </pre>
    *
    * <code>string name = 1 [(.google.api.field_behavior) = IMMUTABLE];</code>
@@ -14496,8 +14486,6 @@ public final class Bucket extends com.google.protobuf.GeneratedMessageV3
    *
    * <pre>
    * Immutable. The project which owns this bucket.
-   * Format: projects/{project_number}
-   * Example: `projects/123456`.
    * </pre>
    *
    * <code>
@@ -14523,8 +14511,6 @@ public final class Bucket extends com.google.protobuf.GeneratedMessageV3
    *
    * <pre>
    * Immutable. The project which owns this bucket.
-   * Format: projects/{project_number}
-   * Example: `projects/123456`.
    * </pre>
    *
    * <code>
@@ -16767,11 +16753,6 @@ public final class Bucket extends com.google.protobuf.GeneratedMessageV3
      *
      * <pre>
      * Immutable. The name of the bucket.
-     * Global buckets will be of the format `projects/{project}/buckets/{bucket}`.
-     * Other sorts of buckets in the future are not guaranteed to follow this
-     * pattern.
-     * For globally unique bucket names, a `_` may be substituted for the project
-     * ID.
      * </pre>
      *
      * <code>string name = 1 [(.google.api.field_behavior) = IMMUTABLE];</code>
@@ -16794,11 +16775,6 @@ public final class Bucket extends com.google.protobuf.GeneratedMessageV3
      *
      * <pre>
      * Immutable. The name of the bucket.
-     * Global buckets will be of the format `projects/{project}/buckets/{bucket}`.
-     * Other sorts of buckets in the future are not guaranteed to follow this
-     * pattern.
-     * For globally unique bucket names, a `_` may be substituted for the project
-     * ID.
      * </pre>
      *
      * <code>string name = 1 [(.google.api.field_behavior) = IMMUTABLE];</code>
@@ -16821,11 +16797,6 @@ public final class Bucket extends com.google.protobuf.GeneratedMessageV3
      *
      * <pre>
      * Immutable. The name of the bucket.
-     * Global buckets will be of the format `projects/{project}/buckets/{bucket}`.
-     * Other sorts of buckets in the future are not guaranteed to follow this
-     * pattern.
-     * For globally unique bucket names, a `_` may be substituted for the project
-     * ID.
      * </pre>
      *
      * <code>string name = 1 [(.google.api.field_behavior) = IMMUTABLE];</code>
@@ -16847,11 +16818,6 @@ public final class Bucket extends com.google.protobuf.GeneratedMessageV3
      *
      * <pre>
      * Immutable. The name of the bucket.
-     * Global buckets will be of the format `projects/{project}/buckets/{bucket}`.
-     * Other sorts of buckets in the future are not guaranteed to follow this
-     * pattern.
-     * For globally unique bucket names, a `_` may be substituted for the project
-     * ID.
      * </pre>
      *
      * <code>string name = 1 [(.google.api.field_behavior) = IMMUTABLE];</code>
@@ -16869,11 +16835,6 @@ public final class Bucket extends com.google.protobuf.GeneratedMessageV3
      *
      * <pre>
      * Immutable. The name of the bucket.
-     * Global buckets will be of the format `projects/{project}/buckets/{bucket}`.
-     * Other sorts of buckets in the future are not guaranteed to follow this
-     * pattern.
-     * For globally unique bucket names, a `_` may be substituted for the project
-     * ID.
      * </pre>
      *
      * <code>string name = 1 [(.google.api.field_behavior) = IMMUTABLE];</code>
@@ -17014,8 +16975,6 @@ public final class Bucket extends com.google.protobuf.GeneratedMessageV3
      *
      * <pre>
      * Immutable. The project which owns this bucket.
-     * Format: projects/{project_number}
-     * Example: `projects/123456`.
      * </pre>
      *
      * <code>
@@ -17040,8 +16999,6 @@ public final class Bucket extends com.google.protobuf.GeneratedMessageV3
      *
      * <pre>
      * Immutable. The project which owns this bucket.
-     * Format: projects/{project_number}
-     * Example: `projects/123456`.
      * </pre>
      *
      * <code>
@@ -17066,8 +17023,6 @@ public final class Bucket extends com.google.protobuf.GeneratedMessageV3
      *
      * <pre>
      * Immutable. The project which owns this bucket.
-     * Format: projects/{project_number}
-     * Example: `projects/123456`.
      * </pre>
      *
      * <code>
@@ -17091,8 +17046,6 @@ public final class Bucket extends com.google.protobuf.GeneratedMessageV3
      *
      * <pre>
      * Immutable. The project which owns this bucket.
-     * Format: projects/{project_number}
-     * Example: `projects/123456`.
      * </pre>
      *
      * <code>
@@ -17112,8 +17065,6 @@ public final class Bucket extends com.google.protobuf.GeneratedMessageV3
      *
      * <pre>
      * Immutable. The project which owns this bucket.
-     * Format: projects/{project_number}
-     * Example: `projects/123456`.
      * </pre>
      *
      * <code>
diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BucketOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BucketOrBuilder.java
index 9cfd286d..3dc8804d 100644
--- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BucketOrBuilder.java
+++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BucketOrBuilder.java
@@ -28,11 +28,6 @@ public interface BucketOrBuilder
    *
    * <pre>
    * Immutable. The name of the bucket.
-   * Global buckets will be of the format `projects/{project}/buckets/{bucket}`.
-   * Other sorts of buckets in the future are not guaranteed to follow this
-   * pattern.
-   * For globally unique bucket names, a `_` may be substituted for the project
-   * ID.
    * </pre>
    *
    * <code>string name = 1 [(.google.api.field_behavior) = IMMUTABLE];</code>
@@ -45,11 +40,6 @@ public interface BucketOrBuilder
    *
    * <pre>
    * Immutable. The name of the bucket.
-   * Global buckets will be of the format `projects/{project}/buckets/{bucket}`.
-   * Other sorts of buckets in the future are not guaranteed to follow this
-   * pattern.
-   * For globally unique bucket names, a `_` may be substituted for the project
-   * ID.
    * </pre>
    *
    * <code>string name = 1 [(.google.api.field_behavior) = IMMUTABLE];</code>
@@ -92,8 +82,6 @@ public interface BucketOrBuilder
    *
    * <pre>
    * Immutable. The project which owns this bucket.
-   * Format: projects/{project_number}
-   * Example: `projects/123456`.
    * </pre>
    *
    * <code>
@@ -108,8 +96,6 @@ public interface BucketOrBuilder
    *
    * <pre>
    * Immutable. The project which owns this bucket.
-   * Format: projects/{project_number}
-   * Example: `projects/123456`.
    * </pre>
    *
    * <code>
diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CommonRequestParams.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CommonRequestParams.java
index 70e27fdc..831d2c65 100644
--- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CommonRequestParams.java
+++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CommonRequestParams.java
@@ -118,7 +118,6 @@ public final class CommonRequestParams extends com.google.protobuf.GeneratedMess
    *
    * <pre>
    * Required. Required when using buckets with Requestor Pays feature enabled.
-   * Example: `projects/123456`.
    * </pre>
    *
    * <code>
@@ -144,7 +143,6 @@ public final class CommonRequestParams extends com.google.protobuf.GeneratedMess
    *
    * <pre>
    * Required. Required when using buckets with Requestor Pays feature enabled.
-   * Example: `projects/123456`.
    * </pre>
    *
    * <code>
@@ -488,7 +486,6 @@ public final class CommonRequestParams extends com.google.protobuf.GeneratedMess
      *
      * <pre>
      * Required. Required when using buckets with Requestor Pays feature enabled.
-     * Example: `projects/123456`.
      * </pre>
      *
      * <code>
@@ -513,7 +510,6 @@ public final class CommonRequestParams extends com.google.protobuf.GeneratedMess
      *
      * <pre>
      * Required. Required when using buckets with Requestor Pays feature enabled.
-     * Example: `projects/123456`.
      * </pre>
      *
      * <code>
@@ -538,7 +534,6 @@ public final class CommonRequestParams extends com.google.protobuf.GeneratedMess
      *
      * <pre>
      * Required. Required when using buckets with Requestor Pays feature enabled.
-     * Example: `projects/123456`.
      * </pre>
      *
      * <code>
@@ -562,7 +557,6 @@ public final class CommonRequestParams extends com.google.protobuf.GeneratedMess
      *
      * <pre>
      * Required. Required when using buckets with Requestor Pays feature enabled.
-     * Example: `projects/123456`.
      * </pre>
      *
      * <code>
@@ -582,7 +576,6 @@ public final class CommonRequestParams extends com.google.protobuf.GeneratedMess
      *
      * <pre>
      * Required. Required when using buckets with Requestor Pays feature enabled.
-     * Example: `projects/123456`.
      * </pre>
      *
      * <code>
diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CommonRequestParamsOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CommonRequestParamsOrBuilder.java
index 54558051..050241c8 100644
--- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CommonRequestParamsOrBuilder.java
+++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CommonRequestParamsOrBuilder.java
@@ -28,7 +28,6 @@ public interface CommonRequestParamsOrBuilder
    *
    * <pre>
    * Required. Required when using buckets with Requestor Pays feature enabled.
-   * Example: `projects/123456`.
    * </pre>
    *
    * <code>
@@ -43,7 +42,6 @@ public interface CommonRequestParamsOrBuilder
    *
    * <pre>
    * Required. Required when using buckets with Requestor Pays feature enabled.
-   * Example: `projects/123456`.
    * </pre>
    *
    * <code>
diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/Object.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/Object.java
index 9914081c..ce256ffb 100644
--- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/Object.java
+++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/Object.java
@@ -1215,7 +1215,6 @@ public final class Object extends com.google.protobuf.GeneratedMessageV3
    *
    * <pre>
    * Immutable. The name of the bucket containing this object.
-   * Example: `projects/_/buckets/foo`.
    * </pre>
    *
    * <code>
@@ -1241,7 +1240,6 @@ public final class Object extends com.google.protobuf.GeneratedMessageV3
    *
    * <pre>
    * Immutable. The name of the bucket containing this object.
-   * Example: `projects/_/buckets/foo`.
    * </pre>
    *
    * <code>
@@ -3498,7 +3496,6 @@ public final class Object extends com.google.protobuf.GeneratedMessageV3
      *
      * <pre>
      * Immutable. The name of the bucket containing this object.
-     * Example: `projects/_/buckets/foo`.
      * </pre>
      *
      * <code>
@@ -3523,7 +3520,6 @@ public final class Object extends com.google.protobuf.GeneratedMessageV3
      *
      * <pre>
      * Immutable. The name of the bucket containing this object.
-     * Example: `projects/_/buckets/foo`.
      * </pre>
      *
      * <code>
@@ -3548,7 +3544,6 @@ public final class Object extends com.google.protobuf.GeneratedMessageV3
      *
      * <pre>
      * Immutable. The name of the bucket containing this object.
-     * Example: `projects/_/buckets/foo`.
      * </pre>
      *
      * <code>
@@ -3572,7 +3567,6 @@ public final class Object extends com.google.protobuf.GeneratedMessageV3
      *
      * <pre>
      * Immutable. The name of the bucket containing this object.
-     * Example: `projects/_/buckets/foo`.
      * </pre>
      *
      * <code>
@@ -3592,7 +3586,6 @@ public final class Object extends com.google.protobuf.GeneratedMessageV3
      *
      * <pre>
      * Immutable. The name of the bucket containing this object.
-     * Example: `projects/_/buckets/foo`.
      * </pre>
      *
      * <code>
diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ObjectOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ObjectOrBuilder.java
index 08410519..c82202c2 100644
--- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ObjectOrBuilder.java
+++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ObjectOrBuilder.java
@@ -65,7 +65,6 @@ public interface ObjectOrBuilder
    *
    * <pre>
    * Immutable. The name of the bucket containing this object.
-   * Example: `projects/_/buckets/foo`.
    * </pre>
    *
    * <code>
@@ -80,7 +79,6 @@ public interface ObjectOrBuilder
    *
    * <pre>
    * Immutable. The name of the bucket containing this object.
-   * Example: `projects/_/buckets/foo`.
    * </pre>
    *
    * <code>
diff --git a/proto-google-cloud-storage-v2/src/main/proto/google/storage/v2/storage.proto b/proto-google-cloud-storage-v2/src/main/proto/google/storage/v2/storage.proto
index 46170df1..c36b9df2 100644
--- a/proto-google-cloud-storage-v2/src/main/proto/google/storage/v2/storage.proto
+++ b/proto-google-cloud-storage-v2/src/main/proto/google/storage/v2/storage.proto
@@ -35,7 +35,27 @@ option (google.api.resource_definition) = {
   pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}"
 };
 
-// Manages Google Cloud Storage resources.
+// ## API Overview and Naming Syntax
+//
+// The GCS gRPC API allows applications to read and write data through the
+// abstractions of buckets and objects. For a description of these abstractions
+// please see https://cloud.google.com/storage/docs.
+//
+// Resources are named as follows:
+//   - Projects are referred to as they are defined by the Resource Manager API,
+//     using strings like `projects/123456` or `projects/my-string-id`.
+//   - Buckets are named using string names of the form:
+//     `projects/{project}/buckets/{bucket}`
+//     For globally unique buckets, `_` may be substituted for the project.
+//   - Objects are uniquely identified by their name along with the name of the
+//     bucket they belong to, as separate strings in this API. For example:
+//
+//       ReadObjectRequest {
+//         bucket: 'projects/_/buckets/my-bucket'
+//         object: 'my-object'
+//       }
+//     Note that object names can contain `/` characters, which are treated as
+//     any other character (no special directory semantics).
 service Storage {
   option (google.api.default_host) = "storage.googleapis.com";
   option (google.api.oauth_scopes) =
@@ -353,7 +373,6 @@ message CommonObjectRequestParams {
 // Parameters that can be passed to any request.
 message CommonRequestParams {
   // Required. Required when using buckets with Requestor Pays feature enabled.
-  // Example: `projects/123456`.
   string user_project = 1 [
     (google.api.field_behavior) = REQUIRED,
     (google.api.resource_reference) = {
@@ -664,11 +683,6 @@ message Bucket {
   }
 
   // Immutable. The name of the bucket.
-  // Global buckets will be of the format `projects/{project}/buckets/{bucket}`.
-  // Other sorts of buckets in the future are not guaranteed to follow this
-  // pattern.
-  // For globally unique bucket names, a `_` may be substituted for the project
-  // ID.
   string name = 1 [(google.api.field_behavior) = IMMUTABLE];
 
   // Output only. The user-chosen part of the bucket name. The `{bucket}` portion of the
@@ -677,8 +691,6 @@ message Bucket {
   string bucket_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
 
   // Immutable. The project which owns this bucket.
-  // Format: projects/{project_number}
-  // Example: `projects/123456`.
   string project = 3 [
     (google.api.field_behavior) = IMMUTABLE,
     (google.api.resource_reference) = {
@@ -895,7 +907,6 @@ message Object {
   string name = 1 [(google.api.field_behavior) = IMMUTABLE];
 
   // Immutable. The name of the bucket containing this object.
-  // Example: `projects/_/buckets/foo`.
   string bucket = 2 [
     (google.api.field_behavior) = IMMUTABLE,
     (google.api.resource_reference) = {
diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml
index 69e4fdbd..705e830a 100644
--- a/samples/install-without-bom/pom.xml
+++ b/samples/install-without-bom/pom.xml
@@ -29,7 +29,7 @@
     <dependency>
       <groupId>com.google.cloud</groupId>
       <artifactId>google-cloud-storage</artifactId>
-      <version>2.2.0</version>
+      <version>2.2.1</version>
     </dependency>
     <!-- [END storage_install_without_bom] -->
 
diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml
index 2a48a102..c4ee6e76 100644
--- a/samples/snapshot/pom.xml
+++ b/samples/snapshot/pom.xml
@@ -28,7 +28,7 @@
     <dependency>
       <groupId>com.google.cloud</groupId>
       <artifactId>google-cloud-storage</artifactId>
-      <version>2.2.0</version>
+      <version>2.2.1</version>
     </dependency>
 
     <dependency>
diff --git a/synth.metadata b/synth.metadata
index 0ba5a7df..172751f3 100644
--- a/synth.metadata
+++ b/synth.metadata
@@ -4,15 +4,15 @@
       "git": {
         "name": ".",
         "remote": "https://github.com/googleapis/java-storage.git",
-        "sha": "eb9006a81a410a0180ff3327623780cf59bf050b"
+        "sha": "0ba77f3c8f7379df0e25340f06b711d22d10b602"
       }
     },
     {
       "git": {
         "name": "googleapis",
         "remote": "https://github.com/googleapis/googleapis.git",
-        "sha": "d2977af9e9f1fc0c9dc8368352daa032471f3c63",
-        "internalRef": "403132955"
+        "sha": "2921f9fb3bfbd16f6b2da0104373e2b47a80a65e",
+        "internalRef": "408420890"
       }
     },
     {
diff --git a/versions.txt b/versions.txt
index c386ef60..04d3218c 100644
--- a/versions.txt
+++ b/versions.txt
@@ -1,7 +1,7 @@
 # Format:
 # module:released-version:current-version
 
-google-cloud-storage:2.2.0:2.2.1-SNAPSHOT
-gapic-google-cloud-storage-v2:2.2.0-alpha:2.2.1-alpha-SNAPSHOT
-grpc-google-cloud-storage-v2:2.2.0-alpha:2.2.1-alpha-SNAPSHOT
-proto-google-cloud-storage-v2:2.2.0-alpha:2.2.1-alpha-SNAPSHOT
+google-cloud-storage:2.2.1:2.2.2-SNAPSHOT
+gapic-google-cloud-storage-v2:2.2.1-alpha:2.2.2-alpha-SNAPSHOT
+grpc-google-cloud-storage-v2:2.2.1-alpha:2.2.2-alpha-SNAPSHOT
+proto-google-cloud-storage-v2:2.2.1-alpha:2.2.2-alpha-SNAPSHOT


Test patch:
diff --git a/google-cloud-storage/src/test/java/com/google/cloud/storage/StorageOptionsTest.java b/google-cloud-storage/src/test/java/com/google/cloud/storage/StorageOptionsTest.java
index 18ff0343..5c9c708c 100644
--- a/google-cloud-storage/src/test/java/com/google/cloud/storage/StorageOptionsTest.java
+++ b/google-cloud-storage/src/test/java/com/google/cloud/storage/StorageOptionsTest.java
@@ -16,6 +16,8 @@
 
 package com.google.cloud.storage;
 
+import static com.google.common.truth.Truth.assertThat;
+
 import com.google.cloud.TransportOptions;
 import org.easymock.EasyMock;
 import org.junit.Assert;
@@ -33,4 +35,34 @@ public class StorageOptionsTest {
       Assert.assertNotNull(ex.getMessage());
     }
   }
+
+  @Test
+  public void testConfigureHostShouldBeKeptOnToBuilder() {
+    StorageOptions opts1 = StorageOptions.newBuilder().setHost("custom-host").build();
+    StorageOptions opts2 = opts1.toBuilder().build();
+
+    assertThat(opts2.getHost()).isEqualTo("custom-host");
+  }
+
+  @Test
+  public void testToBuilderShouldSpecifyDefaultIfNotOtherwiseSet() {
+    StorageOptions opts1 = StorageOptions.newBuilder().build();
+    StorageOptions opts2 = opts1.toBuilder().build();
+
+    assertThat(opts2.getHost()).isEqualTo("https://storage.googleapis.com");
+  }
+
+  @Test
+  public void testNewBuilderSpecifiesCorrectHost() {
+    StorageOptions opts1 = StorageOptions.newBuilder().build();
+
+    assertThat(opts1.getHost()).isEqualTo("https://storage.googleapis.com");
+  }
+
+  @Test
+  public void testDefaultInstanceSpecifiesCorrectHost() {
+    StorageOptions opts1 = StorageOptions.getDefaultInstance();
+
+    assertThat(opts1.getHost()).isEqualTo("https://storage.googleapis.com");
+  }
 }