"""mindbodypublicapi.

This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
"""

# ruff: noqa: E501

class AppointmentGenderPreferenceEnum(object):
    """Implementation of the 'AppointmentGenderPreference' enum.

    The gender of staff member with whom the client prefers to book appointments.
    Possible values are:
    * Female - Indicates that the client prefers to book appointments with female
    staff members.
    * Male - Indicates that the client prefers to book appointments with male staff
    members.
    * None - Indicates that the client does not have a staff member gender preference.

    Attributes:
        NONE: The enum member of type str.
        FEMALE: The enum member of type str.
        MALE: The enum member of type str.

    """

    ENUM_NONE = "None"

    FEMALE = "Female"

    MALE = "Male"

    @classmethod
    def from_value(cls, value, default=None):
        """Return the matching enum value for the given input."""
        if value is None:
            return default

        # If numeric and matches directly
        if isinstance(value, int):
            for name, val in cls.__dict__.items():
                if not name.startswith("_") and val == value:
                    return val

        # If string, perform case-insensitive match
        if isinstance(value, str):
            value_lower = value.lower()
            for name, val in cls.__dict__.items():
                if not name.startswith("_") and (
                    name.lower() == value_lower or str(val).lower() == value_lower
                ):
                    return val

        # Fallback to default
        return default
