45
45
import com .google .api .gax .rpc .UnaryCallSettings ;
46
46
import com .google .api .gax .rpc .UnaryCallable ;
47
47
import com .google .cloud .memcache .v1beta2 .ApplyParametersRequest ;
48
+ import com .google .cloud .memcache .v1beta2 .ApplySoftwareUpdateRequest ;
48
49
import com .google .cloud .memcache .v1beta2 .CreateInstanceRequest ;
49
50
import com .google .cloud .memcache .v1beta2 .DeleteInstanceRequest ;
50
51
import com .google .cloud .memcache .v1beta2 .GetInstanceRequest ;
@@ -123,6 +124,10 @@ public class CloudMemcacheStubSettings extends StubSettings<CloudMemcacheStubSet
123
124
private final UnaryCallSettings <ApplyParametersRequest , Operation > applyParametersSettings ;
124
125
private final OperationCallSettings <ApplyParametersRequest , Instance , OperationMetadata >
125
126
applyParametersOperationSettings ;
127
+ private final UnaryCallSettings <ApplySoftwareUpdateRequest , Operation >
128
+ applySoftwareUpdateSettings ;
129
+ private final OperationCallSettings <ApplySoftwareUpdateRequest , Instance , OperationMetadata >
130
+ applySoftwareUpdateOperationSettings ;
126
131
127
132
private static final PagedListDescriptor <ListInstancesRequest , ListInstancesResponse , Instance >
128
133
LIST_INSTANCES_PAGE_STR_DESC =
@@ -243,6 +248,17 @@ public UnaryCallSettings<ApplyParametersRequest, Operation> applyParametersSetti
243
248
return applyParametersOperationSettings ;
244
249
}
245
250
251
+ /** Returns the object with the settings used for calls to applySoftwareUpdate. */
252
+ public UnaryCallSettings <ApplySoftwareUpdateRequest , Operation > applySoftwareUpdateSettings () {
253
+ return applySoftwareUpdateSettings ;
254
+ }
255
+
256
+ /** Returns the object with the settings used for calls to applySoftwareUpdate. */
257
+ public OperationCallSettings <ApplySoftwareUpdateRequest , Instance , OperationMetadata >
258
+ applySoftwareUpdateOperationSettings () {
259
+ return applySoftwareUpdateOperationSettings ;
260
+ }
261
+
246
262
@ BetaApi ("A restructuring of stub classes is planned, so this may break in the future" )
247
263
public CloudMemcacheStub createStub () throws IOException {
248
264
if (getTransportChannelProvider ()
@@ -324,6 +340,9 @@ protected CloudMemcacheStubSettings(Builder settingsBuilder) throws IOException
324
340
deleteInstanceOperationSettings = settingsBuilder .deleteInstanceOperationSettings ().build ();
325
341
applyParametersSettings = settingsBuilder .applyParametersSettings ().build ();
326
342
applyParametersOperationSettings = settingsBuilder .applyParametersOperationSettings ().build ();
343
+ applySoftwareUpdateSettings = settingsBuilder .applySoftwareUpdateSettings ().build ();
344
+ applySoftwareUpdateOperationSettings =
345
+ settingsBuilder .applySoftwareUpdateOperationSettings ().build ();
327
346
}
328
347
329
348
/** Builder for CloudMemcacheStubSettings. */
@@ -354,6 +373,11 @@ public static class Builder extends StubSettings.Builder<CloudMemcacheStubSettin
354
373
applyParametersSettings ;
355
374
private final OperationCallSettings .Builder <ApplyParametersRequest , Instance , OperationMetadata >
356
375
applyParametersOperationSettings ;
376
+ private final UnaryCallSettings .Builder <ApplySoftwareUpdateRequest , Operation >
377
+ applySoftwareUpdateSettings ;
378
+ private final OperationCallSettings .Builder <
379
+ ApplySoftwareUpdateRequest , Instance , OperationMetadata >
380
+ applySoftwareUpdateOperationSettings ;
357
381
private static final ImmutableMap <String , ImmutableSet <StatusCode .Code >>
358
382
RETRYABLE_CODE_DEFINITIONS ;
359
383
@@ -400,6 +424,8 @@ protected Builder(ClientContext clientContext) {
400
424
deleteInstanceOperationSettings = OperationCallSettings .newBuilder ();
401
425
applyParametersSettings = UnaryCallSettings .newUnaryCallSettingsBuilder ();
402
426
applyParametersOperationSettings = OperationCallSettings .newBuilder ();
427
+ applySoftwareUpdateSettings = UnaryCallSettings .newUnaryCallSettingsBuilder ();
428
+ applySoftwareUpdateOperationSettings = OperationCallSettings .newBuilder ();
403
429
404
430
unaryMethodSettingsBuilders =
405
431
ImmutableList .<UnaryCallSettings .Builder <?, ?>>of (
@@ -409,7 +435,8 @@ protected Builder(ClientContext clientContext) {
409
435
updateInstanceSettings ,
410
436
updateParametersSettings ,
411
437
deleteInstanceSettings ,
412
- applyParametersSettings );
438
+ applyParametersSettings ,
439
+ applySoftwareUpdateSettings );
413
440
initDefaults (this );
414
441
}
415
442
@@ -428,6 +455,9 @@ protected Builder(CloudMemcacheStubSettings settings) {
428
455
deleteInstanceOperationSettings = settings .deleteInstanceOperationSettings .toBuilder ();
429
456
applyParametersSettings = settings .applyParametersSettings .toBuilder ();
430
457
applyParametersOperationSettings = settings .applyParametersOperationSettings .toBuilder ();
458
+ applySoftwareUpdateSettings = settings .applySoftwareUpdateSettings .toBuilder ();
459
+ applySoftwareUpdateOperationSettings =
460
+ settings .applySoftwareUpdateOperationSettings .toBuilder ();
431
461
432
462
unaryMethodSettingsBuilders =
433
463
ImmutableList .<UnaryCallSettings .Builder <?, ?>>of (
@@ -437,7 +467,8 @@ protected Builder(CloudMemcacheStubSettings settings) {
437
467
updateInstanceSettings ,
438
468
updateParametersSettings ,
439
469
deleteInstanceSettings ,
440
- applyParametersSettings );
470
+ applyParametersSettings ,
471
+ applySoftwareUpdateSettings );
441
472
}
442
473
443
474
private static Builder createDefault () {
@@ -487,6 +518,11 @@ private static Builder initDefaults(Builder builder) {
487
518
.setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("no_retry_0_codes" ))
488
519
.setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("no_retry_0_params" ));
489
520
521
+ builder
522
+ .applySoftwareUpdateSettings ()
523
+ .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("no_retry_0_codes" ))
524
+ .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("no_retry_0_params" ));
525
+
490
526
builder
491
527
.createInstanceOperationSettings ()
492
528
.setInitialCallSettings (
@@ -607,6 +643,30 @@ private static Builder initDefaults(Builder builder) {
607
643
.setTotalTimeout (Duration .ofMillis (300000L ))
608
644
.build ()));
609
645
646
+ builder
647
+ .applySoftwareUpdateOperationSettings ()
648
+ .setInitialCallSettings (
649
+ UnaryCallSettings
650
+ .<ApplySoftwareUpdateRequest , OperationSnapshot >newUnaryCallSettingsBuilder ()
651
+ .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("no_retry_0_codes" ))
652
+ .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("no_retry_0_params" ))
653
+ .build ())
654
+ .setResponseTransformer (
655
+ ProtoOperationTransformers .ResponseTransformer .create (Instance .class ))
656
+ .setMetadataTransformer (
657
+ ProtoOperationTransformers .MetadataTransformer .create (OperationMetadata .class ))
658
+ .setPollingAlgorithm (
659
+ OperationTimedPollAlgorithm .create (
660
+ RetrySettings .newBuilder ()
661
+ .setInitialRetryDelay (Duration .ofMillis (5000L ))
662
+ .setRetryDelayMultiplier (1.5 )
663
+ .setMaxRetryDelay (Duration .ofMillis (45000L ))
664
+ .setInitialRpcTimeout (Duration .ZERO )
665
+ .setRpcTimeoutMultiplier (1.0 )
666
+ .setMaxRpcTimeout (Duration .ZERO )
667
+ .setTotalTimeout (Duration .ofMillis (300000L ))
668
+ .build ()));
669
+
610
670
return builder ;
611
671
}
612
672
@@ -704,6 +764,20 @@ public UnaryCallSettings.Builder<ApplyParametersRequest, Operation> applyParamet
704
764
return applyParametersOperationSettings ;
705
765
}
706
766
767
+ /** Returns the builder for the settings used for calls to applySoftwareUpdate. */
768
+ public UnaryCallSettings .Builder <ApplySoftwareUpdateRequest , Operation >
769
+ applySoftwareUpdateSettings () {
770
+ return applySoftwareUpdateSettings ;
771
+ }
772
+
773
+ /** Returns the builder for the settings used for calls to applySoftwareUpdate. */
774
+ @ BetaApi (
775
+ "The surface for use by generated code is not stable yet and may change in the future." )
776
+ public OperationCallSettings .Builder <ApplySoftwareUpdateRequest , Instance , OperationMetadata >
777
+ applySoftwareUpdateOperationSettings () {
778
+ return applySoftwareUpdateOperationSettings ;
779
+ }
780
+
707
781
@ Override
708
782
public CloudMemcacheStubSettings build () throws IOException {
709
783
return new CloudMemcacheStubSettings (this );
0 commit comments