Sequence not Accepting PoingterInput Values

Hello, Previously, the code below was working. I am now receiving the error “The constructor Sequence(PointerInput, int) is undefined” in this program when I try to run the script.
A few days ago, the code below was working. Please assist me in resolving this.

protected  void swipe(Point start, Point end, Duration duration) {
	
		PointerInput input = new PointerInput(PointerInput.Kind.TOUCH, "finger1");
		Sequence swipe = new Sequence(input, 0);
	    swipe.addAction(input.createPointerMove(Duration.ZERO, PointerInput.Origin.viewport(), start.x, start.y));
	    swipe.addAction(input.createPointerDown(PointerInput.MouseButton.LEFT.asArg()));

	    swipe.addAction(input.createPointerMove(duration, PointerInput.Origin.viewport(), end.x, end.y));
	    swipe.addAction(input.createPointerUp(PointerInput.MouseButton.LEFT.asArg()));
	    driver.perform(ImmutableList.of(swipe));
	}

new Sequence(input, 1);

getting same error

have no issue with

                    PointerInput input = new PointerInput(PointerInput.Kind.TOUCH, "finger1");
                    Sequence swipe = new Sequence(input, 1);
                    swipe.addAction(input.createPointerMove(Duration.ofMillis(0), PointerInput.Origin.viewport(), start.x, start.y));
                    swipe.addAction(input.createPointerDown(PointerInput.MouseButton.LEFT.asArg()));
                    swipe.addAction(input.createPointerMove(duration, PointerInput.Origin.viewport(), end.x, end.y));
                    swipe.addAction(input.createPointerUp(PointerInput.MouseButton.LEFT.asArg()));
                    driver.perform(ImmutableList.of(swipe));

what versions of java-client and selenium-java you have?

Am also could not able to run successfully the code in my workspace. The error thrown is unsupported command Exception on driver.perform(ImmutableList.of(swipe)).
Am using selenium 3.141.59 java client 7.6.0.

Java Client is 8.6.0 and selenium Java is 4.6.0

see with java-client 8.6.0 your selenium MIN version should be 4.9.1