Skip to content
This repository was archived by the owner on Sep 16, 2023. It is now read-only.

Commit 8d4bff0

Browse files
docs(regen): update sample code to set total timeout, add API client header test (#56)
1 parent 86c2d71 commit 8d4bff0

18 files changed

+142
-39
lines changed

google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ImageAnnotatorSettings.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,12 @@
5353
* <code>
5454
* ImageAnnotatorSettings.Builder imageAnnotatorSettingsBuilder =
5555
* ImageAnnotatorSettings.newBuilder();
56-
* imageAnnotatorSettingsBuilder.batchAnnotateImagesSettings().getRetrySettings().toBuilder()
57-
* .setTotalTimeout(Duration.ofSeconds(30));
56+
* imageAnnotatorSettingsBuilder
57+
* .batchAnnotateImagesSettings()
58+
* .setRetrySettings(
59+
* imageAnnotatorSettingsBuilder.batchAnnotateImagesSettings().getRetrySettings().toBuilder()
60+
* .setTotalTimeout(Duration.ofSeconds(30))
61+
* .build());
5862
* ImageAnnotatorSettings imageAnnotatorSettings = imageAnnotatorSettingsBuilder.build();
5963
* </code>
6064
* </pre>

google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ProductSearchSettings.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,12 @@
6060
* <code>
6161
* ProductSearchSettings.Builder productSearchSettingsBuilder =
6262
* ProductSearchSettings.newBuilder();
63-
* productSearchSettingsBuilder.createProductSetSettings().getRetrySettings().toBuilder()
64-
* .setTotalTimeout(Duration.ofSeconds(30));
63+
* productSearchSettingsBuilder
64+
* .createProductSetSettings()
65+
* .setRetrySettings(
66+
* productSearchSettingsBuilder.createProductSetSettings().getRetrySettings().toBuilder()
67+
* .setTotalTimeout(Duration.ofSeconds(30))
68+
* .build());
6569
* ProductSearchSettings productSearchSettings = productSearchSettingsBuilder.build();
6670
* </code>
6771
* </pre>

google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/ImageAnnotatorStubSettings.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,12 @@
7474
* <code>
7575
* ImageAnnotatorStubSettings.Builder imageAnnotatorSettingsBuilder =
7676
* ImageAnnotatorStubSettings.newBuilder();
77-
* imageAnnotatorSettingsBuilder.batchAnnotateImagesSettings().getRetrySettings().toBuilder()
78-
* .setTotalTimeout(Duration.ofSeconds(30));
77+
* imageAnnotatorSettingsBuilder
78+
* .batchAnnotateImagesSettings()
79+
* .setRetrySettings(
80+
* imageAnnotatorSettingsBuilder.batchAnnotateImagesSettings().getRetrySettings().toBuilder()
81+
* .setTotalTimeout(Duration.ofSeconds(30))
82+
* .build());
7983
* ImageAnnotatorStubSettings imageAnnotatorSettings = imageAnnotatorSettingsBuilder.build();
8084
* </code>
8185
* </pre>

google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/ProductSearchStubSettings.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,12 @@
106106
* <code>
107107
* ProductSearchStubSettings.Builder productSearchSettingsBuilder =
108108
* ProductSearchStubSettings.newBuilder();
109-
* productSearchSettingsBuilder.createProductSetSettings().getRetrySettings().toBuilder()
110-
* .setTotalTimeout(Duration.ofSeconds(30));
109+
* productSearchSettingsBuilder
110+
* .createProductSetSettings()
111+
* .setRetrySettings(
112+
* productSearchSettingsBuilder.createProductSetSettings().getRetrySettings().toBuilder()
113+
* .setTotalTimeout(Duration.ofSeconds(30))
114+
* .build());
111115
* ProductSearchStubSettings productSearchSettings = productSearchSettingsBuilder.build();
112116
* </code>
113117
* </pre>

google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorSettings.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,12 @@
5151
* <code>
5252
* ImageAnnotatorSettings.Builder imageAnnotatorSettingsBuilder =
5353
* ImageAnnotatorSettings.newBuilder();
54-
* imageAnnotatorSettingsBuilder.batchAnnotateImagesSettings().getRetrySettings().toBuilder()
55-
* .setTotalTimeout(Duration.ofSeconds(30));
54+
* imageAnnotatorSettingsBuilder
55+
* .batchAnnotateImagesSettings()
56+
* .setRetrySettings(
57+
* imageAnnotatorSettingsBuilder.batchAnnotateImagesSettings().getRetrySettings().toBuilder()
58+
* .setTotalTimeout(Duration.ofSeconds(30))
59+
* .build());
5660
* ImageAnnotatorSettings imageAnnotatorSettings = imageAnnotatorSettingsBuilder.build();
5761
* </code>
5862
* </pre>

google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/stub/ImageAnnotatorStubSettings.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,12 @@
6262
* <code>
6363
* ImageAnnotatorStubSettings.Builder imageAnnotatorSettingsBuilder =
6464
* ImageAnnotatorStubSettings.newBuilder();
65-
* imageAnnotatorSettingsBuilder.batchAnnotateImagesSettings().getRetrySettings().toBuilder()
66-
* .setTotalTimeout(Duration.ofSeconds(30));
65+
* imageAnnotatorSettingsBuilder
66+
* .batchAnnotateImagesSettings()
67+
* .setRetrySettings(
68+
* imageAnnotatorSettingsBuilder.batchAnnotateImagesSettings().getRetrySettings().toBuilder()
69+
* .setTotalTimeout(Duration.ofSeconds(30))
70+
* .build());
6771
* ImageAnnotatorStubSettings imageAnnotatorSettings = imageAnnotatorSettingsBuilder.build();
6872
* </code>
6973
* </pre>

google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotatorSettings.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,12 @@
5353
* <code>
5454
* ImageAnnotatorSettings.Builder imageAnnotatorSettingsBuilder =
5555
* ImageAnnotatorSettings.newBuilder();
56-
* imageAnnotatorSettingsBuilder.batchAnnotateImagesSettings().getRetrySettings().toBuilder()
57-
* .setTotalTimeout(Duration.ofSeconds(30));
56+
* imageAnnotatorSettingsBuilder
57+
* .batchAnnotateImagesSettings()
58+
* .setRetrySettings(
59+
* imageAnnotatorSettingsBuilder.batchAnnotateImagesSettings().getRetrySettings().toBuilder()
60+
* .setTotalTimeout(Duration.ofSeconds(30))
61+
* .build());
5862
* ImageAnnotatorSettings imageAnnotatorSettings = imageAnnotatorSettingsBuilder.build();
5963
* </code>
6064
* </pre>

google-cloud-vision/src/main/java/com/google/cloud/vision/v1p2beta1/stub/ImageAnnotatorStubSettings.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,12 @@
7070
* <code>
7171
* ImageAnnotatorStubSettings.Builder imageAnnotatorSettingsBuilder =
7272
* ImageAnnotatorStubSettings.newBuilder();
73-
* imageAnnotatorSettingsBuilder.batchAnnotateImagesSettings().getRetrySettings().toBuilder()
74-
* .setTotalTimeout(Duration.ofSeconds(30));
73+
* imageAnnotatorSettingsBuilder
74+
* .batchAnnotateImagesSettings()
75+
* .setRetrySettings(
76+
* imageAnnotatorSettingsBuilder.batchAnnotateImagesSettings().getRetrySettings().toBuilder()
77+
* .setTotalTimeout(Duration.ofSeconds(30))
78+
* .build());
7579
* ImageAnnotatorStubSettings imageAnnotatorSettings = imageAnnotatorSettingsBuilder.build();
7680
* </code>
7781
* </pre>

google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorSettings.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,12 @@
5353
* <code>
5454
* ImageAnnotatorSettings.Builder imageAnnotatorSettingsBuilder =
5555
* ImageAnnotatorSettings.newBuilder();
56-
* imageAnnotatorSettingsBuilder.batchAnnotateImagesSettings().getRetrySettings().toBuilder()
57-
* .setTotalTimeout(Duration.ofSeconds(30));
56+
* imageAnnotatorSettingsBuilder
57+
* .batchAnnotateImagesSettings()
58+
* .setRetrySettings(
59+
* imageAnnotatorSettingsBuilder.batchAnnotateImagesSettings().getRetrySettings().toBuilder()
60+
* .setTotalTimeout(Duration.ofSeconds(30))
61+
* .build());
5862
* ImageAnnotatorSettings imageAnnotatorSettings = imageAnnotatorSettingsBuilder.build();
5963
* </code>
6064
* </pre>

google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchSettings.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,12 @@
6060
* <code>
6161
* ProductSearchSettings.Builder productSearchSettingsBuilder =
6262
* ProductSearchSettings.newBuilder();
63-
* productSearchSettingsBuilder.createProductSetSettings().getRetrySettings().toBuilder()
64-
* .setTotalTimeout(Duration.ofSeconds(30));
63+
* productSearchSettingsBuilder
64+
* .createProductSetSettings()
65+
* .setRetrySettings(
66+
* productSearchSettingsBuilder.createProductSetSettings().getRetrySettings().toBuilder()
67+
* .setTotalTimeout(Duration.ofSeconds(30))
68+
* .build());
6569
* ProductSearchSettings productSearchSettings = productSearchSettingsBuilder.build();
6670
* </code>
6771
* </pre>

0 commit comments

Comments
 (0)