
class SortingMachineTypes(object):
    """
        Represents a machine composed of motors that feeds cards, takes
        images, and moves them to the carousel.
    """
    class SortingMachineType(object):
        def __init__(self, name, friendly_name):
            """
                @type name: str
                @type friendly_name: str
                @precondition: len(name) > 0
                @precondition: len(friendly_name) > 0
            """
            assert isinstance(name, str)
            assert isinstance(friendly_name, str)
            assert name
            assert friendly_name
            self.__dict__["name"] = name
            self.__dict__["friendly_name"] = friendly_name

        def name():  # @NoSelf
            def fget(self):
                return self.__dict__["name"]
            return locals()
        name = property(**name())

        def friendly_name():  # @NoSelf
            def fget(self):
                return self.__dict__["friendly_name"]
            return locals()
        friendly_name = property(**friendly_name())

        def __repr__(self):
            return '<{0}, value {1}>'.format(
                                             type(self).__name__,
                                             self.name,
                                             )

    BASIC_MACHINE = SortingMachineType('BASIC_MACHINE', 'Model A sorting machine')

    VALUES = frozenset(
                       (
                        BASIC_MACHINE,
                        )
                       )

    NAME_TO_ENUM = {set_enum.name: set_enum for set_enum in VALUES}
