class UserCredentialVersion extends CredentialVersion {

  public void setGenerationParameters(final StringGenerationParameters generationParameters) {
    final EncryptedValue encryptedParameters;
    try {
      final String generationParameterJson =
        generationParameters != null ? jsonObjectMapper.writeValueAsString(generationParameters)
          : null;
      if (generationParameterJson != null) {
        encryptedParameters = getEncryptor().encrypt(generationParameterJson);
        delegate.setEncryptedGenerationParameters(encryptedParameters);
      }

    } catch (final Exception e) {
      throw new RuntimeException(e);
    }
  }

  public  UserCredentialVersion(final UserCredentialVersionData delegate);
  public  UserCredentialVersion(final String name);
  public  UserCredentialVersion(
    final UserCredentialValue userValue,
    final String name,
    final StringGenerationParameters generationParameters,
    final Encryptor encryptor
  );

}