From 2d47c35289889de83d84b2b8fafd5edee11e553f Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 9 Jul 2020 09:12:35 -0700 Subject: [PATCH] feat: proto updates (#78) * fix: migrate bq/connection/v1beta1 to grpc_service_config PiperOrigin-RevId: 320216738 Source-Author: Google APIs Source-Date: Wed Jul 8 10:33:41 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: f0919d48d5fcbfd2d2e30ad3fe6ad7ea2685efc5 Source-Link: https://github.com/googleapis/googleapis/commit/f0919d48d5fcbfd2d2e30ad3fe6ad7ea2685efc5 * fix: migrate bq/connection/v1 to grpc_service_config PiperOrigin-RevId: 320217000 Source-Author: Google APIs Source-Date: Wed Jul 8 10:34:46 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: c4ed5e8114b75a84929aa146a72e9e75a4027c8d Source-Link: https://github.com/googleapis/googleapis/commit/c4ed5e8114b75a84929aa146a72e9e75a4027c8d --- .../v1beta1/ConnectionServiceClient.java | 186 +++++++++--------- .../v1beta1/ConnectionServiceSettings.java | 26 +-- .../connection/v1beta1/package-info.java | 6 +- .../v1beta1/stub/ConnectionServiceStub.java | 8 +- .../stub/ConnectionServiceStubSettings.java | 110 ++++++----- .../stub/GrpcConnectionServiceStub.java | 62 +++--- .../stub/ConnectionServiceStubSettings.java | 56 +++--- .../v1beta1/ConnectionServiceClientTest.java | 74 +++---- synth.metadata | 10 +- 9 files changed, 283 insertions(+), 255 deletions(-) diff --git a/google-cloud-bigqueryconnection/src/main/java/com/google/cloud/bigquery/connection/v1beta1/ConnectionServiceClient.java b/google-cloud-bigqueryconnection/src/main/java/com/google/cloud/bigquery/connection/v1beta1/ConnectionServiceClient.java index 2979c91f..2dc04fff 100644 --- a/google-cloud-bigqueryconnection/src/main/java/com/google/cloud/bigquery/connection/v1beta1/ConnectionServiceClient.java +++ b/google-cloud-bigqueryconnection/src/main/java/com/google/cloud/bigquery/connection/v1beta1/ConnectionServiceClient.java @@ -54,8 +54,10 @@ *
  * 
  * try (ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.create()) {
- *   ConnectionName name = ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]");
- *   connectionServiceClient.deleteConnection(name);
+ *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ *   Connection connection = Connection.newBuilder().build();
+ *   String connectionId = "";
+ *   Connection response = connectionServiceClient.createConnection(parent, connection, connectionId);
  * }
  * 
  * 
@@ -165,96 +167,6 @@ 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. @@ -761,6 +673,96 @@ 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-bigqueryconnection/src/main/java/com/google/cloud/bigquery/connection/v1beta1/ConnectionServiceSettings.java b/google-cloud-bigqueryconnection/src/main/java/com/google/cloud/bigquery/connection/v1beta1/ConnectionServiceSettings.java index 8b1f3731..4a983a81 100644 --- a/google-cloud-bigqueryconnection/src/main/java/com/google/cloud/bigquery/connection/v1beta1/ConnectionServiceSettings.java +++ b/google-cloud-bigqueryconnection/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 deleteConnection to 30 seconds: + *

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

  * 
  * ConnectionServiceSettings.Builder connectionServiceSettingsBuilder =
  *     ConnectionServiceSettings.newBuilder();
  * connectionServiceSettingsBuilder
