diff --git a/README.md b/README.md index e7b83c7ac1..e615b4045f 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ If you are using Maven without BOM, add this to your dependencies: com.google.cloud google-cloud-bigquerystorage - 1.1.1 + 1.2.0 ``` diff --git a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/BaseBigQueryStorageClient.java b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/BaseBigQueryStorageClient.java index c587b00d52..8f337335b5 100644 --- a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/BaseBigQueryStorageClient.java +++ b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/BaseBigQueryStorageClient.java @@ -50,7 +50,7 @@ * * try (BaseBigQueryStorageClient baseBigQueryStorageClient = BaseBigQueryStorageClient.create()) { * TableReference tableReference = TableReference.newBuilder().build(); - * String parent = ""; + * ProjectName parent = ProjectName.of("[PROJECT]"); * int requestedStreams = 0; * ReadSession response = baseBigQueryStorageClient.createReadSession(tableReference, parent, requestedStreams); * } @@ -180,7 +180,7 @@ public BigQueryStorageStub getStub() { *

    * try (BaseBigQueryStorageClient baseBigQueryStorageClient = BaseBigQueryStorageClient.create()) {
    *   TableReference tableReference = TableReference.newBuilder().build();
-   *   String parent = "";
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
    *   int requestedStreams = 0;
    *   ReadSession response = baseBigQueryStorageClient.createReadSession(tableReference, parent, requestedStreams);
    * }
@@ -196,6 +196,51 @@ public BigQueryStorageStub getStub() {
    *     

Streams must be read starting from offset 0. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ + public final ReadSession createReadSession( + TableReference tableReference, ProjectName parent, int requestedStreams) { + CreateReadSessionRequest request = + CreateReadSessionRequest.newBuilder() + .setTableReference(tableReference) + .setParent(parent == null ? null : parent.toString()) + .setRequestedStreams(requestedStreams) + .build(); + return createReadSession(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a new read session. A read session divides the contents of a BigQuery table into one or + * more streams, which can then be used to read data from the table. The read session also + * specifies properties of the data to be read, such as a list of columns or a push-down filter + * describing the rows to be returned. + * + *

A particular row can be read by at most one stream. When the caller has reached the end of + * each stream in the session, then all the data in the table has been read. + * + *

Read sessions automatically expire 24 hours after they are created and do not require manual + * clean-up by the caller. + * + *

Sample code: + * + *


+   * try (BaseBigQueryStorageClient baseBigQueryStorageClient = BaseBigQueryStorageClient.create()) {
+   *   TableReference tableReference = TableReference.newBuilder().build();
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   int requestedStreams = 0;
+   *   ReadSession response = baseBigQueryStorageClient.createReadSession(tableReference, parent.toString(), requestedStreams);
+   * }
+   * 
+ * + * @param tableReference Required. Reference to the table to read. + * @param parent Required. String of the form `projects/{project_id}` indicating the project this + * ReadSession is associated with. This is the project that will be billed for usage. + * @param requestedStreams Initial number of streams. If unset or 0, we will provide a value of + * streams so as to produce reasonable throughput. Must be non-negative. The number of streams + * may be lower than the requested number, depending on the amount parallelism that is + * reasonable for the table and the maximum amount of parallelism allowed by the system. + *

Streams must be read starting from offset 0. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ public final ReadSession createReadSession( TableReference tableReference, String parent, int requestedStreams) { CreateReadSessionRequest request = @@ -225,10 +270,10 @@ public final ReadSession createReadSession( *


    * try (BaseBigQueryStorageClient baseBigQueryStorageClient = BaseBigQueryStorageClient.create()) {
    *   TableReference tableReference = TableReference.newBuilder().build();
-   *   String parent = "";
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
    *   CreateReadSessionRequest request = CreateReadSessionRequest.newBuilder()
    *     .setTableReference(tableReference)
-   *     .setParent(parent)
+   *     .setParent(parent.toString())
    *     .build();
    *   ReadSession response = baseBigQueryStorageClient.createReadSession(request);
    * }
@@ -259,10 +304,10 @@ public final ReadSession createReadSession(CreateReadSessionRequest request) {
    * 

    * try (BaseBigQueryStorageClient baseBigQueryStorageClient = BaseBigQueryStorageClient.create()) {
    *   TableReference tableReference = TableReference.newBuilder().build();
-   *   String parent = "";
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
    *   CreateReadSessionRequest request = CreateReadSessionRequest.newBuilder()
    *     .setTableReference(tableReference)
-   *     .setParent(parent)
+   *     .setParent(parent.toString())
    *     .build();
    *   ApiFuture<ReadSession> future = baseBigQueryStorageClient.createReadSessionCallable().futureCall(request);
    *   // Do something
diff --git a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/package-info.java b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/package-info.java
index 2bbccfac2c..5c0d3b601e 100644
--- a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/package-info.java
+++ b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/package-info.java
@@ -31,7 +31,7 @@
  * 
  * try (BaseBigQueryStorageClient baseBigQueryStorageClient = BaseBigQueryStorageClient.create()) {
  *   TableReference tableReference = TableReference.newBuilder().build();
- *   String parent = "";
+ *   ProjectName parent = ProjectName.of("[PROJECT]");
  *   int requestedStreams = 0;
  *   ReadSession response = baseBigQueryStorageClient.createReadSession(tableReference, parent, requestedStreams);
  * }
diff --git a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/stub/BigQueryStorageStubSettings.java b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/stub/BigQueryStorageStubSettings.java
index 3ce39e32fe..1cf3ac0ccc 100644
--- a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/stub/BigQueryStorageStubSettings.java
+++ b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/stub/BigQueryStorageStubSettings.java
@@ -229,13 +229,18 @@ public static class Builder extends StubSettings.Builder> definitions =
           ImmutableMap.builder();
       definitions.put(
-          "idempotent",
+          "retry_policy_1_codes",
           ImmutableSet.copyOf(
               Lists.newArrayList(
                   StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE)));
-      definitions.put("non_idempotent", ImmutableSet.copyOf(Lists.newArrayList()));
+      definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList()));
       definitions.put(
-          "unary_streaming",
+          "retry_policy_3_codes",
+          ImmutableSet.copyOf(
+              Lists.newArrayList(
+                  StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE)));
+      definitions.put(
+          "retry_policy_2_codes",
           ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE)));
       RETRYABLE_CODE_DEFINITIONS = definitions.build();
     }
@@ -250,34 +255,36 @@ public static class Builder extends StubSettings.Buildercom.google.api.grpc
       proto-google-common-protos
     
+    
+      com.google.api
+      api-common
+    
+    
+      com.google.guava
+      guava
+    
   
 
   
@@ -31,4 +39,4 @@
       
     
   
-
\ No newline at end of file
+
diff --git a/proto-google-cloud-bigquerystorage-v1beta1/src/main/java/com/google/cloud/bigquery/storage/v1beta1/ProjectName.java b/proto-google-cloud-bigquerystorage-v1beta1/src/main/java/com/google/cloud/bigquery/storage/v1beta1/ProjectName.java
new file mode 100644
index 0000000000..3ffe5f3360
--- /dev/null
+++ b/proto-google-cloud-bigquerystorage-v1beta1/src/main/java/com/google/cloud/bigquery/storage/v1beta1/ProjectName.java
@@ -0,0 +1,162 @@
+/*
+ * Copyright 2020 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
+ *
+ *     https://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.google.cloud.bigquery.storage.v1beta1;
+
+import com.google.api.pathtemplate.PathTemplate;
+import com.google.api.resourcenames.ResourceName;
+import com.google.common.base.Preconditions;
+import com.google.common.collect.ImmutableMap;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+/** AUTO-GENERATED DOCUMENTATION AND CLASS */
+@javax.annotation.Generated("by GAPIC protoc plugin")
+public class ProjectName implements ResourceName {
+
+  private static final PathTemplate PATH_TEMPLATE =
+      PathTemplate.createWithoutUrlEncoding("projects/{project}");
+
+  private volatile Map fieldValuesMap;
+
+  private final String project;
+
+  public String getProject() {
+    return project;
+  }
+
+  public static Builder newBuilder() {
+    return new Builder();
+  }
+
+  public Builder toBuilder() {
+    return new Builder(this);
+  }
+
+  private ProjectName(Builder builder) {
+    project = Preconditions.checkNotNull(builder.getProject());
+  }
+
+  public static ProjectName of(String project) {
+    return newBuilder().setProject(project).build();
+  }
+
+  public static String format(String project) {
+    return newBuilder().setProject(project).build().toString();
+  }
+
+  public static ProjectName parse(String formattedString) {
+    if (formattedString.isEmpty()) {
+      return null;
+    }
+    Map matchMap =
+        PATH_TEMPLATE.validatedMatch(
+            formattedString, "ProjectName.parse: formattedString not in valid format");
+    return of(matchMap.get("project"));
+  }
+
+  public static List parseList(List formattedStrings) {
+    List list = new ArrayList<>(formattedStrings.size());
+    for (String formattedString : formattedStrings) {
+      list.add(parse(formattedString));
+    }
+    return list;
+  }
+
+  public static List toStringList(List values) {
+    List list = new ArrayList(values.size());
+    for (ProjectName value : values) {
+      if (value == null) {
+        list.add("");
+      } else {
+        list.add(value.toString());
+      }
+    }
+    return list;
+  }
+
+  public static boolean isParsableFrom(String formattedString) {
+    return PATH_TEMPLATE.matches(formattedString);
+  }
+
+  public Map getFieldValuesMap() {
+    if (fieldValuesMap == null) {
+      synchronized (this) {
+        if (fieldValuesMap == null) {
+          ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder();
+          fieldMapBuilder.put("project", project);
+          fieldValuesMap = fieldMapBuilder.build();
+        }
+      }
+    }
+    return fieldValuesMap;
+  }
+
+  public String getFieldValue(String fieldName) {
+    return getFieldValuesMap().get(fieldName);
+  }
+
+  @Override
+  public String toString() {
+    return PATH_TEMPLATE.instantiate("project", project);
+  }
+
+  /** Builder for ProjectName. */
+  public static class Builder {
+
+    private String project;
+
+    public String getProject() {
+      return project;
+    }
+
+    public Builder setProject(String project) {
+      this.project = project;
+      return this;
+    }
+
+    private Builder() {}
+
+    private Builder(ProjectName projectName) {
+      project = projectName.project;
+    }
+
+    public ProjectName build() {
+      return new ProjectName(this);
+    }
+  }
+
+  @Override
+  public boolean equals(Object o) {
+    if (o == this) {
+      return true;
+    }
+    if (o instanceof ProjectName) {
+      ProjectName that = (ProjectName) o;
+      return (this.project.equals(that.project));
+    }
+    return false;
+  }
+
+  @Override
+  public int hashCode() {
+    int h = 1;
+    h *= 1000003;
+    h ^= project.hashCode();
+    return h;
+  }
+}
diff --git a/proto-google-cloud-bigquerystorage-v1beta1/src/main/java/com/google/cloud/bigquery/storage/v1beta1/ReadSessionName.java b/proto-google-cloud-bigquerystorage-v1beta1/src/main/java/com/google/cloud/bigquery/storage/v1beta1/ReadSessionName.java
new file mode 100644
index 0000000000..c0762f78e5
--- /dev/null
+++ b/proto-google-cloud-bigquerystorage-v1beta1/src/main/java/com/google/cloud/bigquery/storage/v1beta1/ReadSessionName.java
@@ -0,0 +1,210 @@
+/*
+ * Copyright 2020 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
+ *
+ *     https://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.google.cloud.bigquery.storage.v1beta1;
+
+import com.google.api.pathtemplate.PathTemplate;
+import com.google.api.resourcenames.ResourceName;
+import com.google.common.base.Preconditions;
+import com.google.common.collect.ImmutableMap;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+/** AUTO-GENERATED DOCUMENTATION AND CLASS */
+@javax.annotation.Generated("by GAPIC protoc plugin")
+public class ReadSessionName implements ResourceName {
+
+  private static final PathTemplate PATH_TEMPLATE =
+      PathTemplate.createWithoutUrlEncoding(
+          "projects/{project}/locations/{location}/sessions/{session}");
+
+  private volatile Map fieldValuesMap;
+
+  private final String project;
+  private final String location;
+  private final String session;
+
+  public String getProject() {
+    return project;
+  }
+
+  public String getLocation() {
+    return location;
+  }
+
+  public String getSession() {
+    return session;
+  }
+
+  public static Builder newBuilder() {
+    return new Builder();
+  }
+
+  public Builder toBuilder() {
+    return new Builder(this);
+  }
+
+  private ReadSessionName(Builder builder) {
+    project = Preconditions.checkNotNull(builder.getProject());
+    location = Preconditions.checkNotNull(builder.getLocation());
+    session = Preconditions.checkNotNull(builder.getSession());
+  }
+
+  public static ReadSessionName of(String project, String location, String session) {
+    return newBuilder().setProject(project).setLocation(location).setSession(session).build();
+  }
+
+  public static String format(String project, String location, String session) {
+    return newBuilder()
+        .setProject(project)
+        .setLocation(location)
+        .setSession(session)
+        .build()
+        .toString();
+  }
+
+  public static ReadSessionName parse(String formattedString) {
+    if (formattedString.isEmpty()) {
+      return null;
+    }
+    Map matchMap =
+        PATH_TEMPLATE.validatedMatch(
+            formattedString, "ReadSessionName.parse: formattedString not in valid format");
+    return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("session"));
+  }
+
+  public static List parseList(List formattedStrings) {
+    List list = new ArrayList<>(formattedStrings.size());
+    for (String formattedString : formattedStrings) {
+      list.add(parse(formattedString));
+    }
+    return list;
+  }
+
+  public static List toStringList(List values) {
+    List list = new ArrayList(values.size());
+    for (ReadSessionName value : values) {
+      if (value == null) {
+        list.add("");
+      } else {
+        list.add(value.toString());
+      }
+    }
+    return list;
+  }
+
+  public static boolean isParsableFrom(String formattedString) {
+    return PATH_TEMPLATE.matches(formattedString);
+  }
+
+  public Map getFieldValuesMap() {
+    if (fieldValuesMap == null) {
+      synchronized (this) {
+        if (fieldValuesMap == null) {
+          ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder();
+          fieldMapBuilder.put("project", project);
+          fieldMapBuilder.put("location", location);
+          fieldMapBuilder.put("session", session);
+          fieldValuesMap = fieldMapBuilder.build();
+        }
+      }
+    }
+    return fieldValuesMap;
+  }
+
+  public String getFieldValue(String fieldName) {
+    return getFieldValuesMap().get(fieldName);
+  }
+
+  @Override
+  public String toString() {
+    return PATH_TEMPLATE.instantiate("project", project, "location", location, "session", session);
+  }
+
+  /** Builder for ReadSessionName. */
+  public static class Builder {
+
+    private String project;
+    private String location;
+    private String session;
+
+    public String getProject() {
+      return project;
+    }
+
+    public String getLocation() {
+      return location;
+    }
+
+    public String getSession() {
+      return session;
+    }
+
+    public Builder setProject(String project) {
+      this.project = project;
+      return this;
+    }
+
+    public Builder setLocation(String location) {
+      this.location = location;
+      return this;
+    }
+
+    public Builder setSession(String session) {
+      this.session = session;
+      return this;
+    }
+
+    private Builder() {}
+
+    private Builder(ReadSessionName readSessionName) {
+      project = readSessionName.project;
+      location = readSessionName.location;
+      session = readSessionName.session;
+    }
+
+    public ReadSessionName build() {
+      return new ReadSessionName(this);
+    }
+  }
+
+  @Override
+  public boolean equals(Object o) {
+    if (o == this) {
+      return true;
+    }
+    if (o instanceof ReadSessionName) {
+      ReadSessionName that = (ReadSessionName) o;
+      return (this.project.equals(that.project))
+          && (this.location.equals(that.location))
+          && (this.session.equals(that.session));
+    }
+    return false;
+  }
+
+  @Override
+  public int hashCode() {
+    int h = 1;
+    h *= 1000003;
+    h ^= project.hashCode();
+    h *= 1000003;
+    h ^= location.hashCode();
+    h *= 1000003;
+    h ^= session.hashCode();
+    return h;
+  }
+}
diff --git a/proto-google-cloud-bigquerystorage-v1beta1/src/main/java/com/google/cloud/bigquery/storage/v1beta1/StreamName.java b/proto-google-cloud-bigquerystorage-v1beta1/src/main/java/com/google/cloud/bigquery/storage/v1beta1/StreamName.java
new file mode 100644
index 0000000000..a486d4fc85
--- /dev/null
+++ b/proto-google-cloud-bigquerystorage-v1beta1/src/main/java/com/google/cloud/bigquery/storage/v1beta1/StreamName.java
@@ -0,0 +1,210 @@
+/*
+ * Copyright 2020 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
+ *
+ *     https://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.google.cloud.bigquery.storage.v1beta1;
+
+import com.google.api.pathtemplate.PathTemplate;
+import com.google.api.resourcenames.ResourceName;
+import com.google.common.base.Preconditions;
+import com.google.common.collect.ImmutableMap;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+/** AUTO-GENERATED DOCUMENTATION AND CLASS */
+@javax.annotation.Generated("by GAPIC protoc plugin")
+public class StreamName implements ResourceName {
+
+  private static final PathTemplate PATH_TEMPLATE =
+      PathTemplate.createWithoutUrlEncoding(
+          "projects/{project}/locations/{location}/streams/{stream}");
+
+  private volatile Map fieldValuesMap;
+
+  private final String project;
+  private final String location;
+  private final String stream;
+
+  public String getProject() {
+    return project;
+  }
+
+  public String getLocation() {
+    return location;
+  }
+
+  public String getStream() {
+    return stream;
+  }
+
+  public static Builder newBuilder() {
+    return new Builder();
+  }
+
+  public Builder toBuilder() {
+    return new Builder(this);
+  }
+
+  private StreamName(Builder builder) {
+    project = Preconditions.checkNotNull(builder.getProject());
+    location = Preconditions.checkNotNull(builder.getLocation());
+    stream = Preconditions.checkNotNull(builder.getStream());
+  }
+
+  public static StreamName of(String project, String location, String stream) {
+    return newBuilder().setProject(project).setLocation(location).setStream(stream).build();
+  }
+
+  public static String format(String project, String location, String stream) {
+    return newBuilder()
+        .setProject(project)
+        .setLocation(location)
+        .setStream(stream)
+        .build()
+        .toString();
+  }
+
+  public static StreamName parse(String formattedString) {
+    if (formattedString.isEmpty()) {
+      return null;
+    }
+    Map matchMap =
+        PATH_TEMPLATE.validatedMatch(
+            formattedString, "StreamName.parse: formattedString not in valid format");
+    return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("stream"));
+  }
+
+  public static List parseList(List formattedStrings) {
+    List list = new ArrayList<>(formattedStrings.size());
+    for (String formattedString : formattedStrings) {
+      list.add(parse(formattedString));
+    }
+    return list;
+  }
+
+  public static List toStringList(List values) {
+    List list = new ArrayList(values.size());
+    for (StreamName value : values) {
+      if (value == null) {
+        list.add("");
+      } else {
+        list.add(value.toString());
+      }
+    }
+    return list;
+  }
+
+  public static boolean isParsableFrom(String formattedString) {
+    return PATH_TEMPLATE.matches(formattedString);
+  }
+
+  public Map getFieldValuesMap() {
+    if (fieldValuesMap == null) {
+      synchronized (this) {
+        if (fieldValuesMap == null) {
+          ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder();
+          fieldMapBuilder.put("project", project);
+          fieldMapBuilder.put("location", location);
+          fieldMapBuilder.put("stream", stream);
+          fieldValuesMap = fieldMapBuilder.build();
+        }
+      }
+    }
+    return fieldValuesMap;
+  }
+
+  public String getFieldValue(String fieldName) {
+    return getFieldValuesMap().get(fieldName);
+  }
+
+  @Override
+  public String toString() {
+    return PATH_TEMPLATE.instantiate("project", project, "location", location, "stream", stream);
+  }
+
+  /** Builder for StreamName. */
+  public static class Builder {
+
+    private String project;
+    private String location;
+    private String stream;
+
+    public String getProject() {
+      return project;
+    }
+
+    public String getLocation() {
+      return location;
+    }
+
+    public String getStream() {
+      return stream;
+    }
+
+    public Builder setProject(String project) {
+      this.project = project;
+      return this;
+    }
+
+    public Builder setLocation(String location) {
+      this.location = location;
+      return this;
+    }
+
+    public Builder setStream(String stream) {
+      this.stream = stream;
+      return this;
+    }
+
+    private Builder() {}
+
+    private Builder(StreamName streamName) {
+      project = streamName.project;
+      location = streamName.location;
+      stream = streamName.stream;
+    }
+
+    public StreamName build() {
+      return new StreamName(this);
+    }
+  }
+
+  @Override
+  public boolean equals(Object o) {
+    if (o == this) {
+      return true;
+    }
+    if (o instanceof StreamName) {
+      StreamName that = (StreamName) o;
+      return (this.project.equals(that.project))
+          && (this.location.equals(that.location))
+          && (this.stream.equals(that.stream));
+    }
+    return false;
+  }
+
+  @Override
+  public int hashCode() {
+    int h = 1;
+    h *= 1000003;
+    h ^= project.hashCode();
+    h *= 1000003;
+    h ^= location.hashCode();
+    h *= 1000003;
+    h ^= stream.hashCode();
+    return h;
+  }
+}
diff --git a/synth.metadata b/synth.metadata
index 51b94eaf01..a792aab51d 100644
--- a/synth.metadata
+++ b/synth.metadata
@@ -11,39 +11,39 @@
       "git": {
         "name": ".",
         "remote": "https://github.com/googleapis/java-bigquerystorage.git",
-        "sha": "1584bdbf5820a378d844d333e8546b6a26b3c643"
+        "sha": "90bb713795676c6a2434476fde2d4a941b40cbd9"
       }
     },
     {
       "git": {
         "name": "googleapis",
         "remote": "https://github.com/googleapis/googleapis.git",
-        "sha": "da557a85c1c060a6dbffeea1e0867d2586091cf4",
-        "internalRef": "321249584"
+        "sha": "d7a347b819096886f4644b0ed5a978a777f4bbb4",
+        "internalRef": "322235422"
       }
     },
     {
       "git": {
         "name": "googleapis",
         "remote": "https://github.com/googleapis/googleapis.git",
-        "sha": "da557a85c1c060a6dbffeea1e0867d2586091cf4",
-        "internalRef": "321249584"
+        "sha": "d7a347b819096886f4644b0ed5a978a777f4bbb4",
+        "internalRef": "322235422"
       }
     },
     {
       "git": {
         "name": "googleapis",
         "remote": "https://github.com/googleapis/googleapis.git",
-        "sha": "da557a85c1c060a6dbffeea1e0867d2586091cf4",
-        "internalRef": "321249584"
+        "sha": "d7a347b819096886f4644b0ed5a978a777f4bbb4",
+        "internalRef": "322235422"
       }
     },
     {
       "git": {
         "name": "googleapis",
         "remote": "https://github.com/googleapis/googleapis.git",
-        "sha": "da557a85c1c060a6dbffeea1e0867d2586091cf4",
-        "internalRef": "321249584"
+        "sha": "d7a347b819096886f4644b0ed5a978a777f4bbb4",
+        "internalRef": "322235422"
       }
     },
     {