code: public final CryptoKey updateCryptoKeyPrimaryVersion(
        CryptoKeyName name, String cryptoKeyVersionId) {
  
      UpdateCryptoKeyPrimaryVersionRequest request =
          UpdateCryptoKeyPrimaryVersionRequest.newBuilder()
              .setName(name == null ? null : name.toString())
              .setCryptoKeyVersionId(cryptoKeyVersionId)
              .build();
      return updateCryptoKeyPrimaryVersion(request);
    }
docs: Update the version of a [CryptoKey][google.cloud.kms.v1.CryptoKey] that will be used in
  [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt].
  
  <p>Returns an error if called on an asymmetric key.
  
  <p>Sample code:
  
  <pre><code>
  try (KeyManagementServiceClient keyManagementServiceClient = KeyManagementServiceClient.create()) {
  CryptoKeyName name = CryptoKeyName.of("[PROJECT]", "[LOCATION]", "[KEY_RING]", "[CRYPTO_KEY]");
  String cryptoKeyVersionId = "";
  CryptoKey response = keyManagementServiceClient.updateCryptoKeyPrimaryVersion(name, cryptoKeyVersionId);
  }
  </code></pre>
  
  @param name The resource name of the [CryptoKey][google.cloud.kms.v1.CryptoKey] to update.
  @param cryptoKeyVersionId The id of the child
  [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use as primary.
  @throws com.google.api.gax.rpc.ApiException if the remote call fails