- *     .deleteConnectionSettings()
+ *     .createConnectionSettings()
  *     .setRetrySettings(
- *         connectionServiceSettingsBuilder.deleteConnectionSettings().getRetrySettings().toBuilder()
+ *         connectionServiceSettingsBuilder.createConnectionSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * ConnectionServiceSettings connectionServiceSettings = connectionServiceSettingsBuilder.build();
@@ -79,11 +79,6 @@
 @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();
@@ -111,6 +106,11 @@ 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,11 +224,6 @@ 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() {
@@ -258,6 +253,11 @@ 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-bigqueryconnection/src/main/java/com/google/cloud/bigquery/connection/v1beta1/package-info.java b/google-cloud-bigqueryconnection/src/main/java/com/google/cloud/bigquery/connection/v1beta1/package-info.java
index 45bbab0a..dfc46794 100644
--- a/google-cloud-bigqueryconnection/src/main/java/com/google/cloud/bigquery/connection/v1beta1/package-info.java
+++ b/google-cloud-bigqueryconnection/src/main/java/com/google/cloud/bigquery/connection/v1beta1/package-info.java
@@ -28,8 +28,10 @@
  * 
  * 
  * try (ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.create()) {
- *   ConnectionName name = ConnectionName.of("[PROJECT]", "[LOCATION]", "[CONNECTION]");
- *   connectionServiceClient.deleteConnection(name);
+ *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ *   Connection connection = Connection.newBuilder().build();
+ *   String connectionId = "";
+ *   Connection response = connectionServiceClient.createConnection(parent, connection, connectionId);
  * }
  * 
  * 
diff --git a/google-cloud-bigqueryconnection/src/main/java/com/google/cloud/bigquery/connection/v1beta1/stub/ConnectionServiceStub.java b/google-cloud-bigqueryconnection/src/main/java/com/google/cloud/bigquery/connection/v1beta1/stub/ConnectionServiceStub.java index 2e5f4a0f..3e46e264 100644 --- a/google-cloud-bigqueryconnection/src/main/java/com/google/cloud/bigquery/connection/v1beta1/stub/ConnectionServiceStub.java +++ b/google-cloud-bigqueryconnection/src/main/java/com/google/cloud/bigquery/connection/v1beta1/stub/ConnectionServiceStub.java @@ -44,10 +44,6 @@ @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()"); } @@ -70,6 +66,10 @@ 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-bigqueryconnection/src/main/java/com/google/cloud/bigquery/connection/v1beta1/stub/ConnectionServiceStubSettings.java b/google-cloud-bigqueryconnection/src/main/java/com/google/cloud/bigquery/connection/v1beta1/stub/ConnectionServiceStubSettings.java index 778ff4cd..0698cdc1 100644 --- a/google-cloud-bigqueryconnection/src/main/java/com/google/cloud/bigquery/connection/v1beta1/stub/ConnectionServiceStubSettings.java +++ b/google-cloud-bigqueryconnection/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 deleteConnection to 30 seconds: + *

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

  * 
  * ConnectionServiceStubSettings.Builder connectionServiceSettingsBuilder =
  *     ConnectionServiceStubSettings.newBuilder();
  * connectionServiceSettingsBuilder
- *     .deleteConnectionSettings()
+ *     .createConnectionSettings()
  *     .setRetrySettings(
- *         connectionServiceSettingsBuilder.deleteConnectionSettings().getRetrySettings().toBuilder()
+ *         connectionServiceSettingsBuilder.createConnectionSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * ConnectionServiceStubSettings connectionServiceSettings = connectionServiceSettingsBuilder.build();
@@ -95,7 +95,6 @@ public class ConnectionServiceStubSettings extends StubSettings deleteConnectionSettings;
   private final UnaryCallSettings createConnectionSettings;
   private final UnaryCallSettings getConnectionSettings;
   private final UnaryCallSettings
@@ -103,16 +102,12 @@ 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;
@@ -140,6 +135,11 @@ 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,8 +241,6 @@ 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;
@@ -252,6 +250,8 @@ 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
@@ -264,11 +264,13 @@ 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(
+          "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList()));
       RETRYABLE_CODE_DEFINITIONS = definitions.build();
     }
 
@@ -282,12 +284,22 @@ public static class Builder extends StubSettings.Builder>of(
-              deleteConnectionSettings,
               createConnectionSettings,
               getConnectionSettings,
               listConnectionsSettings,
               updateConnectionSettings,
               updateConnectionCredentialSettings,
+              deleteConnectionSettings,
               getIamPolicySettings,
               setIamPolicySettings,
               testIamPermissionsSettings);
@@ -342,50 +354,50 @@ 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"))
-          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
+          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));
 
       builder
           .getConnectionSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
-          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes"))
+          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params"));
 
       builder
           .listConnectionsSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
-          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes"))
+          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params"));
 
       builder
           .updateConnectionSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
-          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
+          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));
 
       builder
           .updateConnectionCredentialSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
-          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
+          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));
+
+      builder
+          .deleteConnectionSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes"))
+          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params"));
 
       builder
           .getIamPolicySettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
-          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
+          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));
 
       builder
           .setIamPolicySettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
-          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
+          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));
 
       builder
           .testIamPermissionsSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
-          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
+          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));
 
       return builder;
     }
