From efafc3a5ed8ae7151aa35e4ef0f33a272f1ccef2 Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Mon, 18 May 2020 11:53:24 -0700 Subject: [PATCH] fix: restore GAPIC v2 retry configs Restores GAPIC v2 retry config overrides that were mistakenly removed during migration. PiperOrigin-RevId: 312088359 Source-Author: Google APIs Source-Date: Mon May 18 08:57:12 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: 5a90d467aa65e7f038f87585e8fbb45d74475e7c Source-Link: https://github.com/googleapis/googleapis/commit/5a90d467aa65e7f038f87585e8fbb45d74475e7c --- .../v1beta1/ConnectionServiceClient.java | 186 +++++++++--------- .../v1beta1/ConnectionServiceSettings.java | 26 +-- .../connection/v1beta1/package-info.java | 6 +- .../v1beta1/stub/ConnectionServiceStub.java | 8 +- .../stub/ConnectionServiceStubSettings.java | 54 ++--- .../stub/GrpcConnectionServiceStub.java | 62 +++--- .../v1beta1/ConnectionServiceClientTest.java | 74 +++---- synth.metadata | 6 +- 8 files changed, 209 insertions(+), 213 deletions(-) diff --git a/google-cloud-bigquery-connection/src/main/java/com/google/cloud/bigquery/connection/v1beta1/ConnectionServiceClient.java b/google-cloud-bigquery-connection/src/main/java/com/google/cloud/bigquery/connection/v1beta1/ConnectionServiceClient.java index 2dc04fff..2979c91f 100644 --- a/google-cloud-bigquery-connection/src/main/java/com/google/cloud/bigquery/connection/v1beta1/ConnectionServiceClient.java +++ b/google-cloud-bigquery-connection/src/main/java/com/google/cloud/bigquery/connection/v1beta1/ConnectionServiceClient.java @@ -54,10 +54,8 @@ *
  * 
  * try (ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.create()) {
- *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- *   Connection connection = Connection.newBuilder().build();
- *   String connectionId = "";
- *   Connection response = connectionServiceClient.createConnection(parent, connection, connectionId);
+ *   ConnectionName name = ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]");
+ *   connectionServiceClient.deleteConnection(name);
  * }
  * 
  * 
@@ -167,6 +165,96 @@ public ConnectionServiceStub getStub() { return stub; } + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes connection and associated credential. + * + *

Sample code: + * + *


