Skip to content

Commit a7e4fd6

Browse files
chore: Update generation configuration at Wed Sep 11 02:19:33 UTC 2024 (#2701)
* chore: Update generation configuration at Wed Sep 11 02:19:33 UTC 2024 * chore: generate libraries at Wed Sep 11 02:20:01 UTC 2024
1 parent 3432345 commit a7e4fd6

File tree

5 files changed

+120
-28
lines changed

5 files changed

+120
-28
lines changed

gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageSettings.java

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@
5959
* <p>The builder of this class is recursive, so contained classes are themselves builders. When
6060
* build() is called, the tree of builders is called to create the complete settings object.
6161
*
62-
* <p>For example, to set the total timeout of deleteBucket to 30 seconds:
62+
* <p>For example, to set the
63+
* [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings)
64+
* of deleteBucket:
6365
*
6466
* <pre>{@code
6567
* // This snippet has been automatically generated and should be regarded as a code template only.
@@ -75,10 +77,21 @@
7577
* .deleteBucketSettings()
7678
* .getRetrySettings()
7779
* .toBuilder()
78-
* .setTotalTimeout(Duration.ofSeconds(30))
80+
* .setInitialRetryDelayDuration(Duration.ofSeconds(1))
81+
* .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
82+
* .setMaxAttempts(5)
83+
* .setMaxRetryDelayDuration(Duration.ofSeconds(30))
84+
* .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
85+
* .setRetryDelayMultiplier(1.3)
86+
* .setRpcTimeoutMultiplier(1.5)
87+
* .setTotalTimeoutDuration(Duration.ofSeconds(300))
7988
* .build());
8089
* StorageSettings storageSettings = storageSettingsBuilder.build();
8190
* }</pre>
91+
*
92+
* Please refer to the [Client Side Retry
93+
* Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for
94+
* additional support in setting retries.
8295
*/
8396
@Generated("by gapic-generator-java")
8497
public class StorageSettings extends ClientSettings<StorageSettings> {

gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/StorageStubSettings.java

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,9 @@
121121
* <p>The builder of this class is recursive, so contained classes are themselves builders. When
122122
* build() is called, the tree of builders is called to create the complete settings object.
123123
*
124-
* <p>For example, to set the total timeout of deleteBucket to 30 seconds:
124+
* <p>For example, to set the
125+
* [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings)
126+
* of deleteBucket:
125127
*
126128
* <pre>{@code
127129
* // This snippet has been automatically generated and should be regarded as a code template only.
@@ -137,10 +139,21 @@
137139
* .deleteBucketSettings()
138140
* .getRetrySettings()
139141
* .toBuilder()
140-
* .setTotalTimeout(Duration.ofSeconds(30))
142+
* .setInitialRetryDelayDuration(Duration.ofSeconds(1))
143+
* .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
144+
* .setMaxAttempts(5)
145+
* .setMaxRetryDelayDuration(Duration.ofSeconds(30))
146+
* .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
147+
* .setRetryDelayMultiplier(1.3)
148+
* .setRpcTimeoutMultiplier(1.5)
149+
* .setTotalTimeoutDuration(Duration.ofSeconds(300))
141150
* .build());
142151
* StorageStubSettings storageSettings = storageSettingsBuilder.build();
143152
* }</pre>
153+
*
154+
* Please refer to the [Client Side Retry
155+
* Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for
156+
* additional support in setting retries.
144157
*/
145158
@Generated("by gapic-generator-java")
146159
public class StorageStubSettings extends StubSettings<StorageStubSettings> {
@@ -237,9 +250,7 @@ public String extractNextToken(ListBucketsResponse payload) {
237250

238251
@Override
239252
public Iterable<Bucket> extractResources(ListBucketsResponse payload) {
240-
return payload.getBucketsList() == null
241-
? ImmutableList.<Bucket>of()
242-
: payload.getBucketsList();
253+
return payload.getBucketsList();
243254
}
244255
};
245256

@@ -282,9 +293,7 @@ public String extractNextToken(ListNotificationConfigsResponse payload) {
282293
@Override
283294
public Iterable<NotificationConfig> extractResources(
284295
ListNotificationConfigsResponse payload) {
285-
return payload.getNotificationConfigsList() == null
286-
? ImmutableList.<NotificationConfig>of()
287-
: payload.getNotificationConfigsList();
296+
return payload.getNotificationConfigsList();
288297
}
289298
};
290299

@@ -318,9 +327,7 @@ public String extractNextToken(ListObjectsResponse payload) {
318327

319328
@Override
320329
public Iterable<Object> extractResources(ListObjectsResponse payload) {
321-
return payload.getObjectsList() == null
322-
? ImmutableList.<Object>of()
323-
: payload.getObjectsList();
330+
return payload.getObjectsList();
324331
}
325332
};
326333

@@ -355,9 +362,7 @@ public String extractNextToken(ListHmacKeysResponse payload) {
355362

356363
@Override
357364
public Iterable<HmacKeyMetadata> extractResources(ListHmacKeysResponse payload) {
358-
return payload.getHmacKeysList() == null
359-
? ImmutableList.<HmacKeyMetadata>of()
360-
: payload.getHmacKeysList();
365+
return payload.getHmacKeysList();
361366
}
362367
};
363368

generation_config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
gapic_generator_version: 2.44.0
2-
googleapis_commitish: b83ceb6200f3af1dfab314583622452f4e514231
1+
gapic_generator_version: 2.45.0
2+
googleapis_commitish: cbf696d38a963c5ab333f85fc9a910b5698ad415
33
libraries_bom_version: 26.45.0
44
libraries:
55
- api_shortname: storage

google-cloud-storage-control/src/main/java/com/google/storage/control/v2/StorageControlSettings.java

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@
5252
* <p>The builder of this class is recursive, so contained classes are themselves builders. When
5353
* build() is called, the tree of builders is called to create the complete settings object.
5454
*
55-
* <p>For example, to set the total timeout of createFolder to 30 seconds:
55+
* <p>For example, to set the
56+
* [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings)
57+
* of createFolder:
5658
*
5759
* <pre>{@code
5860
* // This snippet has been automatically generated and should be regarded as a code template only.
@@ -69,10 +71,47 @@
6971
* .createFolderSettings()
7072
* .getRetrySettings()
7173
* .toBuilder()
72-
* .setTotalTimeout(Duration.ofSeconds(30))
74+
* .setInitialRetryDelayDuration(Duration.ofSeconds(1))
75+
* .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
76+
* .setMaxAttempts(5)
77+
* .setMaxRetryDelayDuration(Duration.ofSeconds(30))
78+
* .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
79+
* .setRetryDelayMultiplier(1.3)
80+
* .setRpcTimeoutMultiplier(1.5)
81+
* .setTotalTimeoutDuration(Duration.ofSeconds(300))
7382
* .build());
7483
* StorageControlSettings storageControlSettings = storageControlSettingsBuilder.build();
7584
* }</pre>
85+
*
86+
* Please refer to the [Client Side Retry
87+
* Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for
88+
* additional support in setting retries.
89+
*
90+
* <p>To configure the RetrySettings of a Long Running Operation method, create an
91+
* OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to
92+
* configure the RetrySettings for renameFolder:
93+
*
94+
* <pre>{@code
95+
* // This snippet has been automatically generated and should be regarded as a code template only.
96+
* // It will require modifications to work:
97+
* // - It may require correct/in-range values for request initialization.
98+
* // - It may require specifying regional endpoints when creating the service client as shown in
99+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
100+
* StorageControlSettings.Builder storageControlSettingsBuilder =
101+
* StorageControlSettings.newBuilder();
102+
* TimedRetryAlgorithm timedRetryAlgorithm =
103+
* OperationalTimedPollAlgorithm.create(
104+
* RetrySettings.newBuilder()
105+
* .setInitialRetryDelayDuration(Duration.ofMillis(500))
106+
* .setRetryDelayMultiplier(1.5)
107+
* .setMaxRetryDelay(Duration.ofMillis(5000))
108+
* .setTotalTimeoutDuration(Duration.ofHours(24))
109+
* .build());
110+
* storageControlSettingsBuilder
111+
* .createClusterOperationSettings()
112+
* .setPollingAlgorithm(timedRetryAlgorithm)
113+
* .build();
114+
* }</pre>
76115
*/
77116
@Generated("by gapic-generator-java")
78117
public class StorageControlSettings extends ClientSettings<StorageControlSettings> {

google-cloud-storage-control/src/main/java/com/google/storage/control/v2/stub/StorageControlStubSettings.java

Lines changed: 43 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,9 @@
8787
* <p>The builder of this class is recursive, so contained classes are themselves builders. When
8888
* build() is called, the tree of builders is called to create the complete settings object.
8989
*
90-
* <p>For example, to set the total timeout of createFolder to 30 seconds:
90+
* <p>For example, to set the
91+
* [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings)
92+
* of createFolder:
9193
*
9294
* <pre>{@code
9395
* // This snippet has been automatically generated and should be regarded as a code template only.
@@ -104,10 +106,47 @@
104106
* .createFolderSettings()
105107
* .getRetrySettings()
106108
* .toBuilder()
107-
* .setTotalTimeout(Duration.ofSeconds(30))
109+
* .setInitialRetryDelayDuration(Duration.ofSeconds(1))
110+
* .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
111+
* .setMaxAttempts(5)
112+
* .setMaxRetryDelayDuration(Duration.ofSeconds(30))
113+
* .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
114+
* .setRetryDelayMultiplier(1.3)
115+
* .setRpcTimeoutMultiplier(1.5)
116+
* .setTotalTimeoutDuration(Duration.ofSeconds(300))
108117
* .build());
109118
* StorageControlStubSettings storageControlSettings = storageControlSettingsBuilder.build();
110119
* }</pre>
120+
*
121+
* Please refer to the [Client Side Retry
122+
* Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for
123+
* additional support in setting retries.
124+
*
125+
* <p>To configure the RetrySettings of a Long Running Operation method, create an
126+
* OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to
127+
* configure the RetrySettings for renameFolder:
128+
*
129+
* <pre>{@code
130+
* // This snippet has been automatically generated and should be regarded as a code template only.
131+
* // It will require modifications to work:
132+
* // - It may require correct/in-range values for request initialization.
133+
* // - It may require specifying regional endpoints when creating the service client as shown in
134+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
135+
* StorageControlStubSettings.Builder storageControlSettingsBuilder =
136+
* StorageControlStubSettings.newBuilder();
137+
* TimedRetryAlgorithm timedRetryAlgorithm =
138+
* OperationalTimedPollAlgorithm.create(
139+
* RetrySettings.newBuilder()
140+
* .setInitialRetryDelayDuration(Duration.ofMillis(500))
141+
* .setRetryDelayMultiplier(1.5)
142+
* .setMaxRetryDelay(Duration.ofMillis(5000))
143+
* .setTotalTimeoutDuration(Duration.ofHours(24))
144+
* .build());
145+
* storageControlSettingsBuilder
146+
* .createClusterOperationSettings()
147+
* .setPollingAlgorithm(timedRetryAlgorithm)
148+
* .build();
149+
* }</pre>
111150
*/
112151
@Generated("by gapic-generator-java")
113152
public class StorageControlStubSettings extends StubSettings<StorageControlStubSettings> {
@@ -168,9 +207,7 @@ public String extractNextToken(ListFoldersResponse payload) {
168207

169208
@Override
170209
public Iterable<Folder> extractResources(ListFoldersResponse payload) {
171-
return payload.getFoldersList() == null
172-
? ImmutableList.<Folder>of()
173-
: payload.getFoldersList();
210+
return payload.getFoldersList();
174211
}
175212
};
176213

@@ -208,9 +245,7 @@ public String extractNextToken(ListManagedFoldersResponse payload) {
208245

209246
@Override
210247
public Iterable<ManagedFolder> extractResources(ListManagedFoldersResponse payload) {
211-
return payload.getManagedFoldersList() == null
212-
? ImmutableList.<ManagedFolder>of()
213-
: payload.getManagedFoldersList();
248+
return payload.getManagedFoldersList();
214249
}
215250
};
216251

0 commit comments

Comments
 (0)