class LocalFileCredentialFactory implements CredentialFactory {

  @Override
  public GoogleCredential getCredential(Collection<String> scopes)
      throws GeneralSecurityException, IOException {

    JsonFactory jsonFactory = JacksonFactory.getDefaultInstance();

    HttpTransport transport = proxy.getHttpTransport();
    if (!isJsonKey) {
      return credentialHelper.getP12Credential(
          serviceAccountId,
          serviceAccountKeyFilePath,
          transport,
          jsonFactory,
          proxy.getHttpRequestInitializer(),
          scopes);
    }
    return credentialHelper.getJsonCredential(
        serviceAccountKeyFilePath,
        transport,
        jsonFactory,
        proxy.getHttpRequestInitializer(),
        scopes);
  }

  private  LocalFileCredentialFactory(Builder builder);

}