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

import typing

from ..core import enum

T_Result = typing.TypeVar("T_Result")


class PolicyEntityTypes(enum.StrEnum):
    SERVICE = "service"
    ASYNC_SERVICE = "async-service"
    JOB = "job"
    NOTEBOOK = "notebook"
    SSH_SERVER = "ssh-server"
    WORKFLOW = "workflow"
    HELM = "helm"

    def visit(
        self,
        service: typing.Callable[[], T_Result],
        async_service: typing.Callable[[], T_Result],
        job: typing.Callable[[], T_Result],
        notebook: typing.Callable[[], T_Result],
        ssh_server: typing.Callable[[], T_Result],
        workflow: typing.Callable[[], T_Result],
        helm: typing.Callable[[], T_Result],
    ) -> T_Result:
        if self is PolicyEntityTypes.SERVICE:
            return service()
        if self is PolicyEntityTypes.ASYNC_SERVICE:
            return async_service()
        if self is PolicyEntityTypes.JOB:
            return job()
        if self is PolicyEntityTypes.NOTEBOOK:
            return notebook()
        if self is PolicyEntityTypes.SSH_SERVER:
            return ssh_server()
        if self is PolicyEntityTypes.WORKFLOW:
            return workflow()
        if self is PolicyEntityTypes.HELM:
            return helm()
