The element state indicates more than active, paused and stopped.
Additional values, such as hidden and masked are available as well.
How can I determine what the proper element state is as some of these values can be combined?
I.e. an element can be both active and hidden, active and masked, etc.
Is it even correct that the element state has the available options like masked and hidden?
"Hidden" and "Masked" are not used as "State" for an element as far as I know. The element will be "Active" in these cases while the "Hidden" option has a separate property and "Masked" is conveyed through the element severity info.
"Restart" is a state which can be passed as part of a SetElementStateMessage and will never be present as live state for an active element.
These states being present in the enum most likely has legacy reasons.
Not familiar with the drop-down menu shown in the above screenshot,
but I agree with Wouter that it seems to mix up values from the possible "Alarm State" of an element and the actual element state.
Adding some visual reference from an admin pov: in any live system, you can browse to the View and select Elements on the left side of the card to display both the element state & the alarm state of an element.
Worth noting that:
1. to get a Masked (alarm) state, your element must be active;
2. you have no alarm state whenever the element is stopped;
3. Paused is similar to "Stopped" but the element can still be browsed
4. "Undefined" will show up for an unresponsive state (can't remember if element or alarm - if the latter, it can come in when the alarm template is set but most values in the alarm template are not retrieving any severity yet)
I seem to recall "Deleted" can show up briefly in a card for the element state when the element is deleted from the system - I'd advise not trying this on any prod element (especially if dealing with an element included in many services &/or an element that is the parent of many DVEs included in different Views).
HTH