2121import static com .google .cloud .kms .v1 .KeyManagementServiceClient .ListImportJobsPagedResponse ;
2222import static com .google .cloud .kms .v1 .KeyManagementServiceClient .ListKeyRingsPagedResponse ;
2323import static com .google .cloud .kms .v1 .KeyManagementServiceClient .ListLocationsPagedResponse ;
24+ import static com .google .cloud .kms .v1 .KeyManagementServiceClient .ListRetiredResourcesPagedResponse ;
2425
2526import com .google .api .core .ApiFunction ;
2627import com .google .api .core .BetaApi ;
3132import com .google .api .gax .rpc .ApiClientHeaderProvider ;
3233import com .google .api .gax .rpc .ClientContext ;
3334import com .google .api .gax .rpc .ClientSettings ;
35+ import com .google .api .gax .rpc .OperationCallSettings ;
3436import com .google .api .gax .rpc .PagedCallSettings ;
3537import com .google .api .gax .rpc .TransportChannelProvider ;
3638import com .google .api .gax .rpc .UnaryCallSettings ;
4446import com .google .iam .v1 .SetIamPolicyRequest ;
4547import com .google .iam .v1 .TestIamPermissionsRequest ;
4648import com .google .iam .v1 .TestIamPermissionsResponse ;
49+ import com .google .longrunning .Operation ;
50+ import com .google .protobuf .Empty ;
4751import java .io .IOException ;
4852import java .util .List ;
4953import javax .annotation .Generated ;
98102 * Please refer to the [Client Side Retry
99103 * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting
100104 * retries.
105+ *
106+ * <p>To configure the RetrySettings of a Long Running Operation method, create an
107+ * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to
108+ * configure the RetrySettings for deleteCryptoKey:
109+ *
110+ * <pre>{@code
111+ * // This snippet has been automatically generated and should be regarded as a code template only.
112+ * // It will require modifications to work:
113+ * // - It may require correct/in-range values for request initialization.
114+ * // - It may require specifying regional endpoints when creating the service client as shown in
115+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
116+ * KeyManagementServiceSettings.Builder keyManagementServiceSettingsBuilder =
117+ * KeyManagementServiceSettings.newBuilder();
118+ * TimedRetryAlgorithm timedRetryAlgorithm =
119+ * OperationalTimedPollAlgorithm.create(
120+ * RetrySettings.newBuilder()
121+ * .setInitialRetryDelayDuration(Duration.ofMillis(500))
122+ * .setRetryDelayMultiplier(1.5)
123+ * .setMaxRetryDelayDuration(Duration.ofMillis(5000))
124+ * .setTotalTimeoutDuration(Duration.ofHours(24))
125+ * .build());
126+ * keyManagementServiceSettingsBuilder
127+ * .createClusterOperationSettings()
128+ * .setPollingAlgorithm(timedRetryAlgorithm)
129+ * .build();
130+ * }</pre>
101131 */
102132@ Generated ("by gapic-generator-java" )
103133public class KeyManagementServiceSettings extends ClientSettings <KeyManagementServiceSettings > {
@@ -131,6 +161,15 @@ public class KeyManagementServiceSettings extends ClientSettings<KeyManagementSe
131161 return ((KeyManagementServiceStubSettings ) getStubSettings ()).listImportJobsSettings ();
132162 }
133163
164+ /** Returns the object with the settings used for calls to listRetiredResources. */
165+ public PagedCallSettings <
166+ ListRetiredResourcesRequest ,
167+ ListRetiredResourcesResponse ,
168+ ListRetiredResourcesPagedResponse >
169+ listRetiredResourcesSettings () {
170+ return ((KeyManagementServiceStubSettings ) getStubSettings ()).listRetiredResourcesSettings ();
171+ }
172+
134173 /** Returns the object with the settings used for calls to getKeyRing. */
135174 public UnaryCallSettings <GetKeyRingRequest , KeyRing > getKeyRingSettings () {
136175 return ((KeyManagementServiceStubSettings ) getStubSettings ()).getKeyRingSettings ();
@@ -157,6 +196,12 @@ public UnaryCallSettings<GetImportJobRequest, ImportJob> getImportJobSettings()
157196 return ((KeyManagementServiceStubSettings ) getStubSettings ()).getImportJobSettings ();
158197 }
159198
199+ /** Returns the object with the settings used for calls to getRetiredResource. */
200+ public UnaryCallSettings <GetRetiredResourceRequest , RetiredResource >
201+ getRetiredResourceSettings () {
202+ return ((KeyManagementServiceStubSettings ) getStubSettings ()).getRetiredResourceSettings ();
203+ }
204+
160205 /** Returns the object with the settings used for calls to createKeyRing. */
161206 public UnaryCallSettings <CreateKeyRingRequest , KeyRing > createKeyRingSettings () {
162207 return ((KeyManagementServiceStubSettings ) getStubSettings ()).createKeyRingSettings ();
@@ -173,6 +218,31 @@ public UnaryCallSettings<CreateCryptoKeyRequest, CryptoKey> createCryptoKeySetti
173218 return ((KeyManagementServiceStubSettings ) getStubSettings ()).createCryptoKeyVersionSettings ();
174219 }
175220
221+ /** Returns the object with the settings used for calls to deleteCryptoKey. */
222+ public UnaryCallSettings <DeleteCryptoKeyRequest , Operation > deleteCryptoKeySettings () {
223+ return ((KeyManagementServiceStubSettings ) getStubSettings ()).deleteCryptoKeySettings ();
224+ }
225+
226+ /** Returns the object with the settings used for calls to deleteCryptoKey. */
227+ public OperationCallSettings <DeleteCryptoKeyRequest , Empty , DeleteCryptoKeyMetadata >
228+ deleteCryptoKeyOperationSettings () {
229+ return ((KeyManagementServiceStubSettings ) getStubSettings ())
230+ .deleteCryptoKeyOperationSettings ();
231+ }
232+
233+ /** Returns the object with the settings used for calls to deleteCryptoKeyVersion. */
234+ public UnaryCallSettings <DeleteCryptoKeyVersionRequest , Operation >
235+ deleteCryptoKeyVersionSettings () {
236+ return ((KeyManagementServiceStubSettings ) getStubSettings ()).deleteCryptoKeyVersionSettings ();
237+ }
238+
239+ /** Returns the object with the settings used for calls to deleteCryptoKeyVersion. */
240+ public OperationCallSettings <DeleteCryptoKeyVersionRequest , Empty , DeleteCryptoKeyVersionMetadata >
241+ deleteCryptoKeyVersionOperationSettings () {
242+ return ((KeyManagementServiceStubSettings ) getStubSettings ())
243+ .deleteCryptoKeyVersionOperationSettings ();
244+ }
245+
176246 /** Returns the object with the settings used for calls to importCryptoKeyVersion. */
177247 public UnaryCallSettings <ImportCryptoKeyVersionRequest , CryptoKeyVersion >
178248 importCryptoKeyVersionSettings () {
@@ -436,6 +506,15 @@ public Builder applyToAllUnaryMethods(
436506 return getStubSettingsBuilder ().listImportJobsSettings ();
437507 }
438508
509+ /** Returns the builder for the settings used for calls to listRetiredResources. */
510+ public PagedCallSettings .Builder <
511+ ListRetiredResourcesRequest ,
512+ ListRetiredResourcesResponse ,
513+ ListRetiredResourcesPagedResponse >
514+ listRetiredResourcesSettings () {
515+ return getStubSettingsBuilder ().listRetiredResourcesSettings ();
516+ }
517+
439518 /** Returns the builder for the settings used for calls to getKeyRing. */
440519 public UnaryCallSettings .Builder <GetKeyRingRequest , KeyRing > getKeyRingSettings () {
441520 return getStubSettingsBuilder ().getKeyRingSettings ();
@@ -462,6 +541,12 @@ public UnaryCallSettings.Builder<GetImportJobRequest, ImportJob> getImportJobSet
462541 return getStubSettingsBuilder ().getImportJobSettings ();
463542 }
464543
544+ /** Returns the builder for the settings used for calls to getRetiredResource. */
545+ public UnaryCallSettings .Builder <GetRetiredResourceRequest , RetiredResource >
546+ getRetiredResourceSettings () {
547+ return getStubSettingsBuilder ().getRetiredResourceSettings ();
548+ }
549+
465550 /** Returns the builder for the settings used for calls to createKeyRing. */
466551 public UnaryCallSettings .Builder <CreateKeyRingRequest , KeyRing > createKeyRingSettings () {
467552 return getStubSettingsBuilder ().createKeyRingSettings ();
@@ -478,6 +563,30 @@ public UnaryCallSettings.Builder<CreateCryptoKeyRequest, CryptoKey> createCrypto
478563 return getStubSettingsBuilder ().createCryptoKeyVersionSettings ();
479564 }
480565
566+ /** Returns the builder for the settings used for calls to deleteCryptoKey. */
567+ public UnaryCallSettings .Builder <DeleteCryptoKeyRequest , Operation > deleteCryptoKeySettings () {
568+ return getStubSettingsBuilder ().deleteCryptoKeySettings ();
569+ }
570+
571+ /** Returns the builder for the settings used for calls to deleteCryptoKey. */
572+ public OperationCallSettings .Builder <DeleteCryptoKeyRequest , Empty , DeleteCryptoKeyMetadata >
573+ deleteCryptoKeyOperationSettings () {
574+ return getStubSettingsBuilder ().deleteCryptoKeyOperationSettings ();
575+ }
576+
577+ /** Returns the builder for the settings used for calls to deleteCryptoKeyVersion. */
578+ public UnaryCallSettings .Builder <DeleteCryptoKeyVersionRequest , Operation >
579+ deleteCryptoKeyVersionSettings () {
580+ return getStubSettingsBuilder ().deleteCryptoKeyVersionSettings ();
581+ }
582+
583+ /** Returns the builder for the settings used for calls to deleteCryptoKeyVersion. */
584+ public OperationCallSettings .Builder <
585+ DeleteCryptoKeyVersionRequest , Empty , DeleteCryptoKeyVersionMetadata >
586+ deleteCryptoKeyVersionOperationSettings () {
587+ return getStubSettingsBuilder ().deleteCryptoKeyVersionOperationSettings ();
588+ }
589+
481590 /** Returns the builder for the settings used for calls to importCryptoKeyVersion. */
482591 public UnaryCallSettings .Builder <ImportCryptoKeyVersionRequest , CryptoKeyVersion >
483592 importCryptoKeyVersionSettings () {
0 commit comments