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

import typing

from ...core import enum

T_Result = typing.TypeVar("T_Result")


class ApplicationsListRequestDeviceTypeFilter(enum.StrEnum):
    CPU = "cpu"
    NVIDIA_GPU = "nvidia_gpu"
    AWS_INFERENTIA = "aws_inferentia"
    NVIDIA_MIG_GPU = "nvidia_mig_gpu"
    NVIDIA_TIMESLICING_GPU = "nvidia_timeslicing_gpu"
    GCP_TPU = "gcp_tpu"

    def visit(
        self,
        cpu: typing.Callable[[], T_Result],
        nvidia_gpu: typing.Callable[[], T_Result],
        aws_inferentia: typing.Callable[[], T_Result],
        nvidia_mig_gpu: typing.Callable[[], T_Result],
        nvidia_timeslicing_gpu: typing.Callable[[], T_Result],
        gcp_tpu: typing.Callable[[], T_Result],
    ) -> T_Result:
        if self is ApplicationsListRequestDeviceTypeFilter.CPU:
            return cpu()
        if self is ApplicationsListRequestDeviceTypeFilter.NVIDIA_GPU:
            return nvidia_gpu()
        if self is ApplicationsListRequestDeviceTypeFilter.AWS_INFERENTIA:
            return aws_inferentia()
        if self is ApplicationsListRequestDeviceTypeFilter.NVIDIA_MIG_GPU:
            return nvidia_mig_gpu()
        if self is ApplicationsListRequestDeviceTypeFilter.NVIDIA_TIMESLICING_GPU:
            return nvidia_timeslicing_gpu()
        if self is ApplicationsListRequestDeviceTypeFilter.GCP_TPU:
            return gcp_tpu()
