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

from typing import List
from .utils.json_map import JsonMap
from .base import BaseModel


@JsonMap({"id_": "id"})
class PicksTeam(BaseModel):
    """PicksTeam

    :param id_: id_, defaults to None
    :type id_: float, optional
    :param name: name, defaults to None
    :type name: str, optional
    :param link: link, defaults to None
    :type link: str, optional
    """

    def __init__(self, id_: float = None, name: str = None, link: str = None):
        if id_ is not None:
            self.id_ = id_
        if name is not None:
            self.name = name
        if link is not None:
            self.link = link


@JsonMap({"id_": "id", "full_name": "fullName"})
class Prospect(BaseModel):
    """Prospect

    :param id_: id_, defaults to None
    :type id_: float, optional
    :param full_name: full_name, defaults to None
    :type full_name: str, optional
    :param link: link, defaults to None
    :type link: str, optional
    """

    def __init__(self, id_: float = None, full_name: str = None, link: str = None):
        if id_ is not None:
            self.id_ = id_
        if full_name is not None:
            self.full_name = full_name
        if link is not None:
            self.link = link


@JsonMap({"pick_overall": "pickOverall", "pick_in_round": "pickInRound"})
class Picks(BaseModel):
    """Picks

    :param year: year, defaults to None
    :type year: float, optional
    :param round: round, defaults to None
    :type round: str, optional
    :param pick_overall: pick_overall, defaults to None
    :type pick_overall: float, optional
    :param pick_in_round: pick_in_round, defaults to None
    :type pick_in_round: float, optional
    :param team: team, defaults to None
    :type team: PicksTeam, optional
    :param prospect: prospect, defaults to None
    :type prospect: Prospect, optional
    """

    def __init__(
        self,
        year: float = None,
        round: str = None,
        pick_overall: float = None,
        pick_in_round: float = None,
        team: PicksTeam = None,
        prospect: Prospect = None,
    ):
        if year is not None:
            self.year = year
        if round is not None:
            self.round = round
        if pick_overall is not None:
            self.pick_overall = pick_overall
        if pick_in_round is not None:
            self.pick_in_round = pick_in_round
        if team is not None:
            self.team = self._define_object(team, PicksTeam)
        if prospect is not None:
            self.prospect = self._define_object(prospect, Prospect)


@JsonMap({"round_number": "roundNumber"})
class Rounds(BaseModel):
    """Rounds

    :param round_number: round_number, defaults to None
    :type round_number: float, optional
    :param round: round, defaults to None
    :type round: float, optional
    :param picks: picks, defaults to None
    :type picks: List[Picks], optional
    """

    def __init__(
        self, round_number: float = None, round: float = None, picks: List[Picks] = None
    ):
        if round_number is not None:
            self.round_number = round_number
        if round is not None:
            self.round = round
        if picks is not None:
            self.picks = self._define_list(picks, Picks)


@JsonMap({"draft_year": "draftYear"})
class Drafts(BaseModel):
    """Drafts

    :param draft_year: draft_year, defaults to None
    :type draft_year: float, optional
    :param rounds: rounds, defaults to None
    :type rounds: List[Rounds], optional
    """

    def __init__(self, draft_year: float = None, rounds: List[Rounds] = None):
        if draft_year is not None:
            self.draft_year = draft_year
        if rounds is not None:
            self.rounds = self._define_list(rounds, Rounds)


@JsonMap({})
class Draft(BaseModel):
    """Draft

    :param copyright: copyright, defaults to None
    :type copyright: str, optional
    :param drafts: drafts, defaults to None
    :type drafts: List[Drafts], optional
    """

    def __init__(self, copyright: str = None, drafts: List[Drafts] = None):
        if copyright is not None:
            self.copyright = copyright
        if drafts is not None:
            self.drafts = self._define_list(drafts, Drafts)
