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

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


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

    :cvar PARLAY: "Parlay"
    :vartype PARLAY: str
    :cvar TWOLEGROUNDROBIN: "TwoLegRoundRobin"
    :vartype TWOLEGROUNDROBIN: str
    :cvar THREELEGROUNDROBIN: "ThreeLegRoundRobin"
    :vartype THREELEGROUNDROBIN: str
    :cvar FOURLEGROUNDROBIN: "FourLegRoundRobin"
    :vartype FOURLEGROUNDROBIN: str
    :cvar FIVELEGROUNDROBIN: "FiveLegRoundRobin"
    :vartype FIVELEGROUNDROBIN: str
    :cvar SIXLEGROUNDROBIN: "SixLegRoundRobin"
    :vartype SIXLEGROUNDROBIN: str
    :cvar SEVENLEGROUNDROBIN: "SevenLegRoundRobin"
    :vartype SEVENLEGROUNDROBIN: str
    :cvar EIGHTLEGROUNDROBIN: "EightLegRoundRobin"
    :vartype EIGHTLEGROUNDROBIN: str
    """

    PARLAY = "Parlay"
    TWOLEGROUNDROBIN = "TwoLegRoundRobin"
    THREELEGROUNDROBIN = "ThreeLegRoundRobin"
    FOURLEGROUNDROBIN = "FourLegRoundRobin"
    FIVELEGROUNDROBIN = "FiveLegRoundRobin"
    SIXLEGROUNDROBIN = "SixLegRoundRobin"
    SEVENLEGROUNDROBIN = "SevenLegRoundRobin"
    EIGHTLEGROUNDROBIN = "EightLegRoundRobin"

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

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


@JsonMap(
    {
        "round_robin_option": "roundRobinOption",
        "unrounded_decimal_odds": "unroundedDecimalOdds",
    }
)
class RoundRobinOptionWithOdds(BaseModel):
    """RoundRobinOptionWithOdds

    :param round_robin_option: round_robin_option, defaults to None
    :type round_robin_option: RoundRobinOption, optional
    :param odds: Parlay odds for this option., defaults to None
    :type odds: float, optional
    :param unrounded_decimal_odds: Unrounded parlay odds in decimal format to be used for calculations only, defaults to None
    :type unrounded_decimal_odds: float, optional
    """

    def __init__(
        self,
        round_robin_option: RoundRobinOption = None,
        odds: float = None,
        unrounded_decimal_odds: float = None,
    ):
        if round_robin_option is not None:
            self.round_robin_option = self._enum_matching(
                round_robin_option, RoundRobinOption.list(), "round_robin_option"
            )
        if odds is not None:
            self.odds = odds
        if unrounded_decimal_odds is not None:
            self.unrounded_decimal_odds = unrounded_decimal_odds
