How to create a Boolean Vector property that is "single selection"? ☐ x
☐ y
☑ z

class MyAddon(bpy.types.Operator):
    ...
    axis =  bpy.props.BoolVectorProperty( subtype="XYZ" )
    ...


This operator is added to menu, now the BoolVectorProperty is multiple selection by default, how do I make it single selection? I want only one value to be True at one time.

I have tried getter and setter, but cannot make it right.
I managed to create a "single selection" boolean vector. It use getter and setters. An auxiliary variable is used to store the value of the property, otherwise setting the property inside the setter would recursively call setter which calls setter which calls setter...

AXIS_VALUE = [0,0,1]

class Foo(bpy.types.Operator):
    #...
    #...

    def getter(self):
        return AXIS_VALUE


    def setter(self, value):
        for i in range(3):
            AXIS_VALUE[i] = { 
                (False, False) : False,
                (False, True) : True,
                (True, True) : False,
                (True, False) : False,
            }[AXIS_VALUE[i], value[i]]


    axis = BoolVectorProperty(
                subtype="XYZ",
                default=(0,0,1),
                get = getter,
                set = setter
            )
    #...
    #...