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

from __future__ import annotations
from typing import List
from .utils.json_map import JsonMap
from .base import BaseModel
from .odds_format import OddsFormat
from .teaser_bet_leg import TeaserBetLeg


@JsonMap(
    {
        "unique_request_id": "uniqueRequestId",
        "teaser_id": "teaserId",
        "odds_format": "oddsFormat",
        "win_risk_stake": "winRiskStake",
    }
)
class PlaceTeaserBetRequest(BaseModel):
    """PlaceTeaserBetRequest

    :param unique_request_id: Client generated GUID for uniquely identifying the bet., defaults to None
    :type unique_request_id: str, optional
    :param teaser_id: Unique identifier. Teaser details can be retrieved from a call to Get Teaser Groups endpoint., defaults to None
    :type teaser_id: int, optional
    :param odds_format: Bet odds format.  <br>AMERICAN = American odds format,  <br>DECIMAL = Decimal (European) odds format,  <br>HONGKONG = Hong Kong odds format,  <br>INDONESIAN = Indonesian odds format,  <br>MALAY = Malaysian odds format <br>, defaults to None
    :type odds_format: OddsFormat, optional
    :param win_risk_stake: Whether the stake amount is risk or win amount., defaults to None
    :type win_risk_stake: str, optional
    :param stake: amount in client’s currency., defaults to None
    :type stake: float, optional
    :param legs: Collection of legs., defaults to None
    :type legs: List[TeaserBetLeg], optional
    """

    def __init__(
        self,
        unique_request_id: str = None,
        teaser_id: int = None,
        odds_format: OddsFormat = None,
        win_risk_stake: str = None,
        stake: float = None,
        legs: List[TeaserBetLeg] = None,
    ):
        if unique_request_id is not None:
            self.unique_request_id = unique_request_id
        if teaser_id is not None:
            self.teaser_id = teaser_id
        if odds_format is not None:
            self.odds_format = self._enum_matching(
                odds_format, OddsFormat.list(), "odds_format"
            )
        if win_risk_stake is not None:
            self.win_risk_stake = win_risk_stake
        if stake is not None:
            self.stake = stake
        if legs is not None:
            self.legs = self._define_list(legs, TeaserBetLeg)
