I'm trying to use CP-SAT solver with some variables: x,y. I want to maximise an objective function of the form x**2-y*x with some constraints. I'm getting

TypeError: unsupported operand type(s) for ** or pow(): 'IntVar' and
  'int'

error messages. Am I correct in assuming I cannot use nonlinear objective function for CP-SAT, as I couldn't find any documentation or examples that did employ nonlinear objectives? Or is there some way to do this?
You have to create an intermediate variable using AddMultiplicationEquality(x2, [x, x])
Using CP-SAT Solver for non-linear objective function