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

import typing

from ..core import enum

T_Result = typing.TypeVar("T_Result")


class UserRoleWithResourceResourceType(enum.StrEnum):
    ROLE = "role"
    ACCOUNT = "account"
    CLUSTER = "cluster"
    WORKSPACE = "workspace"
    ENVIRONMENT = "environment"
    SECRET_GROUP = "secret-group"
    DEPLOYMENT = "deployment"
    APPLICATION = "application"
    SECRET = "secret"
    DOCKER_REGISTRY = "docker-registry"
    TENANT = "tenant"
    VCS_INTEGRATION = "vcs-integration"
    MLF_PROJECT = "mlf-project"
    PROVIDER_INTEGRATION = "provider-integration"
    TEAM = "team"
    SERVICE_ACCOUNT = "service-account"
    LLM_GATEWAY = "llm-gateway"
    POLICY = "policy"
    SETTINGS = "settings"
    PROVIDER_ACCOUNT = "provider-account"
    USER = "user"
    ALERT_CONFIG = "alert-config"
    ALERT_RULE = "alert-rule"
    GATEWAY_CONFIG = "gateway-config"
    TRACING_PROJECT = "tracing-project"
    TRACING_APPLICATION = "tracing-application"
    AGENT_APP = "agent-app"
    GATEWAY_INSTALLATION = "gateway-installation"
    VIRTUAL_ACCOUNT = "virtual-account"
    SSO_BASED_IDENTITY = "sso-based-identity"

    def visit(
        self,
        role: typing.Callable[[], T_Result],
        account: typing.Callable[[], T_Result],
        cluster: typing.Callable[[], T_Result],
        workspace: typing.Callable[[], T_Result],
        environment: typing.Callable[[], T_Result],
        secret_group: typing.Callable[[], T_Result],
        deployment: typing.Callable[[], T_Result],
        application: typing.Callable[[], T_Result],
        secret: typing.Callable[[], T_Result],
        docker_registry: typing.Callable[[], T_Result],
        tenant: typing.Callable[[], T_Result],
        vcs_integration: typing.Callable[[], T_Result],
        mlf_project: typing.Callable[[], T_Result],
        provider_integration: typing.Callable[[], T_Result],
        team: typing.Callable[[], T_Result],
        service_account: typing.Callable[[], T_Result],
        llm_gateway: typing.Callable[[], T_Result],
        policy: typing.Callable[[], T_Result],
        settings: typing.Callable[[], T_Result],
        provider_account: typing.Callable[[], T_Result],
        user: typing.Callable[[], T_Result],
        alert_config: typing.Callable[[], T_Result],
        alert_rule: typing.Callable[[], T_Result],
        gateway_config: typing.Callable[[], T_Result],
        tracing_project: typing.Callable[[], T_Result],
        tracing_application: typing.Callable[[], T_Result],
        agent_app: typing.Callable[[], T_Result],
        gateway_installation: typing.Callable[[], T_Result],
        virtual_account: typing.Callable[[], T_Result],
        sso_based_identity: typing.Callable[[], T_Result],
    ) -> T_Result:
        if self is UserRoleWithResourceResourceType.ROLE:
            return role()
        if self is UserRoleWithResourceResourceType.ACCOUNT:
            return account()
        if self is UserRoleWithResourceResourceType.CLUSTER:
            return cluster()
        if self is UserRoleWithResourceResourceType.WORKSPACE:
            return workspace()
        if self is UserRoleWithResourceResourceType.ENVIRONMENT:
            return environment()
        if self is UserRoleWithResourceResourceType.SECRET_GROUP:
            return secret_group()
        if self is UserRoleWithResourceResourceType.DEPLOYMENT:
            return deployment()
        if self is UserRoleWithResourceResourceType.APPLICATION:
            return application()
        if self is UserRoleWithResourceResourceType.SECRET:
            return secret()
        if self is UserRoleWithResourceResourceType.DOCKER_REGISTRY:
            return docker_registry()
        if self is UserRoleWithResourceResourceType.TENANT:
            return tenant()
        if self is UserRoleWithResourceResourceType.VCS_INTEGRATION:
            return vcs_integration()
        if self is UserRoleWithResourceResourceType.MLF_PROJECT:
            return mlf_project()
        if self is UserRoleWithResourceResourceType.PROVIDER_INTEGRATION:
            return provider_integration()
        if self is UserRoleWithResourceResourceType.TEAM:
            return team()
        if self is UserRoleWithResourceResourceType.SERVICE_ACCOUNT:
            return service_account()
        if self is UserRoleWithResourceResourceType.LLM_GATEWAY:
            return llm_gateway()
        if self is UserRoleWithResourceResourceType.POLICY:
            return policy()
        if self is UserRoleWithResourceResourceType.SETTINGS:
            return settings()
        if self is UserRoleWithResourceResourceType.PROVIDER_ACCOUNT:
            return provider_account()
        if self is UserRoleWithResourceResourceType.USER:
            return user()
        if self is UserRoleWithResourceResourceType.ALERT_CONFIG:
            return alert_config()
        if self is UserRoleWithResourceResourceType.ALERT_RULE:
            return alert_rule()
        if self is UserRoleWithResourceResourceType.GATEWAY_CONFIG:
            return gateway_config()
        if self is UserRoleWithResourceResourceType.TRACING_PROJECT:
            return tracing_project()
        if self is UserRoleWithResourceResourceType.TRACING_APPLICATION:
            return tracing_application()
        if self is UserRoleWithResourceResourceType.AGENT_APP:
            return agent_app()
        if self is UserRoleWithResourceResourceType.GATEWAY_INSTALLATION:
            return gateway_installation()
        if self is UserRoleWithResourceResourceType.VIRTUAL_ACCOUNT:
            return virtual_account()
        if self is UserRoleWithResourceResourceType.SSO_BASED_IDENTITY:
            return sso_based_identity()
