Sample code: * @@ -673,7 +674,9 @@ public final Certificate updateCertificate(Certificate certificate, FieldMask up // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Update a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. + * Update a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. Currently, the + * only field you can update is the + * [labels][google.cloud.security.privateca.v1beta1.Certificate.labels] field. * *
Sample code: * @@ -698,7 +701,9 @@ public final Certificate updateCertificate(UpdateCertificateRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Update a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. + * Update a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. Currently, the + * only field you can update is the + * [labels][google.cloud.security.privateca.v1beta1.Certificate.labels] field. * *
Sample code:
*
@@ -921,7 +926,7 @@ public final UnaryCallable Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * This class provides the ability to make remote calls to the backing service through method
- * calls that map to API methods. Sample code to get started:
- *
- * Note: close() needs to be called on the certificateAuthorityServiceClient object to clean up
- * resources such as threads. In the example above, try-with-resources is used, which automatically
- * calls close().
- *
- * The surface of this class includes several types of Java methods for each of the API's
- * methods:
- *
- * See the individual methods for example code.
- *
- * Many parameters require resource names to be formatted in a particular way. To assist with
- * these names, this class includes a format method for each type of name, and additionally a parse
- * method to extract the individual identifiers contained within names that are returned.
- *
- * This class can be customized by passing in a custom instance of
- * CertificateAuthorityServiceSettings to create(). For example:
- *
- * To customize credentials:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- *
- *
- * @param parent Required. The resource name of the location and
- * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
- * associated with the
- * [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList],
- * in the format `projects/*/locations/*/certificateAuthorities/*`.
- * @param certificateRevocationList Required. A
- * [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList]
- * with initial field values.
- * @param certificateRevocationListId Required. It must be unique within a location and match the
- * regular expression `[a-zA-Z0-9-]{1,63}`
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
- public final OperationFuture
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName parent = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * CertificateRevocationList certificateRevocationList = CertificateRevocationList.newBuilder().build();
- * String certificateRevocationListId = "";
- * CertificateRevocationList response = certificateAuthorityServiceClient.createCertificateRevocationListAsync(parent, certificateRevocationList, certificateRevocationListId).get();
- * }
- *
- *
- * @param parent Required. The resource name of the location and
- * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
- * associated with the
- * [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList],
- * in the format `projects/*/locations/*/certificateAuthorities/*`.
- * @param certificateRevocationList Required. A
- * [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList]
- * with initial field values.
- * @param certificateRevocationListId Required. It must be unique within a location and match the
- * regular expression `[a-zA-Z0-9-]{1,63}`
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
- public final OperationFuture
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName parent = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * CertificateRevocationList certificateRevocationList = CertificateRevocationList.newBuilder().build();
- * String certificateRevocationListId = "";
- * CertificateRevocationList response = certificateAuthorityServiceClient.createCertificateRevocationListAsync(parent.toString(), certificateRevocationList, certificateRevocationListId).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
- */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
- public final OperationFuture
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName parent = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * String certificateRevocationListId = "";
- * CertificateRevocationList certificateRevocationList = CertificateRevocationList.newBuilder().build();
- * CreateCertificateRevocationListRequest request = CreateCertificateRevocationListRequest.newBuilder()
- * .setParent(parent.toString())
- * .setCertificateRevocationListId(certificateRevocationListId)
- * .setCertificateRevocationList(certificateRevocationList)
- * .build();
- * CertificateRevocationList response = certificateAuthorityServiceClient.createCertificateRevocationListAsync(request).get();
- * }
- *
- */
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
- public final OperationCallable<
- CreateCertificateRevocationListRequest, CertificateRevocationList, OperationMetadata>
- createCertificateRevocationListOperationCallable() {
- return stub.createCertificateRevocationListOperationCallable();
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Create a new
- * [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList]
- * in a given Project, Location for a particular
- * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
- *
- *
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName parent = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * String certificateRevocationListId = "";
- * CertificateRevocationList certificateRevocationList = CertificateRevocationList.newBuilder().build();
- * CreateCertificateRevocationListRequest request = CreateCertificateRevocationListRequest.newBuilder()
- * .setParent(parent.toString())
- * .setCertificateRevocationListId(certificateRevocationListId)
- * .setCertificateRevocationList(certificateRevocationList)
- * .build();
- * OperationFuture<CertificateRevocationList, OperationMetadata> future = certificateAuthorityServiceClient.createCertificateRevocationListOperationCallable().futureCall(request);
- * // Do something
- * CertificateRevocationList response = future.get();
- * }
- *
- */
- public final UnaryCallable
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName parent = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * String certificateRevocationListId = "";
- * CertificateRevocationList certificateRevocationList = CertificateRevocationList.newBuilder().build();
- * CreateCertificateRevocationListRequest request = CreateCertificateRevocationListRequest.newBuilder()
- * .setParent(parent.toString())
- * .setCertificateRevocationListId(certificateRevocationListId)
- * .setCertificateRevocationList(certificateRevocationList)
- * .build();
- * ApiFuture<Operation> future = certificateAuthorityServiceClient.createCertificateRevocationListCallable().futureCall(request);
- * // Do something
- * Operation response = future.get();
- * }
- *
- *
- * @param parent Required. The resource name of the location associated with the
- * [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig], in the format
- * `projects/*/locations/*`.
- * @param reusableConfig Required. A
- * [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] with initial field
- * values.
- * @param reusableConfigId Required. It must be unique within a location and match the regular
- * expression `[a-zA-Z0-9-]{1,63}`
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
- public final OperationFuture
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- * ReusableConfig reusableConfig = ReusableConfig.newBuilder().build();
- * String reusableConfigId = "";
- * ReusableConfig response = certificateAuthorityServiceClient.createReusableConfigAsync(parent, reusableConfig, reusableConfigId).get();
- * }
- *
- *
- * @param parent Required. The resource name of the location associated with the
- * [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig], in the format
- * `projects/*/locations/*`.
- * @param reusableConfig Required. A
- * [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] with initial field
- * values.
- * @param reusableConfigId Required. It must be unique within a location and match the regular
- * expression `[a-zA-Z0-9-]{1,63}`
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
- public final OperationFuture
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- * ReusableConfig reusableConfig = ReusableConfig.newBuilder().build();
- * String reusableConfigId = "";
- * ReusableConfig response = certificateAuthorityServiceClient.createReusableConfigAsync(parent.toString(), reusableConfig, reusableConfigId).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
- */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
- public final OperationFuture
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- * String reusableConfigId = "";
- * ReusableConfig reusableConfig = ReusableConfig.newBuilder().build();
- * CreateReusableConfigRequest request = CreateReusableConfigRequest.newBuilder()
- * .setParent(parent.toString())
- * .setReusableConfigId(reusableConfigId)
- * .setReusableConfig(reusableConfig)
- * .build();
- * ReusableConfig response = certificateAuthorityServiceClient.createReusableConfigAsync(request).get();
- * }
- *
- */
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
- public final OperationCallable
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- * String reusableConfigId = "";
- * ReusableConfig reusableConfig = ReusableConfig.newBuilder().build();
- * CreateReusableConfigRequest request = CreateReusableConfigRequest.newBuilder()
- * .setParent(parent.toString())
- * .setReusableConfigId(reusableConfigId)
- * .setReusableConfig(reusableConfig)
- * .build();
- * OperationFuture<ReusableConfig, OperationMetadata> future = certificateAuthorityServiceClient.createReusableConfigOperationCallable().futureCall(request);
- * // Do something
- * ReusableConfig response = future.get();
- * }
- *
- */
- public final UnaryCallable
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- * String reusableConfigId = "";
- * ReusableConfig reusableConfig = ReusableConfig.newBuilder().build();
- * CreateReusableConfigRequest request = CreateReusableConfigRequest.newBuilder()
- * .setParent(parent.toString())
- * .setReusableConfigId(reusableConfigId)
- * .setReusableConfig(reusableConfig)
- * .build();
- * ApiFuture<Operation> future = certificateAuthorityServiceClient.createReusableConfigCallable().futureCall(request);
- * // Do something
- * Operation response = future.get();
- * }
- *
- *
- * @param name Required. The resource name for this
- * [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in the format
- * `projects/*/locations/*/reusableConfigs/*`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
- public final OperationFuture
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * ReusableConfigName name = ReusableConfigName.of("[PROJECT]", "[LOCATION]", "[REUSABLE_CONFIG]");
- * certificateAuthorityServiceClient.deleteReusableConfigAsync(name).get();
- * }
- *
- *
- * @param name Required. The resource name for this
- * [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in the format
- * `projects/*/locations/*/reusableConfigs/*`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
- public final OperationFuture
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * ReusableConfigName name = ReusableConfigName.of("[PROJECT]", "[LOCATION]", "[REUSABLE_CONFIG]");
- * certificateAuthorityServiceClient.deleteReusableConfigAsync(name.toString()).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
- */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
- public final OperationFuture
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * ReusableConfigName name = ReusableConfigName.of("[PROJECT]", "[LOCATION]", "[REUSABLE_CONFIG]");
- * DeleteReusableConfigRequest request = DeleteReusableConfigRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * certificateAuthorityServiceClient.deleteReusableConfigAsync(request).get();
- * }
- *
- */
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
- public final OperationCallable
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * ReusableConfigName name = ReusableConfigName.of("[PROJECT]", "[LOCATION]", "[REUSABLE_CONFIG]");
- * DeleteReusableConfigRequest request = DeleteReusableConfigRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * OperationFuture<Empty, OperationMetadata> future = certificateAuthorityServiceClient.deleteReusableConfigOperationCallable().futureCall(request);
- * // Do something
- * future.get();
- * }
- *
- */
- public final UnaryCallable
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * ReusableConfigName name = ReusableConfigName.of("[PROJECT]", "[LOCATION]", "[REUSABLE_CONFIG]");
- * DeleteReusableConfigRequest request = DeleteReusableConfigRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ApiFuture<Operation> future = certificateAuthorityServiceClient.deleteReusableConfigCallable().futureCall(request);
- * // Do something
- * future.get();
- * }
- *
- *
- * @param reusableConfig Required.
- * [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] with updated
- * values.
- * @param updateMask Required. A list of fields to be updated in this request.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
- public final OperationFuture
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * ReusableConfig reusableConfig = ReusableConfig.newBuilder().build();
- * FieldMask updateMask = FieldMask.newBuilder().build();
- * ReusableConfig response = certificateAuthorityServiceClient.updateReusableConfigAsync(reusableConfig, updateMask).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
- */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
- public final OperationFuture
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * ReusableConfig reusableConfig = ReusableConfig.newBuilder().build();
- * FieldMask updateMask = FieldMask.newBuilder().build();
- * UpdateReusableConfigRequest request = UpdateReusableConfigRequest.newBuilder()
- * .setReusableConfig(reusableConfig)
- * .setUpdateMask(updateMask)
- * .build();
- * ReusableConfig response = certificateAuthorityServiceClient.updateReusableConfigAsync(request).get();
- * }
- *
- */
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
- public final OperationCallable
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * ReusableConfig reusableConfig = ReusableConfig.newBuilder().build();
- * FieldMask updateMask = FieldMask.newBuilder().build();
- * UpdateReusableConfigRequest request = UpdateReusableConfigRequest.newBuilder()
- * .setReusableConfig(reusableConfig)
- * .setUpdateMask(updateMask)
- * .build();
- * OperationFuture<ReusableConfig, OperationMetadata> future = certificateAuthorityServiceClient.updateReusableConfigOperationCallable().futureCall(request);
- * // Do something
- * ReusableConfig response = future.get();
- * }
- *
- */
- public final UnaryCallable
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * ReusableConfig reusableConfig = ReusableConfig.newBuilder().build();
- * FieldMask updateMask = FieldMask.newBuilder().build();
- * UpdateReusableConfigRequest request = UpdateReusableConfigRequest.newBuilder()
- * .setReusableConfig(reusableConfig)
- * .setUpdateMask(updateMask)
- * .build();
- * ApiFuture<Operation> future = certificateAuthorityServiceClient.updateReusableConfigCallable().futureCall(request);
- * // Do something
- * Operation response = future.get();
- * }
- *
- *
- *
- *
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName parent = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * Certificate certificate = Certificate.newBuilder().build();
- * String certificateId = "";
- * Certificate response = certificateAuthorityServiceClient.createCertificate(parent, certificate, certificateId);
- * }
- *
- *
- *
- *
- *
- *
- *
- * To customize the endpoint:
- *
- *
- * CertificateAuthorityServiceSettings certificateAuthorityServiceSettings =
- * CertificateAuthorityServiceSettings.newBuilder()
- * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- * .build();
- * CertificateAuthorityServiceClient certificateAuthorityServiceClient =
- * CertificateAuthorityServiceClient.create(certificateAuthorityServiceSettings);
- *
- *
- *
- */
-@Generated("by gapic-generator")
-@BetaApi
-public class CertificateAuthorityServiceClient implements BackgroundResource {
- private final CertificateAuthorityServiceSettings settings;
- private final CertificateAuthorityServiceStub stub;
- private final OperationsClient operationsClient;
-
- /** Constructs an instance of CertificateAuthorityServiceClient with default settings. */
- public static final CertificateAuthorityServiceClient create() throws IOException {
- return create(CertificateAuthorityServiceSettings.newBuilder().build());
- }
-
- /**
- * Constructs an instance of CertificateAuthorityServiceClient, using the given settings. The
- * channels are created based on the settings passed in, or defaults for any settings that are not
- * set.
- */
- public static final CertificateAuthorityServiceClient create(
- CertificateAuthorityServiceSettings settings) throws IOException {
- return new CertificateAuthorityServiceClient(settings);
- }
-
- /**
- * Constructs an instance of CertificateAuthorityServiceClient, using the given stub for making
- * calls. This is for advanced usage - prefer to use CertificateAuthorityServiceSettings}.
- */
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
- public static final CertificateAuthorityServiceClient create(
- CertificateAuthorityServiceStub stub) {
- return new CertificateAuthorityServiceClient(stub);
- }
-
- /**
- * Constructs an instance of CertificateAuthorityServiceClient, using the given settings. This is
- * protected so that it is easy to make a subclass, but otherwise, the static factory methods
- * should be preferred.
- */
- protected CertificateAuthorityServiceClient(CertificateAuthorityServiceSettings settings)
- throws IOException {
- this.settings = settings;
- this.stub = ((CertificateAuthorityServiceStubSettings) settings.getStubSettings()).createStub();
- this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
- }
-
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
- protected CertificateAuthorityServiceClient(CertificateAuthorityServiceStub stub) {
- this.settings = null;
- this.stub = stub;
- this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
- }
-
- public final CertificateAuthorityServiceSettings getSettings() {
- return settings;
- }
-
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
- public CertificateAuthorityServiceStub getStub() {
- return stub;
- }
-
- /**
- * Returns the OperationsClient that can be used to query the status of a long-running operation
- * returned by another API method call.
- */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
- public final OperationsClient getOperationsClient() {
- return operationsClient;
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Create a new [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in a given
- * Project, Location from a particular
- * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
- *
- *
- * CertificateAuthorityServiceSettings certificateAuthorityServiceSettings =
- * CertificateAuthorityServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
- * CertificateAuthorityServiceClient certificateAuthorityServiceClient =
- * CertificateAuthorityServiceClient.create(certificateAuthorityServiceSettings);
- *
- *
- *
- * @param parent Required. The resource name of the location and
- * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
- * associated with the [Certificate][google.cloud.security.privateca.v1beta1.Certificate], in
- * the format `projects/*/locations/*/certificateAuthorities/*`.
- * @param certificate Required. A
- * [Certificate][google.cloud.security.privateca.v1beta1.Certificate] with initial field
- * values.
- * @param certificateId Optional. It must be unique within a location and match the regular
- * expression `[a-zA-Z0-9-]{1,63}`. This field is required when using a
- * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
- * Enterprise
- * [CertificateAuthority.Tier][google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier],
- * but is optional and its value is ignored otherwise.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final Certificate createCertificate(
- CertificateAuthorityName parent, Certificate certificate, String certificateId) {
- CreateCertificateRequest request =
- CreateCertificateRequest.newBuilder()
- .setParent(parent == null ? null : parent.toString())
- .setCertificate(certificate)
- .setCertificateId(certificateId)
- .build();
- return createCertificate(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Create a new [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in a given
- * Project, Location from a particular
- * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
- *
- *
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName parent = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * Certificate certificate = Certificate.newBuilder().build();
- * String certificateId = "";
- * Certificate response = certificateAuthorityServiceClient.createCertificate(parent, certificate, certificateId);
- * }
- *
- *
- * @param parent Required. The resource name of the location and
- * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
- * associated with the [Certificate][google.cloud.security.privateca.v1beta1.Certificate], in
- * the format `projects/*/locations/*/certificateAuthorities/*`.
- * @param certificate Required. A
- * [Certificate][google.cloud.security.privateca.v1beta1.Certificate] with initial field
- * values.
- * @param certificateId Optional. It must be unique within a location and match the regular
- * expression `[a-zA-Z0-9-]{1,63}`. This field is required when using a
- * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
- * Enterprise
- * [CertificateAuthority.Tier][google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier],
- * but is optional and its value is ignored otherwise.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final Certificate createCertificate(
- String parent, Certificate certificate, String certificateId) {
- CreateCertificateRequest request =
- CreateCertificateRequest.newBuilder()
- .setParent(parent)
- .setCertificate(certificate)
- .setCertificateId(certificateId)
- .build();
- return createCertificate(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Create a new [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in a given
- * Project, Location from a particular
- * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
- *
- *
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName parent = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * Certificate certificate = Certificate.newBuilder().build();
- * String certificateId = "";
- * Certificate response = certificateAuthorityServiceClient.createCertificate(parent.toString(), certificate, certificateId);
- * }
- *
- *
- * @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 Certificate createCertificate(CreateCertificateRequest request) {
- return createCertificateCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Create a new [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in a given
- * Project, Location from a particular
- * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
- *
- *
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName parent = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * Certificate certificate = Certificate.newBuilder().build();
- * CreateCertificateRequest request = CreateCertificateRequest.newBuilder()
- * .setParent(parent.toString())
- * .setCertificate(certificate)
- * .build();
- * Certificate response = certificateAuthorityServiceClient.createCertificate(request);
- * }
- *
- */
- public final UnaryCallable
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName parent = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * Certificate certificate = Certificate.newBuilder().build();
- * CreateCertificateRequest request = CreateCertificateRequest.newBuilder()
- * .setParent(parent.toString())
- * .setCertificate(certificate)
- * .build();
- * ApiFuture<Certificate> future = certificateAuthorityServiceClient.createCertificateCallable().futureCall(request);
- * // Do something
- * Certificate response = future.get();
- * }
- *
- *
- * @param name Required. The [name][google.cloud.security.privateca.v1beta1.Certificate.name] of
- * the [Certificate][google.cloud.security.privateca.v1beta1.Certificate] to get.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final Certificate getCertificate(CertificateName name) {
- GetCertificateRequest request =
- GetCertificateRequest.newBuilder().setName(name == null ? null : name.toString()).build();
- return getCertificate(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Returns a [Certificate][google.cloud.security.privateca.v1beta1.Certificate].
- *
- *
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateName name = CertificateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]", "[CERTIFICATE]");
- * Certificate response = certificateAuthorityServiceClient.getCertificate(name);
- * }
- *
- *
- * @param name Required. The [name][google.cloud.security.privateca.v1beta1.Certificate.name] of
- * the [Certificate][google.cloud.security.privateca.v1beta1.Certificate] to get.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final Certificate getCertificate(String name) {
- GetCertificateRequest request = GetCertificateRequest.newBuilder().setName(name).build();
- return getCertificate(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Returns a [Certificate][google.cloud.security.privateca.v1beta1.Certificate].
- *
- *
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateName name = CertificateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]", "[CERTIFICATE]");
- * Certificate response = certificateAuthorityServiceClient.getCertificate(name.toString());
- * }
- *
- *
- * @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 Certificate getCertificate(GetCertificateRequest request) {
- return getCertificateCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Returns a [Certificate][google.cloud.security.privateca.v1beta1.Certificate].
- *
- *
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateName name = CertificateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]", "[CERTIFICATE]");
- * GetCertificateRequest request = GetCertificateRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * Certificate response = certificateAuthorityServiceClient.getCertificate(request);
- * }
- *
- */
- public final UnaryCallable
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateName name = CertificateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]", "[CERTIFICATE]");
- * GetCertificateRequest request = GetCertificateRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ApiFuture<Certificate> future = certificateAuthorityServiceClient.getCertificateCallable().futureCall(request);
- * // Do something
- * Certificate response = future.get();
- * }
- *
- *
- * @param parent Required. The resource name of the location associated with the
- * [Certificates][google.cloud.security.privateca.v1beta1.Certificate], in the format
- * `projects/*/locations/*/certificateauthorities/*`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ListCertificatesPagedResponse listCertificates(CertificateAuthorityName parent) {
- ListCertificatesRequest request =
- ListCertificatesRequest.newBuilder()
- .setParent(parent == null ? null : parent.toString())
- .build();
- return listCertificates(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Lists [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
- *
- *
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName parent = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * for (Certificate element : certificateAuthorityServiceClient.listCertificates(parent).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- *
- *
- * @param parent Required. The resource name of the location associated with the
- * [Certificates][google.cloud.security.privateca.v1beta1.Certificate], in the format
- * `projects/*/locations/*/certificateauthorities/*`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ListCertificatesPagedResponse listCertificates(String parent) {
- ListCertificatesRequest request =
- ListCertificatesRequest.newBuilder().setParent(parent).build();
- return listCertificates(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Lists [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
- *
- *
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName parent = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * for (Certificate element : certificateAuthorityServiceClient.listCertificates(parent.toString()).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 ListCertificatesPagedResponse listCertificates(ListCertificatesRequest request) {
- return listCertificatesPagedCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Lists [Certificates][google.cloud.security.privateca.v1beta1.Certificate].
- *
- *
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName parent = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * ListCertificatesRequest request = ListCertificatesRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
- * for (Certificate element : certificateAuthorityServiceClient.listCertificates(request).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- *
- */
- public final UnaryCallable
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName parent = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * ListCertificatesRequest request = ListCertificatesRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
- * ApiFuture<ListCertificatesPagedResponse> future = certificateAuthorityServiceClient.listCertificatesPagedCallable().futureCall(request);
- * // Do something
- * for (Certificate element : future.get().iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- *
- */
- public final UnaryCallable
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName parent = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * ListCertificatesRequest request = ListCertificatesRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
- * while (true) {
- * ListCertificatesResponse response = certificateAuthorityServiceClient.listCertificatesCallable().call(request);
- * for (Certificate element : response.getCertificatesList()) {
- * // doThingsWith(element);
- * }
- * String nextPageToken = response.getNextPageToken();
- * if (!Strings.isNullOrEmpty(nextPageToken)) {
- * request = request.toBuilder().setPageToken(nextPageToken).build();
- * } else {
- * break;
- * }
- * }
- * }
- *
- *
- * @param name Required. The resource name for this
- * [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in the format
- * `projects/*/locations/*/certificateAuthorities/*/certificates/*`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final Certificate revokeCertificate(CertificateName name) {
- RevokeCertificateRequest request =
- RevokeCertificateRequest.newBuilder()
- .setName(name == null ? null : name.toString())
- .build();
- return revokeCertificate(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Revoke a [Certificate][google.cloud.security.privateca.v1beta1.Certificate].
- *
- *
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateName name = CertificateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]", "[CERTIFICATE]");
- * Certificate response = certificateAuthorityServiceClient.revokeCertificate(name);
- * }
- *
- *
- * @param name Required. The resource name for this
- * [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in the format
- * `projects/*/locations/*/certificateAuthorities/*/certificates/*`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final Certificate revokeCertificate(String name) {
- RevokeCertificateRequest request = RevokeCertificateRequest.newBuilder().setName(name).build();
- return revokeCertificate(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Revoke a [Certificate][google.cloud.security.privateca.v1beta1.Certificate].
- *
- *
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateName name = CertificateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]", "[CERTIFICATE]");
- * Certificate response = certificateAuthorityServiceClient.revokeCertificate(name.toString());
- * }
- *
- *
- * @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 Certificate revokeCertificate(RevokeCertificateRequest request) {
- return revokeCertificateCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Revoke a [Certificate][google.cloud.security.privateca.v1beta1.Certificate].
- *
- *
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateName name = CertificateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]", "[CERTIFICATE]");
- * RevocationReason reason = RevocationReason.REVOCATION_REASON_UNSPECIFIED;
- * RevokeCertificateRequest request = RevokeCertificateRequest.newBuilder()
- * .setName(name.toString())
- * .setReason(reason)
- * .build();
- * Certificate response = certificateAuthorityServiceClient.revokeCertificate(request);
- * }
- *
- */
- public final UnaryCallable
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateName name = CertificateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]", "[CERTIFICATE]");
- * RevocationReason reason = RevocationReason.REVOCATION_REASON_UNSPECIFIED;
- * RevokeCertificateRequest request = RevokeCertificateRequest.newBuilder()
- * .setName(name.toString())
- * .setReason(reason)
- * .build();
- * ApiFuture<Certificate> future = certificateAuthorityServiceClient.revokeCertificateCallable().futureCall(request);
- * // Do something
- * Certificate response = future.get();
- * }
- *
- *
- * @param certificate Required. [Certificate][google.cloud.security.privateca.v1beta1.Certificate]
- * with updated values.
- * @param updateMask Required. A list of fields to be updated in this request.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final Certificate updateCertificate(Certificate certificate, FieldMask updateMask) {
- UpdateCertificateRequest request =
- UpdateCertificateRequest.newBuilder()
- .setCertificate(certificate)
- .setUpdateMask(updateMask)
- .build();
- return updateCertificate(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Update a [Certificate][google.cloud.security.privateca.v1beta1.Certificate].
- *
- *
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * Certificate certificate = Certificate.newBuilder().build();
- * FieldMask updateMask = FieldMask.newBuilder().build();
- * Certificate response = certificateAuthorityServiceClient.updateCertificate(certificate, updateMask);
- * }
- *
- *
- * @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 Certificate updateCertificate(UpdateCertificateRequest request) {
- return updateCertificateCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Update a [Certificate][google.cloud.security.privateca.v1beta1.Certificate].
- *
- *
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * Certificate certificate = Certificate.newBuilder().build();
- * FieldMask updateMask = FieldMask.newBuilder().build();
- * UpdateCertificateRequest request = UpdateCertificateRequest.newBuilder()
- * .setCertificate(certificate)
- * .setUpdateMask(updateMask)
- * .build();
- * Certificate response = certificateAuthorityServiceClient.updateCertificate(request);
- * }
- *
- */
- public final UnaryCallable
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * Certificate certificate = Certificate.newBuilder().build();
- * FieldMask updateMask = FieldMask.newBuilder().build();
- * UpdateCertificateRequest request = UpdateCertificateRequest.newBuilder()
- * .setCertificate(certificate)
- * .setUpdateMask(updateMask)
- * .build();
- * ApiFuture<Certificate> future = certificateAuthorityServiceClient.updateCertificateCallable().futureCall(request);
- * // Do something
- * Certificate response = future.get();
- * }
- *
- *
- * @param name Required. The resource name for this
- * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
- * format `projects/*/locations/*/certificateAuthorities/*`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
- public final OperationFuture
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * CertificateAuthority response = certificateAuthorityServiceClient.activateCertificateAuthorityAsync(name).get();
- * }
- *
- *
- * @param name Required. The resource name for this
- * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
- * format `projects/*/locations/*/certificateAuthorities/*`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
- public final OperationFuture
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * CertificateAuthority response = certificateAuthorityServiceClient.activateCertificateAuthorityAsync(name.toString()).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
- */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
- public final OperationFuture
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * String pemCaCertificate = "";
- * SubordinateConfig subordinateConfig = SubordinateConfig.newBuilder().build();
- * ActivateCertificateAuthorityRequest request = ActivateCertificateAuthorityRequest.newBuilder()
- * .setName(name.toString())
- * .setPemCaCertificate(pemCaCertificate)
- * .setSubordinateConfig(subordinateConfig)
- * .build();
- * CertificateAuthority response = certificateAuthorityServiceClient.activateCertificateAuthorityAsync(request).get();
- * }
- *
- */
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
- public final OperationCallable<
- ActivateCertificateAuthorityRequest, CertificateAuthority, OperationMetadata>
- activateCertificateAuthorityOperationCallable() {
- return stub.activateCertificateAuthorityOperationCallable();
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Activate a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
- * that is in state
- * [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION]
- * and is of type
- * [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE].
- * After the parent Certificate Authority signs a certificate signing request from
- * [FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.FetchCertificateAuthorityCsr],
- * this method can complete the activation process.
- *
- *
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * String pemCaCertificate = "";
- * SubordinateConfig subordinateConfig = SubordinateConfig.newBuilder().build();
- * ActivateCertificateAuthorityRequest request = ActivateCertificateAuthorityRequest.newBuilder()
- * .setName(name.toString())
- * .setPemCaCertificate(pemCaCertificate)
- * .setSubordinateConfig(subordinateConfig)
- * .build();
- * OperationFuture<CertificateAuthority, OperationMetadata> future = certificateAuthorityServiceClient.activateCertificateAuthorityOperationCallable().futureCall(request);
- * // Do something
- * CertificateAuthority response = future.get();
- * }
- *
- */
- public final UnaryCallable
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * String pemCaCertificate = "";
- * SubordinateConfig subordinateConfig = SubordinateConfig.newBuilder().build();
- * ActivateCertificateAuthorityRequest request = ActivateCertificateAuthorityRequest.newBuilder()
- * .setName(name.toString())
- * .setPemCaCertificate(pemCaCertificate)
- * .setSubordinateConfig(subordinateConfig)
- * .build();
- * ApiFuture<Operation> future = certificateAuthorityServiceClient.activateCertificateAuthorityCallable().futureCall(request);
- * // Do something
- * Operation response = future.get();
- * }
- *
- *
- * @param parent Required. The resource name of the location associated with the
- * [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority], in
- * the format `projects/*/locations/*`.
- * @param certificateAuthority Required. A
- * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] with
- * initial field values.
- * @param certificateAuthorityId Required. It must be unique within a location and match the
- * regular expression `[a-zA-Z0-9-]{1,63}`
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
- public final OperationFuture
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- * CertificateAuthority certificateAuthority = CertificateAuthority.newBuilder().build();
- * String certificateAuthorityId = "";
- * CertificateAuthority response = certificateAuthorityServiceClient.createCertificateAuthorityAsync(parent, certificateAuthority, certificateAuthorityId).get();
- * }
- *
- *
- * @param parent Required. The resource name of the location associated with the
- * [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority], in
- * the format `projects/*/locations/*`.
- * @param certificateAuthority Required. A
- * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] with
- * initial field values.
- * @param certificateAuthorityId Required. It must be unique within a location and match the
- * regular expression `[a-zA-Z0-9-]{1,63}`
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
- public final OperationFuture
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- * CertificateAuthority certificateAuthority = CertificateAuthority.newBuilder().build();
- * String certificateAuthorityId = "";
- * CertificateAuthority response = certificateAuthorityServiceClient.createCertificateAuthorityAsync(parent.toString(), certificateAuthority, certificateAuthorityId).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
- */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
- public final OperationFuture
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- * String certificateAuthorityId = "";
- * CertificateAuthority certificateAuthority = CertificateAuthority.newBuilder().build();
- * CreateCertificateAuthorityRequest request = CreateCertificateAuthorityRequest.newBuilder()
- * .setParent(parent.toString())
- * .setCertificateAuthorityId(certificateAuthorityId)
- * .setCertificateAuthority(certificateAuthority)
- * .build();
- * CertificateAuthority response = certificateAuthorityServiceClient.createCertificateAuthorityAsync(request).get();
- * }
- *
- */
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
- public final OperationCallable<
- CreateCertificateAuthorityRequest, CertificateAuthority, OperationMetadata>
- createCertificateAuthorityOperationCallable() {
- return stub.createCertificateAuthorityOperationCallable();
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Create a new
- * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in a given
- * Project and Location.
- *
- *
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- * String certificateAuthorityId = "";
- * CertificateAuthority certificateAuthority = CertificateAuthority.newBuilder().build();
- * CreateCertificateAuthorityRequest request = CreateCertificateAuthorityRequest.newBuilder()
- * .setParent(parent.toString())
- * .setCertificateAuthorityId(certificateAuthorityId)
- * .setCertificateAuthority(certificateAuthority)
- * .build();
- * OperationFuture<CertificateAuthority, OperationMetadata> future = certificateAuthorityServiceClient.createCertificateAuthorityOperationCallable().futureCall(request);
- * // Do something
- * CertificateAuthority response = future.get();
- * }
- *
- */
- public final UnaryCallable
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- * String certificateAuthorityId = "";
- * CertificateAuthority certificateAuthority = CertificateAuthority.newBuilder().build();
- * CreateCertificateAuthorityRequest request = CreateCertificateAuthorityRequest.newBuilder()
- * .setParent(parent.toString())
- * .setCertificateAuthorityId(certificateAuthorityId)
- * .setCertificateAuthority(certificateAuthority)
- * .build();
- * ApiFuture<Operation> future = certificateAuthorityServiceClient.createCertificateAuthorityCallable().futureCall(request);
- * // Do something
- * Operation response = future.get();
- * }
- *
- *
- * @param name Required. The resource name for this
- * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
- * format `projects/*/locations/*/certificateAuthorities/*`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
- public final OperationFuture
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * CertificateAuthority response = certificateAuthorityServiceClient.disableCertificateAuthorityAsync(name).get();
- * }
- *
- *
- * @param name Required. The resource name for this
- * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
- * format `projects/*/locations/*/certificateAuthorities/*`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
- public final OperationFuture
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * CertificateAuthority response = certificateAuthorityServiceClient.disableCertificateAuthorityAsync(name.toString()).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
- */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
- public final OperationFuture
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * DisableCertificateAuthorityRequest request = DisableCertificateAuthorityRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * CertificateAuthority response = certificateAuthorityServiceClient.disableCertificateAuthorityAsync(request).get();
- * }
- *
- */
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
- public final OperationCallable<
- DisableCertificateAuthorityRequest, CertificateAuthority, OperationMetadata>
- disableCertificateAuthorityOperationCallable() {
- return stub.disableCertificateAuthorityOperationCallable();
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Disable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
- *
- *
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * DisableCertificateAuthorityRequest request = DisableCertificateAuthorityRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * OperationFuture<CertificateAuthority, OperationMetadata> future = certificateAuthorityServiceClient.disableCertificateAuthorityOperationCallable().futureCall(request);
- * // Do something
- * CertificateAuthority response = future.get();
- * }
- *
- */
- public final UnaryCallable
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * DisableCertificateAuthorityRequest request = DisableCertificateAuthorityRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ApiFuture<Operation> future = certificateAuthorityServiceClient.disableCertificateAuthorityCallable().futureCall(request);
- * // Do something
- * Operation response = future.get();
- * }
- *
- *
- * @param name Required. The resource name for this
- * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
- * format `projects/*/locations/*/certificateAuthorities/*`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
- public final OperationFuture
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * CertificateAuthority response = certificateAuthorityServiceClient.enableCertificateAuthorityAsync(name).get();
- * }
- *
- *
- * @param name Required. The resource name for this
- * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
- * format `projects/*/locations/*/certificateAuthorities/*`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
- public final OperationFuture
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * CertificateAuthority response = certificateAuthorityServiceClient.enableCertificateAuthorityAsync(name.toString()).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
- */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
- public final OperationFuture
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * EnableCertificateAuthorityRequest request = EnableCertificateAuthorityRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * CertificateAuthority response = certificateAuthorityServiceClient.enableCertificateAuthorityAsync(request).get();
- * }
- *
- */
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
- public final OperationCallable<
- EnableCertificateAuthorityRequest, CertificateAuthority, OperationMetadata>
- enableCertificateAuthorityOperationCallable() {
- return stub.enableCertificateAuthorityOperationCallable();
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Enable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
- *
- *
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * EnableCertificateAuthorityRequest request = EnableCertificateAuthorityRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * OperationFuture<CertificateAuthority, OperationMetadata> future = certificateAuthorityServiceClient.enableCertificateAuthorityOperationCallable().futureCall(request);
- * // Do something
- * CertificateAuthority response = future.get();
- * }
- *
- */
- public final UnaryCallable
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * EnableCertificateAuthorityRequest request = EnableCertificateAuthorityRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ApiFuture<Operation> future = certificateAuthorityServiceClient.enableCertificateAuthorityCallable().futureCall(request);
- * // Do something
- * Operation response = future.get();
- * }
- *
- *
- * @param name Required. The resource name for this
- * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
- * format `projects/*/locations/*/certificateAuthorities/*`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final FetchCertificateAuthorityCsrResponse fetchCertificateAuthorityCsr(
- CertificateAuthorityName name) {
- FetchCertificateAuthorityCsrRequest request =
- FetchCertificateAuthorityCsrRequest.newBuilder()
- .setName(name == null ? null : name.toString())
- .build();
- return fetchCertificateAuthorityCsr(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Fetch a certificate signing request (CSR) from a
- * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is in
- * state
- * [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION]
- * and is of type
- * [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE].
- * The CSR must then be signed by the desired parent Certificate Authority, which could be another
- * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] resource,
- * or could be an on-prem certificate authority. See also
- * [ActivateCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ActivateCertificateAuthority].
- *
- *
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * FetchCertificateAuthorityCsrResponse response = certificateAuthorityServiceClient.fetchCertificateAuthorityCsr(name);
- * }
- *
- *
- * @param name Required. The resource name for this
- * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
- * format `projects/*/locations/*/certificateAuthorities/*`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final FetchCertificateAuthorityCsrResponse fetchCertificateAuthorityCsr(String name) {
- FetchCertificateAuthorityCsrRequest request =
- FetchCertificateAuthorityCsrRequest.newBuilder().setName(name).build();
- return fetchCertificateAuthorityCsr(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Fetch a certificate signing request (CSR) from a
- * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is in
- * state
- * [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION]
- * and is of type
- * [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE].
- * The CSR must then be signed by the desired parent Certificate Authority, which could be another
- * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] resource,
- * or could be an on-prem certificate authority. See also
- * [ActivateCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ActivateCertificateAuthority].
- *
- *
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * FetchCertificateAuthorityCsrResponse response = certificateAuthorityServiceClient.fetchCertificateAuthorityCsr(name.toString());
- * }
- *
- *
- * @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 FetchCertificateAuthorityCsrResponse fetchCertificateAuthorityCsr(
- FetchCertificateAuthorityCsrRequest request) {
- return fetchCertificateAuthorityCsrCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Fetch a certificate signing request (CSR) from a
- * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is in
- * state
- * [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION]
- * and is of type
- * [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE].
- * The CSR must then be signed by the desired parent Certificate Authority, which could be another
- * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] resource,
- * or could be an on-prem certificate authority. See also
- * [ActivateCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ActivateCertificateAuthority].
- *
- *
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * FetchCertificateAuthorityCsrRequest request = FetchCertificateAuthorityCsrRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * FetchCertificateAuthorityCsrResponse response = certificateAuthorityServiceClient.fetchCertificateAuthorityCsr(request);
- * }
- *
- */
- public final UnaryCallable<
- FetchCertificateAuthorityCsrRequest, FetchCertificateAuthorityCsrResponse>
- fetchCertificateAuthorityCsrCallable() {
- return stub.fetchCertificateAuthorityCsrCallable();
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Returns a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
- *
- *
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * FetchCertificateAuthorityCsrRequest request = FetchCertificateAuthorityCsrRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ApiFuture<FetchCertificateAuthorityCsrResponse> future = certificateAuthorityServiceClient.fetchCertificateAuthorityCsrCallable().futureCall(request);
- * // Do something
- * FetchCertificateAuthorityCsrResponse response = future.get();
- * }
- *
- *
- * @param name Required. The
- * [name][google.cloud.security.privateca.v1beta1.CertificateAuthority.name] of the
- * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] to
- * get.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final CertificateAuthority getCertificateAuthority(CertificateAuthorityName name) {
- GetCertificateAuthorityRequest request =
- GetCertificateAuthorityRequest.newBuilder()
- .setName(name == null ? null : name.toString())
- .build();
- return getCertificateAuthority(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Returns a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
- *
- *
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * CertificateAuthority response = certificateAuthorityServiceClient.getCertificateAuthority(name);
- * }
- *
- *
- * @param name Required. The
- * [name][google.cloud.security.privateca.v1beta1.CertificateAuthority.name] of the
- * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] to
- * get.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final CertificateAuthority getCertificateAuthority(String name) {
- GetCertificateAuthorityRequest request =
- GetCertificateAuthorityRequest.newBuilder().setName(name).build();
- return getCertificateAuthority(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Returns a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
- *
- *
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * CertificateAuthority response = certificateAuthorityServiceClient.getCertificateAuthority(name.toString());
- * }
- *
- *
- * @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 CertificateAuthority getCertificateAuthority(
- GetCertificateAuthorityRequest request) {
- return getCertificateAuthorityCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Returns a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
- *
- *
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * GetCertificateAuthorityRequest request = GetCertificateAuthorityRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * CertificateAuthority response = certificateAuthorityServiceClient.getCertificateAuthority(request);
- * }
- *
- */
- public final UnaryCallable
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * GetCertificateAuthorityRequest request = GetCertificateAuthorityRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ApiFuture<CertificateAuthority> future = certificateAuthorityServiceClient.getCertificateAuthorityCallable().futureCall(request);
- * // Do something
- * CertificateAuthority response = future.get();
- * }
- *
- *
- * @param parent Required. The resource name of the location associated with the
- * [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority], in
- * the format `projects/*/locations/*`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ListCertificateAuthoritiesPagedResponse listCertificateAuthorities(
- LocationName parent) {
- ListCertificateAuthoritiesRequest request =
- ListCertificateAuthoritiesRequest.newBuilder()
- .setParent(parent == null ? null : parent.toString())
- .build();
- return listCertificateAuthorities(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Lists [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority].
- *
- *
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- * for (CertificateAuthority element : certificateAuthorityServiceClient.listCertificateAuthorities(parent).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- *
- *
- * @param parent Required. The resource name of the location associated with the
- * [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority], in
- * the format `projects/*/locations/*`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ListCertificateAuthoritiesPagedResponse listCertificateAuthorities(String parent) {
- ListCertificateAuthoritiesRequest request =
- ListCertificateAuthoritiesRequest.newBuilder().setParent(parent).build();
- return listCertificateAuthorities(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Lists [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority].
- *
- *
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- * for (CertificateAuthority element : certificateAuthorityServiceClient.listCertificateAuthorities(parent.toString()).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 ListCertificateAuthoritiesPagedResponse listCertificateAuthorities(
- ListCertificateAuthoritiesRequest request) {
- return listCertificateAuthoritiesPagedCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Lists [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority].
- *
- *
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- * ListCertificateAuthoritiesRequest request = ListCertificateAuthoritiesRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
- * for (CertificateAuthority element : certificateAuthorityServiceClient.listCertificateAuthorities(request).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- *
- */
- public final UnaryCallable<
- ListCertificateAuthoritiesRequest, ListCertificateAuthoritiesPagedResponse>
- listCertificateAuthoritiesPagedCallable() {
- return stub.listCertificateAuthoritiesPagedCallable();
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Lists [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority].
- *
- *
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- * ListCertificateAuthoritiesRequest request = ListCertificateAuthoritiesRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
- * ApiFuture<ListCertificateAuthoritiesPagedResponse> future = certificateAuthorityServiceClient.listCertificateAuthoritiesPagedCallable().futureCall(request);
- * // Do something
- * for (CertificateAuthority element : future.get().iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- *
- */
- public final UnaryCallable
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- * ListCertificateAuthoritiesRequest request = ListCertificateAuthoritiesRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
- * while (true) {
- * ListCertificateAuthoritiesResponse response = certificateAuthorityServiceClient.listCertificateAuthoritiesCallable().call(request);
- * for (CertificateAuthority element : response.getCertificateAuthoritiesList()) {
- * // doThingsWith(element);
- * }
- * String nextPageToken = response.getNextPageToken();
- * if (!Strings.isNullOrEmpty(nextPageToken)) {
- * request = request.toBuilder().setPageToken(nextPageToken).build();
- * } else {
- * break;
- * }
- * }
- * }
- *
- *
- * @param name Required. The resource name for this
- * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
- * format `projects/*/locations/*/certificateAuthorities/*`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
- public final OperationFuture
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * CertificateAuthority response = certificateAuthorityServiceClient.restoreCertificateAuthorityAsync(name).get();
- * }
- *
- *
- * @param name Required. The resource name for this
- * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
- * format `projects/*/locations/*/certificateAuthorities/*`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
- public final OperationFuture
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * CertificateAuthority response = certificateAuthorityServiceClient.restoreCertificateAuthorityAsync(name.toString()).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
- */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
- public final OperationFuture
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * RestoreCertificateAuthorityRequest request = RestoreCertificateAuthorityRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * CertificateAuthority response = certificateAuthorityServiceClient.restoreCertificateAuthorityAsync(request).get();
- * }
- *
- */
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
- public final OperationCallable<
- RestoreCertificateAuthorityRequest, CertificateAuthority, OperationMetadata>
- restoreCertificateAuthorityOperationCallable() {
- return stub.restoreCertificateAuthorityOperationCallable();
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Restore a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
- * that is scheduled for deletion.
- *
- *
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * RestoreCertificateAuthorityRequest request = RestoreCertificateAuthorityRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * OperationFuture<CertificateAuthority, OperationMetadata> future = certificateAuthorityServiceClient.restoreCertificateAuthorityOperationCallable().futureCall(request);
- * // Do something
- * CertificateAuthority response = future.get();
- * }
- *
- */
- public final UnaryCallable
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * RestoreCertificateAuthorityRequest request = RestoreCertificateAuthorityRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ApiFuture<Operation> future = certificateAuthorityServiceClient.restoreCertificateAuthorityCallable().futureCall(request);
- * // Do something
- * Operation response = future.get();
- * }
- *
- *
- * @param name Required. The resource name for this
- * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
- * format `projects/*/locations/*/certificateAuthorities/*`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
- public final OperationFuture
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * CertificateAuthority response = certificateAuthorityServiceClient.scheduleDeleteCertificateAuthorityAsync(name).get();
- * }
- *
- *
- * @param name Required. The resource name for this
- * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the
- * format `projects/*/locations/*/certificateAuthorities/*`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
- public final OperationFuture
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * CertificateAuthority response = certificateAuthorityServiceClient.scheduleDeleteCertificateAuthorityAsync(name.toString()).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
- */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
- public final OperationFuture
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * ScheduleDeleteCertificateAuthorityRequest request = ScheduleDeleteCertificateAuthorityRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * CertificateAuthority response = certificateAuthorityServiceClient.scheduleDeleteCertificateAuthorityAsync(request).get();
- * }
- *
- */
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
- public final OperationCallable<
- ScheduleDeleteCertificateAuthorityRequest, CertificateAuthority, OperationMetadata>
- scheduleDeleteCertificateAuthorityOperationCallable() {
- return stub.scheduleDeleteCertificateAuthorityOperationCallable();
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Schedule a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
- * for deletion.
- *
- *
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * ScheduleDeleteCertificateAuthorityRequest request = ScheduleDeleteCertificateAuthorityRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * OperationFuture<CertificateAuthority, OperationMetadata> future = certificateAuthorityServiceClient.scheduleDeleteCertificateAuthorityOperationCallable().futureCall(request);
- * // Do something
- * CertificateAuthority response = future.get();
- * }
- *
- */
- public final UnaryCallable
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * ScheduleDeleteCertificateAuthorityRequest request = ScheduleDeleteCertificateAuthorityRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ApiFuture<Operation> future = certificateAuthorityServiceClient.scheduleDeleteCertificateAuthorityCallable().futureCall(request);
- * // Do something
- * Operation response = future.get();
- * }
- *
- *
- * @param certificateAuthority Required.
- * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] with
- * updated values.
- * @param updateMask Required. A list of fields to be updated in this request.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
- public final OperationFuture
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthority certificateAuthority = CertificateAuthority.newBuilder().build();
- * FieldMask updateMask = FieldMask.newBuilder().build();
- * CertificateAuthority response = certificateAuthorityServiceClient.updateCertificateAuthorityAsync(certificateAuthority, updateMask).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
- */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
- public final OperationFuture
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthority certificateAuthority = CertificateAuthority.newBuilder().build();
- * FieldMask updateMask = FieldMask.newBuilder().build();
- * UpdateCertificateAuthorityRequest request = UpdateCertificateAuthorityRequest.newBuilder()
- * .setCertificateAuthority(certificateAuthority)
- * .setUpdateMask(updateMask)
- * .build();
- * CertificateAuthority response = certificateAuthorityServiceClient.updateCertificateAuthorityAsync(request).get();
- * }
- *
- */
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
- public final OperationCallable<
- UpdateCertificateAuthorityRequest, CertificateAuthority, OperationMetadata>
- updateCertificateAuthorityOperationCallable() {
- return stub.updateCertificateAuthorityOperationCallable();
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Update a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
- *
- *
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthority certificateAuthority = CertificateAuthority.newBuilder().build();
- * FieldMask updateMask = FieldMask.newBuilder().build();
- * UpdateCertificateAuthorityRequest request = UpdateCertificateAuthorityRequest.newBuilder()
- * .setCertificateAuthority(certificateAuthority)
- * .setUpdateMask(updateMask)
- * .build();
- * OperationFuture<CertificateAuthority, OperationMetadata> future = certificateAuthorityServiceClient.updateCertificateAuthorityOperationCallable().futureCall(request);
- * // Do something
- * CertificateAuthority response = future.get();
- * }
- *
- */
- public final UnaryCallable
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthority certificateAuthority = CertificateAuthority.newBuilder().build();
- * FieldMask updateMask = FieldMask.newBuilder().build();
- * UpdateCertificateAuthorityRequest request = UpdateCertificateAuthorityRequest.newBuilder()
- * .setCertificateAuthority(certificateAuthority)
- * .setUpdateMask(updateMask)
- * .build();
- * ApiFuture<Operation> future = certificateAuthorityServiceClient.updateCertificateAuthorityCallable().futureCall(request);
- * // Do something
- * Operation response = future.get();
- * }
- *
- *
- * @param parent Required. The resource name of the location and
- * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
- * associated with the
- * [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList],
- * in the format `projects/*/locations/*/certificateAuthorities/*`.
- * @param certificateRevocationList Required. A
- * [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList]
- * with initial field values.
- * @param certificateRevocationListId Required. It must be unique within a location and match the
- * regular expression `[a-zA-Z0-9-]{1,63}`
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
- public final OperationFuture
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName parent = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * CertificateRevocationList certificateRevocationList = CertificateRevocationList.newBuilder().build();
- * String certificateRevocationListId = "";
- * CertificateRevocationList response = certificateAuthorityServiceClient.createCertificateRevocationListAsync(parent, certificateRevocationList, certificateRevocationListId).get();
- * }
- *
- *
- * @param parent Required. The resource name of the location and
- * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]
- * associated with the
- * [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList],
- * in the format `projects/*/locations/*/certificateAuthorities/*`.
- * @param certificateRevocationList Required. A
- * [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList]
- * with initial field values.
- * @param certificateRevocationListId Required. It must be unique within a location and match the
- * regular expression `[a-zA-Z0-9-]{1,63}`
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
- public final OperationFuture
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName parent = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * CertificateRevocationList certificateRevocationList = CertificateRevocationList.newBuilder().build();
- * String certificateRevocationListId = "";
- * CertificateRevocationList response = certificateAuthorityServiceClient.createCertificateRevocationListAsync(parent.toString(), certificateRevocationList, certificateRevocationListId).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
- */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
- public final OperationFuture
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName parent = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * String certificateRevocationListId = "";
- * CertificateRevocationList certificateRevocationList = CertificateRevocationList.newBuilder().build();
- * CreateCertificateRevocationListRequest request = CreateCertificateRevocationListRequest.newBuilder()
- * .setParent(parent.toString())
- * .setCertificateRevocationListId(certificateRevocationListId)
- * .setCertificateRevocationList(certificateRevocationList)
- * .build();
- * CertificateRevocationList response = certificateAuthorityServiceClient.createCertificateRevocationListAsync(request).get();
- * }
- *
- */
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
- public final OperationCallable<
- CreateCertificateRevocationListRequest, CertificateRevocationList, OperationMetadata>
- createCertificateRevocationListOperationCallable() {
- return stub.createCertificateRevocationListOperationCallable();
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Create a new
- * [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList]
- * in a given Project, Location for a particular
- * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].
- *
- *
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName parent = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * String certificateRevocationListId = "";
- * CertificateRevocationList certificateRevocationList = CertificateRevocationList.newBuilder().build();
- * CreateCertificateRevocationListRequest request = CreateCertificateRevocationListRequest.newBuilder()
- * .setParent(parent.toString())
- * .setCertificateRevocationListId(certificateRevocationListId)
- * .setCertificateRevocationList(certificateRevocationList)
- * .build();
- * OperationFuture<CertificateRevocationList, OperationMetadata> future = certificateAuthorityServiceClient.createCertificateRevocationListOperationCallable().futureCall(request);
- * // Do something
- * CertificateRevocationList response = future.get();
- * }
- *
- */
- public final UnaryCallable
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName parent = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * String certificateRevocationListId = "";
- * CertificateRevocationList certificateRevocationList = CertificateRevocationList.newBuilder().build();
- * CreateCertificateRevocationListRequest request = CreateCertificateRevocationListRequest.newBuilder()
- * .setParent(parent.toString())
- * .setCertificateRevocationListId(certificateRevocationListId)
- * .setCertificateRevocationList(certificateRevocationList)
- * .build();
- * ApiFuture<Operation> future = certificateAuthorityServiceClient.createCertificateRevocationListCallable().futureCall(request);
- * // Do something
- * Operation response = future.get();
- * }
- *
- *
- * @param name Required. The
- * [name][google.cloud.security.privateca.v1beta1.CertificateRevocationList.name] of the
- * [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList]
- * to get.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final CertificateRevocationList getCertificateRevocationList(
- CertificateRevocationListName name) {
- GetCertificateRevocationListRequest request =
- GetCertificateRevocationListRequest.newBuilder()
- .setName(name == null ? null : name.toString())
- .build();
- return getCertificateRevocationList(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Returns a
- * [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
- *
- *
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateRevocationListName name = CertificateRevocationListName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]", "[CERTIFICATE_REVOCATION_LIST]");
- * CertificateRevocationList response = certificateAuthorityServiceClient.getCertificateRevocationList(name);
- * }
- *
- *
- * @param name Required. The
- * [name][google.cloud.security.privateca.v1beta1.CertificateRevocationList.name] of the
- * [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList]
- * to get.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final CertificateRevocationList getCertificateRevocationList(String name) {
- GetCertificateRevocationListRequest request =
- GetCertificateRevocationListRequest.newBuilder().setName(name).build();
- return getCertificateRevocationList(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Returns a
- * [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
- *
- *
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateRevocationListName name = CertificateRevocationListName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]", "[CERTIFICATE_REVOCATION_LIST]");
- * CertificateRevocationList response = certificateAuthorityServiceClient.getCertificateRevocationList(name.toString());
- * }
- *
- *
- * @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 CertificateRevocationList getCertificateRevocationList(
- GetCertificateRevocationListRequest request) {
- return getCertificateRevocationListCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Returns a
- * [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
- *
- *
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateRevocationListName name = CertificateRevocationListName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]", "[CERTIFICATE_REVOCATION_LIST]");
- * GetCertificateRevocationListRequest request = GetCertificateRevocationListRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * CertificateRevocationList response = certificateAuthorityServiceClient.getCertificateRevocationList(request);
- * }
- *
- */
- public final UnaryCallable
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateRevocationListName name = CertificateRevocationListName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]", "[CERTIFICATE_REVOCATION_LIST]");
- * GetCertificateRevocationListRequest request = GetCertificateRevocationListRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ApiFuture<CertificateRevocationList> future = certificateAuthorityServiceClient.getCertificateRevocationListCallable().futureCall(request);
- * // Do something
- * CertificateRevocationList response = future.get();
- * }
- *
- *
- * @param parent Required. The resource name of the location associated with the
- * [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList],
- * in the format `projects/*/locations/*/certificateauthorities/*`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ListCertificateRevocationListsPagedResponse listCertificateRevocationLists(
- CertificateAuthorityName parent) {
- ListCertificateRevocationListsRequest request =
- ListCertificateRevocationListsRequest.newBuilder()
- .setParent(parent == null ? null : parent.toString())
- .build();
- return listCertificateRevocationLists(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Lists
- * [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
- *
- *
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName parent = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * for (CertificateRevocationList element : certificateAuthorityServiceClient.listCertificateRevocationLists(parent).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- *
- *
- * @param parent Required. The resource name of the location associated with the
- * [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList],
- * in the format `projects/*/locations/*/certificateauthorities/*`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ListCertificateRevocationListsPagedResponse listCertificateRevocationLists(
- String parent) {
- ListCertificateRevocationListsRequest request =
- ListCertificateRevocationListsRequest.newBuilder().setParent(parent).build();
- return listCertificateRevocationLists(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Lists
- * [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
- *
- *
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName parent = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * for (CertificateRevocationList element : certificateAuthorityServiceClient.listCertificateRevocationLists(parent.toString()).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 ListCertificateRevocationListsPagedResponse listCertificateRevocationLists(
- ListCertificateRevocationListsRequest request) {
- return listCertificateRevocationListsPagedCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Lists
- * [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
- *
- *
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName parent = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * ListCertificateRevocationListsRequest request = ListCertificateRevocationListsRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
- * for (CertificateRevocationList element : certificateAuthorityServiceClient.listCertificateRevocationLists(request).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- *
- */
- public final UnaryCallable<
- ListCertificateRevocationListsRequest, ListCertificateRevocationListsPagedResponse>
- listCertificateRevocationListsPagedCallable() {
- return stub.listCertificateRevocationListsPagedCallable();
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Lists
- * [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
- *
- *
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName parent = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * ListCertificateRevocationListsRequest request = ListCertificateRevocationListsRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
- * ApiFuture<ListCertificateRevocationListsPagedResponse> future = certificateAuthorityServiceClient.listCertificateRevocationListsPagedCallable().futureCall(request);
- * // Do something
- * for (CertificateRevocationList element : future.get().iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- *
- */
- public final UnaryCallable<
- ListCertificateRevocationListsRequest, ListCertificateRevocationListsResponse>
- listCertificateRevocationListsCallable() {
- return stub.listCertificateRevocationListsCallable();
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Update a
- * [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
- *
- *
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateAuthorityName parent = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_AUTHORITY]");
- * ListCertificateRevocationListsRequest request = ListCertificateRevocationListsRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
- * while (true) {
- * ListCertificateRevocationListsResponse response = certificateAuthorityServiceClient.listCertificateRevocationListsCallable().call(request);
- * for (CertificateRevocationList element : response.getCertificateRevocationListsList()) {
- * // doThingsWith(element);
- * }
- * String nextPageToken = response.getNextPageToken();
- * if (!Strings.isNullOrEmpty(nextPageToken)) {
- * request = request.toBuilder().setPageToken(nextPageToken).build();
- * } else {
- * break;
- * }
- * }
- * }
- *
- *
- * @param certificateRevocationList Required.
- * [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList]
- * with updated values.
- * @param updateMask Required. A list of fields to be updated in this request.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
- public final OperationFuture
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateRevocationList certificateRevocationList = CertificateRevocationList.newBuilder().build();
- * FieldMask updateMask = FieldMask.newBuilder().build();
- * CertificateRevocationList response = certificateAuthorityServiceClient.updateCertificateRevocationListAsync(certificateRevocationList, updateMask).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
- */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
- public final OperationFuture
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateRevocationList certificateRevocationList = CertificateRevocationList.newBuilder().build();
- * FieldMask updateMask = FieldMask.newBuilder().build();
- * UpdateCertificateRevocationListRequest request = UpdateCertificateRevocationListRequest.newBuilder()
- * .setCertificateRevocationList(certificateRevocationList)
- * .setUpdateMask(updateMask)
- * .build();
- * CertificateRevocationList response = certificateAuthorityServiceClient.updateCertificateRevocationListAsync(request).get();
- * }
- *
- */
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
- public final OperationCallable<
- UpdateCertificateRevocationListRequest, CertificateRevocationList, OperationMetadata>
- updateCertificateRevocationListOperationCallable() {
- return stub.updateCertificateRevocationListOperationCallable();
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Update a
- * [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList].
- *
- *
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateRevocationList certificateRevocationList = CertificateRevocationList.newBuilder().build();
- * FieldMask updateMask = FieldMask.newBuilder().build();
- * UpdateCertificateRevocationListRequest request = UpdateCertificateRevocationListRequest.newBuilder()
- * .setCertificateRevocationList(certificateRevocationList)
- * .setUpdateMask(updateMask)
- * .build();
- * OperationFuture<CertificateRevocationList, OperationMetadata> future = certificateAuthorityServiceClient.updateCertificateRevocationListOperationCallable().futureCall(request);
- * // Do something
- * CertificateRevocationList response = future.get();
- * }
- *
- */
- public final UnaryCallable
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * CertificateRevocationList certificateRevocationList = CertificateRevocationList.newBuilder().build();
- * FieldMask updateMask = FieldMask.newBuilder().build();
- * UpdateCertificateRevocationListRequest request = UpdateCertificateRevocationListRequest.newBuilder()
- * .setCertificateRevocationList(certificateRevocationList)
- * .setUpdateMask(updateMask)
- * .build();
- * ApiFuture<Operation> future = certificateAuthorityServiceClient.updateCertificateRevocationListCallable().futureCall(request);
- * // Do something
- * Operation response = future.get();
- * }
- *
- *
- * @param parent Required. The resource name of the location associated with the
- * [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig], in the format
- * `projects/*/locations/*`.
- * @param reusableConfig Required. A
- * [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] with initial field
- * values.
- * @param reusableConfigId Required. It must be unique within a location and match the regular
- * expression `[a-zA-Z0-9-]{1,63}`
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
- public final OperationFuture
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- * ReusableConfig reusableConfig = ReusableConfig.newBuilder().build();
- * String reusableConfigId = "";
- * ReusableConfig response = certificateAuthorityServiceClient.createReusableConfigAsync(parent, reusableConfig, reusableConfigId).get();
- * }
- *
- *
- * @param parent Required. The resource name of the location associated with the
- * [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig], in the format
- * `projects/*/locations/*`.
- * @param reusableConfig Required. A
- * [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] with initial field
- * values.
- * @param reusableConfigId Required. It must be unique within a location and match the regular
- * expression `[a-zA-Z0-9-]{1,63}`
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
- public final OperationFuture
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- * ReusableConfig reusableConfig = ReusableConfig.newBuilder().build();
- * String reusableConfigId = "";
- * ReusableConfig response = certificateAuthorityServiceClient.createReusableConfigAsync(parent.toString(), reusableConfig, reusableConfigId).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
- */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
- public final OperationFuture
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- * String reusableConfigId = "";
- * ReusableConfig reusableConfig = ReusableConfig.newBuilder().build();
- * CreateReusableConfigRequest request = CreateReusableConfigRequest.newBuilder()
- * .setParent(parent.toString())
- * .setReusableConfigId(reusableConfigId)
- * .setReusableConfig(reusableConfig)
- * .build();
- * ReusableConfig response = certificateAuthorityServiceClient.createReusableConfigAsync(request).get();
- * }
- *
- */
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
- public final OperationCallable
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- * String reusableConfigId = "";
- * ReusableConfig reusableConfig = ReusableConfig.newBuilder().build();
- * CreateReusableConfigRequest request = CreateReusableConfigRequest.newBuilder()
- * .setParent(parent.toString())
- * .setReusableConfigId(reusableConfigId)
- * .setReusableConfig(reusableConfig)
- * .build();
- * OperationFuture<ReusableConfig, OperationMetadata> future = certificateAuthorityServiceClient.createReusableConfigOperationCallable().futureCall(request);
- * // Do something
- * ReusableConfig response = future.get();
- * }
- *
- */
- public final UnaryCallable
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- * String reusableConfigId = "";
- * ReusableConfig reusableConfig = ReusableConfig.newBuilder().build();
- * CreateReusableConfigRequest request = CreateReusableConfigRequest.newBuilder()
- * .setParent(parent.toString())
- * .setReusableConfigId(reusableConfigId)
- * .setReusableConfig(reusableConfig)
- * .build();
- * ApiFuture<Operation> future = certificateAuthorityServiceClient.createReusableConfigCallable().futureCall(request);
- * // Do something
- * Operation response = future.get();
- * }
- *
- *
- * @param name Required. The resource name for this
- * [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in the format
- * `projects/*/locations/*/reusableConfigs/*`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
- public final OperationFuture
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * ReusableConfigName name = ReusableConfigName.of("[PROJECT]", "[LOCATION]", "[REUSABLE_CONFIG]");
- * certificateAuthorityServiceClient.deleteReusableConfigAsync(name).get();
- * }
- *
- *
- * @param name Required. The resource name for this
- * [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in the format
- * `projects/*/locations/*/reusableConfigs/*`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
- public final OperationFuture
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * ReusableConfigName name = ReusableConfigName.of("[PROJECT]", "[LOCATION]", "[REUSABLE_CONFIG]");
- * certificateAuthorityServiceClient.deleteReusableConfigAsync(name.toString()).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
- */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
- public final OperationFuture
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * ReusableConfigName name = ReusableConfigName.of("[PROJECT]", "[LOCATION]", "[REUSABLE_CONFIG]");
- * DeleteReusableConfigRequest request = DeleteReusableConfigRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * certificateAuthorityServiceClient.deleteReusableConfigAsync(request).get();
- * }
- *
- */
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
- public final OperationCallable
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * ReusableConfigName name = ReusableConfigName.of("[PROJECT]", "[LOCATION]", "[REUSABLE_CONFIG]");
- * DeleteReusableConfigRequest request = DeleteReusableConfigRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * OperationFuture<Empty, OperationMetadata> future = certificateAuthorityServiceClient.deleteReusableConfigOperationCallable().futureCall(request);
- * // Do something
- * future.get();
- * }
- *
- */
- public final UnaryCallable
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * ReusableConfigName name = ReusableConfigName.of("[PROJECT]", "[LOCATION]", "[REUSABLE_CONFIG]");
- * DeleteReusableConfigRequest request = DeleteReusableConfigRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ApiFuture<Operation> future = certificateAuthorityServiceClient.deleteReusableConfigCallable().futureCall(request);
- * // Do something
- * future.get();
- * }
- *
- *
- * @param name Required. The [name][ReusableConfigs.name] of the [ReusableConfigs][] to get.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ReusableConfig getReusableConfig(ReusableConfigName name) {
- GetReusableConfigRequest request =
- GetReusableConfigRequest.newBuilder()
- .setName(name == null ? null : name.toString())
- .build();
- return getReusableConfig(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Returns a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig].
- *
- *
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * ReusableConfigName name = ReusableConfigName.of("[PROJECT]", "[LOCATION]", "[REUSABLE_CONFIG]");
- * ReusableConfig response = certificateAuthorityServiceClient.getReusableConfig(name);
- * }
- *
- *
- * @param name Required. The [name][ReusableConfigs.name] of the [ReusableConfigs][] to get.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ReusableConfig getReusableConfig(String name) {
- GetReusableConfigRequest request = GetReusableConfigRequest.newBuilder().setName(name).build();
- return getReusableConfig(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Returns a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig].
- *
- *
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * ReusableConfigName name = ReusableConfigName.of("[PROJECT]", "[LOCATION]", "[REUSABLE_CONFIG]");
- * ReusableConfig response = certificateAuthorityServiceClient.getReusableConfig(name.toString());
- * }
- *
- *
- * @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 ReusableConfig getReusableConfig(GetReusableConfigRequest request) {
- return getReusableConfigCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Returns a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig].
- *
- *
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * ReusableConfigName name = ReusableConfigName.of("[PROJECT]", "[LOCATION]", "[REUSABLE_CONFIG]");
- * GetReusableConfigRequest request = GetReusableConfigRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ReusableConfig response = certificateAuthorityServiceClient.getReusableConfig(request);
- * }
- *
- */
- public final UnaryCallable
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * ReusableConfigName name = ReusableConfigName.of("[PROJECT]", "[LOCATION]", "[REUSABLE_CONFIG]");
- * GetReusableConfigRequest request = GetReusableConfigRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ApiFuture<ReusableConfig> future = certificateAuthorityServiceClient.getReusableConfigCallable().futureCall(request);
- * // Do something
- * ReusableConfig response = future.get();
- * }
- *
- *
- * @param parent Required. The resource name of the location associated with the
- * [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig], in the format
- * `projects/*/locations/*`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ListReusableConfigsPagedResponse listReusableConfigs(LocationName parent) {
- ListReusableConfigsRequest request =
- ListReusableConfigsRequest.newBuilder()
- .setParent(parent == null ? null : parent.toString())
- .build();
- return listReusableConfigs(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Lists [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig].
- *
- *
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- * for (ReusableConfig element : certificateAuthorityServiceClient.listReusableConfigs(parent).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- *
- *
- * @param parent Required. The resource name of the location associated with the
- * [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig], in the format
- * `projects/*/locations/*`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ListReusableConfigsPagedResponse listReusableConfigs(String parent) {
- ListReusableConfigsRequest request =
- ListReusableConfigsRequest.newBuilder().setParent(parent).build();
- return listReusableConfigs(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Lists [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig].
- *
- *
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- * for (ReusableConfig element : certificateAuthorityServiceClient.listReusableConfigs(parent.toString()).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 ListReusableConfigsPagedResponse listReusableConfigs(
- ListReusableConfigsRequest request) {
- return listReusableConfigsPagedCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Lists [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig].
- *
- *
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- * ListReusableConfigsRequest request = ListReusableConfigsRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
- * for (ReusableConfig element : certificateAuthorityServiceClient.listReusableConfigs(request).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- *
- */
- public final UnaryCallable
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- * ListReusableConfigsRequest request = ListReusableConfigsRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
- * ApiFuture<ListReusableConfigsPagedResponse> future = certificateAuthorityServiceClient.listReusableConfigsPagedCallable().futureCall(request);
- * // Do something
- * for (ReusableConfig element : future.get().iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- *
- */
- public final UnaryCallable
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- * ListReusableConfigsRequest request = ListReusableConfigsRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
- * while (true) {
- * ListReusableConfigsResponse response = certificateAuthorityServiceClient.listReusableConfigsCallable().call(request);
- * for (ReusableConfig element : response.getReusableConfigsList()) {
- * // doThingsWith(element);
- * }
- * String nextPageToken = response.getNextPageToken();
- * if (!Strings.isNullOrEmpty(nextPageToken)) {
- * request = request.toBuilder().setPageToken(nextPageToken).build();
- * } else {
- * break;
- * }
- * }
- * }
- *
- *
- * @param reusableConfig Required.
- * [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] with updated
- * values.
- * @param updateMask Required. A list of fields to be updated in this request.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
- public final OperationFuture
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * ReusableConfig reusableConfig = ReusableConfig.newBuilder().build();
- * FieldMask updateMask = FieldMask.newBuilder().build();
- * ReusableConfig response = certificateAuthorityServiceClient.updateReusableConfigAsync(reusableConfig, updateMask).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
- */
- @BetaApi(
- "The surface for long-running operations is not stable yet and may change in the future.")
- public final OperationFuture
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * ReusableConfig reusableConfig = ReusableConfig.newBuilder().build();
- * FieldMask updateMask = FieldMask.newBuilder().build();
- * UpdateReusableConfigRequest request = UpdateReusableConfigRequest.newBuilder()
- * .setReusableConfig(reusableConfig)
- * .setUpdateMask(updateMask)
- * .build();
- * ReusableConfig response = certificateAuthorityServiceClient.updateReusableConfigAsync(request).get();
- * }
- *
- */
- @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
- public final OperationCallable
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * ReusableConfig reusableConfig = ReusableConfig.newBuilder().build();
- * FieldMask updateMask = FieldMask.newBuilder().build();
- * UpdateReusableConfigRequest request = UpdateReusableConfigRequest.newBuilder()
- * .setReusableConfig(reusableConfig)
- * .setUpdateMask(updateMask)
- * .build();
- * OperationFuture<ReusableConfig, OperationMetadata> future = certificateAuthorityServiceClient.updateReusableConfigOperationCallable().futureCall(request);
- * // Do something
- * ReusableConfig response = future.get();
- * }
- *
- */
- public final UnaryCallable
- * try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
- * ReusableConfig reusableConfig = ReusableConfig.newBuilder().build();
- * FieldMask updateMask = FieldMask.newBuilder().build();
- * UpdateReusableConfigRequest request = UpdateReusableConfigRequest.newBuilder()
- * .setReusableConfig(reusableConfig)
- * .setUpdateMask(updateMask)
- * .build();
- * ApiFuture<Operation> future = certificateAuthorityServiceClient.updateReusableConfigCallable().futureCall(request);
- * // Do something
- * Operation response = future.get();
- * }
- *