including a Java Object variable,in the payload of a POST request to Camunda's '/rest/process-instance/count' endpoint to filter process instances

For the POST endpoint ‘/rest/process-instance/count’ in Camunda, can I include a Java Object variable defined in my Java code within the payload? For example, considering a payload structured as follows:
“activityIdIn”: [
“variables”: [
“name”: “carColor”,
“operator”: “eq”,
“value”: “RED”
Where ‘RED’ is an ENUM defined in my Java code. The objective is to retrieve all process instances in ‘Task1’ where ‘carColor’ equals ‘RED’."