diff --git a/automl/snippets/src/main/java/com/beta/automl/ListDatasets.java b/automl/snippets/src/main/java/com/beta/automl/ListDatasets.java index cc36b61db3d..12cca0ce122 100644 --- a/automl/snippets/src/main/java/com/beta/automl/ListDatasets.java +++ b/automl/snippets/src/main/java/com/beta/automl/ListDatasets.java @@ -40,20 +40,7 @@ static void listDatasets(String projectId) throws IOException { // Initialize client that will be used to send requests. This client only needs to be created // once, and can be reused for multiple requests. After completing all of your requests, call // the "close" method on the client to safely clean up any remaining background resources. - AutoMlSettings.Builder autoMlSettingsBuilder = AutoMlSettings.newBuilder(); - - autoMlSettingsBuilder - .listDatasetsSettings() - .setRetrySettings( - autoMlSettingsBuilder - .listDatasetsSettings() - .getRetrySettings() - .toBuilder() - .setTotalTimeout(Duration.ofSeconds(15)) - .build()); - AutoMlSettings autoMlSettings = autoMlSettingsBuilder.build(); - - try (AutoMlClient client = AutoMlClient.create(autoMlSettings)) { + try (AutoMlClient client = AutoMlClient.create()) { // A resource that represents Google Cloud Platform location. LocationName projectLocation = LocationName.of(projectId, "us-central1"); ListDatasetsRequest request = diff --git a/automl/snippets/src/main/java/com/beta/automl/ListModels.java b/automl/snippets/src/main/java/com/beta/automl/ListModels.java index a96472b7204..589594d41c7 100644 --- a/automl/snippets/src/main/java/com/beta/automl/ListModels.java +++ b/automl/snippets/src/main/java/com/beta/automl/ListModels.java @@ -39,20 +39,7 @@ static void listModels(String projectId) throws IOException { // Initialize client that will be used to send requests. This client only needs to be created // once, and can be reused for multiple requests. After completing all of your requests, call // the "close" method on the client to safely clean up any remaining background resources. - AutoMlSettings.Builder autoMlSettingsBuilder = AutoMlSettings.newBuilder(); - - autoMlSettingsBuilder - .listModelsSettings() - .setRetrySettings( - autoMlSettingsBuilder - .listModelsSettings() - .getRetrySettings() - .toBuilder() - .setTotalTimeout(Duration.ofSeconds(30)) - .build()); - AutoMlSettings autoMlSettings = autoMlSettingsBuilder.build(); - - try (AutoMlClient client = AutoMlClient.create(autoMlSettings)) { + try (AutoMlClient client = AutoMlClient.create()) { // A resource that represents Google Cloud Platform location. LocationName projectLocation = LocationName.of(projectId, "us-central1"); diff --git a/automl/snippets/src/main/java/com/example/automl/ListModels.java b/automl/snippets/src/main/java/com/example/automl/ListModels.java index 9b2e5427c3b..ffb6ad9d150 100644 --- a/automl/snippets/src/main/java/com/example/automl/ListModels.java +++ b/automl/snippets/src/main/java/com/example/automl/ListModels.java @@ -38,20 +38,7 @@ static void listModels(String projectId) throws IOException { // Initialize client that will be used to send requests. This client only needs to be created // once, and can be reused for multiple requests. After completing all of your requests, call // the "close" method on the client to safely clean up any remaining background resources. - AutoMlSettings.Builder autoMlSettingsBuilder = AutoMlSettings.newBuilder(); - - autoMlSettingsBuilder - .listModelsSettings() - .setRetrySettings( - autoMlSettingsBuilder - .listModelsSettings() - .getRetrySettings() - .toBuilder() - .setTotalTimeout(Duration.ofSeconds(20)) - .build()); - AutoMlSettings autoMlSettings = autoMlSettingsBuilder.build(); - - try (AutoMlClient client = AutoMlClient.create(autoMlSettings)) { + try (AutoMlClient client = AutoMlClient.create()) { // A resource that represents Google Cloud Platform location. LocationName projectLocation = LocationName.of(projectId, "us-central1");