public static void register(Optional<String> keyUri, Optional<String> credentialPath)
      throws GeneralSecurityException {
    GcpKmsClient client;
    if (keyUri.isPresent()) {
      client = new GcpKmsClient(keyUri.get());
    } else {
      client = new GcpKmsClient();
    }
    if (credentialPath.isPresent()) {
      client.withCredentials(credentialPath.get());
    } else {
      client.withDefaultCredentials();
    }
    KmsClients.add(client);
  }
Creates and registers a {@link #GcpKmsClient} with the Tink runtime.

<p>If {@code keyUri} is present, it is the only key that the new client will support. Otherwise
the new client supports all GCP KMS keys.

<p>If {@code credentialPath} is present, load the credentials from that. Otherwise use the
default credentials.

<p>In many cases, it is not necessary to register the client. For example, you can create the
GcpKmsClient yourself and call {@link GcpKmsClient#getAead} to get a remote {@code Aead}. Use
this {@code Aead} to encrypt a keyset for with {@code
TinkProtoKeysetFormat.serializeEncryptedKeyset}, or to create an envelope {@code Aead} using
{@code KmsEnvelopeAead.create}.
java_src/src/main/java/com/google/crypto/tink/integration/gcpkms/GcpKmsClient.java