An enum is a data type that only allows certain values for that piece of data. The stuff inside the brackets is called the enumerator list, and each item is an enumerator. The whole thing together is called an enumeration.
In the example, orientation is the name of the enum. Enums let you represent numbers with names. Sometimes it’s easier to work with numbers if you have names for them. You can assign numbers to the values in an enum and use the names to refer to them. That way, you don’t have a bunch of unexplained numbers floating around in your code. You can think of enums as a handy way to store lists of constants so you can refer to them by name. They’re great for keeping your code readable and making sure that you are always using the right variable names to access values that you use really frequently.
The downside to enums is that you need to cast them.