+   * try (ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.create()) {
+   *   ConnectionName name = ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]");
+   *   connectionServiceClient.deleteConnection(name);
+   * }
+   * 
+ * + * @param name Required. Name of the deleted connection, for example: + * `projects/{project_id}/locations/{location_id}/connections/{connection_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteConnection(ConnectionName name) { + DeleteConnectionRequest request = + DeleteConnectionRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteConnection(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes connection and associated credential. + * + *

Sample code: + * + *


+   * try (ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.create()) {
+   *   ConnectionName name = ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]");
+   *   connectionServiceClient.deleteConnection(name.toString());
+   * }
+   * 
+ * + * @param name Required. Name of the deleted connection, for example: + * `projects/{project_id}/locations/{location_id}/connections/{connection_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteConnection(String name) { + DeleteConnectionRequest request = DeleteConnectionRequest.newBuilder().setName(name).build(); + deleteConnection(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes connection and associated credential. + * + *

Sample code: + * + *


+   * try (ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.create()) {
+   *   ConnectionName name = ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]");
+   *   DeleteConnectionRequest request = DeleteConnectionRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   connectionServiceClient.deleteConnection(request);
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteConnection(DeleteConnectionRequest request) { + deleteConnectionCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes connection and associated credential. + * + *

Sample code: + * + *


+   * try (ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.create()) {
+   *   ConnectionName name = ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]");
+   *   DeleteConnectionRequest request = DeleteConnectionRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<Void> future = connectionServiceClient.deleteConnectionCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + public final UnaryCallable deleteConnectionCallable() { + return stub.deleteConnectionCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Creates a new connection. @@ -673,96 +761,6 @@ public final void updateConnectionCredential(UpdateConnectionCredentialRequest r return stub.updateConnectionCredentialCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes connection and associated credential. - * - *

Sample code: - * - *


-   * try (ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.create()) {
-   *   ConnectionName name = ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]");
-   *   connectionServiceClient.deleteConnection(name);
-   * }
-   * 
- * - * @param name Required. Name of the deleted connection, for example: - * `projects/{project_id}/locations/{location_id}/connections/{connection_id}` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteConnection(ConnectionName name) { - DeleteConnectionRequest request = - DeleteConnectionRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - deleteConnection(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes connection and associated credential. - * - *

Sample code: - * - *


-   * try (ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.create()) {
-   *   ConnectionName name = ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]");
-   *   connectionServiceClient.deleteConnection(name.toString());
-   * }
-   * 
- * - * @param name Required. Name of the deleted connection, for example: - * `projects/{project_id}/locations/{location_id}/connections/{connection_id}` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteConnection(String name) { - DeleteConnectionRequest request = DeleteConnectionRequest.newBuilder().setName(name).build(); - deleteConnection(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes connection and associated credential. - * - *

Sample code: - * - *


-   * try (ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.create()) {
-   *   ConnectionName name = ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]");
-   *   DeleteConnectionRequest request = DeleteConnectionRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   connectionServiceClient.deleteConnection(request);
-   * }
-   * 
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteConnection(DeleteConnectionRequest request) { - deleteConnectionCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes connection and associated credential. - * - *

Sample code: - * - *


-   * try (ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.create()) {
-   *   ConnectionName name = ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]");
-   *   DeleteConnectionRequest request = DeleteConnectionRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<Void> future = connectionServiceClient.deleteConnectionCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
- */ - public final UnaryCallable deleteConnectionCallable() { - return stub.deleteConnectionCallable(); - } - // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Gets the access control policy for a resource. Returns an empty policy if the resource exists diff --git a/google-cloud-bigquery-connection/src/main/java/com/google/cloud/bigquery/connection/v1beta1/ConnectionServiceSettings.java b/google-cloud-bigquery-connection/src/main/java/com/google/cloud/bigquery/connection/v1beta1/ConnectionServiceSettings.java index 4a983a81..8b1f3731 100644 --- a/google-cloud-bigquery-connection/src/main/java/com/google/cloud/bigquery/connection/v1beta1/ConnectionServiceSettings.java +++ b/google-cloud-bigquery-connection/src/main/java/com/google/cloud/bigquery/connection/v1beta1/ConnectionServiceSettings.java @@ -60,16 +60,16 @@ *

The builder of this class is recursive, so contained classes are themselves builders. When * build() is called, the tree of builders is called to create the complete settings object. * - *

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

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

  * 
  * ConnectionServiceSettings.Builder connectionServiceSettingsBuilder =
  *     ConnectionServiceSettings.newBuilder();
  * connectionServiceSettingsBuilder
- *     .createConnectionSettings()
+ *     .deleteConnectionSettings()
  *     .setRetrySettings(
- *         connectionServiceSettingsBuilder.createConnectionSettings().getRetrySettings().toBuilder()
+ *         connectionServiceSettingsBuilder.deleteConnectionSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * ConnectionServiceSettings connectionServiceSettings = connectionServiceSettingsBuilder.build();
@@ -79,6 +79,11 @@
 @Generated("by gapic-generator")
 @BetaApi
 public class ConnectionServiceSettings extends ClientSettings {
+  /** Returns the object with the settings used for calls to deleteConnection. */
+  public UnaryCallSettings deleteConnectionSettings() {
+    return ((ConnectionServiceStubSettings) getStubSettings()).deleteConnectionSettings();
+  }
+
   /** Returns the object with the settings used for calls to createConnection. */
   public UnaryCallSettings createConnectionSettings() {
     return ((ConnectionServiceStubSettings) getStubSettings()).createConnectionSettings();
@@ -106,11 +111,6 @@ public UnaryCallSettings updateConnectionSe
     return ((ConnectionServiceStubSettings) getStubSettings()).updateConnectionCredentialSettings();
   }
 
-  /** Returns the object with the settings used for calls to deleteConnection. */
-  public UnaryCallSettings deleteConnectionSettings() {
-    return ((ConnectionServiceStubSettings) getStubSettings()).deleteConnectionSettings();
-  }
-
   /** Returns the object with the settings used for calls to getIamPolicy. */
   public UnaryCallSettings getIamPolicySettings() {
     return ((ConnectionServiceStubSettings) getStubSettings()).getIamPolicySettings();
@@ -224,6 +224,11 @@ public Builder applyToAllUnaryMethods(
       return this;
     }
 
+    /** Returns the builder for the settings used for calls to deleteConnection. */
+    public UnaryCallSettings.Builder deleteConnectionSettings() {
+      return getStubSettingsBuilder().deleteConnectionSettings();
+    }
+
     /** Returns the builder for the settings used for calls to createConnection. */
     public UnaryCallSettings.Builder
         createConnectionSettings() {
@@ -253,11 +258,6 @@ public UnaryCallSettings.Builder getConnection
       return getStubSettingsBuilder().updateConnectionCredentialSettings();
     }
 
-    /** Returns the builder for the settings used for calls to deleteConnection. */
-    public UnaryCallSettings.Builder deleteConnectionSettings() {
-      return getStubSettingsBuilder().deleteConnectionSettings();
-    }
-
     /** Returns the builder for the settings used for calls to getIamPolicy. */
     public UnaryCallSettings.Builder getIamPolicySettings() {
       return getStubSettingsBuilder().getIamPolicySettings();
diff --git a/google-cloud-bigquery-connection/src/main/java/com/google/cloud/bigquery/connection/v1beta1/package-info.java b/google-cloud-bigquery-connection/src/main/java/com/google/cloud/bigquery/connection/v1beta1/package-info.java
index dfc46794..45bbab0a 100644
--- a/google-cloud-bigquery-connection/src/main/java/com/google/cloud/bigquery/connection/v1beta1/package-info.java
+++ b/google-cloud-bigquery-connection/src/main/java/com/google/cloud/bigquery/connection/v1beta1/package-info.java
@@ -28,10 +28,8 @@
  * 
  * 
  * try (ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.create()) {
- *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- *   Connection connection = Connection.newBuilder().build();
- *   String connectionId = "";
- *   Connection response = connectionServiceClient.createConnection(parent, connection, connectionId);
+ *   ConnectionName name = ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]");
+ *   connectionServiceClient.deleteConnection(name);
  * }
  * 
  * 
diff --git a/google-cloud-bigquery-connection/src/main/java/com/google/cloud/bigquery/connection/v1beta1/stub/ConnectionServiceStub.java b/google-cloud-bigquery-connection/src/main/java/com/google/cloud/bigquery/connection/v1beta1/stub/ConnectionServiceStub.java index 3e46e264..2e5f4a0f 100644 --- a/google-cloud-bigquery-connection/src/main/java/com/google/cloud/bigquery/connection/v1beta1/stub/ConnectionServiceStub.java +++ b/google-cloud-bigquery-connection/src/main/java/com/google/cloud/bigquery/connection/v1beta1/stub/ConnectionServiceStub.java @@ -44,6 +44,10 @@ @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public abstract class ConnectionServiceStub implements BackgroundResource { + public UnaryCallable deleteConnectionCallable() { + throw new UnsupportedOperationException("Not implemented: deleteConnectionCallable()"); + } + public UnaryCallable createConnectionCallable() { throw new UnsupportedOperationException("Not implemented: createConnectionCallable()"); } @@ -66,10 +70,6 @@ public UnaryCallable updateConnectionCallab "Not implemented: updateConnectionCredentialCallable()"); } - public UnaryCallable deleteConnectionCallable() { - throw new UnsupportedOperationException("Not implemented: deleteConnectionCallable()"); - } - public UnaryCallable getIamPolicyCallable() { throw new UnsupportedOperationException("Not implemented: getIamPolicyCallable()"); } diff --git a/google-cloud-bigquery-connection/src/main/java/com/google/cloud/bigquery/connection/v1beta1/stub/ConnectionServiceStubSettings.java b/google-cloud-bigquery-connection/src/main/java/com/google/cloud/bigquery/connection/v1beta1/stub/ConnectionServiceStubSettings.java index f7bb470d..778ff4cd 100644 --- a/google-cloud-bigquery-connection/src/main/java/com/google/cloud/bigquery/connection/v1beta1/stub/ConnectionServiceStubSettings.java +++ b/google-cloud-bigquery-connection/src/main/java/com/google/cloud/bigquery/connection/v1beta1/stub/ConnectionServiceStubSettings.java @@ -69,16 +69,16 @@ *

The builder of this class is recursive, so contained classes are themselves builders. When * build() is called, the tree of builders is called to create the complete settings object. * - *

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

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

  * 
  * ConnectionServiceStubSettings.Builder connectionServiceSettingsBuilder =
  *     ConnectionServiceStubSettings.newBuilder();
  * connectionServiceSettingsBuilder
- *     .createConnectionSettings()
+ *     .deleteConnectionSettings()
  *     .setRetrySettings(
- *         connectionServiceSettingsBuilder.createConnectionSettings().getRetrySettings().toBuilder()
+ *         connectionServiceSettingsBuilder.deleteConnectionSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * ConnectionServiceStubSettings connectionServiceSettings = connectionServiceSettingsBuilder.build();
@@ -95,6 +95,7 @@ public class ConnectionServiceStubSettings extends StubSettings deleteConnectionSettings;
   private final UnaryCallSettings createConnectionSettings;
   private final UnaryCallSettings getConnectionSettings;
   private final UnaryCallSettings
@@ -102,12 +103,16 @@ public class ConnectionServiceStubSettings extends StubSettings updateConnectionSettings;
   private final UnaryCallSettings
       updateConnectionCredentialSettings;
-  private final UnaryCallSettings deleteConnectionSettings;
   private final UnaryCallSettings getIamPolicySettings;
   private final UnaryCallSettings setIamPolicySettings;
   private final UnaryCallSettings
       testIamPermissionsSettings;
 
+  /** Returns the object with the settings used for calls to deleteConnection. */
+  public UnaryCallSettings deleteConnectionSettings() {
+    return deleteConnectionSettings;
+  }
+
   /** Returns the object with the settings used for calls to createConnection. */
   public UnaryCallSettings createConnectionSettings() {
     return createConnectionSettings;
@@ -135,11 +140,6 @@ public UnaryCallSettings updateConnectionSe
     return updateConnectionCredentialSettings;
   }
 
-  /** Returns the object with the settings used for calls to deleteConnection. */
-  public UnaryCallSettings deleteConnectionSettings() {
-    return deleteConnectionSettings;
-  }
-
   /** Returns the object with the settings used for calls to getIamPolicy. */
   public UnaryCallSettings getIamPolicySettings() {
     return getIamPolicySettings;
@@ -225,13 +225,13 @@ public Builder toBuilder() {
   protected ConnectionServiceStubSettings(Builder settingsBuilder) throws IOException {
     super(settingsBuilder);
 
+    deleteConnectionSettings = settingsBuilder.deleteConnectionSettings().build();
     createConnectionSettings = settingsBuilder.createConnectionSettings().build();
     getConnectionSettings = settingsBuilder.getConnectionSettings().build();
     listConnectionsSettings = settingsBuilder.listConnectionsSettings().build();
     updateConnectionSettings = settingsBuilder.updateConnectionSettings().build();
     updateConnectionCredentialSettings =
         settingsBuilder.updateConnectionCredentialSettings().build();
-    deleteConnectionSettings = settingsBuilder.deleteConnectionSettings().build();
     getIamPolicySettings = settingsBuilder.getIamPolicySettings().build();
     setIamPolicySettings = settingsBuilder.setIamPolicySettings().build();
     testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build();
@@ -241,6 +241,8 @@ protected ConnectionServiceStubSettings(Builder settingsBuilder) throws IOExcept
   public static class Builder extends StubSettings.Builder {
     private final ImmutableList> unaryMethodSettingsBuilders;
 
+    private final UnaryCallSettings.Builder
+        deleteConnectionSettings;
     private final UnaryCallSettings.Builder
         createConnectionSettings;
     private final UnaryCallSettings.Builder getConnectionSettings;
@@ -250,8 +252,6 @@ public static class Builder extends StubSettings.Builder
         updateConnectionCredentialSettings;
-    private final UnaryCallSettings.Builder
-        deleteConnectionSettings;
     private final UnaryCallSettings.Builder getIamPolicySettings;
     private final UnaryCallSettings.Builder setIamPolicySettings;
     private final UnaryCallSettings.Builder
@@ -298,6 +298,8 @@ protected Builder() {
     protected Builder(ClientContext clientContext) {
       super(clientContext);
 
+      deleteConnectionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+
       createConnectionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
 
       getConnectionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
@@ -308,8 +310,6 @@ protected Builder(ClientContext clientContext) {
 
       updateConnectionCredentialSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
 
-      deleteConnectionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
-
       getIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
 
       setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
@@ -318,12 +318,12 @@ protected Builder(ClientContext clientContext) {
 
       unaryMethodSettingsBuilders =
           ImmutableList.>of(
+              deleteConnectionSettings,
               createConnectionSettings,
               getConnectionSettings,
               listConnectionsSettings,
               updateConnectionSettings,
               updateConnectionCredentialSettings,
-              deleteConnectionSettings,
               getIamPolicySettings,
               setIamPolicySettings,
               testIamPermissionsSettings);
@@ -342,6 +342,11 @@ private static Builder createDefault() {
 
     private static Builder initDefaults(Builder builder) {
 
+      builder
+          .deleteConnectionSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
+
       builder
           .createConnectionSettings()
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
@@ -367,11 +372,6 @@ private static Builder initDefaults(Builder builder) {
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
-      builder
-          .deleteConnectionSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
-          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
-
       builder
           .getIamPolicySettings()
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
@@ -393,24 +393,24 @@ private static Builder initDefaults(Builder builder) {
     protected Builder(ConnectionServiceStubSettings settings) {
       super(settings);
 
+      deleteConnectionSettings = settings.deleteConnectionSettings.toBuilder();
       createConnectionSettings = settings.createConnectionSettings.toBuilder();
       getConnectionSettings = settings.getConnectionSettings.toBuilder();
       listConnectionsSettings = settings.listConnectionsSettings.toBuilder();
       updateConnectionSettings = settings.updateConnectionSettings.toBuilder();
       updateConnectionCredentialSettings = settings.updateConnectionCredentialSettings.toBuilder();
-      deleteConnectionSettings = settings.deleteConnectionSettings.toBuilder();
       getIamPolicySettings = settings.getIamPolicySettings.toBuilder();
       setIamPolicySettings = settings.setIamPolicySettings.toBuilder();
       testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder();
 
       unaryMethodSettingsBuilders =
           ImmutableList.>of(
+              deleteConnectionSettings,
               createConnectionSettings,
               getConnectionSettings,
               listConnectionsSettings,
               updateConnectionSettings,
               updateConnectionCredentialSettings,
-              deleteConnectionSettings,
               getIamPolicySettings,
               setIamPolicySettings,
               testIamPermissionsSettings);
@@ -432,6 +432,11 @@ public Builder applyToAllUnaryMethods(
       return unaryMethodSettingsBuilders;
     }
 
+    /** Returns the builder for the settings used for calls to deleteConnection. */
+    public UnaryCallSettings.Builder deleteConnectionSettings() {
+      return deleteConnectionSettings;
+    }
+
     /** Returns the builder for the settings used for calls to createConnection. */
     public UnaryCallSettings.Builder
         createConnectionSettings() {
@@ -461,11 +466,6 @@ public UnaryCallSettings.Builder getConnection
       return updateConnectionCredentialSettings;
     }
 
-    /** Returns the builder for the settings used for calls to deleteConnection. */
-    public UnaryCallSettings.Builder deleteConnectionSettings() {
-      return deleteConnectionSettings;
-    }
-
     /** Returns the builder for the settings used for calls to getIamPolicy. */
     public UnaryCallSettings.Builder getIamPolicySettings() {
       return getIamPolicySettings;
diff --git a/google-cloud-bigquery-connection/src/main/java/com/google/cloud/bigquery/connection/v1beta1/stub/GrpcConnectionServiceStub.java b/google-cloud-bigquery-connection/src/main/java/com/google/cloud/bigquery/connection/v1beta1/stub/GrpcConnectionServiceStub.java
index 5f40e7c6..6f5bb611 100644
--- a/google-cloud-bigquery-connection/src/main/java/com/google/cloud/bigquery/connection/v1beta1/stub/GrpcConnectionServiceStub.java
+++ b/google-cloud-bigquery-connection/src/main/java/com/google/cloud/bigquery/connection/v1beta1/stub/GrpcConnectionServiceStub.java
@@ -55,6 +55,16 @@
 @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
 public class GrpcConnectionServiceStub extends ConnectionServiceStub {
 
+  private static final MethodDescriptor
+      deleteConnectionMethodDescriptor =
+          MethodDescriptor.newBuilder()
+              .setType(MethodDescriptor.MethodType.UNARY)
+              .setFullMethodName(
+                  "google.cloud.bigquery.connection.v1beta1.ConnectionService/DeleteConnection")
+              .setRequestMarshaller(
+                  ProtoUtils.marshaller(DeleteConnectionRequest.getDefaultInstance()))
+              .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance()))
+              .build();
   private static final MethodDescriptor
       createConnectionMethodDescriptor =
           MethodDescriptor.newBuilder()
@@ -106,16 +116,6 @@ public class GrpcConnectionServiceStub extends ConnectionServiceStub {
                   ProtoUtils.marshaller(UpdateConnectionCredentialRequest.getDefaultInstance()))
               .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance()))
               .build();
-  private static final MethodDescriptor
-      deleteConnectionMethodDescriptor =
-          MethodDescriptor.newBuilder()
-              .setType(MethodDescriptor.MethodType.UNARY)
-              .setFullMethodName(
-                  "google.cloud.bigquery.connection.v1beta1.ConnectionService/DeleteConnection")
-              .setRequestMarshaller(
-                  ProtoUtils.marshaller(DeleteConnectionRequest.getDefaultInstance()))
-              .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance()))
-              .build();
   private static final MethodDescriptor getIamPolicyMethodDescriptor =
       MethodDescriptor.newBuilder()
           .setType(MethodDescriptor.MethodType.UNARY)
@@ -146,6 +146,7 @@ public class GrpcConnectionServiceStub extends ConnectionServiceStub {
 
   private final BackgroundResource backgroundResources;
 
+  private final UnaryCallable deleteConnectionCallable;
   private final UnaryCallable createConnectionCallable;
   private final UnaryCallable getConnectionCallable;
   private final UnaryCallable
@@ -153,7 +154,6 @@ public class GrpcConnectionServiceStub extends ConnectionServiceStub {
   private final UnaryCallable updateConnectionCallable;
   private final UnaryCallable
       updateConnectionCredentialCallable;
-  private final UnaryCallable deleteConnectionCallable;
   private final UnaryCallable getIamPolicyCallable;
   private final UnaryCallable setIamPolicyCallable;
   private final UnaryCallable
@@ -200,6 +200,19 @@ protected GrpcConnectionServiceStub(
       throws IOException {
     this.callableFactory = callableFactory;
 
+    GrpcCallSettings deleteConnectionTransportSettings =
+        GrpcCallSettings.newBuilder()
+            .setMethodDescriptor(deleteConnectionMethodDescriptor)
+            .setParamsExtractor(
+                new RequestParamsExtractor() {
+                  @Override
+                  public Map extract(DeleteConnectionRequest request) {
+                    ImmutableMap.Builder params = ImmutableMap.builder();
+                    params.put("name", String.valueOf(request.getName()));
+                    return params.build();
+                  }
+                })
+            .build();
     GrpcCallSettings createConnectionTransportSettings =
         GrpcCallSettings.newBuilder()
             .setMethodDescriptor(createConnectionMethodDescriptor)
@@ -268,19 +281,6 @@ public Map extract(
                       }
                     })
                 .build();
-    GrpcCallSettings deleteConnectionTransportSettings =
-        GrpcCallSettings.newBuilder()
-            .setMethodDescriptor(deleteConnectionMethodDescriptor)
-            .setParamsExtractor(
-                new RequestParamsExtractor() {
-                  @Override
-                  public Map extract(DeleteConnectionRequest request) {
-                    ImmutableMap.Builder params = ImmutableMap.builder();
-                    params.put("name", String.valueOf(request.getName()));
-                    return params.build();
-                  }
-                })
-            .build();
     GrpcCallSettings getIamPolicyTransportSettings =
         GrpcCallSettings.newBuilder()
             .setMethodDescriptor(getIamPolicyMethodDescriptor)
@@ -322,6 +322,9 @@ public Map extract(TestIamPermissionsRequest request) {
                     })
                 .build();
 
+    this.deleteConnectionCallable =
+        callableFactory.createUnaryCallable(
+            deleteConnectionTransportSettings, settings.deleteConnectionSettings(), clientContext);
     this.createConnectionCallable =
         callableFactory.createUnaryCallable(
             createConnectionTransportSettings, settings.createConnectionSettings(), clientContext);
@@ -339,9 +342,6 @@ public Map extract(TestIamPermissionsRequest request) {
             updateConnectionCredentialTransportSettings,
             settings.updateConnectionCredentialSettings(),
             clientContext);
-    this.deleteConnectionCallable =
-        callableFactory.createUnaryCallable(
-            deleteConnectionTransportSettings, settings.deleteConnectionSettings(), clientContext);
     this.getIamPolicyCallable =
         callableFactory.createUnaryCallable(
             getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext);
@@ -357,6 +357,10 @@ public Map extract(TestIamPermissionsRequest request) {
     backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources());
   }
 
+  public UnaryCallable deleteConnectionCallable() {
+    return deleteConnectionCallable;
+  }
+
   public UnaryCallable createConnectionCallable() {
     return createConnectionCallable;
   }
@@ -378,10 +382,6 @@ public UnaryCallable updateConnectionCallab
     return updateConnectionCredentialCallable;
   }
 
-  public UnaryCallable deleteConnectionCallable() {
-    return deleteConnectionCallable;
-  }
-
   public UnaryCallable getIamPolicyCallable() {
     return getIamPolicyCallable;
   }
diff --git a/google-cloud-bigquery-connection/src/test/java/com/google/cloud/bigquery/connection/v1beta1/ConnectionServiceClientTest.java b/google-cloud-bigquery-connection/src/test/java/com/google/cloud/bigquery/connection/v1beta1/ConnectionServiceClientTest.java
index 6aa6a630..a8755208 100644
--- a/google-cloud-bigquery-connection/src/test/java/com/google/cloud/bigquery/connection/v1beta1/ConnectionServiceClientTest.java
+++ b/google-cloud-bigquery-connection/src/test/java/com/google/cloud/bigquery/connection/v1beta1/ConnectionServiceClientTest.java
@@ -96,6 +96,43 @@ public void tearDown() throws Exception {
     client.close();
   }
 
+  @Test
+  @SuppressWarnings("all")
+  public void deleteConnectionTest() {
+    Empty expectedResponse = Empty.newBuilder().build();
+    mockConnectionService.addResponse(expectedResponse);
+
+    ConnectionName name = ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]");
+
+    client.deleteConnection(name);
+
+    List actualRequests = mockConnectionService.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    DeleteConnectionRequest actualRequest = (DeleteConnectionRequest) actualRequests.get(0);
+
+    Assert.assertEquals(name, ConnectionName.parse(actualRequest.getName()));
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  @SuppressWarnings("all")
+  public void deleteConnectionExceptionTest() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
+    mockConnectionService.addException(exception);
+
+    try {
+      ConnectionName name = ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]");
+
+      client.deleteConnection(name);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception
+    }
+  }
+
   @Test
   @SuppressWarnings("all")
   public void createConnectionTest() {
@@ -348,43 +385,6 @@ public void updateConnectionCredentialExceptionTest() throws Exception {
     }
   }
 
-  @Test
-  @SuppressWarnings("all")
-  public void deleteConnectionTest() {
-    Empty expectedResponse = Empty.newBuilder().build();
-    mockConnectionService.addResponse(expectedResponse);
-
-    ConnectionName name = ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]");
-
-    client.deleteConnection(name);
-
-    List actualRequests = mockConnectionService.getRequests();
-    Assert.assertEquals(1, actualRequests.size());
-    DeleteConnectionRequest actualRequest = (DeleteConnectionRequest) actualRequests.get(0);
-
-    Assert.assertEquals(name, ConnectionName.parse(actualRequest.getName()));
-    Assert.assertTrue(
-        channelProvider.isHeaderSent(
-            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
-            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
-  }
-
-  @Test
-  @SuppressWarnings("all")
-  public void deleteConnectionExceptionTest() throws Exception {
-    StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
-    mockConnectionService.addException(exception);
-
-    try {
-      ConnectionName name = ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]");
-
-      client.deleteConnection(name);
-      Assert.fail("No exception raised");
-    } catch (InvalidArgumentException e) {
-      // Expected exception
-    }
-  }
-
   @Test
   @SuppressWarnings("all")
   public void getIamPolicyTest() {
diff --git a/synth.metadata b/synth.metadata
index f5a46ac3..c48805c4 100644
--- a/synth.metadata
+++ b/synth.metadata
@@ -4,15 +4,15 @@
       "git": {
         "name": ".",
         "remote": "https://github.com/googleapis/java-bigqueryconnection.git",
-        "sha": "2fc9705174ff8d6bd263882bed659c6801e5d948"
+        "sha": "7bb7a4b179b61d3b93988189b0643a570174585b"
       }
     },
     {
       "git": {
         "name": "googleapis",
         "remote": "https://github.com/googleapis/googleapis.git",
-        "sha": "aed11c01e52921613b9ee469c2d85f5f33175fb7",
-        "internalRef": "310660461"
+        "sha": "5a90d467aa65e7f038f87585e8fbb45d74475e7c",
+        "internalRef": "312088359"
       }
     },
     {