# This file was generated by liblab | https://liblab.com/

from enum import Enum
from .utils.json_map import JsonMap
from .base import BaseModel


class ConferenceName(Enum):
    """An enumeration representing different categories.

    :cvar EASTERN: "Eastern"
    :vartype EASTERN: str
    :cvar WESTERN: "Western"
    :vartype WESTERN: str
    :cvar WORLD_CUP_OF_HOCKEY: "World Cup of Hockey"
    :vartype WORLD_CUP_OF_HOCKEY: str
    """

    EASTERN = "Eastern"
    WESTERN = "Western"
    WORLD_CUP_OF_HOCKEY = "World Cup of Hockey"

    def list():
        """Lists all category values.

        :return: A list of all category values.
        :rtype: list
        """
        return list(map(lambda x: x.value, ConferenceName._member_map_.values()))


class Abbreviation(Enum):
    """An enumeration representing different categories.

    :cvar E: "E"
    :vartype E: str
    :cvar W: "W"
    :vartype W: str
    :cvar WCH: "WCH"
    :vartype WCH: str
    """

    E = "E"
    W = "W"
    WCH = "WCH"

    def list():
        """Lists all category values.

        :return: A list of all category values.
        :rtype: list
        """
        return list(map(lambda x: x.value, Abbreviation._member_map_.values()))


class ShortName(Enum):
    """An enumeration representing different categories.

    :cvar EAST: "East"
    :vartype EAST: str
    :cvar WEST: "West"
    :vartype WEST: str
    :cvar WCUP: "WCup"
    :vartype WCUP: str
    """

    EAST = "East"
    WEST = "West"
    WCUP = "WCup"

    def list():
        """Lists all category values.

        :return: A list of all category values.
        :rtype: list
        """
        return list(map(lambda x: x.value, ShortName._member_map_.values()))


@JsonMap({"id_": "id", "short_name": "shortName"})
class Conference(BaseModel):
    """Conference

    :param id_: id_, defaults to None
    :type id_: float, optional
    :param name: name, defaults to None
    :type name: ConferenceName, optional
    :param link: link, defaults to None
    :type link: str, optional
    :param abbreviation: abbreviation, defaults to None
    :type abbreviation: Abbreviation, optional
    :param short_name: short_name, defaults to None
    :type short_name: ShortName, optional
    :param active: active, defaults to None
    :type active: bool, optional
    """

    def __init__(
        self,
        id_: float = None,
        name: ConferenceName = None,
        link: str = None,
        abbreviation: Abbreviation = None,
        short_name: ShortName = None,
        active: bool = None,
    ):
        if id_ is not None:
            self.id_ = id_
        if name is not None:
            self.name = self._enum_matching(name, ConferenceName.list(), "name")
        if link is not None:
            self.link = link
        if abbreviation is not None:
            self.abbreviation = self._enum_matching(
                abbreviation, Abbreviation.list(), "abbreviation"
            )
        if short_name is not None:
            self.short_name = self._enum_matching(
                short_name, ShortName.list(), "short_name"
            )
        if active is not None:
            self.active = active
