# 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", "tri_code": "triCode"})
class GameBoxscoreTeamTeam(BaseModel):
    """GameBoxscoreTeamTeam

    :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
    :param abbreviation: abbreviation, defaults to None
    :type abbreviation: str, optional
    :param tri_code: tri_code, defaults to None
    :type tri_code: str, optional
    """

    def __init__(
        self,
        id_: float = None,
        name: str = None,
        link: str = None,
        abbreviation: str = None,
        tri_code: 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
        if abbreviation is not None:
            self.abbreviation = abbreviation
        if tri_code is not None:
            self.tri_code = tri_code


@JsonMap(
    {
        "power_play_percentage": "powerPlayPercentage",
        "power_play_goals": "powerPlayGoals",
        "power_play_opportunities": "powerPlayOpportunities",
        "face_off_win_percentage": "faceOffWinPercentage",
    }
)
class TeamSkaterStats(BaseModel):
    """TeamSkaterStats

    :param goals: goals, defaults to None
    :type goals: float, optional
    :param pim: pim, defaults to None
    :type pim: float, optional
    :param shots: shots, defaults to None
    :type shots: float, optional
    :param power_play_percentage: power_play_percentage, defaults to None
    :type power_play_percentage: str, optional
    :param power_play_goals: power_play_goals, defaults to None
    :type power_play_goals: float, optional
    :param power_play_opportunities: power_play_opportunities, defaults to None
    :type power_play_opportunities: float, optional
    :param face_off_win_percentage: face_off_win_percentage, defaults to None
    :type face_off_win_percentage: str, optional
    :param blocked: blocked, defaults to None
    :type blocked: float, optional
    :param takeaways: takeaways, defaults to None
    :type takeaways: float, optional
    :param giveaways: giveaways, defaults to None
    :type giveaways: float, optional
    :param hits: hits, defaults to None
    :type hits: float, optional
    """

    def __init__(
        self,
        goals: float = None,
        pim: float = None,
        shots: float = None,
        power_play_percentage: str = None,
        power_play_goals: float = None,
        power_play_opportunities: float = None,
        face_off_win_percentage: str = None,
        blocked: float = None,
        takeaways: float = None,
        giveaways: float = None,
        hits: float = None,
    ):
        if goals is not None:
            self.goals = goals
        if pim is not None:
            self.pim = pim
        if shots is not None:
            self.shots = shots
        if power_play_percentage is not None:
            self.power_play_percentage = power_play_percentage
        if power_play_goals is not None:
            self.power_play_goals = power_play_goals
        if power_play_opportunities is not None:
            self.power_play_opportunities = power_play_opportunities
        if face_off_win_percentage is not None:
            self.face_off_win_percentage = face_off_win_percentage
        if blocked is not None:
            self.blocked = blocked
        if takeaways is not None:
            self.takeaways = takeaways
        if giveaways is not None:
            self.giveaways = giveaways
        if hits is not None:
            self.hits = hits


@JsonMap({"team_skater_stats": "teamSkaterStats"})
class GameBoxscoreTeamTeamStats(BaseModel):
    """GameBoxscoreTeamTeamStats

    :param team_skater_stats: team_skater_stats, defaults to None
    :type team_skater_stats: TeamSkaterStats, optional
    """

    def __init__(self, team_skater_stats: TeamSkaterStats = None):
        if team_skater_stats is not None:
            self.team_skater_stats = self._define_object(
                team_skater_stats, TeamSkaterStats
            )


@JsonMap(
    {
        "id_": "id",
        "full_name": "fullName",
        "shoots_catches": "shootsCatches",
        "roster_status": "rosterStatus",
    }
)
class PlayersPerson(BaseModel):
    """PlayersPerson

    :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 shoots_catches: shoots_catches, defaults to None
    :type shoots_catches: str, optional
    :param roster_status: roster_status, defaults to None
    :type roster_status: str, optional
    """

    def __init__(
        self,
        id_: float = None,
        full_name: str = None,
        link: str = None,
        shoots_catches: str = None,
        roster_status: 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
        if shoots_catches is not None:
            self.shoots_catches = shoots_catches
        if roster_status is not None:
            self.roster_status = roster_status


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

    :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(
    {
        "time_on_ice": "timeOnIce",
        "power_play_goals": "powerPlayGoals",
        "power_play_assists": "powerPlayAssists",
        "penalty_minutes": "penaltyMinutes",
        "face_off_wins": "faceOffWins",
        "faceoff_taken": "faceoffTaken",
        "short_handed_goals": "shortHandedGoals",
        "short_handed_assists": "shortHandedAssists",
        "plus_minus": "plusMinus",
        "even_time_on_ice": "evenTimeOnIce",
        "power_play_time_on_ice": "powerPlayTimeOnIce",
        "short_handed_time_on_ice": "shortHandedTimeOnIce",
    }
)
class SkaterStats(BaseModel):
    """SkaterStats

    :param time_on_ice: time_on_ice, defaults to None
    :type time_on_ice: str, optional
    :param assists: assists, defaults to None
    :type assists: float, optional
    :param goals: goals, defaults to None
    :type goals: float, optional
    :param shots: shots, defaults to None
    :type shots: float, optional
    :param hits: hits, defaults to None
    :type hits: float, optional
    :param power_play_goals: power_play_goals, defaults to None
    :type power_play_goals: float, optional
    :param power_play_assists: power_play_assists, defaults to None
    :type power_play_assists: float, optional
    :param penalty_minutes: penalty_minutes, defaults to None
    :type penalty_minutes: float, optional
    :param face_off_wins: face_off_wins, defaults to None
    :type face_off_wins: float, optional
    :param faceoff_taken: faceoff_taken, defaults to None
    :type faceoff_taken: float, optional
    :param takeaways: takeaways, defaults to None
    :type takeaways: float, optional
    :param giveaways: giveaways, defaults to None
    :type giveaways: float, optional
    :param short_handed_goals: short_handed_goals, defaults to None
    :type short_handed_goals: float, optional
    :param short_handed_assists: short_handed_assists, defaults to None
    :type short_handed_assists: float, optional
    :param blocked: blocked, defaults to None
    :type blocked: float, optional
    :param plus_minus: plus_minus, defaults to None
    :type plus_minus: float, optional
    :param even_time_on_ice: even_time_on_ice, defaults to None
    :type even_time_on_ice: str, optional
    :param power_play_time_on_ice: power_play_time_on_ice, defaults to None
    :type power_play_time_on_ice: str, optional
    :param short_handed_time_on_ice: short_handed_time_on_ice, defaults to None
    :type short_handed_time_on_ice: str, optional
    """

    def __init__(
        self,
        time_on_ice: str = None,
        assists: float = None,
        goals: float = None,
        shots: float = None,
        hits: float = None,
        power_play_goals: float = None,
        power_play_assists: float = None,
        penalty_minutes: float = None,
        face_off_wins: float = None,
        faceoff_taken: float = None,
        takeaways: float = None,
        giveaways: float = None,
        short_handed_goals: float = None,
        short_handed_assists: float = None,
        blocked: float = None,
        plus_minus: float = None,
        even_time_on_ice: str = None,
        power_play_time_on_ice: str = None,
        short_handed_time_on_ice: str = None,
    ):
        if time_on_ice is not None:
            self.time_on_ice = time_on_ice
        if assists is not None:
            self.assists = assists
        if goals is not None:
            self.goals = goals
        if shots is not None:
            self.shots = shots
        if hits is not None:
            self.hits = hits
        if power_play_goals is not None:
            self.power_play_goals = power_play_goals
        if power_play_assists is not None:
            self.power_play_assists = power_play_assists
        if penalty_minutes is not None:
            self.penalty_minutes = penalty_minutes
        if face_off_wins is not None:
            self.face_off_wins = face_off_wins
        if faceoff_taken is not None:
            self.faceoff_taken = faceoff_taken
        if takeaways is not None:
            self.takeaways = takeaways
        if giveaways is not None:
            self.giveaways = giveaways
        if short_handed_goals is not None:
            self.short_handed_goals = short_handed_goals
        if short_handed_assists is not None:
            self.short_handed_assists = short_handed_assists
        if blocked is not None:
            self.blocked = blocked
        if plus_minus is not None:
            self.plus_minus = plus_minus
        if even_time_on_ice is not None:
            self.even_time_on_ice = even_time_on_ice
        if power_play_time_on_ice is not None:
            self.power_play_time_on_ice = power_play_time_on_ice
        if short_handed_time_on_ice is not None:
            self.short_handed_time_on_ice = short_handed_time_on_ice


@JsonMap({"skater_stats": "skaterStats"})
class PlayersStats(BaseModel):
    """PlayersStats

    :param skater_stats: skater_stats, defaults to None
    :type skater_stats: SkaterStats, optional
    """

    def __init__(self, skater_stats: SkaterStats = None):
        if skater_stats is not None:
            self.skater_stats = self._define_object(skater_stats, SkaterStats)


@JsonMap({"jersey_number": "jerseyNumber"})
class GameBoxscoreTeamPlayers(BaseModel):
    """GameBoxscoreTeamPlayers

    :param person: person, defaults to None
    :type person: PlayersPerson, optional
    :param jersey_number: jersey_number, defaults to None
    :type jersey_number: str, optional
    :param position: position, defaults to None
    :type position: PlayersPosition, optional
    :param stats: stats, defaults to None
    :type stats: PlayersStats, optional
    """

    def __init__(
        self,
        person: PlayersPerson = None,
        jersey_number: str = None,
        position: PlayersPosition = None,
        stats: PlayersStats = None,
    ):
        if person is not None:
            self.person = self._define_object(person, PlayersPerson)
        if jersey_number is not None:
            self.jersey_number = jersey_number
        if position is not None:
            self.position = self._define_object(position, PlayersPosition)
        if stats is not None:
            self.stats = self._define_object(stats, PlayersStats)


@JsonMap({"player_id": "playerId", "shift_duration": "shiftDuration"})
class OnIcePlus(BaseModel):
    """OnIcePlus

    :param player_id: player_id, defaults to None
    :type player_id: float, optional
    :param shift_duration: shift_duration, defaults to None
    :type shift_duration: float, optional
    :param stamina: stamina, defaults to None
    :type stamina: float, optional
    """

    def __init__(
        self,
        player_id: float = None,
        shift_duration: float = None,
        stamina: float = None,
    ):
        if player_id is not None:
            self.player_id = player_id
        if shift_duration is not None:
            self.shift_duration = shift_duration
        if stamina is not None:
            self.stamina = stamina


@JsonMap({"full_name": "fullName"})
class CoachesPerson(BaseModel):
    """CoachesPerson

    :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, full_name: str = None, link: str = None):
        if full_name is not None:
            self.full_name = full_name
        if link is not None:
            self.link = link


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

    :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({})
class Coaches(BaseModel):
    """Coaches

    :param person: person, defaults to None
    :type person: CoachesPerson, optional
    :param position: position, defaults to None
    :type position: CoachesPosition, optional
    """

    def __init__(self, person: CoachesPerson = None, position: CoachesPosition = None):
        if person is not None:
            self.person = self._define_object(person, CoachesPerson)
        if position is not None:
            self.position = self._define_object(position, CoachesPosition)


@JsonMap(
    {
        "team_stats": "teamStats",
        "on_ice": "onIce",
        "on_ice_plus": "onIcePlus",
        "penalty_box": "penaltyBox",
    }
)
class GameBoxscoreTeam(BaseModel):
    """GameBoxscoreTeam

    :param team: team, defaults to None
    :type team: GameBoxscoreTeamTeam, optional
    :param team_stats: team_stats, defaults to None
    :type team_stats: GameBoxscoreTeamTeamStats, optional
    :param players: players, defaults to None
    :type players: GameBoxscoreTeamPlayers, optional
    :param goalies: goalies, defaults to None
    :type goalies: List[float], optional
    :param skaters: skaters, defaults to None
    :type skaters: List[float], optional
    :param on_ice: on_ice, defaults to None
    :type on_ice: List[float], optional
    :param on_ice_plus: on_ice_plus, defaults to None
    :type on_ice_plus: List[OnIcePlus], optional
    :param scratches: scratches, defaults to None
    :type scratches: List[float], optional
    :param penalty_box: penalty_box, defaults to None
    :type penalty_box: List[float], optional
    :param coaches: coaches, defaults to None
    :type coaches: List[Coaches], optional
    """

    def __init__(
        self,
        team: GameBoxscoreTeamTeam = None,
        team_stats: GameBoxscoreTeamTeamStats = None,
        players: GameBoxscoreTeamPlayers = None,
        goalies: List[float] = None,
        skaters: List[float] = None,
        on_ice: List[float] = None,
        on_ice_plus: List[OnIcePlus] = None,
        scratches: List[float] = None,
        penalty_box: List[float] = None,
        coaches: List[Coaches] = None,
    ):
        if team is not None:
            self.team = self._define_object(team, GameBoxscoreTeamTeam)
        if team_stats is not None:
            self.team_stats = self._define_object(team_stats, GameBoxscoreTeamTeamStats)
        if players is not None:
            self.players = self._define_object(players, GameBoxscoreTeamPlayers)
        if goalies is not None:
            self.goalies = goalies
        if skaters is not None:
            self.skaters = skaters
        if on_ice is not None:
            self.on_ice = on_ice
        if on_ice_plus is not None:
            self.on_ice_plus = self._define_list(on_ice_plus, OnIcePlus)
        if scratches is not None:
            self.scratches = scratches
        if penalty_box is not None:
            self.penalty_box = penalty_box
        if coaches is not None:
            self.coaches = self._define_list(coaches, Coaches)
