What if the UI would send 'Go' to the API but the instruction would need to be translated into the enum value? In this case it would be 2.
Would we use a reverse map for the instructions?
i.e.
"const fromInstructions = new Map([ ["Stop", TrafficLight.Red], ["Slow down", TrafficLight.Yellow], ["Go", TrafficLight.Green], ]);"
Or do you reckon it would be ok keeping them in the same instructions map?