code: public static Credential getServiceAccountCredential(String serviceAccountId,
        String privateKeyFile, Collection<String> serviceAccountScopes)
            throws GeneralSecurityException, IOException {
      return getCredentialBuilderWithoutPrivateKey(serviceAccountId, serviceAccountScopes)
          .setServiceAccountPrivateKeyFromP12File(new File(privateKeyFile))
          .build();
    }
docs: Constructs credentials for the given account and key file.
  
  @param serviceAccountId service account ID (typically an e-mail address).
  @param privateKeyFile the file name from which to get the private key.
  @param serviceAccountScopes Collection of OAuth scopes to use with the the service
  account flow or {@code null} if not.
  @return valid credentials or {@code null}