From 5ea164b86c15ee444c285699e76ebc5ea2b64d62 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 25 Jun 2020 23:45:12 -0700 Subject: [PATCH] fix: migrate to grpc_service_config (#238) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/9c18038c-d1ba-45ab-9ded-a79e3b7a4d1b/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 317872667 Source-Link: https://github.com/googleapis/googleapis/commit/e8385a4863e19248b71dd1cbe0df5ff51c7a3c3e --- README.md | 23 ++- .../cloud/asset/v1/AssetServiceClient.java | 188 +++++++++--------- .../cloud/asset/v1/AssetServiceSettings.java | 26 +-- .../google/cloud/asset/v1/package-info.java | 4 +- .../cloud/asset/v1/stub/AssetServiceStub.java | 8 +- .../v1/stub/AssetServiceStubSettings.java | 128 +++++++----- .../asset/v1/stub/GrpcAssetServiceStub.java | 56 +++--- .../asset/v1/AssetServiceClientTest.java | 74 +++---- synth.metadata | 22 +- 9 files changed, 288 insertions(+), 241 deletions(-) diff --git a/README.md b/README.md index c9382cee8..a16550d62 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file com.google.cloud libraries-bom - 7.0.0 + 7.0.1 pom import @@ -38,7 +38,7 @@ If you are using Maven without BOM, add this to your dependencies: com.google.cloud google-cloud-asset - 1.3.0 + 1.4.0 ``` @@ -86,6 +86,25 @@ use this Cloud Asset Inventory Client Library. +## Samples + +Samples are in the [`samples/`](https://github.com/googleapis/java-asset/tree/master/samples) directory. The samples' `README.md` +has instructions for running the samples. + +| Sample | Source Code | Try it | +| --------------------------- | --------------------------------- | ------ | +| Batch Get Assets History Example | [source code](https://github.com/googleapis/java-asset/blob/master/samples/snippets/src/main/java/com/example/asset/BatchGetAssetsHistoryExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-asset&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/asset/BatchGetAssetsHistoryExample.java) | +| Create Feed Example | [source code](https://github.com/googleapis/java-asset/blob/master/samples/snippets/src/main/java/com/example/asset/CreateFeedExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-asset&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/asset/CreateFeedExample.java) | +| Delete Feed Example | [source code](https://github.com/googleapis/java-asset/blob/master/samples/snippets/src/main/java/com/example/asset/DeleteFeedExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-asset&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/asset/DeleteFeedExample.java) | +| Export Assets Bigquery Example | [source code](https://github.com/googleapis/java-asset/blob/master/samples/snippets/src/main/java/com/example/asset/ExportAssetsBigqueryExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-asset&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/asset/ExportAssetsBigqueryExample.java) | +| Export Assets Example | [source code](https://github.com/googleapis/java-asset/blob/master/samples/snippets/src/main/java/com/example/asset/ExportAssetsExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-asset&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/asset/ExportAssetsExample.java) | +| Get Feed Example | [source code](https://github.com/googleapis/java-asset/blob/master/samples/snippets/src/main/java/com/example/asset/GetFeedExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-asset&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/asset/GetFeedExample.java) | +| List Feeds Example | [source code](https://github.com/googleapis/java-asset/blob/master/samples/snippets/src/main/java/com/example/asset/ListFeedsExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-asset&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/asset/ListFeedsExample.java) | +| Search All Iam Policies Example | [source code](https://github.com/googleapis/java-asset/blob/master/samples/snippets/src/main/java/com/example/asset/SearchAllIamPoliciesExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-asset&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/asset/SearchAllIamPoliciesExample.java) | +| Search All Resources Example | [source code](https://github.com/googleapis/java-asset/blob/master/samples/snippets/src/main/java/com/example/asset/SearchAllResourcesExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-asset&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/asset/SearchAllResourcesExample.java) | +| Update Feed Example | [source code](https://github.com/googleapis/java-asset/blob/master/samples/snippets/src/main/java/com/example/asset/UpdateFeedExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-asset&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/asset/UpdateFeedExample.java) | + + ## Troubleshooting diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceClient.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceClient.java index 55570a11d..a04cd9b9e 100644 --- a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceClient.java +++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceClient.java @@ -48,8 +48,8 @@ *
  * 
  * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- *   FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]");
