From 3f895447dec5d79d7b60907a629873de5dbdfa16 Mon Sep 17 00:00:00 2001
From: cloud-java-bot <122572305+cloud-java-bot@users.noreply.github.com>
Date: Tue, 19 Mar 2024 10:36:05 -0400
Subject: [PATCH] chore: generate libraries at Tue Mar 19 03:05:28 UTC 2024
(#10565)
---
generation_config.yaml | 2 +-
.../v1/CertificateManagerClient.java | 1051 ++-
.../v1/CertificateManagerSettings.java | 97 +
.../certificatemanager/v1/gapic_metadata.json | 15 +
.../v1/stub/CertificateManagerStub.java | 52 +
.../stub/CertificateManagerStubSettings.java | 326 +
.../v1/stub/GrpcCertificateManagerStub.java | 222 +
.../stub/HttpJsonCertificateManagerStub.java | 376 +
.../reflect-config.json | 189 +
.../CertificateManagerClientHttpJsonTest.java | 486 ++
.../v1/CertificateManagerClientTest.java | 434 ++
.../v1/MockCertificateManagerImpl.java | 105 +
.../v1/CertificateManagerGrpc.java | 592 ++
.../certificatemanager/v1/Certificate.java | 38 +-
.../v1/CertificateManagerProto.java | 789 ++-
.../v1/CreateTrustConfigRequest.java | 1149 ++++
.../v1/CreateTrustConfigRequestOrBuilder.java | 125 +
.../v1/DeleteTrustConfigRequest.java | 850 +++
.../v1/DeleteTrustConfigRequestOrBuilder.java | 86 +
.../v1/DnsAuthorization.java | 347 +
.../v1/DnsAuthorizationOrBuilder.java | 33 +
.../v1/GetTrustConfigRequest.java | 651 ++
.../v1/GetTrustConfigRequestOrBuilder.java | 57 +
...ListCertificateIssuanceConfigsRequest.java | 14 +-
...ficateIssuanceConfigsRequestOrBuilder.java | 4 +-
.../v1/ListCertificateMapEntriesRequest.java | 14 +-
...CertificateMapEntriesRequestOrBuilder.java | 4 +-
.../v1/ListCertificateMapsRequest.java | 14 +-
.../ListCertificateMapsRequestOrBuilder.java | 4 +-
.../v1/ListCertificatesRequest.java | 14 +-
.../v1/ListCertificatesRequestOrBuilder.java | 4 +-
.../v1/ListDnsAuthorizationsRequest.java | 14 +-
...ListDnsAuthorizationsRequestOrBuilder.java | 4 +-
.../v1/ListTrustConfigsRequest.java | 1320 ++++
.../v1/ListTrustConfigsRequestOrBuilder.java | 153 +
.../v1/ListTrustConfigsResponse.java | 1429 ++++
.../v1/ListTrustConfigsResponseOrBuilder.java | 158 +
.../certificatemanager/v1/TrustConfig.java | 6086 +++++++++++++++++
.../v1/TrustConfigName.java | 227 +
.../v1/TrustConfigOrBuilder.java | 327 +
.../v1/TrustConifgProto.java | 258 +
.../v1/UpdateTrustConfigRequest.java | 1056 +++
.../v1/UpdateTrustConfigRequestOrBuilder.java | 111 +
.../v1/certificate_issuance_config.proto | 4 +-
.../v1/certificate_manager.proto | 100 +-
.../certificatemanager/v1/trust_config.proto | 207 +
.../AsyncCreateTrustConfig.java | 53 +
.../AsyncCreateTrustConfigLRO.java | 53 +
.../SyncCreateTrustConfig.java | 48 +
...stConfigLocationnameTrustconfigString.java | 45 +
...ateTrustConfigStringTrustconfigString.java | 45 +
.../AsyncDeleteTrustConfig.java | 51 +
.../AsyncDeleteTrustConfigLRO.java | 52 +
.../SyncDeleteTrustConfig.java | 47 +
.../SyncDeleteTrustConfigString.java | 42 +
.../SyncDeleteTrustConfigTrustconfigname.java | 42 +
.../gettrustconfig/AsyncGetTrustConfig.java | 50 +
.../gettrustconfig/SyncGetTrustConfig.java | 46 +
.../SyncGetTrustConfigString.java | 42 +
.../SyncGetTrustConfigTrustconfigname.java | 42 +
.../AsyncListTrustConfigs.java | 56 +
.../AsyncListTrustConfigsPaged.java | 64 +
.../SyncListTrustConfigs.java | 52 +
.../SyncListTrustConfigsLocationname.java | 44 +
.../SyncListTrustConfigsString.java | 44 +
.../AsyncUpdateTrustConfig.java | 52 +
.../AsyncUpdateTrustConfigLRO.java | 52 +
.../SyncUpdateTrustConfig.java | 47 +
...UpdateTrustConfigTrustconfigFieldmask.java | 44 +
.../edgenetwork/v1/EdgeNetworkClient.java | 43 +-
.../edgenetwork/v1/EdgeNetworkSettings.java | 28 +-
.../edgenetwork/v1/stub/EdgeNetworkStub.java | 3 +
.../v1/stub/EdgeNetworkStubSettings.java | 28 +-
.../cloud/edgenetwork/v1/EdgeNetworkGrpc.java | 16 +
.../cloud/edgenetwork/v1/GetZoneRequest.java | 3 +
.../v1/GetZoneRequestOrBuilder.java | 1 +
.../edgenetwork/v1/ListZonesRequest.java | 3 +
.../v1/ListZonesRequestOrBuilder.java | 1 +
.../edgenetwork/v1/ListZonesResponse.java | 3 +
.../v1/ListZonesResponseOrBuilder.java | 1 +
.../cloud/edgenetwork/v1/ResourcesProto.java | 304 +-
.../cloud/edgenetwork/v1/ServiceProto.java | 546 +-
.../com/google/cloud/edgenetwork/v1/Zone.java | 113 +-
.../cloud/edgenetwork/v1/ZoneOrBuilder.java | 43 +-
.../cloud/edgenetwork/v1/resources.proto | 8 +-
.../google/cloud/edgenetwork/v1/service.proto | 13 +
.../google/cloud/config/v1/ConfigClient.java | 423 ++
.../cloud/config/v1/ConfigSettings.java | 31 +
.../cloud/config/v1/gapic_metadata.json | 6 +
.../cloud/config/v1/stub/ConfigStub.java | 20 +
.../config/v1/stub/ConfigStubSettings.java | 135 +
.../cloud/config/v1/stub/GrpcConfigStub.java | 87 +
.../config/v1/stub/HttpJsonConfigStub.java | 144 +
.../reflect-config.json | 90 +
.../config/v1/ConfigClientHttpJsonTest.java | 250 +
.../cloud/config/v1/ConfigClientTest.java | 220 +
.../cloud/config/v1/MockConfigImpl.java | 43 +
.../google/cloud/config/v1/ConfigGrpc.java | 250 +
.../google/cloud/config/v1/ConfigProto.java | 877 +--
.../google/cloud/config/v1/Deployment.java | 602 ++
.../v1/DeploymentOperationMetadata.java | 44 +
.../cloud/config/v1/DeploymentOrBuilder.java | 103 +
.../config/v1/GetTerraformVersionRequest.java | 647 ++
.../GetTerraformVersionRequestOrBuilder.java | 57 +
.../config/v1/ListDeploymentsRequest.java | 16 +-
.../v1/ListDeploymentsRequestOrBuilder.java | 4 +-
.../cloud/config/v1/ListPreviewsRequest.java | 16 +-
.../v1/ListPreviewsRequestOrBuilder.java | 4 +-
.../cloud/config/v1/ListResourcesRequest.java | 16 +-
.../v1/ListResourcesRequestOrBuilder.java | 4 +-
.../cloud/config/v1/ListRevisionsRequest.java | 16 +-
.../v1/ListRevisionsRequestOrBuilder.java | 4 +-
.../v1/ListTerraformVersionsRequest.java | 1364 ++++
...ListTerraformVersionsRequestOrBuilder.java | 167 +
.../v1/ListTerraformVersionsResponse.java | 1416 ++++
...istTerraformVersionsResponseOrBuilder.java | 156 +
.../com/google/cloud/config/v1/Preview.java | 42 +-
.../config/v1/PreviewOperationMetadata.java | 22 +
.../cloud/config/v1/PreviewOrBuilder.java | 12 +-
.../cloud/config/v1/QuotaValidation.java | 186 +
.../com/google/cloud/config/v1/Revision.java | 781 +++
.../cloud/config/v1/RevisionOrBuilder.java | 116 +
.../cloud/config/v1/TerraformVersion.java | 1859 +++++
.../cloud/config/v1/TerraformVersionName.java | 227 +
.../config/v1/TerraformVersionOrBuilder.java | 202 +
.../proto/google/cloud/config/v1/config.proto | 221 +-
.../AsyncGetTerraformVersion.java | 52 +
.../SyncGetTerraformVersion.java | 48 +
.../SyncGetTerraformVersionString.java | 43 +
...tTerraformVersionTerraformversionname.java | 43 +
.../AsyncListTerraformVersions.java | 56 +
.../AsyncListTerraformVersionsPaged.java | 64 +
.../SyncListTerraformVersions.java | 52 +
...SyncListTerraformVersionsLocationname.java | 44 +
.../SyncListTerraformVersionsString.java | 44 +
135 files changed, 31723 insertions(+), 1471 deletions(-)
create mode 100644 java-certificate-manager/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CreateTrustConfigRequest.java
create mode 100644 java-certificate-manager/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/CreateTrustConfigRequestOrBuilder.java
create mode 100644 java-certificate-manager/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/DeleteTrustConfigRequest.java
create mode 100644 java-certificate-manager/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/DeleteTrustConfigRequestOrBuilder.java
create mode 100644 java-certificate-manager/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/GetTrustConfigRequest.java
create mode 100644 java-certificate-manager/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/GetTrustConfigRequestOrBuilder.java
create mode 100644 java-certificate-manager/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListTrustConfigsRequest.java
create mode 100644 java-certificate-manager/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListTrustConfigsRequestOrBuilder.java
create mode 100644 java-certificate-manager/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListTrustConfigsResponse.java
create mode 100644 java-certificate-manager/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/ListTrustConfigsResponseOrBuilder.java
create mode 100644 java-certificate-manager/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/TrustConfig.java
create mode 100644 java-certificate-manager/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/TrustConfigName.java
create mode 100644 java-certificate-manager/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/TrustConfigOrBuilder.java
create mode 100644 java-certificate-manager/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/TrustConifgProto.java
create mode 100644 java-certificate-manager/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/UpdateTrustConfigRequest.java
create mode 100644 java-certificate-manager/proto-google-cloud-certificate-manager-v1/src/main/java/com/google/cloud/certificatemanager/v1/UpdateTrustConfigRequestOrBuilder.java
create mode 100644 java-certificate-manager/proto-google-cloud-certificate-manager-v1/src/main/proto/google/cloud/certificatemanager/v1/trust_config.proto
create mode 100644 java-certificate-manager/samples/snippets/generated/com/google/cloud/certificatemanager/v1/certificatemanager/createtrustconfig/AsyncCreateTrustConfig.java
create mode 100644 java-certificate-manager/samples/snippets/generated/com/google/cloud/certificatemanager/v1/certificatemanager/createtrustconfig/AsyncCreateTrustConfigLRO.java
create mode 100644 java-certificate-manager/samples/snippets/generated/com/google/cloud/certificatemanager/v1/certificatemanager/createtrustconfig/SyncCreateTrustConfig.java
create mode 100644 java-certificate-manager/samples/snippets/generated/com/google/cloud/certificatemanager/v1/certificatemanager/createtrustconfig/SyncCreateTrustConfigLocationnameTrustconfigString.java
create mode 100644 java-certificate-manager/samples/snippets/generated/com/google/cloud/certificatemanager/v1/certificatemanager/createtrustconfig/SyncCreateTrustConfigStringTrustconfigString.java
create mode 100644 java-certificate-manager/samples/snippets/generated/com/google/cloud/certificatemanager/v1/certificatemanager/deletetrustconfig/AsyncDeleteTrustConfig.java
create mode 100644 java-certificate-manager/samples/snippets/generated/com/google/cloud/certificatemanager/v1/certificatemanager/deletetrustconfig/AsyncDeleteTrustConfigLRO.java
create mode 100644 java-certificate-manager/samples/snippets/generated/com/google/cloud/certificatemanager/v1/certificatemanager/deletetrustconfig/SyncDeleteTrustConfig.java
create mode 100644 java-certificate-manager/samples/snippets/generated/com/google/cloud/certificatemanager/v1/certificatemanager/deletetrustconfig/SyncDeleteTrustConfigString.java
create mode 100644 java-certificate-manager/samples/snippets/generated/com/google/cloud/certificatemanager/v1/certificatemanager/deletetrustconfig/SyncDeleteTrustConfigTrustconfigname.java
create mode 100644 java-certificate-manager/samples/snippets/generated/com/google/cloud/certificatemanager/v1/certificatemanager/gettrustconfig/AsyncGetTrustConfig.java
create mode 100644 java-certificate-manager/samples/snippets/generated/com/google/cloud/certificatemanager/v1/certificatemanager/gettrustconfig/SyncGetTrustConfig.java
create mode 100644 java-certificate-manager/samples/snippets/generated/com/google/cloud/certificatemanager/v1/certificatemanager/gettrustconfig/SyncGetTrustConfigString.java
create mode 100644 java-certificate-manager/samples/snippets/generated/com/google/cloud/certificatemanager/v1/certificatemanager/gettrustconfig/SyncGetTrustConfigTrustconfigname.java
create mode 100644 java-certificate-manager/samples/snippets/generated/com/google/cloud/certificatemanager/v1/certificatemanager/listtrustconfigs/AsyncListTrustConfigs.java
create mode 100644 java-certificate-manager/samples/snippets/generated/com/google/cloud/certificatemanager/v1/certificatemanager/listtrustconfigs/AsyncListTrustConfigsPaged.java
create mode 100644 java-certificate-manager/samples/snippets/generated/com/google/cloud/certificatemanager/v1/certificatemanager/listtrustconfigs/SyncListTrustConfigs.java
create mode 100644 java-certificate-manager/samples/snippets/generated/com/google/cloud/certificatemanager/v1/certificatemanager/listtrustconfigs/SyncListTrustConfigsLocationname.java
create mode 100644 java-certificate-manager/samples/snippets/generated/com/google/cloud/certificatemanager/v1/certificatemanager/listtrustconfigs/SyncListTrustConfigsString.java
create mode 100644 java-certificate-manager/samples/snippets/generated/com/google/cloud/certificatemanager/v1/certificatemanager/updatetrustconfig/AsyncUpdateTrustConfig.java
create mode 100644 java-certificate-manager/samples/snippets/generated/com/google/cloud/certificatemanager/v1/certificatemanager/updatetrustconfig/AsyncUpdateTrustConfigLRO.java
create mode 100644 java-certificate-manager/samples/snippets/generated/com/google/cloud/certificatemanager/v1/certificatemanager/updatetrustconfig/SyncUpdateTrustConfig.java
create mode 100644 java-certificate-manager/samples/snippets/generated/com/google/cloud/certificatemanager/v1/certificatemanager/updatetrustconfig/SyncUpdateTrustConfigTrustconfigFieldmask.java
create mode 100644 java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/GetTerraformVersionRequest.java
create mode 100644 java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/GetTerraformVersionRequestOrBuilder.java
create mode 100644 java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ListTerraformVersionsRequest.java
create mode 100644 java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ListTerraformVersionsRequestOrBuilder.java
create mode 100644 java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ListTerraformVersionsResponse.java
create mode 100644 java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/ListTerraformVersionsResponseOrBuilder.java
create mode 100644 java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/QuotaValidation.java
create mode 100644 java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/TerraformVersion.java
create mode 100644 java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/TerraformVersionName.java
create mode 100644 java-infra-manager/proto-google-cloud-infra-manager-v1/src/main/java/com/google/cloud/config/v1/TerraformVersionOrBuilder.java
create mode 100644 java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/getterraformversion/AsyncGetTerraformVersion.java
create mode 100644 java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/getterraformversion/SyncGetTerraformVersion.java
create mode 100644 java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/getterraformversion/SyncGetTerraformVersionString.java
create mode 100644 java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/getterraformversion/SyncGetTerraformVersionTerraformversionname.java
create mode 100644 java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listterraformversions/AsyncListTerraformVersions.java
create mode 100644 java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listterraformversions/AsyncListTerraformVersionsPaged.java
create mode 100644 java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listterraformversions/SyncListTerraformVersions.java
create mode 100644 java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listterraformversions/SyncListTerraformVersionsLocationname.java
create mode 100644 java-infra-manager/samples/snippets/generated/com/google/cloud/config/v1/config/listterraformversions/SyncListTerraformVersionsString.java
diff --git a/generation_config.yaml b/generation_config.yaml
index b894aea0ba0e..89c2f83ab630 100644
--- a/generation_config.yaml
+++ b/generation_config.yaml
@@ -1,6 +1,6 @@
gapic_generator_version: 2.37.0
protobuf_version: '25.2'
-googleapis_commitish: 1e6517ef4f949191c9e471857cf5811c8abcab84
+googleapis_commitish: 1af32e6094f4d65fb53a01394ba030c495ece1bc
owlbot_cli_image: sha256:623647ee79ac605858d09e60c1382a716c125fb776f69301b72de1cd35d49409
synthtool_commitish: 6612ab8f3afcd5e292aecd647f0fa68812c9f5b5
template_excludes:
diff --git a/java-certificate-manager/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/CertificateManagerClient.java b/java-certificate-manager/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/CertificateManagerClient.java
index 15220ec3575a..5e5a025e7684 100644
--- a/java-certificate-manager/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/CertificateManagerClient.java
+++ b/java-certificate-manager/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/CertificateManagerClient.java
@@ -569,6 +569,104 @@
*
*
*
* ListLocations |
* Lists information about the supported locations for this service. |
*
@@ -4410,7 +4508,7 @@ public final OperationFuture deleteCertificateIssuance
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Lists information about the supported locations for this service.
+ * Lists TrustConfigs in a given project and location.
*
* Sample code:
*
@@ -4421,14 +4519,77 @@ public final OperationFuture deleteCertificateIssuance
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
- * ListLocationsRequest request =
- * ListLocationsRequest.newBuilder()
- * .setName("name3373707")
- * .setFilter("filter-1274492040")
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (TrustConfig element : certificateManagerClient.listTrustConfigs(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The project and location from which the TrustConfigs should be listed,
+ * specified in the format `projects/*/locations/*`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListTrustConfigsPagedResponse listTrustConfigs(LocationName parent) {
+ ListTrustConfigsRequest request =
+ ListTrustConfigsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listTrustConfigs(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists TrustConfigs in a given project and location.
+ *
+ * Sample code:
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (TrustConfig element : certificateManagerClient.listTrustConfigs(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The project and location from which the TrustConfigs should be listed,
+ * specified in the format `projects/*/locations/*`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListTrustConfigsPagedResponse listTrustConfigs(String parent) {
+ ListTrustConfigsRequest request =
+ ListTrustConfigsRequest.newBuilder().setParent(parent).build();
+ return listTrustConfigs(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists TrustConfigs in a given project and location.
+ *
+ * Sample code:
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+ * ListTrustConfigsRequest request =
+ * ListTrustConfigsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
* .build();
- * for (Location element : certificateManagerClient.listLocations(request).iterateAll()) {
+ * for (TrustConfig element : certificateManagerClient.listTrustConfigs(request).iterateAll()) {
* // doThingsWith(element);
* }
* }
@@ -4437,13 +4598,13 @@ public final OperationFuture deleteCertificateIssuance
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) {
- return listLocationsPagedCallable().call(request);
+ public final ListTrustConfigsPagedResponse listTrustConfigs(ListTrustConfigsRequest request) {
+ return listTrustConfigsPagedCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Lists information about the supported locations for this service.
+ * Lists TrustConfigs in a given project and location.
*
* Sample code:
*
@@ -4454,30 +4615,31 @@ public final ListLocationsPagedResponse listLocations(ListLocationsRequest reque
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
- * ListLocationsRequest request =
- * ListLocationsRequest.newBuilder()
- * .setName("name3373707")
- * .setFilter("filter-1274492040")
+ * ListTrustConfigsRequest request =
+ * ListTrustConfigsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
* .build();
- * ApiFuture future =
- * certificateManagerClient.listLocationsPagedCallable().futureCall(request);
+ * ApiFuture future =
+ * certificateManagerClient.listTrustConfigsPagedCallable().futureCall(request);
* // Do something.
- * for (Location element : future.get().iterateAll()) {
+ * for (TrustConfig element : future.get().iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*/
- public final UnaryCallable
- listLocationsPagedCallable() {
- return stub.listLocationsPagedCallable();
+ public final UnaryCallable
+ listTrustConfigsPagedCallable() {
+ return stub.listTrustConfigsPagedCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Lists information about the supported locations for this service.
+ * Lists TrustConfigs in a given project and location.
*
* Sample code:
*
@@ -4488,17 +4650,18 @@ public final ListLocationsPagedResponse listLocations(ListLocationsRequest reque
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
- * ListLocationsRequest request =
- * ListLocationsRequest.newBuilder()
- * .setName("name3373707")
- * .setFilter("filter-1274492040")
+ * ListTrustConfigsRequest request =
+ * ListTrustConfigsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
* .build();
* while (true) {
- * ListLocationsResponse response =
- * certificateManagerClient.listLocationsCallable().call(request);
- * for (Location element : response.getLocationsList()) {
+ * ListTrustConfigsResponse response =
+ * certificateManagerClient.listTrustConfigsCallable().call(request);
+ * for (TrustConfig element : response.getTrustConfigsList()) {
* // doThingsWith(element);
* }
* String nextPageToken = response.getNextPageToken();
@@ -4511,13 +4674,14 @@ public final ListLocationsPagedResponse listLocations(ListLocationsRequest reque
* }
* }
*/
- public final UnaryCallable listLocationsCallable() {
- return stub.listLocationsCallable();
+ public final UnaryCallable
+ listTrustConfigsCallable() {
+ return stub.listTrustConfigsCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Gets information about a location.
+ * Gets details of a single TrustConfig.
*
* Sample code:
*
@@ -4528,21 +4692,24 @@ public final UnaryCallable listLoca
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
- * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
- * Location response = certificateManagerClient.getLocation(request);
+ * TrustConfigName name = TrustConfigName.of("[PROJECT]", "[LOCATION]", "[TRUST_CONFIG]");
+ * TrustConfig response = certificateManagerClient.getTrustConfig(name);
* }
* }
*
- * @param request The request object containing all of the parameters for the API call.
+ * @param name Required. A name of the TrustConfig to describe. Must be in the format
+ * `projects/*/locations/*/trustConfigs/*`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final Location getLocation(GetLocationRequest request) {
- return getLocationCallable().call(request);
+ public final TrustConfig getTrustConfig(TrustConfigName name) {
+ GetTrustConfigRequest request =
+ GetTrustConfigRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getTrustConfig(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Gets information about a location.
+ * Gets details of a single TrustConfig.
*
* Sample code:
*
@@ -4553,56 +4720,713 @@ public final Location getLocation(GetLocationRequest request) {
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
- * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
- * ApiFuture future =
- * certificateManagerClient.getLocationCallable().futureCall(request);
- * // Do something.
- * Location response = future.get();
+ * String name = TrustConfigName.of("[PROJECT]", "[LOCATION]", "[TRUST_CONFIG]").toString();
+ * TrustConfig response = certificateManagerClient.getTrustConfig(name);
* }
* }
+ *
+ * @param name Required. A name of the TrustConfig to describe. Must be in the format
+ * `projects/*/locations/*/trustConfigs/*`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final UnaryCallable getLocationCallable() {
- return stub.getLocationCallable();
- }
-
- @Override
- public final void close() {
- stub.close();
- }
-
- @Override
- public void shutdown() {
- stub.shutdown();
- }
-
- @Override
- public boolean isShutdown() {
- return stub.isShutdown();
+ public final TrustConfig getTrustConfig(String name) {
+ GetTrustConfigRequest request = GetTrustConfigRequest.newBuilder().setName(name).build();
+ return getTrustConfig(request);
}
- @Override
- public boolean isTerminated() {
- return stub.isTerminated();
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single TrustConfig.
+ *
+ * Sample code:
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+ * GetTrustConfigRequest request =
+ * GetTrustConfigRequest.newBuilder()
+ * .setName(TrustConfigName.of("[PROJECT]", "[LOCATION]", "[TRUST_CONFIG]").toString())
+ * .build();
+ * TrustConfig response = certificateManagerClient.getTrustConfig(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final TrustConfig getTrustConfig(GetTrustConfigRequest request) {
+ return getTrustConfigCallable().call(request);
}
- @Override
- public void shutdownNow() {
- stub.shutdownNow();
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single TrustConfig.
+ *
+ * Sample code:
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+ * GetTrustConfigRequest request =
+ * GetTrustConfigRequest.newBuilder()
+ * .setName(TrustConfigName.of("[PROJECT]", "[LOCATION]", "[TRUST_CONFIG]").toString())
+ * .build();
+ * ApiFuture future =
+ * certificateManagerClient.getTrustConfigCallable().futureCall(request);
+ * // Do something.
+ * TrustConfig response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable getTrustConfigCallable() {
+ return stub.getTrustConfigCallable();
}
- @Override
- public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException {
- return stub.awaitTermination(duration, unit);
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new TrustConfig in a given project and location.
+ *
+ * Sample code:
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * TrustConfig trustConfig = TrustConfig.newBuilder().build();
+ * String trustConfigId = "trustConfigId1514573429";
+ * TrustConfig response =
+ * certificateManagerClient.createTrustConfigAsync(parent, trustConfig, trustConfigId).get();
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource of the TrustConfig. Must be in the format
+ * `projects/*/locations/*`.
+ * @param trustConfig Required. A definition of the TrustConfig to create.
+ * @param trustConfigId Required. A user-provided name of the TrustConfig. Must match the regexp
+ * `[a-z0-9-]{1,63}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture createTrustConfigAsync(
+ LocationName parent, TrustConfig trustConfig, String trustConfigId) {
+ CreateTrustConfigRequest request =
+ CreateTrustConfigRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setTrustConfig(trustConfig)
+ .setTrustConfigId(trustConfigId)
+ .build();
+ return createTrustConfigAsync(request);
}
- public static class ListCertificatesPagedResponse
- extends AbstractPagedListResponse<
- ListCertificatesRequest,
- ListCertificatesResponse,
- Certificate,
- ListCertificatesPage,
- ListCertificatesFixedSizeCollection> {
-
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new TrustConfig in a given project and location.
+ *
+ * Sample code:
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * TrustConfig trustConfig = TrustConfig.newBuilder().build();
+ * String trustConfigId = "trustConfigId1514573429";
+ * TrustConfig response =
+ * certificateManagerClient.createTrustConfigAsync(parent, trustConfig, trustConfigId).get();
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource of the TrustConfig. Must be in the format
+ * `projects/*/locations/*`.
+ * @param trustConfig Required. A definition of the TrustConfig to create.
+ * @param trustConfigId Required. A user-provided name of the TrustConfig. Must match the regexp
+ * `[a-z0-9-]{1,63}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture createTrustConfigAsync(
+ String parent, TrustConfig trustConfig, String trustConfigId) {
+ CreateTrustConfigRequest request =
+ CreateTrustConfigRequest.newBuilder()
+ .setParent(parent)
+ .setTrustConfig(trustConfig)
+ .setTrustConfigId(trustConfigId)
+ .build();
+ return createTrustConfigAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new TrustConfig in a given project and location.
+ *
+ * Sample code:
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+ * CreateTrustConfigRequest request =
+ * CreateTrustConfigRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setTrustConfigId("trustConfigId1514573429")
+ * .setTrustConfig(TrustConfig.newBuilder().build())
+ * .build();
+ * TrustConfig response = certificateManagerClient.createTrustConfigAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture createTrustConfigAsync(
+ CreateTrustConfigRequest request) {
+ return createTrustConfigOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new TrustConfig in a given project and location.
+ *
+ * Sample code:
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+ * CreateTrustConfigRequest request =
+ * CreateTrustConfigRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setTrustConfigId("trustConfigId1514573429")
+ * .setTrustConfig(TrustConfig.newBuilder().build())
+ * .build();
+ * OperationFuture future =
+ * certificateManagerClient.createTrustConfigOperationCallable().futureCall(request);
+ * // Do something.
+ * TrustConfig response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable
+ createTrustConfigOperationCallable() {
+ return stub.createTrustConfigOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new TrustConfig in a given project and location.
+ *
+ * Sample code:
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+ * CreateTrustConfigRequest request =
+ * CreateTrustConfigRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setTrustConfigId("trustConfigId1514573429")
+ * .setTrustConfig(TrustConfig.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * certificateManagerClient.createTrustConfigCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable createTrustConfigCallable() {
+ return stub.createTrustConfigCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a TrustConfig.
+ *
+ * Sample code:
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+ * TrustConfig trustConfig = TrustConfig.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * TrustConfig response =
+ * certificateManagerClient.updateTrustConfigAsync(trustConfig, updateMask).get();
+ * }
+ * }
+ *
+ * @param trustConfig Required. A definition of the TrustConfig to update.
+ * @param updateMask Required. The update mask applies to the resource. For the `FieldMask`
+ * definition, see
+ * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture updateTrustConfigAsync(
+ TrustConfig trustConfig, FieldMask updateMask) {
+ UpdateTrustConfigRequest request =
+ UpdateTrustConfigRequest.newBuilder()
+ .setTrustConfig(trustConfig)
+ .setUpdateMask(updateMask)
+ .build();
+ return updateTrustConfigAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a TrustConfig.
+ *
+ * Sample code:
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+ * UpdateTrustConfigRequest request =
+ * UpdateTrustConfigRequest.newBuilder()
+ * .setTrustConfig(TrustConfig.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * TrustConfig response = certificateManagerClient.updateTrustConfigAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture updateTrustConfigAsync(
+ UpdateTrustConfigRequest request) {
+ return updateTrustConfigOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a TrustConfig.
+ *
+ * Sample code:
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+ * UpdateTrustConfigRequest request =
+ * UpdateTrustConfigRequest.newBuilder()
+ * .setTrustConfig(TrustConfig.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * OperationFuture future =
+ * certificateManagerClient.updateTrustConfigOperationCallable().futureCall(request);
+ * // Do something.
+ * TrustConfig response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable
+ updateTrustConfigOperationCallable() {
+ return stub.updateTrustConfigOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a TrustConfig.
+ *
+ * Sample code:
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+ * UpdateTrustConfigRequest request =
+ * UpdateTrustConfigRequest.newBuilder()
+ * .setTrustConfig(TrustConfig.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * certificateManagerClient.updateTrustConfigCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable updateTrustConfigCallable() {
+ return stub.updateTrustConfigCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a single TrustConfig.
+ *
+ * Sample code:
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+ * TrustConfigName name = TrustConfigName.of("[PROJECT]", "[LOCATION]", "[TRUST_CONFIG]");
+ * certificateManagerClient.deleteTrustConfigAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. A name of the TrustConfig to delete. Must be in the format
+ * `projects/*/locations/*/trustConfigs/*`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture deleteTrustConfigAsync(
+ TrustConfigName name) {
+ DeleteTrustConfigRequest request =
+ DeleteTrustConfigRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return deleteTrustConfigAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a single TrustConfig.
+ *
+ * Sample code:
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+ * String name = TrustConfigName.of("[PROJECT]", "[LOCATION]", "[TRUST_CONFIG]").toString();
+ * certificateManagerClient.deleteTrustConfigAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. A name of the TrustConfig to delete. Must be in the format
+ * `projects/*/locations/*/trustConfigs/*`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture deleteTrustConfigAsync(String name) {
+ DeleteTrustConfigRequest request = DeleteTrustConfigRequest.newBuilder().setName(name).build();
+ return deleteTrustConfigAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a single TrustConfig.
+ *
+ * Sample code:
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+ * DeleteTrustConfigRequest request =
+ * DeleteTrustConfigRequest.newBuilder()
+ * .setName(TrustConfigName.of("[PROJECT]", "[LOCATION]", "[TRUST_CONFIG]").toString())
+ * .setEtag("etag3123477")
+ * .build();
+ * certificateManagerClient.deleteTrustConfigAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture deleteTrustConfigAsync(
+ DeleteTrustConfigRequest request) {
+ return deleteTrustConfigOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a single TrustConfig.
+ *
+ * Sample code:
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+ * DeleteTrustConfigRequest request =
+ * DeleteTrustConfigRequest.newBuilder()
+ * .setName(TrustConfigName.of("[PROJECT]", "[LOCATION]", "[TRUST_CONFIG]").toString())
+ * .setEtag("etag3123477")
+ * .build();
+ * OperationFuture future =
+ * certificateManagerClient.deleteTrustConfigOperationCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final OperationCallable
+ deleteTrustConfigOperationCallable() {
+ return stub.deleteTrustConfigOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a single TrustConfig.
+ *
+ * Sample code:
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+ * DeleteTrustConfigRequest request =
+ * DeleteTrustConfigRequest.newBuilder()
+ * .setName(TrustConfigName.of("[PROJECT]", "[LOCATION]", "[TRUST_CONFIG]").toString())
+ * .setEtag("etag3123477")
+ * .build();
+ * ApiFuture future =
+ * certificateManagerClient.deleteTrustConfigCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable deleteTrustConfigCallable() {
+ return stub.deleteTrustConfigCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists information about the supported locations for this service.
+ *
+ * Sample code:
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Location element : certificateManagerClient.listLocations(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) {
+ return listLocationsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists information about the supported locations for this service.
+ *
+ * Sample code:
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future =
+ * certificateManagerClient.listLocationsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Location element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ listLocationsPagedCallable() {
+ return stub.listLocationsPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists information about the supported locations for this service.
+ *
+ * Sample code:
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListLocationsResponse response =
+ * certificateManagerClient.listLocationsCallable().call(request);
+ * for (Location element : response.getLocationsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable listLocationsCallable() {
+ return stub.listLocationsCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets information about a location.
+ *
+ * Sample code:
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * Location response = certificateManagerClient.getLocation(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Location getLocation(GetLocationRequest request) {
+ return getLocationCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets information about a location.
+ *
+ * Sample code:
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CertificateManagerClient certificateManagerClient = CertificateManagerClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * ApiFuture future =
+ * certificateManagerClient.getLocationCallable().futureCall(request);
+ * // Do something.
+ * Location response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable getLocationCallable() {
+ return stub.getLocationCallable();
+ }
+
+ @Override
+ public final void close() {
+ stub.close();
+ }
+
+ @Override
+ public void shutdown() {
+ stub.shutdown();
+ }
+
+ @Override
+ public boolean isShutdown() {
+ return stub.isShutdown();
+ }
+
+ @Override
+ public boolean isTerminated() {
+ return stub.isTerminated();
+ }
+
+ @Override
+ public void shutdownNow() {
+ stub.shutdownNow();
+ }
+
+ @Override
+ public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException {
+ return stub.awaitTermination(duration, unit);
+ }
+
+ public static class ListCertificatesPagedResponse
+ extends AbstractPagedListResponse<
+ ListCertificatesRequest,
+ ListCertificatesResponse,
+ Certificate,
+ ListCertificatesPage,
+ ListCertificatesFixedSizeCollection> {
+
public static ApiFuture createAsync(
PageContext context,
ApiFuture futureResponse) {
@@ -5033,6 +5857,83 @@ protected ListCertificateIssuanceConfigsFixedSizeCollection createCollection(
}
}
+ public static class ListTrustConfigsPagedResponse
+ extends AbstractPagedListResponse<
+ ListTrustConfigsRequest,
+ ListTrustConfigsResponse,
+ TrustConfig,
+ ListTrustConfigsPage,
+ ListTrustConfigsFixedSizeCollection> {
+
+ public static ApiFuture createAsync(
+ PageContext context,
+ ApiFuture futureResponse) {
+ ApiFuture futurePage =
+ ListTrustConfigsPage.createEmptyPage().createPageAsync(context, futureResponse);
+ return ApiFutures.transform(
+ futurePage,
+ input -> new ListTrustConfigsPagedResponse(input),
+ MoreExecutors.directExecutor());
+ }
+
+ private ListTrustConfigsPagedResponse(ListTrustConfigsPage page) {
+ super(page, ListTrustConfigsFixedSizeCollection.createEmptyCollection());
+ }
+ }
+
+ public static class ListTrustConfigsPage
+ extends AbstractPage<
+ ListTrustConfigsRequest, ListTrustConfigsResponse, TrustConfig, ListTrustConfigsPage> {
+
+ private ListTrustConfigsPage(
+ PageContext context,
+ ListTrustConfigsResponse response) {
+ super(context, response);
+ }
+
+ private static ListTrustConfigsPage createEmptyPage() {
+ return new ListTrustConfigsPage(null, null);
+ }
+
+ @Override
+ protected ListTrustConfigsPage createPage(
+ PageContext context,
+ ListTrustConfigsResponse response) {
+ return new ListTrustConfigsPage(context, response);
+ }
+
+ @Override
+ public ApiFuture createPageAsync(
+ PageContext context,
+ ApiFuture futureResponse) {
+ return super.createPageAsync(context, futureResponse);
+ }
+ }
+
+ public static class ListTrustConfigsFixedSizeCollection
+ extends AbstractFixedSizeCollection<
+ ListTrustConfigsRequest,
+ ListTrustConfigsResponse,
+ TrustConfig,
+ ListTrustConfigsPage,
+ ListTrustConfigsFixedSizeCollection> {
+
+ private ListTrustConfigsFixedSizeCollection(
+ List pages, int collectionSize) {
+ super(pages, collectionSize);
+ }
+
+ private static ListTrustConfigsFixedSizeCollection createEmptyCollection() {
+ return new ListTrustConfigsFixedSizeCollection(null, 0);
+ }
+
+ @Override
+ protected ListTrustConfigsFixedSizeCollection createCollection(
+ List pages, int collectionSize) {
+ return new ListTrustConfigsFixedSizeCollection(pages, collectionSize);
+ }
+ }
+
public static class ListLocationsPagedResponse
extends AbstractPagedListResponse<
ListLocationsRequest,
diff --git a/java-certificate-manager/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/CertificateManagerSettings.java b/java-certificate-manager/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/CertificateManagerSettings.java
index f8e918f08b96..441f433ba4d1 100644
--- a/java-certificate-manager/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/CertificateManagerSettings.java
+++ b/java-certificate-manager/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/CertificateManagerSettings.java
@@ -22,6 +22,7 @@
import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListCertificatesPagedResponse;
import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListDnsAuthorizationsPagedResponse;
import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListLocationsPagedResponse;
+import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListTrustConfigsPagedResponse;
import com.google.api.core.ApiFunction;
import com.google.api.core.BetaApi;
@@ -341,6 +342,54 @@ public UnaryCallSettings deleteCertifica
.deleteCertificateIssuanceConfigOperationSettings();
}
+ /** Returns the object with the settings used for calls to listTrustConfigs. */
+ public PagedCallSettings<
+ ListTrustConfigsRequest, ListTrustConfigsResponse, ListTrustConfigsPagedResponse>
+ listTrustConfigsSettings() {
+ return ((CertificateManagerStubSettings) getStubSettings()).listTrustConfigsSettings();
+ }
+
+ /** Returns the object with the settings used for calls to getTrustConfig. */
+ public UnaryCallSettings getTrustConfigSettings() {
+ return ((CertificateManagerStubSettings) getStubSettings()).getTrustConfigSettings();
+ }
+
+ /** Returns the object with the settings used for calls to createTrustConfig. */
+ public UnaryCallSettings createTrustConfigSettings() {
+ return ((CertificateManagerStubSettings) getStubSettings()).createTrustConfigSettings();
+ }
+
+ /** Returns the object with the settings used for calls to createTrustConfig. */
+ public OperationCallSettings
+ createTrustConfigOperationSettings() {
+ return ((CertificateManagerStubSettings) getStubSettings())
+ .createTrustConfigOperationSettings();
+ }
+
+ /** Returns the object with the settings used for calls to updateTrustConfig. */
+ public UnaryCallSettings updateTrustConfigSettings() {
+ return ((CertificateManagerStubSettings) getStubSettings()).updateTrustConfigSettings();
+ }
+
+ /** Returns the object with the settings used for calls to updateTrustConfig. */
+ public OperationCallSettings
+ updateTrustConfigOperationSettings() {
+ return ((CertificateManagerStubSettings) getStubSettings())
+ .updateTrustConfigOperationSettings();
+ }
+
+ /** Returns the object with the settings used for calls to deleteTrustConfig. */
+ public UnaryCallSettings deleteTrustConfigSettings() {
+ return ((CertificateManagerStubSettings) getStubSettings()).deleteTrustConfigSettings();
+ }
+
+ /** Returns the object with the settings used for calls to deleteTrustConfig. */
+ public OperationCallSettings
+ deleteTrustConfigOperationSettings() {
+ return ((CertificateManagerStubSettings) getStubSettings())
+ .deleteTrustConfigOperationSettings();
+ }
+
/** Returns the object with the settings used for calls to listLocations. */
public PagedCallSettings
listLocationsSettings() {
@@ -712,6 +761,54 @@ public UnaryCallSettings.Builder getCertific
return getStubSettingsBuilder().deleteCertificateIssuanceConfigOperationSettings();
}
+ /** Returns the builder for the settings used for calls to listTrustConfigs. */
+ public PagedCallSettings.Builder<
+ ListTrustConfigsRequest, ListTrustConfigsResponse, ListTrustConfigsPagedResponse>
+ listTrustConfigsSettings() {
+ return getStubSettingsBuilder().listTrustConfigsSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to getTrustConfig. */
+ public UnaryCallSettings.Builder getTrustConfigSettings() {
+ return getStubSettingsBuilder().getTrustConfigSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to createTrustConfig. */
+ public UnaryCallSettings.Builder
+ createTrustConfigSettings() {
+ return getStubSettingsBuilder().createTrustConfigSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to createTrustConfig. */
+ public OperationCallSettings.Builder
+ createTrustConfigOperationSettings() {
+ return getStubSettingsBuilder().createTrustConfigOperationSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to updateTrustConfig. */
+ public UnaryCallSettings.Builder
+ updateTrustConfigSettings() {
+ return getStubSettingsBuilder().updateTrustConfigSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to updateTrustConfig. */
+ public OperationCallSettings.Builder
+ updateTrustConfigOperationSettings() {
+ return getStubSettingsBuilder().updateTrustConfigOperationSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to deleteTrustConfig. */
+ public UnaryCallSettings.Builder
+ deleteTrustConfigSettings() {
+ return getStubSettingsBuilder().deleteTrustConfigSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to deleteTrustConfig. */
+ public OperationCallSettings.Builder
+ deleteTrustConfigOperationSettings() {
+ return getStubSettingsBuilder().deleteTrustConfigOperationSettings();
+ }
+
/** Returns the builder for the settings used for calls to listLocations. */
public PagedCallSettings.Builder<
ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
diff --git a/java-certificate-manager/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/gapic_metadata.json b/java-certificate-manager/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/gapic_metadata.json
index 6545d0f0db7c..04c73447d591 100644
--- a/java-certificate-manager/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/gapic_metadata.json
+++ b/java-certificate-manager/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/gapic_metadata.json
@@ -25,6 +25,9 @@
"CreateDnsAuthorization": {
"methods": ["createDnsAuthorizationAsync", "createDnsAuthorizationAsync", "createDnsAuthorizationAsync", "createDnsAuthorizationOperationCallable", "createDnsAuthorizationCallable"]
},
+ "CreateTrustConfig": {
+ "methods": ["createTrustConfigAsync", "createTrustConfigAsync", "createTrustConfigAsync", "createTrustConfigOperationCallable", "createTrustConfigCallable"]
+ },
"DeleteCertificate": {
"methods": ["deleteCertificateAsync", "deleteCertificateAsync", "deleteCertificateAsync", "deleteCertificateOperationCallable", "deleteCertificateCallable"]
},
@@ -40,6 +43,9 @@
"DeleteDnsAuthorization": {
"methods": ["deleteDnsAuthorizationAsync", "deleteDnsAuthorizationAsync", "deleteDnsAuthorizationAsync", "deleteDnsAuthorizationOperationCallable", "deleteDnsAuthorizationCallable"]
},
+ "DeleteTrustConfig": {
+ "methods": ["deleteTrustConfigAsync", "deleteTrustConfigAsync", "deleteTrustConfigAsync", "deleteTrustConfigOperationCallable", "deleteTrustConfigCallable"]
+ },
"GetCertificate": {
"methods": ["getCertificate", "getCertificate", "getCertificate", "getCertificateCallable"]
},
@@ -58,6 +64,9 @@
"GetLocation": {
"methods": ["getLocation", "getLocationCallable"]
},
+ "GetTrustConfig": {
+ "methods": ["getTrustConfig", "getTrustConfig", "getTrustConfig", "getTrustConfigCallable"]
+ },
"ListCertificateIssuanceConfigs": {
"methods": ["listCertificateIssuanceConfigs", "listCertificateIssuanceConfigs", "listCertificateIssuanceConfigs", "listCertificateIssuanceConfigsPagedCallable", "listCertificateIssuanceConfigsCallable"]
},
@@ -76,6 +85,9 @@
"ListLocations": {
"methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"]
},
+ "ListTrustConfigs": {
+ "methods": ["listTrustConfigs", "listTrustConfigs", "listTrustConfigs", "listTrustConfigsPagedCallable", "listTrustConfigsCallable"]
+ },
"UpdateCertificate": {
"methods": ["updateCertificateAsync", "updateCertificateAsync", "updateCertificateOperationCallable", "updateCertificateCallable"]
},
@@ -87,6 +99,9 @@
},
"UpdateDnsAuthorization": {
"methods": ["updateDnsAuthorizationAsync", "updateDnsAuthorizationAsync", "updateDnsAuthorizationOperationCallable", "updateDnsAuthorizationCallable"]
+ },
+ "UpdateTrustConfig": {
+ "methods": ["updateTrustConfigAsync", "updateTrustConfigAsync", "updateTrustConfigOperationCallable", "updateTrustConfigCallable"]
}
}
}
diff --git a/java-certificate-manager/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/stub/CertificateManagerStub.java b/java-certificate-manager/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/stub/CertificateManagerStub.java
index 7f79af824e1f..a752e6510440 100644
--- a/java-certificate-manager/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/stub/CertificateManagerStub.java
+++ b/java-certificate-manager/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/stub/CertificateManagerStub.java
@@ -22,6 +22,7 @@
import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListCertificatesPagedResponse;
import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListDnsAuthorizationsPagedResponse;
import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListLocationsPagedResponse;
+import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListTrustConfigsPagedResponse;
import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.rpc.OperationCallable;
@@ -35,17 +36,20 @@
import com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest;
import com.google.cloud.certificatemanager.v1.CreateCertificateRequest;
import com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest;
+import com.google.cloud.certificatemanager.v1.CreateTrustConfigRequest;
import com.google.cloud.certificatemanager.v1.DeleteCertificateIssuanceConfigRequest;
import com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest;
import com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest;
import com.google.cloud.certificatemanager.v1.DeleteCertificateRequest;
import com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest;
+import com.google.cloud.certificatemanager.v1.DeleteTrustConfigRequest;
import com.google.cloud.certificatemanager.v1.DnsAuthorization;
import com.google.cloud.certificatemanager.v1.GetCertificateIssuanceConfigRequest;
import com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest;
import com.google.cloud.certificatemanager.v1.GetCertificateMapRequest;
import com.google.cloud.certificatemanager.v1.GetCertificateRequest;
import com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest;
+import com.google.cloud.certificatemanager.v1.GetTrustConfigRequest;
import com.google.cloud.certificatemanager.v1.ListCertificateIssuanceConfigsRequest;
import com.google.cloud.certificatemanager.v1.ListCertificateIssuanceConfigsResponse;
import com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest;
@@ -56,11 +60,15 @@
import com.google.cloud.certificatemanager.v1.ListCertificatesResponse;
import com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest;
import com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse;
+import com.google.cloud.certificatemanager.v1.ListTrustConfigsRequest;
+import com.google.cloud.certificatemanager.v1.ListTrustConfigsResponse;
import com.google.cloud.certificatemanager.v1.OperationMetadata;
+import com.google.cloud.certificatemanager.v1.TrustConfig;
import com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest;
import com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest;
import com.google.cloud.certificatemanager.v1.UpdateCertificateRequest;
import com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest;
+import com.google.cloud.certificatemanager.v1.UpdateTrustConfigRequest;
import com.google.cloud.location.GetLocationRequest;
import com.google.cloud.location.ListLocationsRequest;
import com.google.cloud.location.ListLocationsResponse;
@@ -314,6 +322,50 @@ public UnaryCallable deleteDnsAuthoriz
"Not implemented: deleteCertificateIssuanceConfigCallable()");
}
+ public UnaryCallable
+ listTrustConfigsPagedCallable() {
+ throw new UnsupportedOperationException("Not implemented: listTrustConfigsPagedCallable()");
+ }
+
+ public UnaryCallable
+ listTrustConfigsCallable() {
+ throw new UnsupportedOperationException("Not implemented: listTrustConfigsCallable()");
+ }
+
+ public UnaryCallable getTrustConfigCallable() {
+ throw new UnsupportedOperationException("Not implemented: getTrustConfigCallable()");
+ }
+
+ public OperationCallable
+ createTrustConfigOperationCallable() {
+ throw new UnsupportedOperationException(
+ "Not implemented: createTrustConfigOperationCallable()");
+ }
+
+ public UnaryCallable createTrustConfigCallable() {
+ throw new UnsupportedOperationException("Not implemented: createTrustConfigCallable()");
+ }
+
+ public OperationCallable
+ updateTrustConfigOperationCallable() {
+ throw new UnsupportedOperationException(
+ "Not implemented: updateTrustConfigOperationCallable()");
+ }
+
+ public UnaryCallable updateTrustConfigCallable() {
+ throw new UnsupportedOperationException("Not implemented: updateTrustConfigCallable()");
+ }
+
+ public OperationCallable
+ deleteTrustConfigOperationCallable() {
+ throw new UnsupportedOperationException(
+ "Not implemented: deleteTrustConfigOperationCallable()");
+ }
+
+ public UnaryCallable deleteTrustConfigCallable() {
+ throw new UnsupportedOperationException("Not implemented: deleteTrustConfigCallable()");
+ }
+
public UnaryCallable
listLocationsPagedCallable() {
throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()");
diff --git a/java-certificate-manager/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/stub/CertificateManagerStubSettings.java b/java-certificate-manager/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/stub/CertificateManagerStubSettings.java
index 51df354a95d5..a2903346bee7 100644
--- a/java-certificate-manager/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/stub/CertificateManagerStubSettings.java
+++ b/java-certificate-manager/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/stub/CertificateManagerStubSettings.java
@@ -22,6 +22,7 @@
import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListCertificatesPagedResponse;
import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListDnsAuthorizationsPagedResponse;
import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListLocationsPagedResponse;
+import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListTrustConfigsPagedResponse;
import com.google.api.core.ApiFunction;
import com.google.api.core.ApiFuture;
@@ -61,17 +62,20 @@
import com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest;
import com.google.cloud.certificatemanager.v1.CreateCertificateRequest;
import com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest;
+import com.google.cloud.certificatemanager.v1.CreateTrustConfigRequest;
import com.google.cloud.certificatemanager.v1.DeleteCertificateIssuanceConfigRequest;
import com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest;
import com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest;
import com.google.cloud.certificatemanager.v1.DeleteCertificateRequest;
import com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest;
+import com.google.cloud.certificatemanager.v1.DeleteTrustConfigRequest;
import com.google.cloud.certificatemanager.v1.DnsAuthorization;
import com.google.cloud.certificatemanager.v1.GetCertificateIssuanceConfigRequest;
import com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest;
import com.google.cloud.certificatemanager.v1.GetCertificateMapRequest;
import com.google.cloud.certificatemanager.v1.GetCertificateRequest;
import com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest;
+import com.google.cloud.certificatemanager.v1.GetTrustConfigRequest;
import com.google.cloud.certificatemanager.v1.ListCertificateIssuanceConfigsRequest;
import com.google.cloud.certificatemanager.v1.ListCertificateIssuanceConfigsResponse;
import com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest;
@@ -82,11 +86,15 @@
import com.google.cloud.certificatemanager.v1.ListCertificatesResponse;
import com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest;
import com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse;
+import com.google.cloud.certificatemanager.v1.ListTrustConfigsRequest;
+import com.google.cloud.certificatemanager.v1.ListTrustConfigsResponse;
import com.google.cloud.certificatemanager.v1.OperationMetadata;
+import com.google.cloud.certificatemanager.v1.TrustConfig;
import com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest;
import com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest;
import com.google.cloud.certificatemanager.v1.UpdateCertificateRequest;
import com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest;
+import com.google.cloud.certificatemanager.v1.UpdateTrustConfigRequest;
import com.google.cloud.location.GetLocationRequest;
import com.google.cloud.location.ListLocationsRequest;
import com.google.cloud.location.ListLocationsResponse;
@@ -238,6 +246,19 @@ public class CertificateManagerStubSettings extends StubSettings
deleteCertificateIssuanceConfigOperationSettings;
+ private final PagedCallSettings<
+ ListTrustConfigsRequest, ListTrustConfigsResponse, ListTrustConfigsPagedResponse>
+ listTrustConfigsSettings;
+ private final UnaryCallSettings getTrustConfigSettings;
+ private final UnaryCallSettings createTrustConfigSettings;
+ private final OperationCallSettings
+ createTrustConfigOperationSettings;
+ private final UnaryCallSettings updateTrustConfigSettings;
+ private final OperationCallSettings
+ updateTrustConfigOperationSettings;
+ private final UnaryCallSettings deleteTrustConfigSettings;
+ private final OperationCallSettings
+ deleteTrustConfigOperationSettings;
private final PagedCallSettings<
ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
listLocationsSettings;
@@ -460,6 +481,46 @@ public Iterable extractResources(
}
};
+ private static final PagedListDescriptor<
+ ListTrustConfigsRequest, ListTrustConfigsResponse, TrustConfig>
+ LIST_TRUST_CONFIGS_PAGE_STR_DESC =
+ new PagedListDescriptor<
+ ListTrustConfigsRequest, ListTrustConfigsResponse, TrustConfig>() {
+ @Override
+ public String emptyToken() {
+ return "";
+ }
+
+ @Override
+ public ListTrustConfigsRequest injectToken(
+ ListTrustConfigsRequest payload, String token) {
+ return ListTrustConfigsRequest.newBuilder(payload).setPageToken(token).build();
+ }
+
+ @Override
+ public ListTrustConfigsRequest injectPageSize(
+ ListTrustConfigsRequest payload, int pageSize) {
+ return ListTrustConfigsRequest.newBuilder(payload).setPageSize(pageSize).build();
+ }
+
+ @Override
+ public Integer extractPageSize(ListTrustConfigsRequest payload) {
+ return payload.getPageSize();
+ }
+
+ @Override
+ public String extractNextToken(ListTrustConfigsResponse payload) {
+ return payload.getNextPageToken();
+ }
+
+ @Override
+ public Iterable extractResources(ListTrustConfigsResponse payload) {
+ return payload.getTrustConfigsList() == null
+ ? ImmutableList.of()
+ : payload.getTrustConfigsList();
+ }
+ };
+
private static final PagedListDescriptor
LIST_LOCATIONS_PAGE_STR_DESC =
new PagedListDescriptor() {
@@ -621,6 +682,25 @@ public ApiFuture getFuturePagedResp
}
};
+ private static final PagedListResponseFactory<
+ ListTrustConfigsRequest, ListTrustConfigsResponse, ListTrustConfigsPagedResponse>
+ LIST_TRUST_CONFIGS_PAGE_STR_FACT =
+ new PagedListResponseFactory<
+ ListTrustConfigsRequest, ListTrustConfigsResponse, ListTrustConfigsPagedResponse>() {
+ @Override
+ public ApiFuture getFuturePagedResponse(
+ UnaryCallable callable,
+ ListTrustConfigsRequest request,
+ ApiCallContext context,
+ ApiFuture futureResponse) {
+ PageContext
+ pageContext =
+ PageContext.create(
+ callable, LIST_TRUST_CONFIGS_PAGE_STR_DESC, request, context);
+ return ListTrustConfigsPagedResponse.createAsync(pageContext, futureResponse);
+ }
+ };
+
private static final PagedListResponseFactory<
ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
LIST_LOCATIONS_PAGE_STR_FACT =
@@ -872,6 +952,51 @@ public UnaryCallSettings deleteCertifica
return deleteCertificateIssuanceConfigOperationSettings;
}
+ /** Returns the object with the settings used for calls to listTrustConfigs. */
+ public PagedCallSettings<
+ ListTrustConfigsRequest, ListTrustConfigsResponse, ListTrustConfigsPagedResponse>
+ listTrustConfigsSettings() {
+ return listTrustConfigsSettings;
+ }
+
+ /** Returns the object with the settings used for calls to getTrustConfig. */
+ public UnaryCallSettings getTrustConfigSettings() {
+ return getTrustConfigSettings;
+ }
+
+ /** Returns the object with the settings used for calls to createTrustConfig. */
+ public UnaryCallSettings createTrustConfigSettings() {
+ return createTrustConfigSettings;
+ }
+
+ /** Returns the object with the settings used for calls to createTrustConfig. */
+ public OperationCallSettings
+ createTrustConfigOperationSettings() {
+ return createTrustConfigOperationSettings;
+ }
+
+ /** Returns the object with the settings used for calls to updateTrustConfig. */
+ public UnaryCallSettings updateTrustConfigSettings() {
+ return updateTrustConfigSettings;
+ }
+
+ /** Returns the object with the settings used for calls to updateTrustConfig. */
+ public OperationCallSettings
+ updateTrustConfigOperationSettings() {
+ return updateTrustConfigOperationSettings;
+ }
+
+ /** Returns the object with the settings used for calls to deleteTrustConfig. */
+ public UnaryCallSettings deleteTrustConfigSettings() {
+ return deleteTrustConfigSettings;
+ }
+
+ /** Returns the object with the settings used for calls to deleteTrustConfig. */
+ public OperationCallSettings
+ deleteTrustConfigOperationSettings() {
+ return deleteTrustConfigOperationSettings;
+ }
+
/** Returns the object with the settings used for calls to listLocations. */
public PagedCallSettings
listLocationsSettings() {
@@ -1058,6 +1183,17 @@ protected CertificateManagerStubSettings(Builder settingsBuilder) throws IOExcep
settingsBuilder.deleteCertificateIssuanceConfigSettings().build();
deleteCertificateIssuanceConfigOperationSettings =
settingsBuilder.deleteCertificateIssuanceConfigOperationSettings().build();
+ listTrustConfigsSettings = settingsBuilder.listTrustConfigsSettings().build();
+ getTrustConfigSettings = settingsBuilder.getTrustConfigSettings().build();
+ createTrustConfigSettings = settingsBuilder.createTrustConfigSettings().build();
+ createTrustConfigOperationSettings =
+ settingsBuilder.createTrustConfigOperationSettings().build();
+ updateTrustConfigSettings = settingsBuilder.updateTrustConfigSettings().build();
+ updateTrustConfigOperationSettings =
+ settingsBuilder.updateTrustConfigOperationSettings().build();
+ deleteTrustConfigSettings = settingsBuilder.deleteTrustConfigSettings().build();
+ deleteTrustConfigOperationSettings =
+ settingsBuilder.deleteTrustConfigOperationSettings().build();
listLocationsSettings = settingsBuilder.listLocationsSettings().build();
getLocationSettings = settingsBuilder.getLocationSettings().build();
}
@@ -1169,6 +1305,25 @@ public static class Builder
private final OperationCallSettings.Builder<
DeleteCertificateIssuanceConfigRequest, Empty, OperationMetadata>
deleteCertificateIssuanceConfigOperationSettings;
+ private final PagedCallSettings.Builder<
+ ListTrustConfigsRequest, ListTrustConfigsResponse, ListTrustConfigsPagedResponse>
+ listTrustConfigsSettings;
+ private final UnaryCallSettings.Builder
+ getTrustConfigSettings;
+ private final UnaryCallSettings.Builder
+ createTrustConfigSettings;
+ private final OperationCallSettings.Builder<
+ CreateTrustConfigRequest, TrustConfig, OperationMetadata>
+ createTrustConfigOperationSettings;
+ private final UnaryCallSettings.Builder
+ updateTrustConfigSettings;
+ private final OperationCallSettings.Builder<
+ UpdateTrustConfigRequest, TrustConfig, OperationMetadata>
+ updateTrustConfigOperationSettings;
+ private final UnaryCallSettings.Builder
+ deleteTrustConfigSettings;
+ private final OperationCallSettings.Builder
+ deleteTrustConfigOperationSettings;
private final PagedCallSettings.Builder<
ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
listLocationsSettings;
@@ -1256,6 +1411,14 @@ protected Builder(ClientContext clientContext) {
createCertificateIssuanceConfigOperationSettings = OperationCallSettings.newBuilder();
deleteCertificateIssuanceConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
deleteCertificateIssuanceConfigOperationSettings = OperationCallSettings.newBuilder();
+ listTrustConfigsSettings = PagedCallSettings.newBuilder(LIST_TRUST_CONFIGS_PAGE_STR_FACT);
+ getTrustConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ createTrustConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ createTrustConfigOperationSettings = OperationCallSettings.newBuilder();
+ updateTrustConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ updateTrustConfigOperationSettings = OperationCallSettings.newBuilder();
+ deleteTrustConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ deleteTrustConfigOperationSettings = OperationCallSettings.newBuilder();
listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT);
getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
@@ -1285,6 +1448,11 @@ protected Builder(ClientContext clientContext) {
getCertificateIssuanceConfigSettings,
createCertificateIssuanceConfigSettings,
deleteCertificateIssuanceConfigSettings,
+ listTrustConfigsSettings,
+ getTrustConfigSettings,
+ createTrustConfigSettings,
+ updateTrustConfigSettings,
+ deleteTrustConfigSettings,
listLocationsSettings,
getLocationSettings);
initDefaults(this);
@@ -1346,6 +1514,14 @@ protected Builder(CertificateManagerStubSettings settings) {
settings.deleteCertificateIssuanceConfigSettings.toBuilder();
deleteCertificateIssuanceConfigOperationSettings =
settings.deleteCertificateIssuanceConfigOperationSettings.toBuilder();
+ listTrustConfigsSettings = settings.listTrustConfigsSettings.toBuilder();
+ getTrustConfigSettings = settings.getTrustConfigSettings.toBuilder();
+ createTrustConfigSettings = settings.createTrustConfigSettings.toBuilder();
+ createTrustConfigOperationSettings = settings.createTrustConfigOperationSettings.toBuilder();
+ updateTrustConfigSettings = settings.updateTrustConfigSettings.toBuilder();
+ updateTrustConfigOperationSettings = settings.updateTrustConfigOperationSettings.toBuilder();
+ deleteTrustConfigSettings = settings.deleteTrustConfigSettings.toBuilder();
+ deleteTrustConfigOperationSettings = settings.deleteTrustConfigOperationSettings.toBuilder();
listLocationsSettings = settings.listLocationsSettings.toBuilder();
getLocationSettings = settings.getLocationSettings.toBuilder();
@@ -1375,6 +1551,11 @@ protected Builder(CertificateManagerStubSettings settings) {
getCertificateIssuanceConfigSettings,
createCertificateIssuanceConfigSettings,
deleteCertificateIssuanceConfigSettings,
+ listTrustConfigsSettings,
+ getTrustConfigSettings,
+ createTrustConfigSettings,
+ updateTrustConfigSettings,
+ deleteTrustConfigSettings,
listLocationsSettings,
getLocationSettings);
}
@@ -1524,6 +1705,31 @@ private static Builder initDefaults(Builder builder) {
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
+ builder
+ .listTrustConfigsSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .getTrustConfigSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .createTrustConfigSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .updateTrustConfigSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .deleteTrustConfigSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
builder
.listLocationsSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
@@ -1876,6 +2082,78 @@ private static Builder initDefaults(Builder builder) {
.setTotalTimeout(Duration.ofMillis(300000L))
.build()));
+ builder
+ .createTrustConfigOperationSettings()
+ .setInitialCallSettings(
+ UnaryCallSettings
+ .newUnaryCallSettingsBuilder()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"))
+ .build())
+ .setResponseTransformer(
+ ProtoOperationTransformers.ResponseTransformer.create(TrustConfig.class))
+ .setMetadataTransformer(
+ ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class))
+ .setPollingAlgorithm(
+ OperationTimedPollAlgorithm.create(
+ RetrySettings.newBuilder()
+ .setInitialRetryDelay(Duration.ofMillis(5000L))
+ .setRetryDelayMultiplier(1.5)
+ .setMaxRetryDelay(Duration.ofMillis(45000L))
+ .setInitialRpcTimeout(Duration.ZERO)
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeout(Duration.ZERO)
+ .setTotalTimeout(Duration.ofMillis(300000L))
+ .build()));
+
+ builder
+ .updateTrustConfigOperationSettings()
+ .setInitialCallSettings(
+ UnaryCallSettings
+ .newUnaryCallSettingsBuilder()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"))
+ .build())
+ .setResponseTransformer(
+ ProtoOperationTransformers.ResponseTransformer.create(TrustConfig.class))
+ .setMetadataTransformer(
+ ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class))
+ .setPollingAlgorithm(
+ OperationTimedPollAlgorithm.create(
+ RetrySettings.newBuilder()
+ .setInitialRetryDelay(Duration.ofMillis(5000L))
+ .setRetryDelayMultiplier(1.5)
+ .setMaxRetryDelay(Duration.ofMillis(45000L))
+ .setInitialRpcTimeout(Duration.ZERO)
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeout(Duration.ZERO)
+ .setTotalTimeout(Duration.ofMillis(300000L))
+ .build()));
+
+ builder
+ .deleteTrustConfigOperationSettings()
+ .setInitialCallSettings(
+ UnaryCallSettings
+ .newUnaryCallSettingsBuilder()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"))
+ .build())
+ .setResponseTransformer(
+ ProtoOperationTransformers.ResponseTransformer.create(Empty.class))
+ .setMetadataTransformer(
+ ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class))
+ .setPollingAlgorithm(
+ OperationTimedPollAlgorithm.create(
+ RetrySettings.newBuilder()
+ .setInitialRetryDelay(Duration.ofMillis(5000L))
+ .setRetryDelayMultiplier(1.5)
+ .setMaxRetryDelay(Duration.ofMillis(45000L))
+ .setInitialRpcTimeout(Duration.ZERO)
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeout(Duration.ZERO)
+ .setTotalTimeout(Duration.ofMillis(300000L))
+ .build()));
+
return builder;
}
@@ -2142,6 +2420,54 @@ public UnaryCallSettings.Builder getCertific
return deleteCertificateIssuanceConfigOperationSettings;
}
+ /** Returns the builder for the settings used for calls to listTrustConfigs. */
+ public PagedCallSettings.Builder<
+ ListTrustConfigsRequest, ListTrustConfigsResponse, ListTrustConfigsPagedResponse>
+ listTrustConfigsSettings() {
+ return listTrustConfigsSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to getTrustConfig. */
+ public UnaryCallSettings.Builder getTrustConfigSettings() {
+ return getTrustConfigSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to createTrustConfig. */
+ public UnaryCallSettings.Builder
+ createTrustConfigSettings() {
+ return createTrustConfigSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to createTrustConfig. */
+ public OperationCallSettings.Builder
+ createTrustConfigOperationSettings() {
+ return createTrustConfigOperationSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to updateTrustConfig. */
+ public UnaryCallSettings.Builder
+ updateTrustConfigSettings() {
+ return updateTrustConfigSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to updateTrustConfig. */
+ public OperationCallSettings.Builder
+ updateTrustConfigOperationSettings() {
+ return updateTrustConfigOperationSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to deleteTrustConfig. */
+ public UnaryCallSettings.Builder
+ deleteTrustConfigSettings() {
+ return deleteTrustConfigSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to deleteTrustConfig. */
+ public OperationCallSettings.Builder
+ deleteTrustConfigOperationSettings() {
+ return deleteTrustConfigOperationSettings;
+ }
+
/** Returns the builder for the settings used for calls to listLocations. */
public PagedCallSettings.Builder<
ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
diff --git a/java-certificate-manager/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/stub/GrpcCertificateManagerStub.java b/java-certificate-manager/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/stub/GrpcCertificateManagerStub.java
index fca87327724f..7a85bbb20864 100644
--- a/java-certificate-manager/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/stub/GrpcCertificateManagerStub.java
+++ b/java-certificate-manager/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/stub/GrpcCertificateManagerStub.java
@@ -22,6 +22,7 @@
import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListCertificatesPagedResponse;
import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListDnsAuthorizationsPagedResponse;
import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListLocationsPagedResponse;
+import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListTrustConfigsPagedResponse;
import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.core.BackgroundResourceAggregation;
@@ -40,17 +41,20 @@
import com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest;
import com.google.cloud.certificatemanager.v1.CreateCertificateRequest;
import com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest;
+import com.google.cloud.certificatemanager.v1.CreateTrustConfigRequest;
import com.google.cloud.certificatemanager.v1.DeleteCertificateIssuanceConfigRequest;
import com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest;
import com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest;
import com.google.cloud.certificatemanager.v1.DeleteCertificateRequest;
import com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest;
+import com.google.cloud.certificatemanager.v1.DeleteTrustConfigRequest;
import com.google.cloud.certificatemanager.v1.DnsAuthorization;
import com.google.cloud.certificatemanager.v1.GetCertificateIssuanceConfigRequest;
import com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest;
import com.google.cloud.certificatemanager.v1.GetCertificateMapRequest;
import com.google.cloud.certificatemanager.v1.GetCertificateRequest;
import com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest;
+import com.google.cloud.certificatemanager.v1.GetTrustConfigRequest;
import com.google.cloud.certificatemanager.v1.ListCertificateIssuanceConfigsRequest;
import com.google.cloud.certificatemanager.v1.ListCertificateIssuanceConfigsResponse;
import com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest;
@@ -61,11 +65,15 @@
import com.google.cloud.certificatemanager.v1.ListCertificatesResponse;
import com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest;
import com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse;
+import com.google.cloud.certificatemanager.v1.ListTrustConfigsRequest;
+import com.google.cloud.certificatemanager.v1.ListTrustConfigsResponse;
import com.google.cloud.certificatemanager.v1.OperationMetadata;
+import com.google.cloud.certificatemanager.v1.TrustConfig;
import com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest;
import com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest;
import com.google.cloud.certificatemanager.v1.UpdateCertificateRequest;
import com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest;
+import com.google.cloud.certificatemanager.v1.UpdateTrustConfigRequest;
import com.google.cloud.location.GetLocationRequest;
import com.google.cloud.location.ListLocationsRequest;
import com.google.cloud.location.ListLocationsResponse;
@@ -368,6 +376,62 @@ public class GrpcCertificateManagerStub extends CertificateManagerStub {
.setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
.build();
+ private static final MethodDescriptor
+ listTrustConfigsMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(
+ "google.cloud.certificatemanager.v1.CertificateManager/ListTrustConfigs")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(ListTrustConfigsRequest.getDefaultInstance()))
+ .setResponseMarshaller(
+ ProtoUtils.marshaller(ListTrustConfigsResponse.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor
+ getTrustConfigMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(
+ "google.cloud.certificatemanager.v1.CertificateManager/GetTrustConfig")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(GetTrustConfigRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(TrustConfig.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor
+ createTrustConfigMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(
+ "google.cloud.certificatemanager.v1.CertificateManager/CreateTrustConfig")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(CreateTrustConfigRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor
+ updateTrustConfigMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(
+ "google.cloud.certificatemanager.v1.CertificateManager/UpdateTrustConfig")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(UpdateTrustConfigRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor
+ deleteTrustConfigMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(
+ "google.cloud.certificatemanager.v1.CertificateManager/DeleteTrustConfig")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(DeleteTrustConfigRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
+ .build();
+
private static final MethodDescriptor
listLocationsMethodDescriptor =
MethodDescriptor.newBuilder()
@@ -473,6 +537,20 @@ public class GrpcCertificateManagerStub extends CertificateManagerStub {
deleteCertificateIssuanceConfigCallable;
private final OperationCallable
deleteCertificateIssuanceConfigOperationCallable;
+ private final UnaryCallable
+ listTrustConfigsCallable;
+ private final UnaryCallable
+ listTrustConfigsPagedCallable;
+ private final UnaryCallable getTrustConfigCallable;
+ private final UnaryCallable createTrustConfigCallable;
+ private final OperationCallable
+ createTrustConfigOperationCallable;
+ private final UnaryCallable updateTrustConfigCallable;
+ private final OperationCallable
+ updateTrustConfigOperationCallable;
+ private final UnaryCallable deleteTrustConfigCallable;
+ private final OperationCallable
+ deleteTrustConfigOperationCallable;
private final UnaryCallable listLocationsCallable;
private final UnaryCallable
listLocationsPagedCallable;
@@ -790,6 +868,58 @@ protected GrpcCertificateManagerStub(
return builder.build();
})
.build();
+ GrpcCallSettings
+ listTrustConfigsTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(listTrustConfigsMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("parent", String.valueOf(request.getParent()));
+ return builder.build();
+ })
+ .build();
+ GrpcCallSettings getTrustConfigTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(getTrustConfigMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("name", String.valueOf(request.getName()));
+ return builder.build();
+ })
+ .build();
+ GrpcCallSettings createTrustConfigTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(createTrustConfigMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("parent", String.valueOf(request.getParent()));
+ return builder.build();
+ })
+ .build();
+ GrpcCallSettings updateTrustConfigTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(updateTrustConfigMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add(
+ "trust_config.name", String.valueOf(request.getTrustConfig().getName()));
+ return builder.build();
+ })
+ .build();
+ GrpcCallSettings deleteTrustConfigTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(deleteTrustConfigMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("name", String.valueOf(request.getName()));
+ return builder.build();
+ })
+ .build();
GrpcCallSettings listLocationsTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(listLocationsMethodDescriptor)
@@ -1034,6 +1164,48 @@ protected GrpcCertificateManagerStub(
settings.deleteCertificateIssuanceConfigOperationSettings(),
clientContext,
operationsStub);
+ this.listTrustConfigsCallable =
+ callableFactory.createUnaryCallable(
+ listTrustConfigsTransportSettings, settings.listTrustConfigsSettings(), clientContext);
+ this.listTrustConfigsPagedCallable =
+ callableFactory.createPagedCallable(
+ listTrustConfigsTransportSettings, settings.listTrustConfigsSettings(), clientContext);
+ this.getTrustConfigCallable =
+ callableFactory.createUnaryCallable(
+ getTrustConfigTransportSettings, settings.getTrustConfigSettings(), clientContext);
+ this.createTrustConfigCallable =
+ callableFactory.createUnaryCallable(
+ createTrustConfigTransportSettings,
+ settings.createTrustConfigSettings(),
+ clientContext);
+ this.createTrustConfigOperationCallable =
+ callableFactory.createOperationCallable(
+ createTrustConfigTransportSettings,
+ settings.createTrustConfigOperationSettings(),
+ clientContext,
+ operationsStub);
+ this.updateTrustConfigCallable =
+ callableFactory.createUnaryCallable(
+ updateTrustConfigTransportSettings,
+ settings.updateTrustConfigSettings(),
+ clientContext);
+ this.updateTrustConfigOperationCallable =
+ callableFactory.createOperationCallable(
+ updateTrustConfigTransportSettings,
+ settings.updateTrustConfigOperationSettings(),
+ clientContext,
+ operationsStub);
+ this.deleteTrustConfigCallable =
+ callableFactory.createUnaryCallable(
+ deleteTrustConfigTransportSettings,
+ settings.deleteTrustConfigSettings(),
+ clientContext);
+ this.deleteTrustConfigOperationCallable =
+ callableFactory.createOperationCallable(
+ deleteTrustConfigTransportSettings,
+ settings.deleteTrustConfigOperationSettings(),
+ clientContext,
+ operationsStub);
this.listLocationsCallable =
callableFactory.createUnaryCallable(
listLocationsTransportSettings, settings.listLocationsSettings(), clientContext);
@@ -1301,6 +1473,56 @@ public UnaryCallable deleteDnsAuthoriz
return deleteCertificateIssuanceConfigOperationCallable;
}
+ @Override
+ public UnaryCallable
+ listTrustConfigsCallable() {
+ return listTrustConfigsCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ listTrustConfigsPagedCallable() {
+ return listTrustConfigsPagedCallable;
+ }
+
+ @Override
+ public UnaryCallable getTrustConfigCallable() {
+ return getTrustConfigCallable;
+ }
+
+ @Override
+ public UnaryCallable createTrustConfigCallable() {
+ return createTrustConfigCallable;
+ }
+
+ @Override
+ public OperationCallable
+ createTrustConfigOperationCallable() {
+ return createTrustConfigOperationCallable;
+ }
+
+ @Override
+ public UnaryCallable updateTrustConfigCallable() {
+ return updateTrustConfigCallable;
+ }
+
+ @Override
+ public OperationCallable
+ updateTrustConfigOperationCallable() {
+ return updateTrustConfigOperationCallable;
+ }
+
+ @Override
+ public UnaryCallable deleteTrustConfigCallable() {
+ return deleteTrustConfigCallable;
+ }
+
+ @Override
+ public OperationCallable
+ deleteTrustConfigOperationCallable() {
+ return deleteTrustConfigOperationCallable;
+ }
+
@Override
public UnaryCallable listLocationsCallable() {
return listLocationsCallable;
diff --git a/java-certificate-manager/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/stub/HttpJsonCertificateManagerStub.java b/java-certificate-manager/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/stub/HttpJsonCertificateManagerStub.java
index 387880f80eac..15b5cf2a8927 100644
--- a/java-certificate-manager/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/stub/HttpJsonCertificateManagerStub.java
+++ b/java-certificate-manager/google-cloud-certificate-manager/src/main/java/com/google/cloud/certificatemanager/v1/stub/HttpJsonCertificateManagerStub.java
@@ -22,6 +22,7 @@
import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListCertificatesPagedResponse;
import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListDnsAuthorizationsPagedResponse;
import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListLocationsPagedResponse;
+import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListTrustConfigsPagedResponse;
import com.google.api.HttpRule;
import com.google.api.core.InternalApi;
@@ -48,17 +49,20 @@
import com.google.cloud.certificatemanager.v1.CreateCertificateMapRequest;
import com.google.cloud.certificatemanager.v1.CreateCertificateRequest;
import com.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest;
+import com.google.cloud.certificatemanager.v1.CreateTrustConfigRequest;
import com.google.cloud.certificatemanager.v1.DeleteCertificateIssuanceConfigRequest;
import com.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest;
import com.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest;
import com.google.cloud.certificatemanager.v1.DeleteCertificateRequest;
import com.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest;
+import com.google.cloud.certificatemanager.v1.DeleteTrustConfigRequest;
import com.google.cloud.certificatemanager.v1.DnsAuthorization;
import com.google.cloud.certificatemanager.v1.GetCertificateIssuanceConfigRequest;
import com.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest;
import com.google.cloud.certificatemanager.v1.GetCertificateMapRequest;
import com.google.cloud.certificatemanager.v1.GetCertificateRequest;
import com.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest;
+import com.google.cloud.certificatemanager.v1.GetTrustConfigRequest;
import com.google.cloud.certificatemanager.v1.ListCertificateIssuanceConfigsRequest;
import com.google.cloud.certificatemanager.v1.ListCertificateIssuanceConfigsResponse;
import com.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest;
@@ -69,11 +73,15 @@
import com.google.cloud.certificatemanager.v1.ListCertificatesResponse;
import com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest;
import com.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse;
+import com.google.cloud.certificatemanager.v1.ListTrustConfigsRequest;
+import com.google.cloud.certificatemanager.v1.ListTrustConfigsResponse;
import com.google.cloud.certificatemanager.v1.OperationMetadata;
+import com.google.cloud.certificatemanager.v1.TrustConfig;
import com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest;
import com.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest;
import com.google.cloud.certificatemanager.v1.UpdateCertificateRequest;
import com.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest;
+import com.google.cloud.certificatemanager.v1.UpdateTrustConfigRequest;
import com.google.cloud.location.GetLocationRequest;
import com.google.cloud.location.ListLocationsRequest;
import com.google.cloud.location.ListLocationsResponse;
@@ -103,6 +111,7 @@ public class HttpJsonCertificateManagerStub extends CertificateManagerStub {
.add(Empty.getDescriptor())
.add(CertificateMap.getDescriptor())
.add(Certificate.getDescriptor())
+ .add(TrustConfig.getDescriptor())
.add(CertificateMapEntry.getDescriptor())
.add(OperationMetadata.getDescriptor())
.add(CertificateIssuanceConfig.getDescriptor())
@@ -1085,6 +1094,205 @@ public class HttpJsonCertificateManagerStub extends CertificateManagerStub {
HttpJsonOperationSnapshot.create(response))
.build();
+ private static final ApiMethodDescriptor
+ listTrustConfigsMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName(
+ "google.cloud.certificatemanager.v1.CertificateManager/ListTrustConfigs")
+ .setHttpMethod("GET")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{parent=projects/*/locations/*}/trustConfigs",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "parent", request.getParent());
+ return fields;
+ })
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "filter", request.getFilter());
+ serializer.putQueryParam(fields, "orderBy", request.getOrderBy());
+ serializer.putQueryParam(fields, "pageSize", request.getPageSize());
+ serializer.putQueryParam(fields, "pageToken", request.getPageToken());
+ serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
+ return fields;
+ })
+ .setRequestBodyExtractor(request -> null)
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(ListTrustConfigsResponse.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ getTrustConfigMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName(
+ "google.cloud.certificatemanager.v1.CertificateManager/GetTrustConfig")
+ .setHttpMethod("GET")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{name=projects/*/locations/*/trustConfigs/*}",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "name", request.getName());
+ return fields;
+ })
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
+ return fields;
+ })
+ .setRequestBodyExtractor(request -> null)
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(TrustConfig.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ createTrustConfigMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName(
+ "google.cloud.certificatemanager.v1.CertificateManager/CreateTrustConfig")
+ .setHttpMethod("POST")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{parent=projects/*/locations/*}/trustConfigs",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "parent", request.getParent());
+ return fields;
+ })
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(
+ fields, "trustConfigId", request.getTrustConfigId());
+ serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
+ return fields;
+ })
+ .setRequestBodyExtractor(
+ request ->
+ ProtoRestSerializer.create()
+ .toBody("trustConfig", request.getTrustConfig(), true))
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(Operation.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .setOperationSnapshotFactory(
+ (CreateTrustConfigRequest request, Operation response) ->
+ HttpJsonOperationSnapshot.create(response))
+ .build();
+
+ private static final ApiMethodDescriptor
+ updateTrustConfigMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName(
+ "google.cloud.certificatemanager.v1.CertificateManager/UpdateTrustConfig")
+ .setHttpMethod("PATCH")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{trustConfig.name=projects/*/locations/*/trustConfigs/*}",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(
+ fields, "trustConfig.name", request.getTrustConfig().getName());
+ return fields;
+ })
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "updateMask", request.getUpdateMask());
+ serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
+ return fields;
+ })
+ .setRequestBodyExtractor(
+ request ->
+ ProtoRestSerializer.create()
+ .toBody("trustConfig", request.getTrustConfig(), true))
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(Operation.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .setOperationSnapshotFactory(
+ (UpdateTrustConfigRequest request, Operation response) ->
+ HttpJsonOperationSnapshot.create(response))
+ .build();
+
+ private static final ApiMethodDescriptor
+ deleteTrustConfigMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName(
+ "google.cloud.certificatemanager.v1.CertificateManager/DeleteTrustConfig")
+ .setHttpMethod("DELETE")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{name=projects/*/locations/*/trustConfigs/*}",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "name", request.getName());
+ return fields;
+ })
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "etag", request.getEtag());
+ serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
+ return fields;
+ })
+ .setRequestBodyExtractor(request -> null)
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(Operation.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .setOperationSnapshotFactory(
+ (DeleteTrustConfigRequest request, Operation response) ->
+ HttpJsonOperationSnapshot.create(response))
+ .build();
+
private static final ApiMethodDescriptor
listLocationsMethodDescriptor =
ApiMethodDescriptor.newBuilder()
@@ -1239,6 +1447,20 @@ public class HttpJsonCertificateManagerStub extends CertificateManagerStub {
deleteCertificateIssuanceConfigCallable;
private final OperationCallable
deleteCertificateIssuanceConfigOperationCallable;
+ private final UnaryCallable
+ listTrustConfigsCallable;
+ private final UnaryCallable
+ listTrustConfigsPagedCallable;
+ private final UnaryCallable getTrustConfigCallable;
+ private final UnaryCallable createTrustConfigCallable;
+ private final OperationCallable
+ createTrustConfigOperationCallable;
+ private final UnaryCallable updateTrustConfigCallable;
+ private final OperationCallable
+ updateTrustConfigOperationCallable;
+ private final UnaryCallable deleteTrustConfigCallable;
+ private final OperationCallable
+ deleteTrustConfigOperationCallable;
private final UnaryCallable listLocationsCallable;
private final UnaryCallable
listLocationsPagedCallable;
@@ -1614,6 +1836,63 @@ protected HttpJsonCertificateManagerStub(
return builder.build();
})
.build();
+ HttpJsonCallSettings
+ listTrustConfigsTransportSettings =
+ HttpJsonCallSettings.newBuilder()
+ .setMethodDescriptor(listTrustConfigsMethodDescriptor)
+ .setTypeRegistry(typeRegistry)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("parent", String.valueOf(request.getParent()));
+ return builder.build();
+ })
+ .build();
+ HttpJsonCallSettings getTrustConfigTransportSettings =
+ HttpJsonCallSettings.newBuilder()
+ .setMethodDescriptor(getTrustConfigMethodDescriptor)
+ .setTypeRegistry(typeRegistry)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("name", String.valueOf(request.getName()));
+ return builder.build();
+ })
+ .build();
+ HttpJsonCallSettings createTrustConfigTransportSettings =
+ HttpJsonCallSettings.newBuilder()
+ .setMethodDescriptor(createTrustConfigMethodDescriptor)
+ .setTypeRegistry(typeRegistry)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("parent", String.valueOf(request.getParent()));
+ return builder.build();
+ })
+ .build();
+ HttpJsonCallSettings updateTrustConfigTransportSettings =
+ HttpJsonCallSettings.newBuilder()
+ .setMethodDescriptor(updateTrustConfigMethodDescriptor)
+ .setTypeRegistry(typeRegistry)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add(
+ "trust_config.name", String.valueOf(request.getTrustConfig().getName()));
+ return builder.build();
+ })
+ .build();
+ HttpJsonCallSettings deleteTrustConfigTransportSettings =
+ HttpJsonCallSettings.newBuilder()
+ .setMethodDescriptor(deleteTrustConfigMethodDescriptor)
+ .setTypeRegistry(typeRegistry)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("name", String.valueOf(request.getName()));
+ return builder.build();
+ })
+ .build();
HttpJsonCallSettings
listLocationsTransportSettings =
HttpJsonCallSettings.newBuilder()
@@ -1861,6 +2140,48 @@ protected HttpJsonCertificateManagerStub(
settings.deleteCertificateIssuanceConfigOperationSettings(),
clientContext,
httpJsonOperationsStub);
+ this.listTrustConfigsCallable =
+ callableFactory.createUnaryCallable(
+ listTrustConfigsTransportSettings, settings.listTrustConfigsSettings(), clientContext);
+ this.listTrustConfigsPagedCallable =
+ callableFactory.createPagedCallable(
+ listTrustConfigsTransportSettings, settings.listTrustConfigsSettings(), clientContext);
+ this.getTrustConfigCallable =
+ callableFactory.createUnaryCallable(
+ getTrustConfigTransportSettings, settings.getTrustConfigSettings(), clientContext);
+ this.createTrustConfigCallable =
+ callableFactory.createUnaryCallable(
+ createTrustConfigTransportSettings,
+ settings.createTrustConfigSettings(),
+ clientContext);
+ this.createTrustConfigOperationCallable =
+ callableFactory.createOperationCallable(
+ createTrustConfigTransportSettings,
+ settings.createTrustConfigOperationSettings(),
+ clientContext,
+ httpJsonOperationsStub);
+ this.updateTrustConfigCallable =
+ callableFactory.createUnaryCallable(
+ updateTrustConfigTransportSettings,
+ settings.updateTrustConfigSettings(),
+ clientContext);
+ this.updateTrustConfigOperationCallable =
+ callableFactory.createOperationCallable(
+ updateTrustConfigTransportSettings,
+ settings.updateTrustConfigOperationSettings(),
+ clientContext,
+ httpJsonOperationsStub);
+ this.deleteTrustConfigCallable =
+ callableFactory.createUnaryCallable(
+ deleteTrustConfigTransportSettings,
+ settings.deleteTrustConfigSettings(),
+ clientContext);
+ this.deleteTrustConfigOperationCallable =
+ callableFactory.createOperationCallable(
+ deleteTrustConfigTransportSettings,
+ settings.deleteTrustConfigOperationSettings(),
+ clientContext,
+ httpJsonOperationsStub);
this.listLocationsCallable =
callableFactory.createUnaryCallable(
listLocationsTransportSettings, settings.listLocationsSettings(), clientContext);
@@ -1902,6 +2223,11 @@ public static List getMethodDescriptors() {
methodDescriptors.add(getCertificateIssuanceConfigMethodDescriptor);
methodDescriptors.add(createCertificateIssuanceConfigMethodDescriptor);
methodDescriptors.add(deleteCertificateIssuanceConfigMethodDescriptor);
+ methodDescriptors.add(listTrustConfigsMethodDescriptor);
+ methodDescriptors.add(getTrustConfigMethodDescriptor);
+ methodDescriptors.add(createTrustConfigMethodDescriptor);
+ methodDescriptors.add(updateTrustConfigMethodDescriptor);
+ methodDescriptors.add(deleteTrustConfigMethodDescriptor);
methodDescriptors.add(listLocationsMethodDescriptor);
methodDescriptors.add(getLocationMethodDescriptor);
return methodDescriptors;
@@ -2160,6 +2486,56 @@ public UnaryCallable deleteDnsAuthoriz
return deleteCertificateIssuanceConfigOperationCallable;
}
+ @Override
+ public UnaryCallable
+ listTrustConfigsCallable() {
+ return listTrustConfigsCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ listTrustConfigsPagedCallable() {
+ return listTrustConfigsPagedCallable;
+ }
+
+ @Override
+ public UnaryCallable getTrustConfigCallable() {
+ return getTrustConfigCallable;
+ }
+
+ @Override
+ public UnaryCallable createTrustConfigCallable() {
+ return createTrustConfigCallable;
+ }
+
+ @Override
+ public OperationCallable
+ createTrustConfigOperationCallable() {
+ return createTrustConfigOperationCallable;
+ }
+
+ @Override
+ public UnaryCallable updateTrustConfigCallable() {
+ return updateTrustConfigCallable;
+ }
+
+ @Override
+ public OperationCallable
+ updateTrustConfigOperationCallable() {
+ return updateTrustConfigOperationCallable;
+ }
+
+ @Override
+ public UnaryCallable deleteTrustConfigCallable() {
+ return deleteTrustConfigCallable;
+ }
+
+ @Override
+ public OperationCallable
+ deleteTrustConfigOperationCallable() {
+ return deleteTrustConfigOperationCallable;
+ }
+
@Override
public UnaryCallable listLocationsCallable() {
return listLocationsCallable;
diff --git a/java-certificate-manager/google-cloud-certificate-manager/src/main/resources/META-INF/native-image/com.google.cloud.certificatemanager.v1/reflect-config.json b/java-certificate-manager/google-cloud-certificate-manager/src/main/resources/META-INF/native-image/com.google.cloud.certificatemanager.v1/reflect-config.json
index 82a37dd68dcd..5c68faf1c1df 100644
--- a/java-certificate-manager/google-cloud-certificate-manager/src/main/resources/META-INF/native-image/com.google.cloud.certificatemanager.v1/reflect-config.json
+++ b/java-certificate-manager/google-cloud-certificate-manager/src/main/resources/META-INF/native-image/com.google.cloud.certificatemanager.v1/reflect-config.json
@@ -746,6 +746,24 @@
"allDeclaredClasses": true,
"allPublicClasses": true
},
+ {
+ "name": "com.google.cloud.certificatemanager.v1.CreateTrustConfigRequest",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
+ {
+ "name": "com.google.cloud.certificatemanager.v1.CreateTrustConfigRequest$Builder",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
{
"name": "com.google.cloud.certificatemanager.v1.DeleteCertificateIssuanceConfigRequest",
"queryAllDeclaredConstructors": true,
@@ -836,6 +854,24 @@
"allDeclaredClasses": true,
"allPublicClasses": true
},
+ {
+ "name": "com.google.cloud.certificatemanager.v1.DeleteTrustConfigRequest",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
+ {
+ "name": "com.google.cloud.certificatemanager.v1.DeleteTrustConfigRequest$Builder",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
{
"name": "com.google.cloud.certificatemanager.v1.DnsAuthorization",
"queryAllDeclaredConstructors": true,
@@ -872,6 +908,15 @@
"allDeclaredClasses": true,
"allPublicClasses": true
},
+ {
+ "name": "com.google.cloud.certificatemanager.v1.DnsAuthorization$Type",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
{
"name": "com.google.cloud.certificatemanager.v1.GetCertificateIssuanceConfigRequest",
"queryAllDeclaredConstructors": true,
@@ -962,6 +1007,24 @@
"allDeclaredClasses": true,
"allPublicClasses": true
},
+ {
+ "name": "com.google.cloud.certificatemanager.v1.GetTrustConfigRequest",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
+ {
+ "name": "com.google.cloud.certificatemanager.v1.GetTrustConfigRequest$Builder",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
{
"name": "com.google.cloud.certificatemanager.v1.ListCertificateIssuanceConfigsRequest",
"queryAllDeclaredConstructors": true,
@@ -1142,6 +1205,42 @@
"allDeclaredClasses": true,
"allPublicClasses": true
},
+ {
+ "name": "com.google.cloud.certificatemanager.v1.ListTrustConfigsRequest",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
+ {
+ "name": "com.google.cloud.certificatemanager.v1.ListTrustConfigsRequest$Builder",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
+ {
+ "name": "com.google.cloud.certificatemanager.v1.ListTrustConfigsResponse",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
+ {
+ "name": "com.google.cloud.certificatemanager.v1.ListTrustConfigsResponse$Builder",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
{
"name": "com.google.cloud.certificatemanager.v1.OperationMetadata",
"queryAllDeclaredConstructors": true,
@@ -1169,6 +1268,78 @@
"allDeclaredClasses": true,
"allPublicClasses": true
},
+ {
+ "name": "com.google.cloud.certificatemanager.v1.TrustConfig",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
+ {
+ "name": "com.google.cloud.certificatemanager.v1.TrustConfig$Builder",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
+ {
+ "name": "com.google.cloud.certificatemanager.v1.TrustConfig$IntermediateCA",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
+ {
+ "name": "com.google.cloud.certificatemanager.v1.TrustConfig$IntermediateCA$Builder",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
+ {
+ "name": "com.google.cloud.certificatemanager.v1.TrustConfig$TrustAnchor",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
+ {
+ "name": "com.google.cloud.certificatemanager.v1.TrustConfig$TrustAnchor$Builder",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
+ {
+ "name": "com.google.cloud.certificatemanager.v1.TrustConfig$TrustStore",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
+ {
+ "name": "com.google.cloud.certificatemanager.v1.TrustConfig$TrustStore$Builder",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
{
"name": "com.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest",
"queryAllDeclaredConstructors": true,
@@ -1241,6 +1412,24 @@
"allDeclaredClasses": true,
"allPublicClasses": true
},
+ {
+ "name": "com.google.cloud.certificatemanager.v1.UpdateTrustConfigRequest",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
+ {
+ "name": "com.google.cloud.certificatemanager.v1.UpdateTrustConfigRequest$Builder",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
{
"name": "com.google.cloud.location.GetLocationRequest",
"queryAllDeclaredConstructors": true,
diff --git a/java-certificate-manager/google-cloud-certificate-manager/src/test/java/com/google/cloud/certificatemanager/v1/CertificateManagerClientHttpJsonTest.java b/java-certificate-manager/google-cloud-certificate-manager/src/test/java/com/google/cloud/certificatemanager/v1/CertificateManagerClientHttpJsonTest.java
index 8160d85f7fd1..7bcb0b56a227 100644
--- a/java-certificate-manager/google-cloud-certificate-manager/src/test/java/com/google/cloud/certificatemanager/v1/CertificateManagerClientHttpJsonTest.java
+++ b/java-certificate-manager/google-cloud-certificate-manager/src/test/java/com/google/cloud/certificatemanager/v1/CertificateManagerClientHttpJsonTest.java
@@ -22,6 +22,7 @@
import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListCertificatesPagedResponse;
import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListDnsAuthorizationsPagedResponse;
import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListLocationsPagedResponse;
+import static com.google.cloud.certificatemanager.v1.CertificateManagerClient.ListTrustConfigsPagedResponse;
import com.google.api.gax.core.NoCredentialsProvider;
import com.google.api.gax.httpjson.GaxHttpJsonProperties;
@@ -2582,6 +2583,491 @@ public void deleteCertificateIssuanceConfigExceptionTest2() throws Exception {
}
}
+ @Test
+ public void listTrustConfigsTest() throws Exception {
+ TrustConfig responsesElement = TrustConfig.newBuilder().build();
+ ListTrustConfigsResponse expectedResponse =
+ ListTrustConfigsResponse.newBuilder()
+ .setNextPageToken("")
+ .addAllTrustConfigs(Arrays.asList(responsesElement))
+ .build();
+ mockService.addResponse(expectedResponse);
+
+ LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+
+ ListTrustConfigsPagedResponse pagedListResponse = client.listTrustConfigs(parent);
+
+ List resources = Lists.newArrayList(pagedListResponse.iterateAll());
+
+ Assert.assertEquals(1, resources.size());
+ Assert.assertEquals(expectedResponse.getTrustConfigsList().get(0), resources.get(0));
+
+ List actualRequests = mockService.getRequestPaths();
+ Assert.assertEquals(1, actualRequests.size());
+
+ String apiClientHeaderKey =
+ mockService
+ .getRequestHeaders()
+ .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey())
+ .iterator()
+ .next();
+ Assert.assertTrue(
+ GaxHttpJsonProperties.getDefaultApiClientHeaderPattern()
+ .matcher(apiClientHeaderKey)
+ .matches());
+ }
+
+ @Test
+ public void listTrustConfigsExceptionTest() throws Exception {
+ ApiException exception =
+ ApiExceptionFactory.createException(
+ new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false);
+ mockService.addException(exception);
+
+ try {
+ LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ client.listTrustConfigs(parent);
+ Assert.fail("No exception raised");
+ } catch (InvalidArgumentException e) {
+ // Expected exception.
+ }
+ }
+
+ @Test
+ public void listTrustConfigsTest2() throws Exception {
+ TrustConfig responsesElement = TrustConfig.newBuilder().build();
+ ListTrustConfigsResponse expectedResponse =
+ ListTrustConfigsResponse.newBuilder()
+ .setNextPageToken("")
+ .addAllTrustConfigs(Arrays.asList(responsesElement))
+ .build();
+ mockService.addResponse(expectedResponse);
+
+ String parent = "projects/project-5833/locations/location-5833";
+
+ ListTrustConfigsPagedResponse pagedListResponse = client.listTrustConfigs(parent);
+
+ List resources = Lists.newArrayList(pagedListResponse.iterateAll());
+
+ Assert.assertEquals(1, resources.size());
+ Assert.assertEquals(expectedResponse.getTrustConfigsList().get(0), resources.get(0));
+
+ List actualRequests = mockService.getRequestPaths();
+ Assert.assertEquals(1, actualRequests.size());
+
+ String apiClientHeaderKey =
+ mockService
+ .getRequestHeaders()
+ .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey())
+ .iterator()
+ .next();
+ Assert.assertTrue(
+ GaxHttpJsonProperties.getDefaultApiClientHeaderPattern()
+ .matcher(apiClientHeaderKey)
+ .matches());
+ }
+
+ @Test
+ public void listTrustConfigsExceptionTest2() throws Exception {
+ ApiException exception =
+ ApiExceptionFactory.createException(
+ new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false);
+ mockService.addException(exception);
+
+ try {
+ String parent = "projects/project-5833/locations/location-5833";
+ client.listTrustConfigs(parent);
+ Assert.fail("No exception raised");
+ } catch (InvalidArgumentException e) {
+ // Expected exception.
+ }
+ }
+
+ @Test
+ public void getTrustConfigTest() throws Exception {
+ TrustConfig expectedResponse =
+ TrustConfig.newBuilder()
+ .setName(TrustConfigName.of("[PROJECT]", "[LOCATION]", "[TRUST_CONFIG]").toString())
+ .setCreateTime(Timestamp.newBuilder().build())
+ .setUpdateTime(Timestamp.newBuilder().build())
+ .putAllLabels(new HashMap())
+ .setDescription("description-1724546052")
+ .setEtag("etag3123477")
+ .addAllTrustStores(new ArrayList())
+ .build();
+ mockService.addResponse(expectedResponse);
+
+ TrustConfigName name = TrustConfigName.of("[PROJECT]", "[LOCATION]", "[TRUST_CONFIG]");
+
+ TrustConfig actualResponse = client.getTrustConfig(name);
+ Assert.assertEquals(expectedResponse, actualResponse);
+
+ List actualRequests = mockService.getRequestPaths();
+ Assert.assertEquals(1, actualRequests.size());
+
+ String apiClientHeaderKey =
+ mockService
+ .getRequestHeaders()
+ .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey())
+ .iterator()
+ .next();
+ Assert.assertTrue(
+ GaxHttpJsonProperties.getDefaultApiClientHeaderPattern()
+ .matcher(apiClientHeaderKey)
+ .matches());
+ }
+
+ @Test
+ public void getTrustConfigExceptionTest() throws Exception {
+ ApiException exception =
+ ApiExceptionFactory.createException(
+ new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false);
+ mockService.addException(exception);
+
+ try {
+ TrustConfigName name = TrustConfigName.of("[PROJECT]", "[LOCATION]", "[TRUST_CONFIG]");
+ client.getTrustConfig(name);
+ Assert.fail("No exception raised");
+ } catch (InvalidArgumentException e) {
+ // Expected exception.
+ }
+ }
+
+ @Test
+ public void getTrustConfigTest2() throws Exception {
+ TrustConfig expectedResponse =
+ TrustConfig.newBuilder()
+ .setName(TrustConfigName.of("[PROJECT]", "[LOCATION]", "[TRUST_CONFIG]").toString())
+ .setCreateTime(Timestamp.newBuilder().build())
+ .setUpdateTime(Timestamp.newBuilder().build())
+ .putAllLabels(new HashMap())
+ .setDescription("description-1724546052")
+ .setEtag("etag3123477")
+ .addAllTrustStores(new ArrayList())
+ .build();
+ mockService.addResponse(expectedResponse);
+
+ String name = "projects/project-2775/locations/location-2775/trustConfigs/trustConfig-2775";
+
+ TrustConfig actualResponse = client.getTrustConfig(name);
+ Assert.assertEquals(expectedResponse, actualResponse);
+
+ List actualRequests = mockService.getRequestPaths();
+ Assert.assertEquals(1, actualRequests.size());
+
+ String apiClientHeaderKey =
+ mockService
+ .getRequestHeaders()
+ .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey())
+ .iterator()
+ .next();
+ Assert.assertTrue(
+ GaxHttpJsonProperties.getDefaultApiClientHeaderPattern()
+ .matcher(apiClientHeaderKey)
+ .matches());
+ }
+
+ @Test
+ public void getTrustConfigExceptionTest2() throws Exception {
+ ApiException exception =
+ ApiExceptionFactory.createException(
+ new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false);
+ mockService.addException(exception);
+
+ try {
+ String name = "projects/project-2775/locations/location-2775/trustConfigs/trustConfig-2775";
+ client.getTrustConfig(name);
+ Assert.fail("No exception raised");
+ } catch (InvalidArgumentException e) {
+ // Expected exception.
+ }
+ }
+
+ @Test
+ public void createTrustConfigTest() throws Exception {
+ TrustConfig expectedResponse =
+ TrustConfig.newBuilder()
+ .setName(TrustConfigName.of("[PROJECT]", "[LOCATION]", "[TRUST_CONFIG]").toString())
+ .setCreateTime(Timestamp.newBuilder().build())
+ .setUpdateTime(Timestamp.newBuilder().build())
+ .putAllLabels(new HashMap())
+ .setDescription("description-1724546052")
+ .setEtag("etag3123477")
+ .addAllTrustStores(new ArrayList |