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

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


@JsonMap({"type_": "type"})
class DraftProspectPrimaryPosition(BaseModel):
    """DraftProspectPrimaryPosition

    :param code: code, defaults to None
    :type code: str, optional
    :param name: name, defaults to None
    :type name: str, optional
    :param type_: type_, defaults to None
    :type type_: str, optional
    :param abbreviation: abbreviation, defaults to None
    :type abbreviation: str, optional
    """

    def __init__(
        self,
        code: str = None,
        name: str = None,
        type_: str = None,
        abbreviation: str = None,
    ):
        if code is not None:
            self.code = code
        if name is not None:
            self.name = name
        if type_ is not None:
            self.type_ = type_
        if abbreviation is not None:
            self.abbreviation = abbreviation


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

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

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


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

    :param link: link, defaults to None
    :type link: str, optional
    """

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


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

    :param link: link, defaults to None
    :type link: str, optional
    """

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


@JsonMap(
    {
        "id_": "id",
        "full_name": "fullName",
        "first_name": "firstName",
        "last_name": "lastName",
        "birth_date": "birthDate",
        "birth_city": "birthCity",
        "birth_country": "birthCountry",
        "shoots_catches": "shootsCatches",
        "primary_position": "primaryPosition",
        "prospect_category": "prospectCategory",
        "amateur_team": "amateurTeam",
        "amateur_league": "amateurLeague",
    }
)
class DraftProspect(BaseModel):
    """DraftProspect

    :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
    :param first_name: first_name, defaults to None
    :type first_name: str, optional
    :param last_name: last_name, defaults to None
    :type last_name: str, optional
    :param birth_date: birth_date, defaults to None
    :type birth_date: str, optional
    :param birth_city: birth_city, defaults to None
    :type birth_city: str, optional
    :param birth_country: birth_country, defaults to None
    :type birth_country: str, optional
    :param nationality: nationality, defaults to None
    :type nationality: str, optional
    :param height: height, defaults to None
    :type height: str, optional
    :param weight: weight, defaults to None
    :type weight: float, optional
    :param shoots_catches: shoots_catches, defaults to None
    :type shoots_catches: str, optional
    :param primary_position: primary_position, defaults to None
    :type primary_position: DraftProspectPrimaryPosition, optional
    :param prospect_category: prospect_category, defaults to None
    :type prospect_category: ProspectCategory, optional
    :param amateur_team: amateur_team, defaults to None
    :type amateur_team: AmateurTeam, optional
    :param amateur_league: amateur_league, defaults to None
    :type amateur_league: AmateurLeague, optional
    :param ranks: ranks, defaults to None
    :type ranks: dict, optional
    """

    def __init__(
        self,
        id_: float = None,
        full_name: str = None,
        link: str = None,
        first_name: str = None,
        last_name: str = None,
        birth_date: str = None,
        birth_city: str = None,
        birth_country: str = None,
        nationality: str = None,
        height: str = None,
        weight: float = None,
        shoots_catches: str = None,
        primary_position: DraftProspectPrimaryPosition = None,
        prospect_category: ProspectCategory = None,
        amateur_team: AmateurTeam = None,
        amateur_league: AmateurLeague = None,
        ranks: dict = 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
        if first_name is not None:
            self.first_name = first_name
        if last_name is not None:
            self.last_name = last_name
        if birth_date is not None:
            self.birth_date = birth_date
        if birth_city is not None:
            self.birth_city = birth_city
        if birth_country is not None:
            self.birth_country = birth_country
        if nationality is not None:
            self.nationality = nationality
        if height is not None:
            self.height = height
        if weight is not None:
            self.weight = weight
        if shoots_catches is not None:
            self.shoots_catches = shoots_catches
        if primary_position is not None:
            self.primary_position = self._define_object(
                primary_position, DraftProspectPrimaryPosition
            )
        if prospect_category is not None:
            self.prospect_category = self._define_object(
                prospect_category, ProspectCategory
            )
        if amateur_team is not None:
            self.amateur_team = self._define_object(amateur_team, AmateurTeam)
        if amateur_league is not None:
            self.amateur_league = self._define_object(amateur_league, AmateurLeague)
        if ranks is not None:
            self.ranks = ranks
