Class CertificateAuthorityServiceClient

java.lang.Object
com.google.cloud.security.privateca.v1.CertificateAuthorityServiceClient
All Implemented Interfaces:
BackgroundResource, AutoCloseable

@Generated("by gapic-generator-java") public class CertificateAuthorityServiceClient extends Object implements BackgroundResource
Service Description: [Certificate Authority Service][google.cloud.security.privateca.v1.CertificateAuthorityService] manages private certificate authorities and issued certificates.

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:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create()) {
   CaPoolName parent = CaPoolName.of("[PROJECT]", "[LOCATION]", "[CA_POOL]");
   Certificate certificate = Certificate.newBuilder().build();
   String certificateId = "certificateId-644529902";
   Certificate response =
       certificateAuthorityServiceClient.createCertificate(parent, certificate, certificateId);
 }
 

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().

Methods
Method Description Method Variants

CreateCertificate

Create a new [Certificate][google.cloud.security.privateca.v1.Certificate] in a given Project, Location from a particular [CaPool][google.cloud.security.privateca.v1.CaPool].

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createCertificate(CreateCertificateRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • createCertificate(CaPoolName parent, Certificate certificate, String certificateId)

  • createCertificate(String parent, Certificate certificate, String certificateId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createCertificateCallable()

GetCertificate

Returns a [Certificate][google.cloud.security.privateca.v1.Certificate].

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getCertificate(GetCertificateRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getCertificate(CertificateName name)

  • getCertificate(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getCertificateCallable()

ListCertificates

Lists [Certificates][google.cloud.security.privateca.v1.Certificate].

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listCertificates(ListCertificatesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listCertificates(CaPoolName parent)

  • listCertificates(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listCertificatesPagedCallable()

  • listCertificatesCallable()

RevokeCertificate

Revoke a [Certificate][google.cloud.security.privateca.v1.Certificate].

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • revokeCertificate(RevokeCertificateRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • revokeCertificate(CertificateName name)

  • revokeCertificate(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • revokeCertificateCallable()

UpdateCertificate

Update a [Certificate][google.cloud.security.privateca.v1.Certificate]. Currently, the only field you can update is the [labels][google.cloud.security.privateca.v1.Certificate.labels] field.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateCertificate(UpdateCertificateRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • updateCertificate(Certificate certificate, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateCertificateCallable()

ActivateCertificateAuthority

Activate a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] that is in state [AWAITING_USER_ACTIVATION][google.cloud.security.privateca.v1.CertificateAuthority.State.AWAITING_USER_ACTIVATION] and is of type [SUBORDINATE][google.cloud.security.privateca.v1.CertificateAuthority.Type.SUBORDINATE]. After the parent Certificate Authority signs a certificate signing request from [FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCertificateAuthorityCsr], this method can complete the activation process.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • activateCertificateAuthorityAsync(ActivateCertificateAuthorityRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • activateCertificateAuthorityAsync(CertificateAuthorityName name)

  • activateCertificateAuthorityAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • activateCertificateAuthorityOperationCallable()

  • activateCertificateAuthorityCallable()

CreateCertificateAuthority

Create a new [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in a given Project and Location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createCertificateAuthorityAsync(CreateCertificateAuthorityRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • createCertificateAuthorityAsync(CaPoolName parent, CertificateAuthority certificateAuthority, String certificateAuthorityId)

  • createCertificateAuthorityAsync(String parent, CertificateAuthority certificateAuthority, String certificateAuthorityId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createCertificateAuthorityOperationCallable()

  • createCertificateAuthorityCallable()

DisableCertificateAuthority

Disable a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • disableCertificateAuthorityAsync(DisableCertificateAuthorityRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • disableCertificateAuthorityAsync(CertificateAuthorityName name)

  • disableCertificateAuthorityAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • disableCertificateAuthorityOperationCallable()

  • disableCertificateAuthorityCallable()

EnableCertificateAuthority

Enable a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • enableCertificateAuthorityAsync(EnableCertificateAuthorityRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • enableCertificateAuthorityAsync(CertificateAuthorityName name)

  • enableCertificateAuthorityAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • enableCertificateAuthorityOperationCallable()

  • enableCertificateAuthorityCallable()

FetchCertificateAuthorityCsr

Fetch a certificate signing request (CSR) from a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] that is in state [AWAITING_USER_ACTIVATION][google.cloud.security.privateca.v1.CertificateAuthority.State.AWAITING_USER_ACTIVATION] and is of type [SUBORDINATE][google.cloud.security.privateca.v1.CertificateAuthority.Type.SUBORDINATE]. The CSR must then be signed by the desired parent Certificate Authority, which could be another [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] resource, or could be an on-prem certificate authority. See also [ActivateCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.ActivateCertificateAuthority].

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • fetchCertificateAuthorityCsr(FetchCertificateAuthorityCsrRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • fetchCertificateAuthorityCsr(CertificateAuthorityName name)

  • fetchCertificateAuthorityCsr(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • fetchCertificateAuthorityCsrCallable()

GetCertificateAuthority

Returns a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getCertificateAuthority(GetCertificateAuthorityRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getCertificateAuthority(CertificateAuthorityName name)

  • getCertificateAuthority(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getCertificateAuthorityCallable()

ListCertificateAuthorities

Lists [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority].

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listCertificateAuthorities(ListCertificateAuthoritiesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listCertificateAuthorities(CaPoolName parent)

  • listCertificateAuthorities(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listCertificateAuthoritiesPagedCallable()

  • listCertificateAuthoritiesCallable()

UndeleteCertificateAuthority

Undelete a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] that has been deleted.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • undeleteCertificateAuthorityAsync(UndeleteCertificateAuthorityRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • undeleteCertificateAuthorityAsync(CertificateAuthorityName name)

  • undeleteCertificateAuthorityAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • undeleteCertificateAuthorityOperationCallable()

  • undeleteCertificateAuthorityCallable()

DeleteCertificateAuthority

Delete a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteCertificateAuthorityAsync(DeleteCertificateAuthorityRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • deleteCertificateAuthorityAsync(CertificateAuthorityName name)

  • deleteCertificateAuthorityAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteCertificateAuthorityOperationCallable()

  • deleteCertificateAuthorityCallable()

UpdateCertificateAuthority

Update a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateCertificateAuthorityAsync(UpdateCertificateAuthorityRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • updateCertificateAuthorityAsync(CertificateAuthority certificateAuthority, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateCertificateAuthorityOperationCallable()

  • updateCertificateAuthorityCallable()

CreateCaPool

Create a [CaPool][google.cloud.security.privateca.v1.CaPool].

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createCaPoolAsync(CreateCaPoolRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • createCaPoolAsync(LocationName parent, CaPool caPool, String caPoolId)

  • createCaPoolAsync(String parent, CaPool caPool, String caPoolId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createCaPoolOperationCallable()

  • createCaPoolCallable()

UpdateCaPool

Update a [CaPool][google.cloud.security.privateca.v1.CaPool].

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateCaPoolAsync(UpdateCaPoolRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • updateCaPoolAsync(CaPool caPool, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateCaPoolOperationCallable()

  • updateCaPoolCallable()

GetCaPool

Returns a [CaPool][google.cloud.security.privateca.v1.CaPool].

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getCaPool(GetCaPoolRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getCaPool(CaPoolName name)

  • getCaPool(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getCaPoolCallable()

ListCaPools

Lists [CaPools][google.cloud.security.privateca.v1.CaPool].

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listCaPools(ListCaPoolsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listCaPools(LocationName parent)

  • listCaPools(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listCaPoolsPagedCallable()

  • listCaPoolsCallable()

DeleteCaPool

Delete a [CaPool][google.cloud.security.privateca.v1.CaPool].

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteCaPoolAsync(DeleteCaPoolRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • deleteCaPoolAsync(CaPoolName name)

  • deleteCaPoolAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteCaPoolOperationCallable()

  • deleteCaPoolCallable()

FetchCaCerts

FetchCaCerts returns the current trust anchor for the [CaPool][google.cloud.security.privateca.v1.CaPool]. This will include CA certificate chains for all certificate authorities in the ENABLED, DISABLED, or STAGED states.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • fetchCaCerts(FetchCaCertsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • fetchCaCerts(CaPoolName caPool)

  • fetchCaCerts(String caPool)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • fetchCaCertsCallable()

GetCertificateRevocationList

Returns a [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList].

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getCertificateRevocationList(GetCertificateRevocationListRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getCertificateRevocationList(CertificateRevocationListName name)

  • getCertificateRevocationList(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getCertificateRevocationListCallable()

ListCertificateRevocationLists

Lists [CertificateRevocationLists][google.cloud.security.privateca.v1.CertificateRevocationList].

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listCertificateRevocationLists(ListCertificateRevocationListsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listCertificateRevocationLists(CertificateAuthorityName parent)

  • listCertificateRevocationLists(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listCertificateRevocationListsPagedCallable()

  • listCertificateRevocationListsCallable()

UpdateCertificateRevocationList

Update a [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList].

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateCertificateRevocationListAsync(UpdateCertificateRevocationListRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • updateCertificateRevocationListAsync(CertificateRevocationList certificateRevocationList, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateCertificateRevocationListOperationCallable()

  • updateCertificateRevocationListCallable()

CreateCertificateTemplate

Create a new [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] in a given Project and Location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createCertificateTemplateAsync(CreateCertificateTemplateRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • createCertificateTemplateAsync(LocationName parent, CertificateTemplate certificateTemplate, String certificateTemplateId)

  • createCertificateTemplateAsync(String parent, CertificateTemplate certificateTemplate, String certificateTemplateId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createCertificateTemplateOperationCallable()

  • createCertificateTemplateCallable()

DeleteCertificateTemplate

DeleteCertificateTemplate deletes a [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate].

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteCertificateTemplateAsync(DeleteCertificateTemplateRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • deleteCertificateTemplateAsync(CertificateTemplateName name)

  • deleteCertificateTemplateAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteCertificateTemplateOperationCallable()

  • deleteCertificateTemplateCallable()

GetCertificateTemplate

Returns a [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate].

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getCertificateTemplate(GetCertificateTemplateRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getCertificateTemplate(CertificateTemplateName name)

  • getCertificateTemplate(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getCertificateTemplateCallable()

ListCertificateTemplates

Lists [CertificateTemplates][google.cloud.security.privateca.v1.CertificateTemplate].

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listCertificateTemplates(ListCertificateTemplatesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listCertificateTemplates(LocationName parent)

  • listCertificateTemplates(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listCertificateTemplatesPagedCallable()

  • listCertificateTemplatesCallable()

UpdateCertificateTemplate

Update a [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate].

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateCertificateTemplateAsync(UpdateCertificateTemplateRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • updateCertificateTemplateAsync(CertificateTemplate certificateTemplate, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateCertificateTemplateOperationCallable()

  • updateCertificateTemplateCallable()

ListLocations

Lists information about the supported locations for this service.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listLocations(ListLocationsRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listLocationsPagedCallable()

  • listLocationsCallable()

GetLocation

Gets information about a location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getLocation(GetLocationRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getLocationCallable()

SetIamPolicy

Sets the access control policy on the specified resource. Replacesany existing policy.

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • setIamPolicy(SetIamPolicyRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • setIamPolicyCallable()

GetIamPolicy

Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getIamPolicy(GetIamPolicyRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getIamPolicyCallable()

TestIamPermissions

Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error.

Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • testIamPermissions(TestIamPermissionsRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • testIamPermissionsCallable()

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:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 CertificateAuthorityServiceSettings certificateAuthorityServiceSettings =
     CertificateAuthorityServiceSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create(certificateAuthorityServiceSettings);
 

To customize the endpoint:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 CertificateAuthorityServiceSettings certificateAuthorityServiceSettings =
     CertificateAuthorityServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
 CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create(certificateAuthorityServiceSettings);
 

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 CertificateAuthorityServiceSettings certificateAuthorityServiceSettings =
     CertificateAuthorityServiceSettings.newHttpJsonBuilder().build();
 CertificateAuthorityServiceClient certificateAuthorityServiceClient =
     CertificateAuthorityServiceClient.create(certificateAuthorityServiceSettings);
 

Please refer to the GitHub repository's samples for more quickstart code snippets.

  • Constructor Details

    • CertificateAuthorityServiceClient

      protected CertificateAuthorityServiceClient(CertificateAuthorityServiceSettings settings) throws IOException
      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.
      Throws:
      IOException
    • CertificateAuthorityServiceClient

      protected CertificateAuthorityServiceClient(CertificateAuthorityServiceStub stub)
  • Method Details

    • create

      public static final CertificateAuthorityServiceClient create() throws IOException
      Constructs an instance of CertificateAuthorityServiceClient with default settings.
      Throws:
      IOException
    • create

      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.
      Throws:
      IOException
    • create

      Constructs an instance of CertificateAuthorityServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(CertificateAuthorityServiceSettings).
    • getSettings

      public final CertificateAuthorityServiceSettings getSettings()
    • getStub

    • getOperationsClient

      public final OperationsClient getOperationsClient()
      Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
    • getHttpJsonOperationsClient

      @BetaApi public final OperationsClient getHttpJsonOperationsClient()
      Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
    • createCertificate

      public final Certificate createCertificate(CaPoolName parent, Certificate certificate, String certificateId)
      Create a new [Certificate][google.cloud.security.privateca.v1.Certificate] in a given Project, Location from a particular [CaPool][google.cloud.security.privateca.v1.CaPool].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         CaPoolName parent = CaPoolName.of("[PROJECT]", "[LOCATION]", "[CA_POOL]");
         Certificate certificate = Certificate.newBuilder().build();
         String certificateId = "certificateId-644529902";
         Certificate response =
             certificateAuthorityServiceClient.createCertificate(parent, certificate, certificateId);
       }
       
      Parameters:
      parent - Required. The resource name of the [CaPool][google.cloud.security.privateca.v1.CaPool] associated with the [Certificate][google.cloud.security.privateca.v1.Certificate], in the format `projects/*/locations/*/caPools/*`.
      certificate - Required. A [Certificate][google.cloud.security.privateca.v1.Certificate] with initial field values.
      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.v1.CertificateAuthority] in the Enterprise [CertificateAuthority.tier][google.cloud.security.privateca.v1.CertificateAuthority.tier], but is optional and its value is ignored otherwise.
      Throws:
      ApiException - if the remote call fails
    • createCertificate

      public final Certificate createCertificate(String parent, Certificate certificate, String certificateId)
      Create a new [Certificate][google.cloud.security.privateca.v1.Certificate] in a given Project, Location from a particular [CaPool][google.cloud.security.privateca.v1.CaPool].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         String parent = CaPoolName.of("[PROJECT]", "[LOCATION]", "[CA_POOL]").toString();
         Certificate certificate = Certificate.newBuilder().build();
         String certificateId = "certificateId-644529902";
         Certificate response =
             certificateAuthorityServiceClient.createCertificate(parent, certificate, certificateId);
       }
       
      Parameters:
      parent - Required. The resource name of the [CaPool][google.cloud.security.privateca.v1.CaPool] associated with the [Certificate][google.cloud.security.privateca.v1.Certificate], in the format `projects/*/locations/*/caPools/*`.
      certificate - Required. A [Certificate][google.cloud.security.privateca.v1.Certificate] with initial field values.
      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.v1.CertificateAuthority] in the Enterprise [CertificateAuthority.tier][google.cloud.security.privateca.v1.CertificateAuthority.tier], but is optional and its value is ignored otherwise.
      Throws:
      ApiException - if the remote call fails
    • createCertificate

      public final Certificate createCertificate(CreateCertificateRequest request)
      Create a new [Certificate][google.cloud.security.privateca.v1.Certificate] in a given Project, Location from a particular [CaPool][google.cloud.security.privateca.v1.CaPool].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         CreateCertificateRequest request =
             CreateCertificateRequest.newBuilder()
                 .setParent(CaPoolName.of("[PROJECT]", "[LOCATION]", "[CA_POOL]").toString())
                 .setCertificateId("certificateId-644529902")
                 .setCertificate(Certificate.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .setValidateOnly(true)
                 .setIssuingCertificateAuthorityId("issuingCertificateAuthorityId-559908707")
                 .build();
         Certificate response = certificateAuthorityServiceClient.createCertificate(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createCertificateCallable

      public final UnaryCallable<CreateCertificateRequest,Certificate> createCertificateCallable()
      Create a new [Certificate][google.cloud.security.privateca.v1.Certificate] in a given Project, Location from a particular [CaPool][google.cloud.security.privateca.v1.CaPool].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         CreateCertificateRequest request =
             CreateCertificateRequest.newBuilder()
                 .setParent(CaPoolName.of("[PROJECT]", "[LOCATION]", "[CA_POOL]").toString())
                 .setCertificateId("certificateId-644529902")
                 .setCertificate(Certificate.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .setValidateOnly(true)
                 .setIssuingCertificateAuthorityId("issuingCertificateAuthorityId-559908707")
                 .build();
         ApiFuture<Certificate> future =
             certificateAuthorityServiceClient.createCertificateCallable().futureCall(request);
         // Do something.
         Certificate response = future.get();
       }
       
    • getCertificate

      public final Certificate getCertificate(CertificateName name)
      Returns a [Certificate][google.cloud.security.privateca.v1.Certificate].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         CertificateName name =
             CertificateName.of("[PROJECT]", "[LOCATION]", "[CA_POOL]", "[CERTIFICATE]");
         Certificate response = certificateAuthorityServiceClient.getCertificate(name);
       }
       
      Parameters:
      name - Required. The [name][google.cloud.security.privateca.v1.Certificate.name] of the [Certificate][google.cloud.security.privateca.v1.Certificate] to get.
      Throws:
      ApiException - if the remote call fails
    • getCertificate

      public final Certificate getCertificate(String name)
      Returns a [Certificate][google.cloud.security.privateca.v1.Certificate].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         String name =
             CertificateName.of("[PROJECT]", "[LOCATION]", "[CA_POOL]", "[CERTIFICATE]").toString();
         Certificate response = certificateAuthorityServiceClient.getCertificate(name);
       }
       
      Parameters:
      name - Required. The [name][google.cloud.security.privateca.v1.Certificate.name] of the [Certificate][google.cloud.security.privateca.v1.Certificate] to get.
      Throws:
      ApiException - if the remote call fails
    • getCertificate

      public final Certificate getCertificate(GetCertificateRequest request)
      Returns a [Certificate][google.cloud.security.privateca.v1.Certificate].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         GetCertificateRequest request =
             GetCertificateRequest.newBuilder()
                 .setName(
                     CertificateName.of("[PROJECT]", "[LOCATION]", "[CA_POOL]", "[CERTIFICATE]")
                         .toString())
                 .build();
         Certificate response = certificateAuthorityServiceClient.getCertificate(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getCertificateCallable

      public final UnaryCallable<GetCertificateRequest,Certificate> getCertificateCallable()
      Returns a [Certificate][google.cloud.security.privateca.v1.Certificate].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         GetCertificateRequest request =
             GetCertificateRequest.newBuilder()
                 .setName(
                     CertificateName.of("[PROJECT]", "[LOCATION]", "[CA_POOL]", "[CERTIFICATE]")
                         .toString())
                 .build();
         ApiFuture<Certificate> future =
             certificateAuthorityServiceClient.getCertificateCallable().futureCall(request);
         // Do something.
         Certificate response = future.get();
       }
       
    • listCertificates

      Lists [Certificates][google.cloud.security.privateca.v1.Certificate].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         CaPoolName parent = CaPoolName.of("[PROJECT]", "[LOCATION]", "[CA_POOL]");
         for (Certificate element :
             certificateAuthorityServiceClient.listCertificates(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The resource name of the location associated with the [Certificates][google.cloud.security.privateca.v1.Certificate], in the format `projects/*/locations/*/caPools/*`.
      Throws:
      ApiException - if the remote call fails
    • listCertificates

      Lists [Certificates][google.cloud.security.privateca.v1.Certificate].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         String parent = CaPoolName.of("[PROJECT]", "[LOCATION]", "[CA_POOL]").toString();
         for (Certificate element :
             certificateAuthorityServiceClient.listCertificates(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The resource name of the location associated with the [Certificates][google.cloud.security.privateca.v1.Certificate], in the format `projects/*/locations/*/caPools/*`.
      Throws:
      ApiException - if the remote call fails
    • listCertificates

      Lists [Certificates][google.cloud.security.privateca.v1.Certificate].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         ListCertificatesRequest request =
             ListCertificatesRequest.newBuilder()
                 .setParent(CaPoolName.of("[PROJECT]", "[LOCATION]", "[CA_POOL]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         for (Certificate element :
             certificateAuthorityServiceClient.listCertificates(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listCertificatesPagedCallable

      Lists [Certificates][google.cloud.security.privateca.v1.Certificate].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         ListCertificatesRequest request =
             ListCertificatesRequest.newBuilder()
                 .setParent(CaPoolName.of("[PROJECT]", "[LOCATION]", "[CA_POOL]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         ApiFuture<Certificate> future =
             certificateAuthorityServiceClient.listCertificatesPagedCallable().futureCall(request);
         // Do something.
         for (Certificate element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listCertificatesCallable

      public final UnaryCallable<ListCertificatesRequest,ListCertificatesResponse> listCertificatesCallable()
      Lists [Certificates][google.cloud.security.privateca.v1.Certificate].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         ListCertificatesRequest request =
             ListCertificatesRequest.newBuilder()
                 .setParent(CaPoolName.of("[PROJECT]", "[LOCATION]", "[CA_POOL]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .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;
           }
         }
       }
       
    • revokeCertificate

      public final Certificate revokeCertificate(CertificateName name)
      Revoke a [Certificate][google.cloud.security.privateca.v1.Certificate].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         CertificateName name =
             CertificateName.of("[PROJECT]", "[LOCATION]", "[CA_POOL]", "[CERTIFICATE]");
         Certificate response = certificateAuthorityServiceClient.revokeCertificate(name);
       }
       
      Parameters:
      name - Required. The resource name for this [Certificate][google.cloud.security.privateca.v1.Certificate] in the format `projects/*/locations/*/caPools/*/certificates/*`.
      Throws:
      ApiException - if the remote call fails
    • revokeCertificate

      public final Certificate revokeCertificate(String name)
      Revoke a [Certificate][google.cloud.security.privateca.v1.Certificate].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         String name =
             CertificateName.of("[PROJECT]", "[LOCATION]", "[CA_POOL]", "[CERTIFICATE]").toString();
         Certificate response = certificateAuthorityServiceClient.revokeCertificate(name);
       }
       
      Parameters:
      name - Required. The resource name for this [Certificate][google.cloud.security.privateca.v1.Certificate] in the format `projects/*/locations/*/caPools/*/certificates/*`.
      Throws:
      ApiException - if the remote call fails
    • revokeCertificate

      public final Certificate revokeCertificate(RevokeCertificateRequest request)
      Revoke a [Certificate][google.cloud.security.privateca.v1.Certificate].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         RevokeCertificateRequest request =
             RevokeCertificateRequest.newBuilder()
                 .setName(
                     CertificateName.of("[PROJECT]", "[LOCATION]", "[CA_POOL]", "[CERTIFICATE]")
                         .toString())
                 .setReason(RevocationReason.forNumber(0))
                 .setRequestId("requestId693933066")
                 .build();
         Certificate response = certificateAuthorityServiceClient.revokeCertificate(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • revokeCertificateCallable

      public final UnaryCallable<RevokeCertificateRequest,Certificate> revokeCertificateCallable()
      Revoke a [Certificate][google.cloud.security.privateca.v1.Certificate].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         RevokeCertificateRequest request =
             RevokeCertificateRequest.newBuilder()
                 .setName(
                     CertificateName.of("[PROJECT]", "[LOCATION]", "[CA_POOL]", "[CERTIFICATE]")
                         .toString())
                 .setReason(RevocationReason.forNumber(0))
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Certificate> future =
             certificateAuthorityServiceClient.revokeCertificateCallable().futureCall(request);
         // Do something.
         Certificate response = future.get();
       }
       
    • updateCertificate

      public final Certificate updateCertificate(Certificate certificate, com.google.protobuf.FieldMask updateMask)
      Update a [Certificate][google.cloud.security.privateca.v1.Certificate]. Currently, the only field you can update is the [labels][google.cloud.security.privateca.v1.Certificate.labels] field.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         Certificate certificate = Certificate.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         Certificate response =
             certificateAuthorityServiceClient.updateCertificate(certificate, updateMask);
       }
       
      Parameters:
      certificate - Required. [Certificate][google.cloud.security.privateca.v1.Certificate] with updated values.
      updateMask - Required. A list of fields to be updated in this request.
      Throws:
      ApiException - if the remote call fails
    • updateCertificate

      public final Certificate updateCertificate(UpdateCertificateRequest request)
      Update a [Certificate][google.cloud.security.privateca.v1.Certificate]. Currently, the only field you can update is the [labels][google.cloud.security.privateca.v1.Certificate.labels] field.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         UpdateCertificateRequest request =
             UpdateCertificateRequest.newBuilder()
                 .setCertificate(Certificate.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         Certificate response = certificateAuthorityServiceClient.updateCertificate(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateCertificateCallable

      public final UnaryCallable<UpdateCertificateRequest,Certificate> updateCertificateCallable()
      Update a [Certificate][google.cloud.security.privateca.v1.Certificate]. Currently, the only field you can update is the [labels][google.cloud.security.privateca.v1.Certificate.labels] field.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         UpdateCertificateRequest request =
             UpdateCertificateRequest.newBuilder()
                 .setCertificate(Certificate.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Certificate> future =
             certificateAuthorityServiceClient.updateCertificateCallable().futureCall(request);
         // Do something.
         Certificate response = future.get();
       }
       
    • activateCertificateAuthorityAsync

      public final OperationFuture<CertificateAuthority,OperationMetadata> activateCertificateAuthorityAsync(CertificateAuthorityName name)
      Activate a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] that is in state [AWAITING_USER_ACTIVATION][google.cloud.security.privateca.v1.CertificateAuthority.State.AWAITING_USER_ACTIVATION] and is of type [SUBORDINATE][google.cloud.security.privateca.v1.CertificateAuthority.Type.SUBORDINATE]. After the parent Certificate Authority signs a certificate signing request from [FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCertificateAuthorityCsr], this method can complete the activation process.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         CertificateAuthorityName name =
             CertificateAuthorityName.of(
                 "[PROJECT]", "[LOCATION]", "[CA_POOL]", "[CERTIFICATE_AUTHORITY]");
         CertificateAuthority response =
             certificateAuthorityServiceClient.activateCertificateAuthorityAsync(name).get();
       }
       
      Parameters:
      name - Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`.
      Throws:
      ApiException - if the remote call fails
    • activateCertificateAuthorityAsync

      public final OperationFuture<CertificateAuthority,OperationMetadata> activateCertificateAuthorityAsync(String name)
      Activate a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] that is in state [AWAITING_USER_ACTIVATION][google.cloud.security.privateca.v1.CertificateAuthority.State.AWAITING_USER_ACTIVATION] and is of type [SUBORDINATE][google.cloud.security.privateca.v1.CertificateAuthority.Type.SUBORDINATE]. After the parent Certificate Authority signs a certificate signing request from [FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCertificateAuthorityCsr], this method can complete the activation process.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         String name =
             CertificateAuthorityName.of(
                     "[PROJECT]", "[LOCATION]", "[CA_POOL]", "[CERTIFICATE_AUTHORITY]")
                 .toString();
         CertificateAuthority response =
             certificateAuthorityServiceClient.activateCertificateAuthorityAsync(name).get();
       }
       
      Parameters:
      name - Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`.
      Throws:
      ApiException - if the remote call fails
    • activateCertificateAuthorityAsync

      public final OperationFuture<CertificateAuthority,OperationMetadata> activateCertificateAuthorityAsync(ActivateCertificateAuthorityRequest request)
      Activate a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] that is in state [AWAITING_USER_ACTIVATION][google.cloud.security.privateca.v1.CertificateAuthority.State.AWAITING_USER_ACTIVATION] and is of type [SUBORDINATE][google.cloud.security.privateca.v1.CertificateAuthority.Type.SUBORDINATE]. After the parent Certificate Authority signs a certificate signing request from [FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCertificateAuthorityCsr], this method can complete the activation process.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         ActivateCertificateAuthorityRequest request =
             ActivateCertificateAuthorityRequest.newBuilder()
                 .setName(
                     CertificateAuthorityName.of(
                             "[PROJECT]", "[LOCATION]", "[CA_POOL]", "[CERTIFICATE_AUTHORITY]")
                         .toString())
                 .setPemCaCertificate("pemCaCertificate2100567073")
                 .setSubordinateConfig(SubordinateConfig.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         CertificateAuthority response =
             certificateAuthorityServiceClient.activateCertificateAuthorityAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • activateCertificateAuthorityOperationCallable

      public final OperationCallable<ActivateCertificateAuthorityRequest,CertificateAuthority,OperationMetadata> activateCertificateAuthorityOperationCallable()
      Activate a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] that is in state [AWAITING_USER_ACTIVATION][google.cloud.security.privateca.v1.CertificateAuthority.State.AWAITING_USER_ACTIVATION] and is of type [SUBORDINATE][google.cloud.security.privateca.v1.CertificateAuthority.Type.SUBORDINATE]. After the parent Certificate Authority signs a certificate signing request from [FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCertificateAuthorityCsr], this method can complete the activation process.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         ActivateCertificateAuthorityRequest request =
             ActivateCertificateAuthorityRequest.newBuilder()
                 .setName(
                     CertificateAuthorityName.of(
                             "[PROJECT]", "[LOCATION]", "[CA_POOL]", "[CERTIFICATE_AUTHORITY]")
                         .toString())
                 .setPemCaCertificate("pemCaCertificate2100567073")
                 .setSubordinateConfig(SubordinateConfig.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<CertificateAuthority, OperationMetadata> future =
             certificateAuthorityServiceClient
                 .activateCertificateAuthorityOperationCallable()
                 .futureCall(request);
         // Do something.
         CertificateAuthority response = future.get();
       }
       
    • activateCertificateAuthorityCallable

      public final UnaryCallable<ActivateCertificateAuthorityRequest,Operation> activateCertificateAuthorityCallable()
      Activate a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] that is in state [AWAITING_USER_ACTIVATION][google.cloud.security.privateca.v1.CertificateAuthority.State.AWAITING_USER_ACTIVATION] and is of type [SUBORDINATE][google.cloud.security.privateca.v1.CertificateAuthority.Type.SUBORDINATE]. After the parent Certificate Authority signs a certificate signing request from [FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCertificateAuthorityCsr], this method can complete the activation process.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         ActivateCertificateAuthorityRequest request =
             ActivateCertificateAuthorityRequest.newBuilder()
                 .setName(
                     CertificateAuthorityName.of(
                             "[PROJECT]", "[LOCATION]", "[CA_POOL]", "[CERTIFICATE_AUTHORITY]")
                         .toString())
                 .setPemCaCertificate("pemCaCertificate2100567073")
                 .setSubordinateConfig(SubordinateConfig.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             certificateAuthorityServiceClient
                 .activateCertificateAuthorityCallable()
                 .futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • createCertificateAuthorityAsync

      public final OperationFuture<CertificateAuthority,OperationMetadata> createCertificateAuthorityAsync(CaPoolName parent, CertificateAuthority certificateAuthority, String certificateAuthorityId)
      Create a new [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in a given Project and Location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         CaPoolName parent = CaPoolName.of("[PROJECT]", "[LOCATION]", "[CA_POOL]");
         CertificateAuthority certificateAuthority = CertificateAuthority.newBuilder().build();
         String certificateAuthorityId = "certificateAuthorityId-1652580953";
         CertificateAuthority response =
             certificateAuthorityServiceClient
                 .createCertificateAuthorityAsync(parent, certificateAuthority, certificateAuthorityId)
                 .get();
       }
       
      Parameters:
      parent - Required. The resource name of the [CaPool][google.cloud.security.privateca.v1.CaPool] associated with the [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority], in the format `projects/*/locations/*/caPools/*`.
      certificateAuthority - Required. A [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] with initial field values.
      certificateAuthorityId - Required. It must be unique within a location and match the regular expression `[a-zA-Z0-9_-]{1,63}`
      Throws:
      ApiException - if the remote call fails
    • createCertificateAuthorityAsync

      public final OperationFuture<CertificateAuthority,OperationMetadata> createCertificateAuthorityAsync(String parent, CertificateAuthority certificateAuthority, String certificateAuthorityId)
      Create a new [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in a given Project and Location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         String parent = CaPoolName.of("[PROJECT]", "[LOCATION]", "[CA_POOL]").toString();
         CertificateAuthority certificateAuthority = CertificateAuthority.newBuilder().build();
         String certificateAuthorityId = "certificateAuthorityId-1652580953";
         CertificateAuthority response =
             certificateAuthorityServiceClient
                 .createCertificateAuthorityAsync(parent, certificateAuthority, certificateAuthorityId)
                 .get();
       }
       
      Parameters:
      parent - Required. The resource name of the [CaPool][google.cloud.security.privateca.v1.CaPool] associated with the [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority], in the format `projects/*/locations/*/caPools/*`.
      certificateAuthority - Required. A [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] with initial field values.
      certificateAuthorityId - Required. It must be unique within a location and match the regular expression `[a-zA-Z0-9_-]{1,63}`
      Throws:
      ApiException - if the remote call fails
    • createCertificateAuthorityAsync

      public final OperationFuture<CertificateAuthority,OperationMetadata> createCertificateAuthorityAsync(CreateCertificateAuthorityRequest request)
      Create a new [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in a given Project and Location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         CreateCertificateAuthorityRequest request =
             CreateCertificateAuthorityRequest.newBuilder()
                 .setParent(CaPoolName.of("[PROJECT]", "[LOCATION]", "[CA_POOL]").toString())
                 .setCertificateAuthorityId("certificateAuthorityId-1652580953")
                 .setCertificateAuthority(CertificateAuthority.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         CertificateAuthority response =
             certificateAuthorityServiceClient.createCertificateAuthorityAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createCertificateAuthorityOperationCallable

      public final OperationCallable<CreateCertificateAuthorityRequest,CertificateAuthority,OperationMetadata> createCertificateAuthorityOperationCallable()
      Create a new [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in a given Project and Location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         CreateCertificateAuthorityRequest request =
             CreateCertificateAuthorityRequest.newBuilder()
                 .setParent(CaPoolName.of("[PROJECT]", "[LOCATION]", "[CA_POOL]").toString())
                 .setCertificateAuthorityId("certificateAuthorityId-1652580953")
                 .setCertificateAuthority(CertificateAuthority.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<CertificateAuthority, OperationMetadata> future =
             certificateAuthorityServiceClient
                 .createCertificateAuthorityOperationCallable()
                 .futureCall(request);
         // Do something.
         CertificateAuthority response = future.get();
       }
       
    • createCertificateAuthorityCallable

      public final UnaryCallable<CreateCertificateAuthorityRequest,Operation> createCertificateAuthorityCallable()
      Create a new [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in a given Project and Location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         CreateCertificateAuthorityRequest request =
             CreateCertificateAuthorityRequest.newBuilder()
                 .setParent(CaPoolName.of("[PROJECT]", "[LOCATION]", "[CA_POOL]").toString())
                 .setCertificateAuthorityId("certificateAuthorityId-1652580953")
                 .setCertificateAuthority(CertificateAuthority.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             certificateAuthorityServiceClient
                 .createCertificateAuthorityCallable()
                 .futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • disableCertificateAuthorityAsync

      public final OperationFuture<CertificateAuthority,OperationMetadata> disableCertificateAuthorityAsync(CertificateAuthorityName name)
      Disable a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         CertificateAuthorityName name =
             CertificateAuthorityName.of(
                 "[PROJECT]", "[LOCATION]", "[CA_POOL]", "[CERTIFICATE_AUTHORITY]");
         CertificateAuthority response =
             certificateAuthorityServiceClient.disableCertificateAuthorityAsync(name).get();
       }
       
      Parameters:
      name - Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`.
      Throws:
      ApiException - if the remote call fails
    • disableCertificateAuthorityAsync

      public final OperationFuture<CertificateAuthority,OperationMetadata> disableCertificateAuthorityAsync(String name)
      Disable a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         String name =
             CertificateAuthorityName.of(
                     "[PROJECT]", "[LOCATION]", "[CA_POOL]", "[CERTIFICATE_AUTHORITY]")
                 .toString();
         CertificateAuthority response =
             certificateAuthorityServiceClient.disableCertificateAuthorityAsync(name).get();
       }
       
      Parameters:
      name - Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`.
      Throws:
      ApiException - if the remote call fails
    • disableCertificateAuthorityAsync

      public final OperationFuture<CertificateAuthority,OperationMetadata> disableCertificateAuthorityAsync(DisableCertificateAuthorityRequest request)
      Disable a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         DisableCertificateAuthorityRequest request =
             DisableCertificateAuthorityRequest.newBuilder()
                 .setName(
                     CertificateAuthorityName.of(
                             "[PROJECT]", "[LOCATION]", "[CA_POOL]", "[CERTIFICATE_AUTHORITY]")
                         .toString())
                 .setRequestId("requestId693933066")
                 .setIgnoreDependentResources(true)
                 .build();
         CertificateAuthority response =
             certificateAuthorityServiceClient.disableCertificateAuthorityAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • disableCertificateAuthorityOperationCallable

      public final OperationCallable<DisableCertificateAuthorityRequest,CertificateAuthority,OperationMetadata> disableCertificateAuthorityOperationCallable()
      Disable a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         DisableCertificateAuthorityRequest request =
             DisableCertificateAuthorityRequest.newBuilder()
                 .setName(
                     CertificateAuthorityName.of(
                             "[PROJECT]", "[LOCATION]", "[CA_POOL]", "[CERTIFICATE_AUTHORITY]")
                         .toString())
                 .setRequestId("requestId693933066")
                 .setIgnoreDependentResources(true)
                 .build();
         OperationFuture<CertificateAuthority, OperationMetadata> future =
             certificateAuthorityServiceClient
                 .disableCertificateAuthorityOperationCallable()
                 .futureCall(request);
         // Do something.
         CertificateAuthority response = future.get();
       }
       
    • disableCertificateAuthorityCallable

      public final UnaryCallable<DisableCertificateAuthorityRequest,Operation> disableCertificateAuthorityCallable()
      Disable a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         DisableCertificateAuthorityRequest request =
             DisableCertificateAuthorityRequest.newBuilder()
                 .setName(
                     CertificateAuthorityName.of(
                             "[PROJECT]", "[LOCATION]", "[CA_POOL]", "[CERTIFICATE_AUTHORITY]")
                         .toString())
                 .setRequestId("requestId693933066")
                 .setIgnoreDependentResources(true)
                 .build();
         ApiFuture<Operation> future =
             certificateAuthorityServiceClient
                 .disableCertificateAuthorityCallable()
                 .futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • enableCertificateAuthorityAsync

      public final OperationFuture<CertificateAuthority,OperationMetadata> enableCertificateAuthorityAsync(CertificateAuthorityName name)
      Enable a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         CertificateAuthorityName name =
             CertificateAuthorityName.of(
                 "[PROJECT]", "[LOCATION]", "[CA_POOL]", "[CERTIFICATE_AUTHORITY]");
         CertificateAuthority response =
             certificateAuthorityServiceClient.enableCertificateAuthorityAsync(name).get();
       }
       
      Parameters:
      name - Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`.
      Throws:
      ApiException - if the remote call fails
    • enableCertificateAuthorityAsync

      public final OperationFuture<CertificateAuthority,OperationMetadata> enableCertificateAuthorityAsync(String name)
      Enable a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         String name =
             CertificateAuthorityName.of(
                     "[PROJECT]", "[LOCATION]", "[CA_POOL]", "[CERTIFICATE_AUTHORITY]")
                 .toString();
         CertificateAuthority response =
             certificateAuthorityServiceClient.enableCertificateAuthorityAsync(name).get();
       }
       
      Parameters:
      name - Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`.
      Throws:
      ApiException - if the remote call fails
    • enableCertificateAuthorityAsync

      public final OperationFuture<CertificateAuthority,OperationMetadata> enableCertificateAuthorityAsync(EnableCertificateAuthorityRequest request)
      Enable a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         EnableCertificateAuthorityRequest request =
             EnableCertificateAuthorityRequest.newBuilder()
                 .setName(
                     CertificateAuthorityName.of(
                             "[PROJECT]", "[LOCATION]", "[CA_POOL]", "[CERTIFICATE_AUTHORITY]")
                         .toString())
                 .setRequestId("requestId693933066")
                 .build();
         CertificateAuthority response =
             certificateAuthorityServiceClient.enableCertificateAuthorityAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • enableCertificateAuthorityOperationCallable

      public final OperationCallable<EnableCertificateAuthorityRequest,CertificateAuthority,OperationMetadata> enableCertificateAuthorityOperationCallable()
      Enable a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         EnableCertificateAuthorityRequest request =
             EnableCertificateAuthorityRequest.newBuilder()
                 .setName(
                     CertificateAuthorityName.of(
                             "[PROJECT]", "[LOCATION]", "[CA_POOL]", "[CERTIFICATE_AUTHORITY]")
                         .toString())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<CertificateAuthority, OperationMetadata> future =
             certificateAuthorityServiceClient
                 .enableCertificateAuthorityOperationCallable()
                 .futureCall(request);
         // Do something.
         CertificateAuthority response = future.get();
       }
       
    • enableCertificateAuthorityCallable

      public final UnaryCallable<EnableCertificateAuthorityRequest,Operation> enableCertificateAuthorityCallable()
      Enable a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         EnableCertificateAuthorityRequest request =
             EnableCertificateAuthorityRequest.newBuilder()
                 .setName(
                     CertificateAuthorityName.of(
                             "[PROJECT]", "[LOCATION]", "[CA_POOL]", "[CERTIFICATE_AUTHORITY]")
                         .toString())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             certificateAuthorityServiceClient
                 .enableCertificateAuthorityCallable()
                 .futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • fetchCertificateAuthorityCsr

      public final FetchCertificateAuthorityCsrResponse fetchCertificateAuthorityCsr(CertificateAuthorityName name)
      Fetch a certificate signing request (CSR) from a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] that is in state [AWAITING_USER_ACTIVATION][google.cloud.security.privateca.v1.CertificateAuthority.State.AWAITING_USER_ACTIVATION] and is of type [SUBORDINATE][google.cloud.security.privateca.v1.CertificateAuthority.Type.SUBORDINATE]. The CSR must then be signed by the desired parent Certificate Authority, which could be another [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] resource, or could be an on-prem certificate authority. See also [ActivateCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.ActivateCertificateAuthority].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         CertificateAuthorityName name =
             CertificateAuthorityName.of(
                 "[PROJECT]", "[LOCATION]", "[CA_POOL]", "[CERTIFICATE_AUTHORITY]");
         FetchCertificateAuthorityCsrResponse response =
             certificateAuthorityServiceClient.fetchCertificateAuthorityCsr(name);
       }
       
      Parameters:
      name - Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`.
      Throws:
      ApiException - if the remote call fails
    • fetchCertificateAuthorityCsr

      public final FetchCertificateAuthorityCsrResponse fetchCertificateAuthorityCsr(String name)
      Fetch a certificate signing request (CSR) from a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] that is in state [AWAITING_USER_ACTIVATION][google.cloud.security.privateca.v1.CertificateAuthority.State.AWAITING_USER_ACTIVATION] and is of type [SUBORDINATE][google.cloud.security.privateca.v1.CertificateAuthority.Type.SUBORDINATE]. The CSR must then be signed by the desired parent Certificate Authority, which could be another [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] resource, or could be an on-prem certificate authority. See also [ActivateCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.ActivateCertificateAuthority].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         String name =
             CertificateAuthorityName.of(
                     "[PROJECT]", "[LOCATION]", "[CA_POOL]", "[CERTIFICATE_AUTHORITY]")
                 .toString();
         FetchCertificateAuthorityCsrResponse response =
             certificateAuthorityServiceClient.fetchCertificateAuthorityCsr(name);
       }
       
      Parameters:
      name - Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`.
      Throws:
      ApiException - if the remote call fails
    • fetchCertificateAuthorityCsr

      public final FetchCertificateAuthorityCsrResponse fetchCertificateAuthorityCsr(FetchCertificateAuthorityCsrRequest request)
      Fetch a certificate signing request (CSR) from a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] that is in state [AWAITING_USER_ACTIVATION][google.cloud.security.privateca.v1.CertificateAuthority.State.AWAITING_USER_ACTIVATION] and is of type [SUBORDINATE][google.cloud.security.privateca.v1.CertificateAuthority.Type.SUBORDINATE]. The CSR must then be signed by the desired parent Certificate Authority, which could be another [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] resource, or could be an on-prem certificate authority. See also [ActivateCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.ActivateCertificateAuthority].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         FetchCertificateAuthorityCsrRequest request =
             FetchCertificateAuthorityCsrRequest.newBuilder()
                 .setName(
                     CertificateAuthorityName.of(
                             "[PROJECT]", "[LOCATION]", "[CA_POOL]", "[CERTIFICATE_AUTHORITY]")
                         .toString())
                 .build();
         FetchCertificateAuthorityCsrResponse response =
             certificateAuthorityServiceClient.fetchCertificateAuthorityCsr(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • fetchCertificateAuthorityCsrCallable

      public final UnaryCallable<FetchCertificateAuthorityCsrRequest,FetchCertificateAuthorityCsrResponse> fetchCertificateAuthorityCsrCallable()
      Fetch a certificate signing request (CSR) from a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] that is in state [AWAITING_USER_ACTIVATION][google.cloud.security.privateca.v1.CertificateAuthority.State.AWAITING_USER_ACTIVATION] and is of type [SUBORDINATE][google.cloud.security.privateca.v1.CertificateAuthority.Type.SUBORDINATE]. The CSR must then be signed by the desired parent Certificate Authority, which could be another [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] resource, or could be an on-prem certificate authority. See also [ActivateCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.ActivateCertificateAuthority].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         FetchCertificateAuthorityCsrRequest request =
             FetchCertificateAuthorityCsrRequest.newBuilder()
                 .setName(
                     CertificateAuthorityName.of(
                             "[PROJECT]", "[LOCATION]", "[CA_POOL]", "[CERTIFICATE_AUTHORITY]")
                         .toString())
                 .build();
         ApiFuture<FetchCertificateAuthorityCsrResponse> future =
             certificateAuthorityServiceClient
                 .fetchCertificateAuthorityCsrCallable()
                 .futureCall(request);
         // Do something.
         FetchCertificateAuthorityCsrResponse response = future.get();
       }
       
    • getCertificateAuthority

      public final CertificateAuthority getCertificateAuthority(CertificateAuthorityName name)
      Returns a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         CertificateAuthorityName name =
             CertificateAuthorityName.of(
                 "[PROJECT]", "[LOCATION]", "[CA_POOL]", "[CERTIFICATE_AUTHORITY]");
         CertificateAuthority response =
             certificateAuthorityServiceClient.getCertificateAuthority(name);
       }
       
      Parameters:
      name - Required. The [name][google.cloud.security.privateca.v1.CertificateAuthority.name] of the [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] to get.
      Throws:
      ApiException - if the remote call fails
    • getCertificateAuthority

      public final CertificateAuthority getCertificateAuthority(String name)
      Returns a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         String name =
             CertificateAuthorityName.of(
                     "[PROJECT]", "[LOCATION]", "[CA_POOL]", "[CERTIFICATE_AUTHORITY]")
                 .toString();
         CertificateAuthority response =
             certificateAuthorityServiceClient.getCertificateAuthority(name);
       }
       
      Parameters:
      name - Required. The [name][google.cloud.security.privateca.v1.CertificateAuthority.name] of the [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] to get.
      Throws:
      ApiException - if the remote call fails
    • getCertificateAuthority

      public final CertificateAuthority getCertificateAuthority(GetCertificateAuthorityRequest request)
      Returns a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         GetCertificateAuthorityRequest request =
             GetCertificateAuthorityRequest.newBuilder()
                 .setName(
                     CertificateAuthorityName.of(
                             "[PROJECT]", "[LOCATION]", "[CA_POOL]", "[CERTIFICATE_AUTHORITY]")
                         .toString())
                 .build();
         CertificateAuthority response =
             certificateAuthorityServiceClient.getCertificateAuthority(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getCertificateAuthorityCallable

      public final UnaryCallable<GetCertificateAuthorityRequest,CertificateAuthority> getCertificateAuthorityCallable()
      Returns a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         GetCertificateAuthorityRequest request =
             GetCertificateAuthorityRequest.newBuilder()
                 .setName(
                     CertificateAuthorityName.of(
                             "[PROJECT]", "[LOCATION]", "[CA_POOL]", "[CERTIFICATE_AUTHORITY]")
                         .toString())
                 .build();
         ApiFuture<CertificateAuthority> future =
             certificateAuthorityServiceClient.getCertificateAuthorityCallable().futureCall(request);
         // Do something.
         CertificateAuthority response = future.get();
       }
       
    • listCertificateAuthorities

      Lists [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         CaPoolName parent = CaPoolName.of("[PROJECT]", "[LOCATION]", "[CA_POOL]");
         for (CertificateAuthority element :
             certificateAuthorityServiceClient.listCertificateAuthorities(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The resource name of the [CaPool][google.cloud.security.privateca.v1.CaPool] associated with the [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority], in the format `projects/*/locations/*/caPools/*`.
      Throws:
      ApiException - if the remote call fails
    • listCertificateAuthorities

      Lists [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         String parent = CaPoolName.of("[PROJECT]", "[LOCATION]", "[CA_POOL]").toString();
         for (CertificateAuthority element :
             certificateAuthorityServiceClient.listCertificateAuthorities(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The resource name of the [CaPool][google.cloud.security.privateca.v1.CaPool] associated with the [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority], in the format `projects/*/locations/*/caPools/*`.
      Throws:
      ApiException - if the remote call fails
    • listCertificateAuthorities

      Lists [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         ListCertificateAuthoritiesRequest request =
             ListCertificateAuthoritiesRequest.newBuilder()
                 .setParent(CaPoolName.of("[PROJECT]", "[LOCATION]", "[CA_POOL]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         for (CertificateAuthority element :
             certificateAuthorityServiceClient.listCertificateAuthorities(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listCertificateAuthoritiesPagedCallable

      Lists [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         ListCertificateAuthoritiesRequest request =
             ListCertificateAuthoritiesRequest.newBuilder()
                 .setParent(CaPoolName.of("[PROJECT]", "[LOCATION]", "[CA_POOL]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         ApiFuture<CertificateAuthority> future =
             certificateAuthorityServiceClient
                 .listCertificateAuthoritiesPagedCallable()
                 .futureCall(request);
         // Do something.
         for (CertificateAuthority element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listCertificateAuthoritiesCallable

      public final UnaryCallable<ListCertificateAuthoritiesRequest,ListCertificateAuthoritiesResponse> listCertificateAuthoritiesCallable()
      Lists [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         ListCertificateAuthoritiesRequest request =
             ListCertificateAuthoritiesRequest.newBuilder()
                 .setParent(CaPoolName.of("[PROJECT]", "[LOCATION]", "[CA_POOL]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .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;
           }
         }
       }
       
    • undeleteCertificateAuthorityAsync

      public final OperationFuture<CertificateAuthority,OperationMetadata> undeleteCertificateAuthorityAsync(CertificateAuthorityName name)
      Undelete a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] that has been deleted.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         CertificateAuthorityName name =
             CertificateAuthorityName.of(
                 "[PROJECT]", "[LOCATION]", "[CA_POOL]", "[CERTIFICATE_AUTHORITY]");
         CertificateAuthority response =
             certificateAuthorityServiceClient.undeleteCertificateAuthorityAsync(name).get();
       }
       
      Parameters:
      name - Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`.
      Throws:
      ApiException - if the remote call fails
    • undeleteCertificateAuthorityAsync

      public final OperationFuture<CertificateAuthority,OperationMetadata> undeleteCertificateAuthorityAsync(String name)
      Undelete a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] that has been deleted.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         String name =
             CertificateAuthorityName.of(
                     "[PROJECT]", "[LOCATION]", "[CA_POOL]", "[CERTIFICATE_AUTHORITY]")
                 .toString();
         CertificateAuthority response =
             certificateAuthorityServiceClient.undeleteCertificateAuthorityAsync(name).get();
       }
       
      Parameters:
      name - Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`.
      Throws:
      ApiException - if the remote call fails
    • undeleteCertificateAuthorityAsync

      public final OperationFuture<CertificateAuthority,OperationMetadata> undeleteCertificateAuthorityAsync(UndeleteCertificateAuthorityRequest request)
      Undelete a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] that has been deleted.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         UndeleteCertificateAuthorityRequest request =
             UndeleteCertificateAuthorityRequest.newBuilder()
                 .setName(
                     CertificateAuthorityName.of(
                             "[PROJECT]", "[LOCATION]", "[CA_POOL]", "[CERTIFICATE_AUTHORITY]")
                         .toString())
                 .setRequestId("requestId693933066")
                 .build();
         CertificateAuthority response =
             certificateAuthorityServiceClient.undeleteCertificateAuthorityAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • undeleteCertificateAuthorityOperationCallable

      public final OperationCallable<UndeleteCertificateAuthorityRequest,CertificateAuthority,OperationMetadata> undeleteCertificateAuthorityOperationCallable()
      Undelete a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] that has been deleted.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         UndeleteCertificateAuthorityRequest request =
             UndeleteCertificateAuthorityRequest.newBuilder()
                 .setName(
                     CertificateAuthorityName.of(
                             "[PROJECT]", "[LOCATION]", "[CA_POOL]", "[CERTIFICATE_AUTHORITY]")
                         .toString())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<CertificateAuthority, OperationMetadata> future =
             certificateAuthorityServiceClient
                 .undeleteCertificateAuthorityOperationCallable()
                 .futureCall(request);
         // Do something.
         CertificateAuthority response = future.get();
       }
       
    • undeleteCertificateAuthorityCallable

      public final UnaryCallable<UndeleteCertificateAuthorityRequest,Operation> undeleteCertificateAuthorityCallable()
      Undelete a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] that has been deleted.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         UndeleteCertificateAuthorityRequest request =
             UndeleteCertificateAuthorityRequest.newBuilder()
                 .setName(
                     CertificateAuthorityName.of(
                             "[PROJECT]", "[LOCATION]", "[CA_POOL]", "[CERTIFICATE_AUTHORITY]")
                         .toString())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             certificateAuthorityServiceClient
                 .undeleteCertificateAuthorityCallable()
                 .futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • deleteCertificateAuthorityAsync

      public final OperationFuture<CertificateAuthority,OperationMetadata> deleteCertificateAuthorityAsync(CertificateAuthorityName name)
      Delete a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         CertificateAuthorityName name =
             CertificateAuthorityName.of(
                 "[PROJECT]", "[LOCATION]", "[CA_POOL]", "[CERTIFICATE_AUTHORITY]");
         CertificateAuthority response =
             certificateAuthorityServiceClient.deleteCertificateAuthorityAsync(name).get();
       }
       
      Parameters:
      name - Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`.
      Throws:
      ApiException - if the remote call fails
    • deleteCertificateAuthorityAsync

      public final OperationFuture<CertificateAuthority,OperationMetadata> deleteCertificateAuthorityAsync(String name)
      Delete a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         String name =
             CertificateAuthorityName.of(
                     "[PROJECT]", "[LOCATION]", "[CA_POOL]", "[CERTIFICATE_AUTHORITY]")
                 .toString();
         CertificateAuthority response =
             certificateAuthorityServiceClient.deleteCertificateAuthorityAsync(name).get();
       }
       
      Parameters:
      name - Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`.
      Throws:
      ApiException - if the remote call fails
    • deleteCertificateAuthorityAsync

      public final OperationFuture<CertificateAuthority,OperationMetadata> deleteCertificateAuthorityAsync(DeleteCertificateAuthorityRequest request)
      Delete a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         DeleteCertificateAuthorityRequest request =
             DeleteCertificateAuthorityRequest.newBuilder()
                 .setName(
                     CertificateAuthorityName.of(
                             "[PROJECT]", "[LOCATION]", "[CA_POOL]", "[CERTIFICATE_AUTHORITY]")
                         .toString())
                 .setRequestId("requestId693933066")
                 .setIgnoreActiveCertificates(true)
                 .setSkipGracePeriod(true)
                 .setIgnoreDependentResources(true)
                 .build();
         CertificateAuthority response =
             certificateAuthorityServiceClient.deleteCertificateAuthorityAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteCertificateAuthorityOperationCallable

      public final OperationCallable<DeleteCertificateAuthorityRequest,CertificateAuthority,OperationMetadata> deleteCertificateAuthorityOperationCallable()
      Delete a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         DeleteCertificateAuthorityRequest request =
             DeleteCertificateAuthorityRequest.newBuilder()
                 .setName(
                     CertificateAuthorityName.of(
                             "[PROJECT]", "[LOCATION]", "[CA_POOL]", "[CERTIFICATE_AUTHORITY]")
                         .toString())
                 .setRequestId("requestId693933066")
                 .setIgnoreActiveCertificates(true)
                 .setSkipGracePeriod(true)
                 .setIgnoreDependentResources(true)
                 .build();
         OperationFuture<CertificateAuthority, OperationMetadata> future =
             certificateAuthorityServiceClient
                 .deleteCertificateAuthorityOperationCallable()
                 .futureCall(request);
         // Do something.
         CertificateAuthority response = future.get();
       }
       
    • deleteCertificateAuthorityCallable

      public final UnaryCallable<DeleteCertificateAuthorityRequest,Operation> deleteCertificateAuthorityCallable()
      Delete a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         DeleteCertificateAuthorityRequest request =
             DeleteCertificateAuthorityRequest.newBuilder()
                 .setName(
                     CertificateAuthorityName.of(
                             "[PROJECT]", "[LOCATION]", "[CA_POOL]", "[CERTIFICATE_AUTHORITY]")
                         .toString())
                 .setRequestId("requestId693933066")
                 .setIgnoreActiveCertificates(true)
                 .setSkipGracePeriod(true)
                 .setIgnoreDependentResources(true)
                 .build();
         ApiFuture<Operation> future =
             certificateAuthorityServiceClient
                 .deleteCertificateAuthorityCallable()
                 .futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • updateCertificateAuthorityAsync

      public final OperationFuture<CertificateAuthority,OperationMetadata> updateCertificateAuthorityAsync(CertificateAuthority certificateAuthority, com.google.protobuf.FieldMask updateMask)
      Update a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         CertificateAuthority certificateAuthority = CertificateAuthority.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         CertificateAuthority response =
             certificateAuthorityServiceClient
                 .updateCertificateAuthorityAsync(certificateAuthority, updateMask)
                 .get();
       }
       
      Parameters:
      certificateAuthority - Required. [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] with updated values.
      updateMask - Required. A list of fields to be updated in this request.
      Throws:
      ApiException - if the remote call fails
    • updateCertificateAuthorityAsync

      public final OperationFuture<CertificateAuthority,OperationMetadata> updateCertificateAuthorityAsync(UpdateCertificateAuthorityRequest request)
      Update a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         UpdateCertificateAuthorityRequest request =
             UpdateCertificateAuthorityRequest.newBuilder()
                 .setCertificateAuthority(CertificateAuthority.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         CertificateAuthority response =
             certificateAuthorityServiceClient.updateCertificateAuthorityAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateCertificateAuthorityOperationCallable

      public final OperationCallable<UpdateCertificateAuthorityRequest,CertificateAuthority,OperationMetadata> updateCertificateAuthorityOperationCallable()
      Update a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         UpdateCertificateAuthorityRequest request =
             UpdateCertificateAuthorityRequest.newBuilder()
                 .setCertificateAuthority(CertificateAuthority.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<CertificateAuthority, OperationMetadata> future =
             certificateAuthorityServiceClient
                 .updateCertificateAuthorityOperationCallable()
                 .futureCall(request);
         // Do something.
         CertificateAuthority response = future.get();
       }
       
    • updateCertificateAuthorityCallable

      public final UnaryCallable<UpdateCertificateAuthorityRequest,Operation> updateCertificateAuthorityCallable()
      Update a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         UpdateCertificateAuthorityRequest request =
             UpdateCertificateAuthorityRequest.newBuilder()
                 .setCertificateAuthority(CertificateAuthority.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             certificateAuthorityServiceClient
                 .updateCertificateAuthorityCallable()
                 .futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • createCaPoolAsync

      public final OperationFuture<CaPool,OperationMetadata> createCaPoolAsync(LocationName parent, CaPool caPool, String caPoolId)
      Create a [CaPool][google.cloud.security.privateca.v1.CaPool].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         CaPool caPool = CaPool.newBuilder().build();
         String caPoolId = "caPoolId-970668971";
         CaPool response =
             certificateAuthorityServiceClient.createCaPoolAsync(parent, caPool, caPoolId).get();
       }
       
      Parameters:
      parent - Required. The resource name of the location associated with the [CaPool][google.cloud.security.privateca.v1.CaPool], in the format `projects/*/locations/*`.
      caPool - Required. A [CaPool][google.cloud.security.privateca.v1.CaPool] with initial field values.
      caPoolId - Required. It must be unique within a location and match the regular expression `[a-zA-Z0-9_-]{1,63}`
      Throws:
      ApiException - if the remote call fails
    • createCaPoolAsync

      public final OperationFuture<CaPool,OperationMetadata> createCaPoolAsync(String parent, CaPool caPool, String caPoolId)
      Create a [CaPool][google.cloud.security.privateca.v1.CaPool].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         CaPool caPool = CaPool.newBuilder().build();
         String caPoolId = "caPoolId-970668971";
         CaPool response =
             certificateAuthorityServiceClient.createCaPoolAsync(parent, caPool, caPoolId).get();
       }
       
      Parameters:
      parent - Required. The resource name of the location associated with the [CaPool][google.cloud.security.privateca.v1.CaPool], in the format `projects/*/locations/*`.
      caPool - Required. A [CaPool][google.cloud.security.privateca.v1.CaPool] with initial field values.
      caPoolId - Required. It must be unique within a location and match the regular expression `[a-zA-Z0-9_-]{1,63}`
      Throws:
      ApiException - if the remote call fails
    • createCaPoolAsync

      public final OperationFuture<CaPool,OperationMetadata> createCaPoolAsync(CreateCaPoolRequest request)
      Create a [CaPool][google.cloud.security.privateca.v1.CaPool].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         CreateCaPoolRequest request =
             CreateCaPoolRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setCaPoolId("caPoolId-970668971")
                 .setCaPool(CaPool.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         CaPool response = certificateAuthorityServiceClient.createCaPoolAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createCaPoolOperationCallable

      public final OperationCallable<CreateCaPoolRequest,CaPool,OperationMetadata> createCaPoolOperationCallable()
      Create a [CaPool][google.cloud.security.privateca.v1.CaPool].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         CreateCaPoolRequest request =
             CreateCaPoolRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setCaPoolId("caPoolId-970668971")
                 .setCaPool(CaPool.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<CaPool, OperationMetadata> future =
             certificateAuthorityServiceClient.createCaPoolOperationCallable().futureCall(request);
         // Do something.
         CaPool response = future.get();
       }
       
    • createCaPoolCallable

      public final UnaryCallable<CreateCaPoolRequest,Operation> createCaPoolCallable()
      Create a [CaPool][google.cloud.security.privateca.v1.CaPool].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         CreateCaPoolRequest request =
             CreateCaPoolRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setCaPoolId("caPoolId-970668971")
                 .setCaPool(CaPool.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             certificateAuthorityServiceClient.createCaPoolCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • updateCaPoolAsync

      public final OperationFuture<CaPool,OperationMetadata> updateCaPoolAsync(CaPool caPool, com.google.protobuf.FieldMask updateMask)
      Update a [CaPool][google.cloud.security.privateca.v1.CaPool].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         CaPool caPool = CaPool.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         CaPool response =
             certificateAuthorityServiceClient.updateCaPoolAsync(caPool, updateMask).get();
       }
       
      Parameters:
      caPool - Required. [CaPool][google.cloud.security.privateca.v1.CaPool] with updated values.
      updateMask - Required. A list of fields to be updated in this request.
      Throws:
      ApiException - if the remote call fails
    • updateCaPoolAsync

      public final OperationFuture<CaPool,OperationMetadata> updateCaPoolAsync(UpdateCaPoolRequest request)
      Update a [CaPool][google.cloud.security.privateca.v1.CaPool].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         UpdateCaPoolRequest request =
             UpdateCaPoolRequest.newBuilder()
                 .setCaPool(CaPool.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         CaPool response = certificateAuthorityServiceClient.updateCaPoolAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateCaPoolOperationCallable

      public final OperationCallable<UpdateCaPoolRequest,CaPool,OperationMetadata> updateCaPoolOperationCallable()
      Update a [CaPool][google.cloud.security.privateca.v1.CaPool].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         UpdateCaPoolRequest request =
             UpdateCaPoolRequest.newBuilder()
                 .setCaPool(CaPool.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<CaPool, OperationMetadata> future =
             certificateAuthorityServiceClient.updateCaPoolOperationCallable().futureCall(request);
         // Do something.
         CaPool response = future.get();
       }
       
    • updateCaPoolCallable

      public final UnaryCallable<UpdateCaPoolRequest,Operation> updateCaPoolCallable()
      Update a [CaPool][google.cloud.security.privateca.v1.CaPool].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         UpdateCaPoolRequest request =
             UpdateCaPoolRequest.newBuilder()
                 .setCaPool(CaPool.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             certificateAuthorityServiceClient.updateCaPoolCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • getCaPool

      public final CaPool getCaPool(CaPoolName name)
      Returns a [CaPool][google.cloud.security.privateca.v1.CaPool].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         CaPoolName name = CaPoolName.of("[PROJECT]", "[LOCATION]", "[CA_POOL]");
         CaPool response = certificateAuthorityServiceClient.getCaPool(name);
       }
       
      Parameters:
      name - Required. The [name][google.cloud.security.privateca.v1.CaPool.name] of the [CaPool][google.cloud.security.privateca.v1.CaPool] to get.
      Throws:
      ApiException - if the remote call fails
    • getCaPool

      public final CaPool getCaPool(String name)
      Returns a [CaPool][google.cloud.security.privateca.v1.CaPool].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         String name = CaPoolName.of("[PROJECT]", "[LOCATION]", "[CA_POOL]").toString();
         CaPool response = certificateAuthorityServiceClient.getCaPool(name);
       }
       
      Parameters:
      name - Required. The [name][google.cloud.security.privateca.v1.CaPool.name] of the [CaPool][google.cloud.security.privateca.v1.CaPool] to get.
      Throws:
      ApiException - if the remote call fails
    • getCaPool

      public final CaPool getCaPool(GetCaPoolRequest request)
      Returns a [CaPool][google.cloud.security.privateca.v1.CaPool].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         GetCaPoolRequest request =
             GetCaPoolRequest.newBuilder()
                 .setName(CaPoolName.of("[PROJECT]", "[LOCATION]", "[CA_POOL]").toString())
                 .build();
         CaPool response = certificateAuthorityServiceClient.getCaPool(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getCaPoolCallable

      public final UnaryCallable<GetCaPoolRequest,CaPool> getCaPoolCallable()
      Returns a [CaPool][google.cloud.security.privateca.v1.CaPool].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         GetCaPoolRequest request =
             GetCaPoolRequest.newBuilder()
                 .setName(CaPoolName.of("[PROJECT]", "[LOCATION]", "[CA_POOL]").toString())
                 .build();
         ApiFuture<CaPool> future =
             certificateAuthorityServiceClient.getCaPoolCallable().futureCall(request);
         // Do something.
         CaPool response = future.get();
       }
       
    • listCaPools

      Lists [CaPools][google.cloud.security.privateca.v1.CaPool].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         for (CaPool element : certificateAuthorityServiceClient.listCaPools(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The resource name of the location associated with the [CaPools][google.cloud.security.privateca.v1.CaPool], in the format `projects/*/locations/*`.
      Throws:
      ApiException - if the remote call fails
    • listCaPools

      Lists [CaPools][google.cloud.security.privateca.v1.CaPool].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         for (CaPool element : certificateAuthorityServiceClient.listCaPools(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The resource name of the location associated with the [CaPools][google.cloud.security.privateca.v1.CaPool], in the format `projects/*/locations/*`.
      Throws:
      ApiException - if the remote call fails
    • listCaPools

      Lists [CaPools][google.cloud.security.privateca.v1.CaPool].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         ListCaPoolsRequest request =
             ListCaPoolsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         for (CaPool element : certificateAuthorityServiceClient.listCaPools(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listCaPoolsPagedCallable

      Lists [CaPools][google.cloud.security.privateca.v1.CaPool].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         ListCaPoolsRequest request =
             ListCaPoolsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         ApiFuture<CaPool> future =
             certificateAuthorityServiceClient.listCaPoolsPagedCallable().futureCall(request);
         // Do something.
         for (CaPool element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listCaPoolsCallable

      public final UnaryCallable<ListCaPoolsRequest,ListCaPoolsResponse> listCaPoolsCallable()
      Lists [CaPools][google.cloud.security.privateca.v1.CaPool].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         ListCaPoolsRequest request =
             ListCaPoolsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         while (true) {
           ListCaPoolsResponse response =
               certificateAuthorityServiceClient.listCaPoolsCallable().call(request);
           for (CaPool element : response.getCaPoolsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • deleteCaPoolAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteCaPoolAsync(CaPoolName name)
      Delete a [CaPool][google.cloud.security.privateca.v1.CaPool].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         CaPoolName name = CaPoolName.of("[PROJECT]", "[LOCATION]", "[CA_POOL]");
         certificateAuthorityServiceClient.deleteCaPoolAsync(name).get();
       }
       
      Parameters:
      name - Required. The resource name for this [CaPool][google.cloud.security.privateca.v1.CaPool] in the format `projects/*/locations/*/caPools/*`.
      Throws:
      ApiException - if the remote call fails
    • deleteCaPoolAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteCaPoolAsync(String name)
      Delete a [CaPool][google.cloud.security.privateca.v1.CaPool].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         String name = CaPoolName.of("[PROJECT]", "[LOCATION]", "[CA_POOL]").toString();
         certificateAuthorityServiceClient.deleteCaPoolAsync(name).get();
       }
       
      Parameters:
      name - Required. The resource name for this [CaPool][google.cloud.security.privateca.v1.CaPool] in the format `projects/*/locations/*/caPools/*`.
      Throws:
      ApiException - if the remote call fails
    • deleteCaPoolAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteCaPoolAsync(DeleteCaPoolRequest request)
      Delete a [CaPool][google.cloud.security.privateca.v1.CaPool].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         DeleteCaPoolRequest request =
             DeleteCaPoolRequest.newBuilder()
                 .setName(CaPoolName.of("[PROJECT]", "[LOCATION]", "[CA_POOL]").toString())
                 .setRequestId("requestId693933066")
                 .setIgnoreDependentResources(true)
                 .build();
         certificateAuthorityServiceClient.deleteCaPoolAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteCaPoolOperationCallable

      public final OperationCallable<DeleteCaPoolRequest,com.google.protobuf.Empty,OperationMetadata> deleteCaPoolOperationCallable()
      Delete a [CaPool][google.cloud.security.privateca.v1.CaPool].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         DeleteCaPoolRequest request =
             DeleteCaPoolRequest.newBuilder()
                 .setName(CaPoolName.of("[PROJECT]", "[LOCATION]", "[CA_POOL]").toString())
                 .setRequestId("requestId693933066")
                 .setIgnoreDependentResources(true)
                 .build();
         OperationFuture<Empty, OperationMetadata> future =
             certificateAuthorityServiceClient.deleteCaPoolOperationCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteCaPoolCallable

      public final UnaryCallable<DeleteCaPoolRequest,Operation> deleteCaPoolCallable()
      Delete a [CaPool][google.cloud.security.privateca.v1.CaPool].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         DeleteCaPoolRequest request =
             DeleteCaPoolRequest.newBuilder()
                 .setName(CaPoolName.of("[PROJECT]", "[LOCATION]", "[CA_POOL]").toString())
                 .setRequestId("requestId693933066")
                 .setIgnoreDependentResources(true)
                 .build();
         ApiFuture<Operation> future =
             certificateAuthorityServiceClient.deleteCaPoolCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • fetchCaCerts

      public final FetchCaCertsResponse fetchCaCerts(CaPoolName caPool)
      FetchCaCerts returns the current trust anchor for the [CaPool][google.cloud.security.privateca.v1.CaPool]. This will include CA certificate chains for all certificate authorities in the ENABLED, DISABLED, or STAGED states.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         CaPoolName caPool = CaPoolName.of("[PROJECT]", "[LOCATION]", "[CA_POOL]");
         FetchCaCertsResponse response = certificateAuthorityServiceClient.fetchCaCerts(caPool);
       }
       
      Parameters:
      caPool - Required. The resource name for the [CaPool][google.cloud.security.privateca.v1.CaPool] in the format `projects/*/locations/*/caPools/*`.
      Throws:
      ApiException - if the remote call fails
    • fetchCaCerts

      public final FetchCaCertsResponse fetchCaCerts(String caPool)
      FetchCaCerts returns the current trust anchor for the [CaPool][google.cloud.security.privateca.v1.CaPool]. This will include CA certificate chains for all certificate authorities in the ENABLED, DISABLED, or STAGED states.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         String caPool = CaPoolName.of("[PROJECT]", "[LOCATION]", "[CA_POOL]").toString();
         FetchCaCertsResponse response = certificateAuthorityServiceClient.fetchCaCerts(caPool);
       }
       
      Parameters:
      caPool - Required. The resource name for the [CaPool][google.cloud.security.privateca.v1.CaPool] in the format `projects/*/locations/*/caPools/*`.
      Throws:
      ApiException - if the remote call fails
    • fetchCaCerts

      public final FetchCaCertsResponse fetchCaCerts(FetchCaCertsRequest request)
      FetchCaCerts returns the current trust anchor for the [CaPool][google.cloud.security.privateca.v1.CaPool]. This will include CA certificate chains for all certificate authorities in the ENABLED, DISABLED, or STAGED states.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         FetchCaCertsRequest request =
             FetchCaCertsRequest.newBuilder()
                 .setCaPool(CaPoolName.of("[PROJECT]", "[LOCATION]", "[CA_POOL]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         FetchCaCertsResponse response = certificateAuthorityServiceClient.fetchCaCerts(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • fetchCaCertsCallable

      public final UnaryCallable<FetchCaCertsRequest,FetchCaCertsResponse> fetchCaCertsCallable()
      FetchCaCerts returns the current trust anchor for the [CaPool][google.cloud.security.privateca.v1.CaPool]. This will include CA certificate chains for all certificate authorities in the ENABLED, DISABLED, or STAGED states.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         FetchCaCertsRequest request =
             FetchCaCertsRequest.newBuilder()
                 .setCaPool(CaPoolName.of("[PROJECT]", "[LOCATION]", "[CA_POOL]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<FetchCaCertsResponse> future =
             certificateAuthorityServiceClient.fetchCaCertsCallable().futureCall(request);
         // Do something.
         FetchCaCertsResponse response = future.get();
       }
       
    • getCertificateRevocationList

      public final CertificateRevocationList getCertificateRevocationList(CertificateRevocationListName name)
      Returns a [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         CertificateRevocationListName name =
             CertificateRevocationListName.of(
                 "[PROJECT]",
                 "[LOCATION]",
                 "[CA_POOL]",
                 "[CERTIFICATE_AUTHORITY]",
                 "[CERTIFICATE_REVOCATION_LIST]");
         CertificateRevocationList response =
             certificateAuthorityServiceClient.getCertificateRevocationList(name);
       }
       
      Parameters:
      name - Required. The [name][google.cloud.security.privateca.v1.CertificateRevocationList.name] of the [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList] to get.
      Throws:
      ApiException - if the remote call fails
    • getCertificateRevocationList

      public final CertificateRevocationList getCertificateRevocationList(String name)
      Returns a [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         String name =
             CertificateRevocationListName.of(
                     "[PROJECT]",
                     "[LOCATION]",
                     "[CA_POOL]",
                     "[CERTIFICATE_AUTHORITY]",
                     "[CERTIFICATE_REVOCATION_LIST]")
                 .toString();
         CertificateRevocationList response =
             certificateAuthorityServiceClient.getCertificateRevocationList(name);
       }
       
      Parameters:
      name - Required. The [name][google.cloud.security.privateca.v1.CertificateRevocationList.name] of the [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList] to get.
      Throws:
      ApiException - if the remote call fails
    • getCertificateRevocationList

      public final CertificateRevocationList getCertificateRevocationList(GetCertificateRevocationListRequest request)
      Returns a [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         GetCertificateRevocationListRequest request =
             GetCertificateRevocationListRequest.newBuilder()
                 .setName(
                     CertificateRevocationListName.of(
                             "[PROJECT]",
                             "[LOCATION]",
                             "[CA_POOL]",
                             "[CERTIFICATE_AUTHORITY]",
                             "[CERTIFICATE_REVOCATION_LIST]")
                         .toString())
                 .build();
         CertificateRevocationList response =
             certificateAuthorityServiceClient.getCertificateRevocationList(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getCertificateRevocationListCallable

      public final UnaryCallable<GetCertificateRevocationListRequest,CertificateRevocationList> getCertificateRevocationListCallable()
      Returns a [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         GetCertificateRevocationListRequest request =
             GetCertificateRevocationListRequest.newBuilder()
                 .setName(
                     CertificateRevocationListName.of(
                             "[PROJECT]",
                             "[LOCATION]",
                             "[CA_POOL]",
                             "[CERTIFICATE_AUTHORITY]",
                             "[CERTIFICATE_REVOCATION_LIST]")
                         .toString())
                 .build();
         ApiFuture<CertificateRevocationList> future =
             certificateAuthorityServiceClient
                 .getCertificateRevocationListCallable()
                 .futureCall(request);
         // Do something.
         CertificateRevocationList response = future.get();
       }
       
    • listCertificateRevocationLists

      Lists [CertificateRevocationLists][google.cloud.security.privateca.v1.CertificateRevocationList].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         CertificateAuthorityName parent =
             CertificateAuthorityName.of(
                 "[PROJECT]", "[LOCATION]", "[CA_POOL]", "[CERTIFICATE_AUTHORITY]");
         for (CertificateRevocationList element :
             certificateAuthorityServiceClient.listCertificateRevocationLists(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The resource name of the location associated with the [CertificateRevocationLists][google.cloud.security.privateca.v1.CertificateRevocationList], in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`.
      Throws:
      ApiException - if the remote call fails
    • listCertificateRevocationLists

      public final CertificateAuthorityServiceClient.ListCertificateRevocationListsPagedResponse listCertificateRevocationLists(String parent)
      Lists [CertificateRevocationLists][google.cloud.security.privateca.v1.CertificateRevocationList].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         String parent =
             CertificateAuthorityName.of(
                     "[PROJECT]", "[LOCATION]", "[CA_POOL]", "[CERTIFICATE_AUTHORITY]")
                 .toString();
         for (CertificateRevocationList element :
             certificateAuthorityServiceClient.listCertificateRevocationLists(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The resource name of the location associated with the [CertificateRevocationLists][google.cloud.security.privateca.v1.CertificateRevocationList], in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`.
      Throws:
      ApiException - if the remote call fails
    • listCertificateRevocationLists

      Lists [CertificateRevocationLists][google.cloud.security.privateca.v1.CertificateRevocationList].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         ListCertificateRevocationListsRequest request =
             ListCertificateRevocationListsRequest.newBuilder()
                 .setParent(
                     CertificateAuthorityName.of(
                             "[PROJECT]", "[LOCATION]", "[CA_POOL]", "[CERTIFICATE_AUTHORITY]")
                         .toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         for (CertificateRevocationList element :
             certificateAuthorityServiceClient.listCertificateRevocationLists(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listCertificateRevocationListsPagedCallable

      Lists [CertificateRevocationLists][google.cloud.security.privateca.v1.CertificateRevocationList].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         ListCertificateRevocationListsRequest request =
             ListCertificateRevocationListsRequest.newBuilder()
                 .setParent(
                     CertificateAuthorityName.of(
                             "[PROJECT]", "[LOCATION]", "[CA_POOL]", "[CERTIFICATE_AUTHORITY]")
                         .toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         ApiFuture<CertificateRevocationList> future =
             certificateAuthorityServiceClient
                 .listCertificateRevocationListsPagedCallable()
                 .futureCall(request);
         // Do something.
         for (CertificateRevocationList element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listCertificateRevocationListsCallable

      public final UnaryCallable<ListCertificateRevocationListsRequest,ListCertificateRevocationListsResponse> listCertificateRevocationListsCallable()
      Lists [CertificateRevocationLists][google.cloud.security.privateca.v1.CertificateRevocationList].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         ListCertificateRevocationListsRequest request =
             ListCertificateRevocationListsRequest.newBuilder()
                 .setParent(
                     CertificateAuthorityName.of(
                             "[PROJECT]", "[LOCATION]", "[CA_POOL]", "[CERTIFICATE_AUTHORITY]")
                         .toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .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;
           }
         }
       }
       
    • updateCertificateRevocationListAsync

      public final OperationFuture<CertificateRevocationList,OperationMetadata> updateCertificateRevocationListAsync(CertificateRevocationList certificateRevocationList, com.google.protobuf.FieldMask updateMask)
      Update a [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         CertificateRevocationList certificateRevocationList =
             CertificateRevocationList.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         CertificateRevocationList response =
             certificateAuthorityServiceClient
                 .updateCertificateRevocationListAsync(certificateRevocationList, updateMask)
                 .get();
       }
       
      Parameters:
      certificateRevocationList - Required. [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList] with updated values.
      updateMask - Required. A list of fields to be updated in this request.
      Throws:
      ApiException - if the remote call fails
    • updateCertificateRevocationListAsync

      public final OperationFuture<CertificateRevocationList,OperationMetadata> updateCertificateRevocationListAsync(UpdateCertificateRevocationListRequest request)
      Update a [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         UpdateCertificateRevocationListRequest request =
             UpdateCertificateRevocationListRequest.newBuilder()
                 .setCertificateRevocationList(CertificateRevocationList.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         CertificateRevocationList response =
             certificateAuthorityServiceClient.updateCertificateRevocationListAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateCertificateRevocationListOperationCallable

      public final OperationCallable<UpdateCertificateRevocationListRequest,CertificateRevocationList,OperationMetadata> updateCertificateRevocationListOperationCallable()
      Update a [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         UpdateCertificateRevocationListRequest request =
             UpdateCertificateRevocationListRequest.newBuilder()
                 .setCertificateRevocationList(CertificateRevocationList.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<CertificateRevocationList, OperationMetadata> future =
             certificateAuthorityServiceClient
                 .updateCertificateRevocationListOperationCallable()
                 .futureCall(request);
         // Do something.
         CertificateRevocationList response = future.get();
       }
       
    • updateCertificateRevocationListCallable

      public final UnaryCallable<UpdateCertificateRevocationListRequest,Operation> updateCertificateRevocationListCallable()
      Update a [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         UpdateCertificateRevocationListRequest request =
             UpdateCertificateRevocationListRequest.newBuilder()
                 .setCertificateRevocationList(CertificateRevocationList.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             certificateAuthorityServiceClient
                 .updateCertificateRevocationListCallable()
                 .futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • createCertificateTemplateAsync

      public final OperationFuture<CertificateTemplate,OperationMetadata> createCertificateTemplateAsync(LocationName parent, CertificateTemplate certificateTemplate, String certificateTemplateId)
      Create a new [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] in a given Project and Location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         CertificateTemplate certificateTemplate = CertificateTemplate.newBuilder().build();
         String certificateTemplateId = "certificateTemplateId1920134188";
         CertificateTemplate response =
             certificateAuthorityServiceClient
                 .createCertificateTemplateAsync(parent, certificateTemplate, certificateTemplateId)
                 .get();
       }
       
      Parameters:
      parent - Required. The resource name of the location associated with the [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate], in the format `projects/*/locations/*`.
      certificateTemplate - Required. A [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] with initial field values.
      certificateTemplateId - Required. It must be unique within a location and match the regular expression `[a-zA-Z0-9_-]{1,63}`
      Throws:
      ApiException - if the remote call fails
    • createCertificateTemplateAsync

      public final OperationFuture<CertificateTemplate,OperationMetadata> createCertificateTemplateAsync(String parent, CertificateTemplate certificateTemplate, String certificateTemplateId)
      Create a new [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] in a given Project and Location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         CertificateTemplate certificateTemplate = CertificateTemplate.newBuilder().build();
         String certificateTemplateId = "certificateTemplateId1920134188";
         CertificateTemplate response =
             certificateAuthorityServiceClient
                 .createCertificateTemplateAsync(parent, certificateTemplate, certificateTemplateId)
                 .get();
       }
       
      Parameters:
      parent - Required. The resource name of the location associated with the [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate], in the format `projects/*/locations/*`.
      certificateTemplate - Required. A [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] with initial field values.
      certificateTemplateId - Required. It must be unique within a location and match the regular expression `[a-zA-Z0-9_-]{1,63}`
      Throws:
      ApiException - if the remote call fails
    • createCertificateTemplateAsync

      public final OperationFuture<CertificateTemplate,OperationMetadata> createCertificateTemplateAsync(CreateCertificateTemplateRequest request)
      Create a new [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] in a given Project and Location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         CreateCertificateTemplateRequest request =
             CreateCertificateTemplateRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setCertificateTemplateId("certificateTemplateId1920134188")
                 .setCertificateTemplate(CertificateTemplate.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         CertificateTemplate response =
             certificateAuthorityServiceClient.createCertificateTemplateAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createCertificateTemplateOperationCallable

      public final OperationCallable<CreateCertificateTemplateRequest,CertificateTemplate,OperationMetadata> createCertificateTemplateOperationCallable()
      Create a new [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] in a given Project and Location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         CreateCertificateTemplateRequest request =
             CreateCertificateTemplateRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setCertificateTemplateId("certificateTemplateId1920134188")
                 .setCertificateTemplate(CertificateTemplate.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<CertificateTemplate, OperationMetadata> future =
             certificateAuthorityServiceClient
                 .createCertificateTemplateOperationCallable()
                 .futureCall(request);
         // Do something.
         CertificateTemplate response = future.get();
       }
       
    • createCertificateTemplateCallable

      public final UnaryCallable<CreateCertificateTemplateRequest,Operation> createCertificateTemplateCallable()
      Create a new [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] in a given Project and Location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         CreateCertificateTemplateRequest request =
             CreateCertificateTemplateRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setCertificateTemplateId("certificateTemplateId1920134188")
                 .setCertificateTemplate(CertificateTemplate.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             certificateAuthorityServiceClient.createCertificateTemplateCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • deleteCertificateTemplateAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteCertificateTemplateAsync(CertificateTemplateName name)
      DeleteCertificateTemplate deletes a [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         CertificateTemplateName name =
             CertificateTemplateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_TEMPLATE]");
         certificateAuthorityServiceClient.deleteCertificateTemplateAsync(name).get();
       }
       
      Parameters:
      name - Required. The resource name for this [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] in the format `projects/*/locations/*/certificateTemplates/*`.
      Throws:
      ApiException - if the remote call fails
    • deleteCertificateTemplateAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteCertificateTemplateAsync(String name)
      DeleteCertificateTemplate deletes a [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         String name =
             CertificateTemplateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_TEMPLATE]")
                 .toString();
         certificateAuthorityServiceClient.deleteCertificateTemplateAsync(name).get();
       }
       
      Parameters:
      name - Required. The resource name for this [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] in the format `projects/*/locations/*/certificateTemplates/*`.
      Throws:
      ApiException - if the remote call fails
    • deleteCertificateTemplateAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteCertificateTemplateAsync(DeleteCertificateTemplateRequest request)
      DeleteCertificateTemplate deletes a [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         DeleteCertificateTemplateRequest request =
             DeleteCertificateTemplateRequest.newBuilder()
                 .setName(
                     CertificateTemplateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_TEMPLATE]")
                         .toString())
                 .setRequestId("requestId693933066")
                 .build();
         certificateAuthorityServiceClient.deleteCertificateTemplateAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteCertificateTemplateOperationCallable

      public final OperationCallable<DeleteCertificateTemplateRequest,com.google.protobuf.Empty,OperationMetadata> deleteCertificateTemplateOperationCallable()
      DeleteCertificateTemplate deletes a [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         DeleteCertificateTemplateRequest request =
             DeleteCertificateTemplateRequest.newBuilder()
                 .setName(
                     CertificateTemplateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_TEMPLATE]")
                         .toString())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<Empty, OperationMetadata> future =
             certificateAuthorityServiceClient
                 .deleteCertificateTemplateOperationCallable()
                 .futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteCertificateTemplateCallable

      public final UnaryCallable<DeleteCertificateTemplateRequest,Operation> deleteCertificateTemplateCallable()
      DeleteCertificateTemplate deletes a [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         DeleteCertificateTemplateRequest request =
             DeleteCertificateTemplateRequest.newBuilder()
                 .setName(
                     CertificateTemplateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_TEMPLATE]")
                         .toString())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             certificateAuthorityServiceClient.deleteCertificateTemplateCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • getCertificateTemplate

      public final CertificateTemplate getCertificateTemplate(CertificateTemplateName name)
      Returns a [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         CertificateTemplateName name =
             CertificateTemplateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_TEMPLATE]");
         CertificateTemplate response = certificateAuthorityServiceClient.getCertificateTemplate(name);
       }
       
      Parameters:
      name - Required. The [name][google.cloud.security.privateca.v1.CertificateTemplate.name] of the [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] to get.
      Throws:
      ApiException - if the remote call fails
    • getCertificateTemplate

      public final CertificateTemplate getCertificateTemplate(String name)
      Returns a [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         String name =
             CertificateTemplateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_TEMPLATE]")
                 .toString();
         CertificateTemplate response = certificateAuthorityServiceClient.getCertificateTemplate(name);
       }
       
      Parameters:
      name - Required. The [name][google.cloud.security.privateca.v1.CertificateTemplate.name] of the [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] to get.
      Throws:
      ApiException - if the remote call fails
    • getCertificateTemplate

      public final CertificateTemplate getCertificateTemplate(GetCertificateTemplateRequest request)
      Returns a [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         GetCertificateTemplateRequest request =
             GetCertificateTemplateRequest.newBuilder()
                 .setName(
                     CertificateTemplateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_TEMPLATE]")
                         .toString())
                 .build();
         CertificateTemplate response =
             certificateAuthorityServiceClient.getCertificateTemplate(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getCertificateTemplateCallable

      public final UnaryCallable<GetCertificateTemplateRequest,CertificateTemplate> getCertificateTemplateCallable()
      Returns a [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         GetCertificateTemplateRequest request =
             GetCertificateTemplateRequest.newBuilder()
                 .setName(
                     CertificateTemplateName.of("[PROJECT]", "[LOCATION]", "[CERTIFICATE_TEMPLATE]")
                         .toString())
                 .build();
         ApiFuture<CertificateTemplate> future =
             certificateAuthorityServiceClient.getCertificateTemplateCallable().futureCall(request);
         // Do something.
         CertificateTemplate response = future.get();
       }
       
    • listCertificateTemplates

      Lists [CertificateTemplates][google.cloud.security.privateca.v1.CertificateTemplate].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         for (CertificateTemplate element :
             certificateAuthorityServiceClient.listCertificateTemplates(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The resource name of the location associated with the [CertificateTemplates][google.cloud.security.privateca.v1.CertificateTemplate], in the format `projects/*/locations/*`.
      Throws:
      ApiException - if the remote call fails
    • listCertificateTemplates

      Lists [CertificateTemplates][google.cloud.security.privateca.v1.CertificateTemplate].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         for (CertificateTemplate element :
             certificateAuthorityServiceClient.listCertificateTemplates(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The resource name of the location associated with the [CertificateTemplates][google.cloud.security.privateca.v1.CertificateTemplate], in the format `projects/*/locations/*`.
      Throws:
      ApiException - if the remote call fails
    • listCertificateTemplates

      Lists [CertificateTemplates][google.cloud.security.privateca.v1.CertificateTemplate].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         ListCertificateTemplatesRequest request =
             ListCertificateTemplatesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         for (CertificateTemplate element :
             certificateAuthorityServiceClient.listCertificateTemplates(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listCertificateTemplatesPagedCallable

      Lists [CertificateTemplates][google.cloud.security.privateca.v1.CertificateTemplate].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         ListCertificateTemplatesRequest request =
             ListCertificateTemplatesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         ApiFuture<CertificateTemplate> future =
             certificateAuthorityServiceClient
                 .listCertificateTemplatesPagedCallable()
                 .futureCall(request);
         // Do something.
         for (CertificateTemplate element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listCertificateTemplatesCallable

      public final UnaryCallable<ListCertificateTemplatesRequest,ListCertificateTemplatesResponse> listCertificateTemplatesCallable()
      Lists [CertificateTemplates][google.cloud.security.privateca.v1.CertificateTemplate].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         ListCertificateTemplatesRequest request =
             ListCertificateTemplatesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         while (true) {
           ListCertificateTemplatesResponse response =
               certificateAuthorityServiceClient.listCertificateTemplatesCallable().call(request);
           for (CertificateTemplate element : response.getCertificateTemplatesList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • updateCertificateTemplateAsync

      public final OperationFuture<CertificateTemplate,OperationMetadata> updateCertificateTemplateAsync(CertificateTemplate certificateTemplate, com.google.protobuf.FieldMask updateMask)
      Update a [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         CertificateTemplate certificateTemplate = CertificateTemplate.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         CertificateTemplate response =
             certificateAuthorityServiceClient
                 .updateCertificateTemplateAsync(certificateTemplate, updateMask)
                 .get();
       }
       
      Parameters:
      certificateTemplate - Required. [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] with updated values.
      updateMask - Required. A list of fields to be updated in this request.
      Throws:
      ApiException - if the remote call fails
    • updateCertificateTemplateAsync

      public final OperationFuture<CertificateTemplate,OperationMetadata> updateCertificateTemplateAsync(UpdateCertificateTemplateRequest request)
      Update a [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         UpdateCertificateTemplateRequest request =
             UpdateCertificateTemplateRequest.newBuilder()
                 .setCertificateTemplate(CertificateTemplate.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         CertificateTemplate response =
             certificateAuthorityServiceClient.updateCertificateTemplateAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateCertificateTemplateOperationCallable

      public final OperationCallable<UpdateCertificateTemplateRequest,CertificateTemplate,OperationMetadata> updateCertificateTemplateOperationCallable()
      Update a [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         UpdateCertificateTemplateRequest request =
             UpdateCertificateTemplateRequest.newBuilder()
                 .setCertificateTemplate(CertificateTemplate.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<CertificateTemplate, OperationMetadata> future =
             certificateAuthorityServiceClient
                 .updateCertificateTemplateOperationCallable()
                 .futureCall(request);
         // Do something.
         CertificateTemplate response = future.get();
       }
       
    • updateCertificateTemplateCallable

      public final UnaryCallable<UpdateCertificateTemplateRequest,Operation> updateCertificateTemplateCallable()
      Update a [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate].

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         UpdateCertificateTemplateRequest request =
             UpdateCertificateTemplateRequest.newBuilder()
                 .setCertificateTemplate(CertificateTemplate.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             certificateAuthorityServiceClient.updateCertificateTemplateCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • listLocations

      Lists information about the supported locations for this service.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         ListLocationsRequest request =
             ListLocationsRequest.newBuilder()
                 .setName("name3373707")
                 .setFilter("filter-1274492040")
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (Location element :
             certificateAuthorityServiceClient.listLocations(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listLocationsPagedCallable

      Lists information about the supported locations for this service.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         ListLocationsRequest request =
             ListLocationsRequest.newBuilder()
                 .setName("name3373707")
                 .setFilter("filter-1274492040")
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<Location> future =
             certificateAuthorityServiceClient.listLocationsPagedCallable().futureCall(request);
         // Do something.
         for (Location element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listLocationsCallable

      public final UnaryCallable<ListLocationsRequest,ListLocationsResponse> listLocationsCallable()
      Lists information about the supported locations for this service.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         ListLocationsRequest request =
             ListLocationsRequest.newBuilder()
                 .setName("name3373707")
                 .setFilter("filter-1274492040")
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListLocationsResponse response =
               certificateAuthorityServiceClient.listLocationsCallable().call(request);
           for (Location element : response.getLocationsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • getLocation

      public final Location getLocation(GetLocationRequest request)
      Gets information about a location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
         Location response = certificateAuthorityServiceClient.getLocation(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getLocationCallable

      public final UnaryCallable<GetLocationRequest,Location> getLocationCallable()
      Gets information about a location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
         ApiFuture<Location> future =
             certificateAuthorityServiceClient.getLocationCallable().futureCall(request);
         // Do something.
         Location response = future.get();
       }
       
    • setIamPolicy

      public final Policy setIamPolicy(SetIamPolicyRequest request)
      Sets the access control policy on the specified resource. Replacesany existing policy.

      Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         SetIamPolicyRequest request =
             SetIamPolicyRequest.newBuilder()
                 .setResource(CaPoolName.of("[PROJECT]", "[LOCATION]", "[CA_POOL]").toString())
                 .setPolicy(Policy.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         Policy response = certificateAuthorityServiceClient.setIamPolicy(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • setIamPolicyCallable

      public final UnaryCallable<SetIamPolicyRequest,Policy> setIamPolicyCallable()
      Sets the access control policy on the specified resource. Replacesany existing policy.

      Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         SetIamPolicyRequest request =
             SetIamPolicyRequest.newBuilder()
                 .setResource(CaPoolName.of("[PROJECT]", "[LOCATION]", "[CA_POOL]").toString())
                 .setPolicy(Policy.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         ApiFuture<Policy> future =
             certificateAuthorityServiceClient.setIamPolicyCallable().futureCall(request);
         // Do something.
         Policy response = future.get();
       }
       
    • getIamPolicy

      public final Policy getIamPolicy(GetIamPolicyRequest request)
      Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         GetIamPolicyRequest request =
             GetIamPolicyRequest.newBuilder()
                 .setResource(CaPoolName.of("[PROJECT]", "[LOCATION]", "[CA_POOL]").toString())
                 .setOptions(GetPolicyOptions.newBuilder().build())
                 .build();
         Policy response = certificateAuthorityServiceClient.getIamPolicy(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getIamPolicyCallable

      public final UnaryCallable<GetIamPolicyRequest,Policy> getIamPolicyCallable()
      Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         GetIamPolicyRequest request =
             GetIamPolicyRequest.newBuilder()
                 .setResource(CaPoolName.of("[PROJECT]", "[LOCATION]", "[CA_POOL]").toString())
                 .setOptions(GetPolicyOptions.newBuilder().build())
                 .build();
         ApiFuture<Policy> future =
             certificateAuthorityServiceClient.getIamPolicyCallable().futureCall(request);
         // Do something.
         Policy response = future.get();
       }
       
    • testIamPermissions

      public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request)
      Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error.

      Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         TestIamPermissionsRequest request =
             TestIamPermissionsRequest.newBuilder()
                 .setResource(CaPoolName.of("[PROJECT]", "[LOCATION]", "[CA_POOL]").toString())
                 .addAllPermissions(new ArrayList<String>())
                 .build();
         TestIamPermissionsResponse response =
             certificateAuthorityServiceClient.testIamPermissions(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • testIamPermissionsCallable

      public final UnaryCallable<TestIamPermissionsRequest,TestIamPermissionsResponse> testIamPermissionsCallable()
      Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error.

      Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (CertificateAuthorityServiceClient certificateAuthorityServiceClient =
           CertificateAuthorityServiceClient.create()) {
         TestIamPermissionsRequest request =
             TestIamPermissionsRequest.newBuilder()
                 .setResource(CaPoolName.of("[PROJECT]", "[LOCATION]", "[CA_POOL]").toString())
                 .addAllPermissions(new ArrayList<String>())
                 .build();
         ApiFuture<TestIamPermissionsResponse> future =
             certificateAuthorityServiceClient.testIamPermissionsCallable().futureCall(request);
         // Do something.
         TestIamPermissionsResponse response = future.get();
       }
       
    • close

      public final void close()
      Specified by:
      close in interface AutoCloseable
    • shutdown

      public void shutdown()
      Specified by:
      shutdown in interface BackgroundResource
    • isShutdown

      public boolean isShutdown()
      Specified by:
      isShutdown in interface BackgroundResource
    • isTerminated

      public boolean isTerminated()
      Specified by:
      isTerminated in interface BackgroundResource
    • shutdownNow

      public void shutdownNow()
      Specified by:
      shutdownNow in interface BackgroundResource
    • awaitTermination

      public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException
      Specified by:
      awaitTermination in interface BackgroundResource
      Throws:
      InterruptedException