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

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


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

    :cvar CANNOT_TEASER_LIVE_GAME: "CANNOT_TEASER_LIVE_GAME"
    :vartype CANNOT_TEASER_LIVE_GAME: str
    :cvar CHECK_TEASER_ERROR: "CHECK_TEASER_ERROR"
    :vartype CHECK_TEASER_ERROR: str
    :cvar INVALID_EVENT: "INVALID_EVENT"
    :vartype INVALID_EVENT: str
    :cvar INVALID_LEG_BET: "INVALID_LEG_BET"
    :vartype INVALID_LEG_BET: str
    :cvar INVALID_LEG_BET_TYPE: "INVALID_LEG_BET_TYPE"
    :vartype INVALID_LEG_BET_TYPE: str
    :cvar LINE_CHANGED: "LINE_CHANGED"
    :vartype LINE_CHANGED: str
    :cvar LINE_DOES_NOT_BELONG_TO_EVENT: "LINE_DOES_NOT_BELONG_TO_EVENT"
    :vartype LINE_DOES_NOT_BELONG_TO_EVENT: str
    :cvar OFFLINE_EVENT: "OFFLINE_EVENT"
    :vartype OFFLINE_EVENT: str
    :cvar PAST_CUTOFFTIME: "PAST_CUTOFFTIME"
    :vartype PAST_CUTOFFTIME: str
    :cvar POINTS_ARE_NOT_ADJUSTED: "POINTS_ARE_NOT_ADJUSTED"
    :vartype POINTS_ARE_NOT_ADJUSTED: str
    :cvar SYSTEM_ERROR_1: "SYSTEM_ERROR_1"
    :vartype SYSTEM_ERROR_1: str
    :cvar SYSTEM_ERROR_2: "SYSTEM_ERROR_2"
    :vartype SYSTEM_ERROR_2: str
    :cvar WAGER_DATA_MISSING: "WAGER_DATA_MISSING"
    :vartype WAGER_DATA_MISSING: str
    :cvar LINE_IS_NOT_AVAILABLE: "LINE_IS_NOT_AVAILABLE"
    :vartype LINE_IS_NOT_AVAILABLE: str
    :cvar TEASER_IS_NOT_ENABLED: "TEASER_IS_NOT_ENABLED"
    :vartype TEASER_IS_NOT_ENABLED: str
    :cvar BETTING_SUSPENDED: "BETTING_SUSPENDED"
    :vartype BETTING_SUSPENDED: str
    """

    CANNOT_TEASER_LIVE_GAME = "CANNOT_TEASER_LIVE_GAME"
    CHECK_TEASER_ERROR = "CHECK_TEASER_ERROR"
    INVALID_EVENT = "INVALID_EVENT"
    INVALID_LEG_BET = "INVALID_LEG_BET"
    INVALID_LEG_BET_TYPE = "INVALID_LEG_BET_TYPE"
    LINE_CHANGED = "LINE_CHANGED"
    LINE_DOES_NOT_BELONG_TO_EVENT = "LINE_DOES_NOT_BELONG_TO_EVENT"
    OFFLINE_EVENT = "OFFLINE_EVENT"
    PAST_CUTOFFTIME = "PAST_CUTOFFTIME"
    POINTS_ARE_NOT_ADJUSTED = "POINTS_ARE_NOT_ADJUSTED"
    SYSTEM_ERROR_1 = "SYSTEM_ERROR_1"
    SYSTEM_ERROR_2 = "SYSTEM_ERROR_2"
    WAGER_DATA_MISSING = "WAGER_DATA_MISSING"
    LINE_IS_NOT_AVAILABLE = "LINE_IS_NOT_AVAILABLE"
    TEASER_IS_NOT_ENABLED = "TEASER_IS_NOT_ENABLED"
    BETTING_SUSPENDED = "BETTING_SUSPENDED"

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

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


@JsonMap({"error_code": "errorCode", "leg_id": "legId", "line_id": "lineId"})
class PlaceTeaserBetLegResponse(BaseModel):
    """PlaceTeaserBetLegResponse

    :param status: Status of the request., defaults to None
    :type status: str, optional
    :param error_code: When Status is PROCESSED_WITH_ERROR, provides a code indicating the specific problem.<br><br>CANNOT_TEASER_LIVE_GAME = Teaser is not allowed on a live game,   <br>CHECK_TEASER_ERROR = The teaser is invalid, check the teaser error for more details,  <br>INVALID_EVENT = The game is not found in the system,  <br>INVALID_LEG_BET = The wager is not verified,  <br>INVALID_LEG_BET_TYPE = Wager type is not “teasable”, can be either Spread or Total,  <br>LINE_CHANGED = Wager is placed on a line that has changed,  <br>LINE_DOES_NOT_BELONG_TO_EVENT = There was no game found for the wager,  <br>OFFLINE_EVENT = Either the game is offline OR there was no game found for the wager,  <br>PAST_CUTOFFTIME = Wager is placed on a game after the cutoff time,  <br>POINTS_ARE_NOT_ADJUSTED = The teaser points were not adjusted,  <br>SYSTEM_ERROR_1 = System error,  <br>SYSTEM_ERROR_2 = System error,  <br>WAGER_DATA_MISSING = Wager is denied due to insufficient information available for validation,  <br>LINE_IS_NOT_AVAILABLE = Line is not available for the specified Teaser Leg, <br>TEASER_IS_NOT_ENABLED = Teaser is not available for the specified leg, <br>BETTING_SUSPENDED - Due to anomalous market circumstances bets are not currently being accepted on this line. Try again with next LineId.<br>, defaults to None
    :type error_code: PlaceTeaserBetLegResponseErrorCode, optional
    :param leg_id: Echo of the legId from the request., defaults to None
    :type leg_id: str, optional
    :param line_id: Line identification that bet was placed on., defaults to None
    :type line_id: int, optional
    :param points: Number of points., defaults to None
    :type points: float, optional
    """

    def __init__(
        self,
        status: str = None,
        error_code: PlaceTeaserBetLegResponseErrorCode = None,
        leg_id: str = None,
        line_id: int = None,
        points: float = None,
    ):
        if status is not None:
            self.status = status
        if error_code is not None:
            self.error_code = self._enum_matching(
                error_code, PlaceTeaserBetLegResponseErrorCode.list(), "error_code"
            )
        if leg_id is not None:
            self.leg_id = leg_id
        if line_id is not None:
            self.line_id = line_id
        if points is not None:
            self.points = points
