File tree 3 files changed +3
-42
lines changed
automl/snippets/src/main/java/com
3 files changed +3
-42
lines changed Original file line number Diff line number Diff line change @@ -40,20 +40,7 @@ static void listDatasets(String projectId) throws IOException {
40
40
// Initialize client that will be used to send requests. This client only needs to be created
41
41
// once, and can be reused for multiple requests. After completing all of your requests, call
42
42
// the "close" method on the client to safely clean up any remaining background resources.
43
- AutoMlSettings .Builder autoMlSettingsBuilder = AutoMlSettings .newBuilder ();
44
-
45
- autoMlSettingsBuilder
46
- .listDatasetsSettings ()
47
- .setRetrySettings (
48
- autoMlSettingsBuilder
49
- .listDatasetsSettings ()
50
- .getRetrySettings ()
51
- .toBuilder ()
52
- .setTotalTimeout (Duration .ofSeconds (15 ))
53
- .build ());
54
- AutoMlSettings autoMlSettings = autoMlSettingsBuilder .build ();
55
-
56
- try (AutoMlClient client = AutoMlClient .create (autoMlSettings )) {
43
+ try (AutoMlClient client = AutoMlClient .create ()) {
57
44
// A resource that represents Google Cloud Platform location.
58
45
LocationName projectLocation = LocationName .of (projectId , "us-central1" );
59
46
ListDatasetsRequest request =
Original file line number Diff line number Diff line change @@ -39,20 +39,7 @@ static void listModels(String projectId) throws IOException {
39
39
// Initialize client that will be used to send requests. This client only needs to be created
40
40
// once, and can be reused for multiple requests. After completing all of your requests, call
41
41
// the "close" method on the client to safely clean up any remaining background resources.
42
- AutoMlSettings .Builder autoMlSettingsBuilder = AutoMlSettings .newBuilder ();
43
-
44
- autoMlSettingsBuilder
45
- .listModelsSettings ()
46
- .setRetrySettings (
47
- autoMlSettingsBuilder
48
- .listModelsSettings ()
49
- .getRetrySettings ()
50
- .toBuilder ()
51
- .setTotalTimeout (Duration .ofSeconds (30 ))
52
- .build ());
53
- AutoMlSettings autoMlSettings = autoMlSettingsBuilder .build ();
54
-
55
- try (AutoMlClient client = AutoMlClient .create (autoMlSettings )) {
42
+ try (AutoMlClient client = AutoMlClient .create ()) {
56
43
// A resource that represents Google Cloud Platform location.
57
44
LocationName projectLocation = LocationName .of (projectId , "us-central1" );
58
45
Original file line number Diff line number Diff line change @@ -38,20 +38,7 @@ static void listModels(String projectId) throws IOException {
38
38
// Initialize client that will be used to send requests. This client only needs to be created
39
39
// once, and can be reused for multiple requests. After completing all of your requests, call
40
40
// the "close" method on the client to safely clean up any remaining background resources.
41
- AutoMlSettings .Builder autoMlSettingsBuilder = AutoMlSettings .newBuilder ();
42
-
43
- autoMlSettingsBuilder
44
- .listModelsSettings ()
45
- .setRetrySettings (
46
- autoMlSettingsBuilder
47
- .listModelsSettings ()
48
- .getRetrySettings ()
49
- .toBuilder ()
50
- .setTotalTimeout (Duration .ofSeconds (20 ))
51
- .build ());
52
- AutoMlSettings autoMlSettings = autoMlSettingsBuilder .build ();
53
-
54
- try (AutoMlClient client = AutoMlClient .create (autoMlSettings )) {
41
+ try (AutoMlClient client = AutoMlClient .create ()) {
55
42
// A resource that represents Google Cloud Platform location.
56
43
LocationName projectLocation = LocationName .of (projectId , "us-central1" );
57
44
You can’t perform that action at this time.
0 commit comments