# This file was auto-generated by Fern from our API Definition.

import enum
import typing

T_Result = typing.TypeVar("T_Result")


class AddressUse(str, enum.Enum):
    HOME = "HOME"
    WORK = "WORK"
    TEMP = "TEMP"
    OLD = "OLD"
    BILLING = "BILLING"

    def visit(
        self,
        home: typing.Callable[[], T_Result],
        work: typing.Callable[[], T_Result],
        temp: typing.Callable[[], T_Result],
        old: typing.Callable[[], T_Result],
        billing: typing.Callable[[], T_Result],
    ) -> T_Result:
        if self is AddressUse.HOME:
            return home()
        if self is AddressUse.WORK:
            return work()
        if self is AddressUse.TEMP:
            return temp()
        if self is AddressUse.OLD:
            return old()
        if self is AddressUse.BILLING:
            return billing()
