code: public static SdkInstaller newInstaller(
        Path managedSdkDirectory,
        Version version,
        OsInfo osInfo,
        String userAgentString,
        boolean usageReporting) {
      DownloaderFactory downloaderFactory = new DownloaderFactory(userAgentString);
      ExtractorFactory extractorFactory = new ExtractorFactory();
  
      InstallerFactory installerFactory =
          version == Version.LATEST ? new InstallerFactory(osInfo, usageReporting) : null;
  
      FileResourceProviderFactory fileResourceProviderFactory =
          new FileResourceProviderFactory(version, osInfo, managedSdkDirectory);
  
      return new SdkInstaller(
          fileResourceProviderFactory, downloaderFactory, extractorFactory, installerFactory);
    }
docs: Configure and create a new Installer instance.
  
  @param managedSdkDirectory home directory of google cloud java managed cloud SDKs
  @param version version of the Cloud SDK we want to install
  @param osInfo target operating system for installation
  @param userAgentString user agent string for https requests
  @param usageReporting enable client side usage reporting on gcloud
  @return a new configured Cloud SDK Installer