- *   assetServiceClient.deleteFeed(name);
+ *   String parent = "";
+ *   Feed response = assetServiceClient.createFeed(parent);
  * }
  * 
  * 
@@ -170,98 +170,6 @@ public final OperationsClient getOperationsClient() { return operationsClient; } - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes an asset feed. - * - *

Sample code: - * - *


-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]");
-   *   assetServiceClient.deleteFeed(name);
-   * }
-   * 
- * - * @param name Required. The name of the feed and it must be in the format of: - * projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id - * organizations/organization_number/feeds/feed_id - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteFeed(FeedName name) { - DeleteFeedRequest request = - DeleteFeedRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - deleteFeed(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes an asset feed. - * - *

Sample code: - * - *


-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]");
-   *   assetServiceClient.deleteFeed(name.toString());
-   * }
-   * 
- * - * @param name Required. The name of the feed and it must be in the format of: - * projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id - * organizations/organization_number/feeds/feed_id - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteFeed(String name) { - DeleteFeedRequest request = DeleteFeedRequest.newBuilder().setName(name).build(); - deleteFeed(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes an asset feed. - * - *

Sample code: - * - *


-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]");
-   *   DeleteFeedRequest request = DeleteFeedRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   assetServiceClient.deleteFeed(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 deleteFeed(DeleteFeedRequest request) { - deleteFeedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes an asset feed. - * - *

Sample code: - * - *


-   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
-   *   FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]");
-   *   DeleteFeedRequest request = DeleteFeedRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<Void> future = assetServiceClient.deleteFeedCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
- */ - public final UnaryCallable deleteFeedCallable() { - return stub.deleteFeedCallable(); - } - // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Exports assets with time and resource types to a given Cloud Storage location/BigQuery table. @@ -725,6 +633,98 @@ public final UnaryCallable updateFeedCallable() { return stub.updateFeedCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes an asset feed. + * + *

Sample code: + * + *


+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]");
+   *   assetServiceClient.deleteFeed(name);
+   * }
+   * 
+ * + * @param name Required. The name of the feed and it must be in the format of: + * projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id + * organizations/organization_number/feeds/feed_id + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteFeed(FeedName name) { + DeleteFeedRequest request = + DeleteFeedRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteFeed(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes an asset feed. + * + *

Sample code: + * + *


+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]");
+   *   assetServiceClient.deleteFeed(name.toString());
+   * }
+   * 
+ * + * @param name Required. The name of the feed and it must be in the format of: + * projects/project_number/feeds/feed_id folders/folder_number/feeds/feed_id + * organizations/organization_number/feeds/feed_id + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteFeed(String name) { + DeleteFeedRequest request = DeleteFeedRequest.newBuilder().setName(name).build(); + deleteFeed(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes an asset feed. + * + *

Sample code: + * + *


+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]");
+   *   DeleteFeedRequest request = DeleteFeedRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   assetServiceClient.deleteFeed(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 deleteFeed(DeleteFeedRequest request) { + deleteFeedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes an asset feed. + * + *

Sample code: + * + *


+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]");
+   *   DeleteFeedRequest request = DeleteFeedRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<Void> future = assetServiceClient.deleteFeedCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + public final UnaryCallable deleteFeedCallable() { + return stub.deleteFeedCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Searches all the resources within the given accessible scope (e.g., a project, a folder or an diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceSettings.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceSettings.java index 5349ac51b..cbb837570 100644 --- a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceSettings.java +++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceSettings.java @@ -52,16 +52,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 deleteFeed to 30 seconds: + *

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

  * 
  * AssetServiceSettings.Builder assetServiceSettingsBuilder =
  *     AssetServiceSettings.newBuilder();
  * assetServiceSettingsBuilder
- *     .deleteFeedSettings()
+ *     .createFeedSettings()
  *     .setRetrySettings(
- *         assetServiceSettingsBuilder.deleteFeedSettings().getRetrySettings().toBuilder()
+ *         assetServiceSettingsBuilder.createFeedSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * AssetServiceSettings assetServiceSettings = assetServiceSettingsBuilder.build();
@@ -71,11 +71,6 @@
 @Generated("by gapic-generator")
 @BetaApi
 public class AssetServiceSettings extends ClientSettings {
-  /** Returns the object with the settings used for calls to deleteFeed. */
-  public UnaryCallSettings deleteFeedSettings() {
-    return ((AssetServiceStubSettings) getStubSettings()).deleteFeedSettings();
-  }
-
   /** Returns the object with the settings used for calls to exportAssets. */
   public UnaryCallSettings exportAssetsSettings() {
     return ((AssetServiceStubSettings) getStubSettings()).exportAssetsSettings();
@@ -115,6 +110,11 @@ public UnaryCallSettings updateFeedSettings() {
     return ((AssetServiceStubSettings) getStubSettings()).updateFeedSettings();
   }
 
+  /** Returns the object with the settings used for calls to deleteFeed. */
+  public UnaryCallSettings deleteFeedSettings() {
+    return ((AssetServiceStubSettings) getStubSettings()).deleteFeedSettings();
+  }
+
   /** Returns the object with the settings used for calls to searchAllResources. */
   public PagedCallSettings<
           SearchAllResourcesRequest, SearchAllResourcesResponse, SearchAllResourcesPagedResponse>
@@ -228,11 +228,6 @@ public Builder applyToAllUnaryMethods(
       return this;
     }
 
-    /** Returns the builder for the settings used for calls to deleteFeed. */
-    public UnaryCallSettings.Builder deleteFeedSettings() {
-      return getStubSettingsBuilder().deleteFeedSettings();
-    }
-
     /** Returns the builder for the settings used for calls to exportAssets. */
     public UnaryCallSettings.Builder exportAssetsSettings() {
       return getStubSettingsBuilder().exportAssetsSettings();
@@ -273,6 +268,11 @@ public UnaryCallSettings.Builder updateFeedSettings() {
       return getStubSettingsBuilder().updateFeedSettings();
     }
 
+    /** Returns the builder for the settings used for calls to deleteFeed. */
+    public UnaryCallSettings.Builder deleteFeedSettings() {
+      return getStubSettingsBuilder().deleteFeedSettings();
+    }
+
     /** Returns the builder for the settings used for calls to searchAllResources. */
     public PagedCallSettings.Builder<
             SearchAllResourcesRequest, SearchAllResourcesResponse, SearchAllResourcesPagedResponse>
diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/package-info.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/package-info.java
index 1d5560bd3..8d3107e5b 100644
--- a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/package-info.java
+++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/package-info.java
@@ -28,8 +28,8 @@
  * 
  * 
  * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
- *   FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]");
- *   assetServiceClient.deleteFeed(name);
+ *   String parent = "";
+ *   Feed response = assetServiceClient.createFeed(parent);
  * }
  * 
  * 
diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStub.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStub.java index 0a3c4a82c..58873ddc3 100644 --- a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStub.java +++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStub.java @@ -57,10 +57,6 @@ public OperationsStub getOperationsStub() { throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); } - public UnaryCallable deleteFeedCallable() { - throw new UnsupportedOperationException("Not implemented: deleteFeedCallable()"); - } - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") public OperationCallable exportAssetsOperationCallable() { @@ -92,6 +88,10 @@ public UnaryCallable updateFeedCallable() { throw new UnsupportedOperationException("Not implemented: updateFeedCallable()"); } + public UnaryCallable deleteFeedCallable() { + throw new UnsupportedOperationException("Not implemented: deleteFeedCallable()"); + } + public UnaryCallable searchAllResourcesPagedCallable() { throw new UnsupportedOperationException("Not implemented: searchAllResourcesPagedCallable()"); diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStubSettings.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStubSettings.java index 8d8dc29b3..0906a1ad7 100644 --- a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStubSettings.java +++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStubSettings.java @@ -87,16 +87,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 deleteFeed to 30 seconds: + *

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

  * 
  * AssetServiceStubSettings.Builder assetServiceSettingsBuilder =
  *     AssetServiceStubSettings.newBuilder();
  * assetServiceSettingsBuilder
- *     .deleteFeedSettings()
+ *     .createFeedSettings()
  *     .setRetrySettings(
- *         assetServiceSettingsBuilder.deleteFeedSettings().getRetrySettings().toBuilder()
+ *         assetServiceSettingsBuilder.createFeedSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * AssetServiceStubSettings assetServiceSettings = assetServiceSettingsBuilder.build();
@@ -110,7 +110,6 @@ public class AssetServiceStubSettings extends StubSettings DEFAULT_SERVICE_SCOPES =
       ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build();
 
-  private final UnaryCallSettings deleteFeedSettings;
   private final UnaryCallSettings exportAssetsSettings;
   private final OperationCallSettings<
           ExportAssetsRequest, ExportAssetsResponse, ExportAssetsRequest>
@@ -121,6 +120,7 @@ public class AssetServiceStubSettings extends StubSettings getFeedSettings;
   private final UnaryCallSettings listFeedsSettings;
   private final UnaryCallSettings updateFeedSettings;
+  private final UnaryCallSettings deleteFeedSettings;
   private final PagedCallSettings<
           SearchAllResourcesRequest, SearchAllResourcesResponse, SearchAllResourcesPagedResponse>
       searchAllResourcesSettings;
@@ -130,11 +130,6 @@ public class AssetServiceStubSettings extends StubSettings
       searchAllIamPoliciesSettings;
 
-  /** Returns the object with the settings used for calls to deleteFeed. */
-  public UnaryCallSettings deleteFeedSettings() {
-    return deleteFeedSettings;
-  }
-
   /** Returns the object with the settings used for calls to exportAssets. */
   public UnaryCallSettings exportAssetsSettings() {
     return exportAssetsSettings;
@@ -173,6 +168,11 @@ public UnaryCallSettings updateFeedSettings() {
     return updateFeedSettings;
   }
 
+  /** Returns the object with the settings used for calls to deleteFeed. */
+  public UnaryCallSettings deleteFeedSettings() {
+    return deleteFeedSettings;
+  }
+
   /** Returns the object with the settings used for calls to searchAllResources. */
   public PagedCallSettings<
           SearchAllResourcesRequest, SearchAllResourcesResponse, SearchAllResourcesPagedResponse>
@@ -258,7 +258,6 @@ public Builder toBuilder() {
   protected AssetServiceStubSettings(Builder settingsBuilder) throws IOException {
     super(settingsBuilder);
 
-    deleteFeedSettings = settingsBuilder.deleteFeedSettings().build();
     exportAssetsSettings = settingsBuilder.exportAssetsSettings().build();
     exportAssetsOperationSettings = settingsBuilder.exportAssetsOperationSettings().build();
     batchGetAssetsHistorySettings = settingsBuilder.batchGetAssetsHistorySettings().build();
@@ -266,6 +265,7 @@ protected AssetServiceStubSettings(Builder settingsBuilder) throws IOException {
     getFeedSettings = settingsBuilder.getFeedSettings().build();
     listFeedsSettings = settingsBuilder.listFeedsSettings().build();
     updateFeedSettings = settingsBuilder.updateFeedSettings().build();
+    deleteFeedSettings = settingsBuilder.deleteFeedSettings().build();
     searchAllResourcesSettings = settingsBuilder.searchAllResourcesSettings().build();
     searchAllIamPoliciesSettings = settingsBuilder.searchAllIamPoliciesSettings().build();
   }
@@ -404,7 +404,6 @@ public ApiFuture getFuturePagedResponse(
   public static class Builder extends StubSettings.Builder {
     private final ImmutableList> unaryMethodSettingsBuilders;
 
-    private final UnaryCallSettings.Builder deleteFeedSettings;
     private final UnaryCallSettings.Builder exportAssetsSettings;
     private final OperationCallSettings.Builder<
             ExportAssetsRequest, ExportAssetsResponse, ExportAssetsRequest>
@@ -416,6 +415,7 @@ public static class Builder extends StubSettings.Builder getFeedSettings;
     private final UnaryCallSettings.Builder listFeedsSettings;
     private final UnaryCallSettings.Builder updateFeedSettings;
+    private final UnaryCallSettings.Builder deleteFeedSettings;
     private final PagedCallSettings.Builder<
             SearchAllResourcesRequest, SearchAllResourcesResponse, SearchAllResourcesPagedResponse>
         searchAllResourcesSettings;
@@ -432,11 +432,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(
+          "retry_policy_2_codes",
+          ImmutableSet.copyOf(
+              Lists.newArrayList(
+                  StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE)));
+      definitions.put(
+          "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList()));
       RETRYABLE_CODE_DEFINITIONS = definitions.build();
     }
 
@@ -450,12 +457,33 @@ public static class Builder extends StubSettings.Builder>of(
-              deleteFeedSettings,
               exportAssetsSettings,
               batchGetAssetsHistorySettings,
               createFeedSettings,
               getFeedSettings,
               listFeedsSettings,
               updateFeedSettings,
+              deleteFeedSettings,
               searchAllResourcesSettings,
               searchAllIamPoliciesSettings);
 
@@ -513,57 +541,57 @@ private static Builder createDefault() {
 
     private static Builder initDefaults(Builder builder) {
 
-      builder
-          .deleteFeedSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
-          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
-
       builder
           .exportAssetsSettings()
-          .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
           .batchGetAssetsHistorySettings()
-          .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
           .createFeedSettings()
-          .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
           .getFeedSettings()
-          .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
           .listFeedsSettings()
-          .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
           .updateFeedSettings()
-          .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
+          .deleteFeedSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes"))
+          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params"));
 
       builder
           .searchAllResourcesSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
-          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes"))
+          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params"));
 
       builder
           .searchAllIamPoliciesSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
-          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes"))
+          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params"));
       builder
           .exportAssetsOperationSettings()
           .setInitialCallSettings(
               UnaryCallSettings
                   .newUnaryCallSettingsBuilder()
-                  .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"))
                   .build())
           .setResponseTransformer(
               ProtoOperationTransformers.ResponseTransformer.create(ExportAssetsResponse.class))
@@ -587,7 +615,6 @@ private static Builder initDefaults(Builder builder) {
     protected Builder(AssetServiceStubSettings settings) {
       super(settings);
 
-      deleteFeedSettings = settings.deleteFeedSettings.toBuilder();
       exportAssetsSettings = settings.exportAssetsSettings.toBuilder();
       exportAssetsOperationSettings = settings.exportAssetsOperationSettings.toBuilder();
       batchGetAssetsHistorySettings = settings.batchGetAssetsHistorySettings.toBuilder();
@@ -595,18 +622,19 @@ protected Builder(AssetServiceStubSettings settings) {
       getFeedSettings = settings.getFeedSettings.toBuilder();
       listFeedsSettings = settings.listFeedsSettings.toBuilder();
       updateFeedSettings = settings.updateFeedSettings.toBuilder();
+      deleteFeedSettings = settings.deleteFeedSettings.toBuilder();
       searchAllResourcesSettings = settings.searchAllResourcesSettings.toBuilder();
       searchAllIamPoliciesSettings = settings.searchAllIamPoliciesSettings.toBuilder();
 
       unaryMethodSettingsBuilders =
           ImmutableList.>of(
-              deleteFeedSettings,
               exportAssetsSettings,
               batchGetAssetsHistorySettings,
               createFeedSettings,
               getFeedSettings,
               listFeedsSettings,
               updateFeedSettings,
+              deleteFeedSettings,
               searchAllResourcesSettings,
               searchAllIamPoliciesSettings);
     }
@@ -627,11 +655,6 @@ public Builder applyToAllUnaryMethods(
       return unaryMethodSettingsBuilders;
     }
 
-    /** Returns the builder for the settings used for calls to deleteFeed. */
-    public UnaryCallSettings.Builder deleteFeedSettings() {
-      return deleteFeedSettings;
-    }
-
     /** Returns the builder for the settings used for calls to exportAssets. */
     public UnaryCallSettings.Builder exportAssetsSettings() {
       return exportAssetsSettings;
@@ -672,6 +695,11 @@ public UnaryCallSettings.Builder updateFeedSettings() {
       return updateFeedSettings;
     }
 
+    /** Returns the builder for the settings used for calls to deleteFeed. */
+    public UnaryCallSettings.Builder deleteFeedSettings() {
+      return deleteFeedSettings;
+    }
+
     /** Returns the builder for the settings used for calls to searchAllResources. */
     public PagedCallSettings.Builder<
             SearchAllResourcesRequest, SearchAllResourcesResponse, SearchAllResourcesPagedResponse>
diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/GrpcAssetServiceStub.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/GrpcAssetServiceStub.java
index 3fd6e8541..7ce7c50bb 100644
--- a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/GrpcAssetServiceStub.java
+++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/GrpcAssetServiceStub.java
@@ -63,13 +63,6 @@
 @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
 public class GrpcAssetServiceStub extends AssetServiceStub {
 
-  private static final MethodDescriptor deleteFeedMethodDescriptor =
-      MethodDescriptor.newBuilder()
-          .setType(MethodDescriptor.MethodType.UNARY)
-          .setFullMethodName("google.cloud.asset.v1.AssetService/DeleteFeed")
-          .setRequestMarshaller(ProtoUtils.marshaller(DeleteFeedRequest.getDefaultInstance()))
-          .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance()))
-          .build();
   private static final MethodDescriptor
       exportAssetsMethodDescriptor =
           MethodDescriptor.newBuilder()
@@ -117,6 +110,13 @@ public class GrpcAssetServiceStub extends AssetServiceStub {
           .setRequestMarshaller(ProtoUtils.marshaller(UpdateFeedRequest.getDefaultInstance()))
           .setResponseMarshaller(ProtoUtils.marshaller(Feed.getDefaultInstance()))
           .build();
+  private static final MethodDescriptor deleteFeedMethodDescriptor =
+      MethodDescriptor.newBuilder()
+          .setType(MethodDescriptor.MethodType.UNARY)
+          .setFullMethodName("google.cloud.asset.v1.AssetService/DeleteFeed")
+          .setRequestMarshaller(ProtoUtils.marshaller(DeleteFeedRequest.getDefaultInstance()))
+          .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance()))
+          .build();
   private static final MethodDescriptor
       searchAllResourcesMethodDescriptor =
           MethodDescriptor.newBuilder()
@@ -141,7 +141,6 @@ public class GrpcAssetServiceStub extends AssetServiceStub {
   private final BackgroundResource backgroundResources;
   private final GrpcOperationsStub operationsStub;
 
-  private final UnaryCallable deleteFeedCallable;
   private final UnaryCallable exportAssetsCallable;
   private final OperationCallable
       exportAssetsOperationCallable;
@@ -151,6 +150,7 @@ public class GrpcAssetServiceStub extends AssetServiceStub {
   private final UnaryCallable getFeedCallable;
   private final UnaryCallable listFeedsCallable;
   private final UnaryCallable updateFeedCallable;
+  private final UnaryCallable deleteFeedCallable;
   private final UnaryCallable
       searchAllResourcesCallable;
   private final UnaryCallable
@@ -200,19 +200,6 @@ protected GrpcAssetServiceStub(
     this.callableFactory = callableFactory;
     this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory);
 
-    GrpcCallSettings deleteFeedTransportSettings =
-        GrpcCallSettings.newBuilder()
-            .setMethodDescriptor(deleteFeedMethodDescriptor)
-            .setParamsExtractor(
-                new RequestParamsExtractor() {
-                  @Override
-                  public Map extract(DeleteFeedRequest request) {
-                    ImmutableMap.Builder params = ImmutableMap.builder();
-                    params.put("name", String.valueOf(request.getName()));
-                    return params.build();
-                  }
-                })
-            .build();
     GrpcCallSettings exportAssetsTransportSettings =
         GrpcCallSettings.newBuilder()
             .setMethodDescriptor(exportAssetsMethodDescriptor)
@@ -293,6 +280,19 @@ public Map extract(UpdateFeedRequest request) {
                   }
                 })
             .build();
+    GrpcCallSettings deleteFeedTransportSettings =
+        GrpcCallSettings.newBuilder()
+            .setMethodDescriptor(deleteFeedMethodDescriptor)
+            .setParamsExtractor(
+                new RequestParamsExtractor() {
+                  @Override
+                  public Map extract(DeleteFeedRequest request) {
+                    ImmutableMap.Builder params = ImmutableMap.builder();
+                    params.put("name", String.valueOf(request.getName()));
+                    return params.build();
+                  }
+                })
+            .build();
     GrpcCallSettings
         searchAllResourcesTransportSettings =
             GrpcCallSettings.newBuilder()
@@ -322,9 +322,6 @@ public Map extract(SearchAllIamPoliciesRequest request) {
                     })
                 .build();
 
-    this.deleteFeedCallable =
-        callableFactory.createUnaryCallable(
-            deleteFeedTransportSettings, settings.deleteFeedSettings(), clientContext);
     this.exportAssetsCallable =
         callableFactory.createUnaryCallable(
             exportAssetsTransportSettings, settings.exportAssetsSettings(), clientContext);
@@ -351,6 +348,9 @@ public Map extract(SearchAllIamPoliciesRequest request) {
     this.updateFeedCallable =
         callableFactory.createUnaryCallable(
             updateFeedTransportSettings, settings.updateFeedSettings(), clientContext);
+    this.deleteFeedCallable =
+        callableFactory.createUnaryCallable(
+            deleteFeedTransportSettings, settings.deleteFeedSettings(), clientContext);
     this.searchAllResourcesCallable =
         callableFactory.createUnaryCallable(
             searchAllResourcesTransportSettings,
@@ -380,10 +380,6 @@ public GrpcOperationsStub getOperationsStub() {
     return operationsStub;
   }
 
-  public UnaryCallable deleteFeedCallable() {
-    return deleteFeedCallable;
-  }
-
   @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
   public OperationCallable
       exportAssetsOperationCallable() {
@@ -415,6 +411,10 @@ public UnaryCallable updateFeedCallable() {
     return updateFeedCallable;
   }
 
+  public UnaryCallable deleteFeedCallable() {
+    return deleteFeedCallable;
+  }
+
   public UnaryCallable
       searchAllResourcesPagedCallable() {
     return searchAllResourcesPagedCallable;
diff --git a/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/AssetServiceClientTest.java b/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/AssetServiceClientTest.java
index b962984cb..feaf938e2 100644
--- a/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/AssetServiceClientTest.java
+++ b/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/AssetServiceClientTest.java
@@ -85,43 +85,6 @@ public void tearDown() throws Exception {
     client.close();
   }
 
-  @Test
-  @SuppressWarnings("all")
-  public void deleteFeedTest() {
-    Empty expectedResponse = Empty.newBuilder().build();
-    mockAssetService.addResponse(expectedResponse);
-
-    FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]");
-
-    client.deleteFeed(name);
-
-    List actualRequests = mockAssetService.getRequests();
-    Assert.assertEquals(1, actualRequests.size());
-    DeleteFeedRequest actualRequest = (DeleteFeedRequest) actualRequests.get(0);
-
-    Assert.assertEquals(name, FeedName.parse(actualRequest.getName()));
-    Assert.assertTrue(
-        channelProvider.isHeaderSent(
-            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
-            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
-  }
-
-  @Test
-  @SuppressWarnings("all")
-  public void deleteFeedExceptionTest() throws Exception {
-    StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
-    mockAssetService.addException(exception);
-
-    try {
-      FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]");
-
-      client.deleteFeed(name);
-      Assert.fail("No exception raised");
-    } catch (InvalidArgumentException e) {
-      // Expected exception
-    }
-  }
-
   @Test
   @SuppressWarnings("all")
   public void exportAssetsTest() throws Exception {
@@ -380,6 +343,43 @@ public void updateFeedExceptionTest() throws Exception {
     }
   }
 
+  @Test
+  @SuppressWarnings("all")
+  public void deleteFeedTest() {
+    Empty expectedResponse = Empty.newBuilder().build();
+    mockAssetService.addResponse(expectedResponse);
+
+    FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]");
+
+    client.deleteFeed(name);
+
+    List actualRequests = mockAssetService.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    DeleteFeedRequest actualRequest = (DeleteFeedRequest) actualRequests.get(0);
+
+    Assert.assertEquals(name, FeedName.parse(actualRequest.getName()));
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  @SuppressWarnings("all")
+  public void deleteFeedExceptionTest() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
+    mockAssetService.addException(exception);
+
+    try {
+      FeedName name = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]");
+
+      client.deleteFeed(name);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception
+    }
+  }
+
   @Test
   @SuppressWarnings("all")
   public void searchAllResourcesTest() {
diff --git a/synth.metadata b/synth.metadata
index 95f459350..4503b6bbb 100644
--- a/synth.metadata
+++ b/synth.metadata
@@ -4,47 +4,47 @@
       "git": {
         "name": ".",
         "remote": "https://github.com/googleapis/java-asset.git",
-        "sha": "f14bd119c952bd38bf03fd25a98e8bc4641b84fe"
+        "sha": "48fdde6813aa936d3ebcc42e4442db46a30bd4e7"
       }
     },
     {
       "git": {
         "name": "googleapis",
         "remote": "https://github.com/googleapis/googleapis.git",
-        "sha": "3dcb344dd2a03043708b3ba40c4df141a3d5b06b",
-        "internalRef": "316789767"
+        "sha": "e8385a4863e19248b71dd1cbe0df5ff51c7a3c3e",
+        "internalRef": "317872667"
       }
     },
     {
       "git": {
         "name": "googleapis",
         "remote": "https://github.com/googleapis/googleapis.git",
-        "sha": "3dcb344dd2a03043708b3ba40c4df141a3d5b06b",
-        "internalRef": "316789767"
+        "sha": "e8385a4863e19248b71dd1cbe0df5ff51c7a3c3e",
+        "internalRef": "317872667"
       }
     },
     {
       "git": {
         "name": "googleapis",
         "remote": "https://github.com/googleapis/googleapis.git",
-        "sha": "3dcb344dd2a03043708b3ba40c4df141a3d5b06b",
-        "internalRef": "316789767"
+        "sha": "e8385a4863e19248b71dd1cbe0df5ff51c7a3c3e",
+        "internalRef": "317872667"
       }
     },
     {
       "git": {
         "name": "googleapis",
         "remote": "https://github.com/googleapis/googleapis.git",
-        "sha": "3dcb344dd2a03043708b3ba40c4df141a3d5b06b",
-        "internalRef": "316789767"
+        "sha": "e8385a4863e19248b71dd1cbe0df5ff51c7a3c3e",
+        "internalRef": "317872667"
       }
     },
     {
       "git": {
         "name": "googleapis",
         "remote": "https://github.com/googleapis/googleapis.git",
-        "sha": "3dcb344dd2a03043708b3ba40c4df141a3d5b06b",
-        "internalRef": "316789767"
+        "sha": "e8385a4863e19248b71dd1cbe0df5ff51c7a3c3e",
+        "internalRef": "317872667"
       }
     },
     {