class LocalFileCredentialFactory implements CredentialFactory {

  public static LocalFileCredentialFactory fromConfiguration() {
    checkState(Configuration.isInitialized(), "configuration not initialized");
    ConfigValue<String> serviceAccountKeyFilePath =
        Configuration.getString(LocalFileCredentialFactory.SERVICE_ACCOUNT_KEY_FILE_CONFIG, null);
    ConfigValue<String> serviceAccountId =
        Configuration.getString(LocalFileCredentialFactory.SERVICE_ACCOUNT_ID_CONFIG, "");

    return new Builder()
        .setServiceAccountKeyFilePath(serviceAccountKeyFilePath.get())
        .setServiceAccountId(serviceAccountId.get())
        .setProxy(GoogleProxy.fromConfiguration())
        .build();
  }

  private  LocalFileCredentialFactory(Builder builder);

}