@@ -393,24 +405,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,11 +444,6 @@ 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() {
@@ -466,6 +473,11 @@ 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-bigqueryconnection/src/main/java/com/google/cloud/bigquery/connection/v1beta1/stub/GrpcConnectionServiceStub.java b/google-cloud-bigqueryconnection/src/main/java/com/google/cloud/bigquery/connection/v1beta1/stub/GrpcConnectionServiceStub.java
index 6f5bb611..5f40e7c6 100644
--- a/google-cloud-bigqueryconnection/src/main/java/com/google/cloud/bigquery/connection/v1beta1/stub/GrpcConnectionServiceStub.java
+++ b/google-cloud-bigqueryconnection/src/main/java/com/google/cloud/bigquery/connection/v1beta1/stub/GrpcConnectionServiceStub.java
@@ -55,16 +55,6 @@
 @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()
@@ -116,6 +106,16 @@ 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,7 +146,6 @@ public class GrpcConnectionServiceStub extends ConnectionServiceStub {
 
   private final BackgroundResource backgroundResources;
 
-  private final UnaryCallable deleteConnectionCallable;
   private final UnaryCallable createConnectionCallable;
   private final UnaryCallable getConnectionCallable;
   private final UnaryCallable
@@ -154,6 +153,7 @@ 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,19 +200,6 @@ 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)
@@ -281,6 +268,19 @@ 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,9 +322,6 @@ public Map extract(TestIamPermissionsRequest request) {
                     })
                 .build();
 
-    this.deleteConnectionCallable =
-        callableFactory.createUnaryCallable(
-            deleteConnectionTransportSettings, settings.deleteConnectionSettings(), clientContext);
     this.createConnectionCallable =
         callableFactory.createUnaryCallable(
             createConnectionTransportSettings, settings.createConnectionSettings(), clientContext);
@@ -342,6 +339,9 @@ 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,10 +357,6 @@ public Map extract(TestIamPermissionsRequest request) {
     backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources());
   }
 
-  public UnaryCallable deleteConnectionCallable() {
-    return deleteConnectionCallable;
-  }
-
   public UnaryCallable createConnectionCallable() {
     return createConnectionCallable;
   }
@@ -382,6 +378,10 @@ public UnaryCallable updateConnectionCallab
     return updateConnectionCredentialCallable;
   }
 
+  public UnaryCallable deleteConnectionCallable() {
+    return deleteConnectionCallable;
+  }
+
   public UnaryCallable getIamPolicyCallable() {
     return getIamPolicyCallable;
   }
diff --git a/google-cloud-bigqueryconnection/src/main/java/com/google/cloud/bigqueryconnection/v1/stub/ConnectionServiceStubSettings.java b/google-cloud-bigqueryconnection/src/main/java/com/google/cloud/bigqueryconnection/v1/stub/ConnectionServiceStubSettings.java
index 89ceaa72..ae95d91b 100644
--- a/google-cloud-bigqueryconnection/src/main/java/com/google/cloud/bigqueryconnection/v1/stub/ConnectionServiceStubSettings.java
+++ b/google-cloud-bigqueryconnection/src/main/java/com/google/cloud/bigqueryconnection/v1/stub/ConnectionServiceStubSettings.java
@@ -319,11 +319,13 @@ 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(
+          "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList()));
       RETRYABLE_CODE_DEFINITIONS = definitions.build();
     }
 
@@ -337,12 +339,22 @@ public static class Builder extends StubSettings.Builder 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() {
@@ -385,6 +348,43 @@ 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 508024ca..bf8c2999 100644
--- a/synth.metadata
+++ b/synth.metadata
@@ -4,23 +4,23 @@
       "git": {
         "name": ".",
         "remote": "https://github.com/googleapis/java-bigqueryconnection.git",
-        "sha": "75d63e4d69e181c8d389cec320dcb3f433ddaf05"
+        "sha": "8ce50d09538a646dbbea6199767b3678a4ba3b9f"
       }
     },
     {
       "git": {
         "name": "googleapis",
         "remote": "https://github.com/googleapis/googleapis.git",
-        "sha": "79a17b8c64efa7bafff0a16b467754c73d570b6e",
-        "internalRef": "317385359"
+        "sha": "c4ed5e8114b75a84929aa146a72e9e75a4027c8d",
+        "internalRef": "320217000"
       }
     },
     {
       "git": {
         "name": "googleapis",
         "remote": "https://github.com/googleapis/googleapis.git",
-        "sha": "79a17b8c64efa7bafff0a16b467754c73d570b6e",
-        "internalRef": "317385359"
+        "sha": "c4ed5e8114b75a84929aa146a72e9e75a4027c8d",
+        "internalRef": "320217000"
       }
     },
     {