Perhaps I'm being overly careful in trying to be consistent with how enum's are defined in other places, e.g. IndexShardState. I can simplify this.