code: private static long uploadImageAsset(
        AdWordsServicesInterface adWordsServices, AdWordsSession session, String url)
        throws IOException {
  
      AssetServiceInterface assetService = adWordsServices.get(session, AssetServiceInterface.class);
  
      // Create the image asset.
      ImageAsset image = new ImageAsset();
      // Optional: Provide a unique friendly name to identify your asset. If you specify the assetName
      // field, then both the asset name and the image being uploaded should be unique, and should not
      // match another ACTIVE asset in this customer account.
      // image.setAssetName("Image asset #" + System.currentTimeMillis());
      image.setImageData(com.google.api.ads.common.lib.utils.Media.getMediaDataFromUrl(url));
  
      // Create the operation.
      AssetOperation operation = new AssetOperation();
      operation.setOperator(Operator.ADD);
      operation.setOperand(image);
  
      // Create the asset and return the ID.
      return assetService.mutate(new AssetOperation[] {operation}).getValue(0).getAssetId();
    }
docs: Creates and uploads an {@link ImageAsset} for the specified URL.
  
  @return the ID of the {@link ImageAsset}.
  @throws IOException if unable to read the image from the specified URL.