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

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


@JsonMap({"display_name": "displayName"})
class StatsType2(BaseModel):
    """StatsType2

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

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


@JsonMap(
    {
        "games_played": "gamesPlayed",
        "pt_pctg": "ptPctg",
        "goals_per_game": "goalsPerGame",
        "goals_against_per_game": "goalsAgainstPerGame",
        "ev_gga_ratio": "evGGARatio",
        "power_play_percentage": "powerPlayPercentage",
        "power_play_goals": "powerPlayGoals",
        "power_play_goals_against": "powerPlayGoalsAgainst",
        "power_play_opportunities": "powerPlayOpportunities",
        "penalty_kill_percentage": "penaltyKillPercentage",
        "shots_per_game": "shotsPerGame",
        "shots_allowed": "shotsAllowed",
        "win_score_first": "winScoreFirst",
        "win_opp_score_first": "winOppScoreFirst",
        "win_lead_first_per": "winLeadFirstPer",
        "win_lead_second_per": "winLeadSecondPer",
        "win_outshoot_opp": "winOutshootOpp",
        "win_outshot_by_opp": "winOutshotByOpp",
        "face_offs_taken": "faceOffsTaken",
        "face_offs_won": "faceOffsWon",
        "face_offs_lost": "faceOffsLost",
        "face_off_win_percentage": "faceOffWinPercentage",
        "shooting_pctg": "shootingPctg",
        "save_pctg": "savePctg",
    }
)
class SplitsStat2(BaseModel):
    """SplitsStat2

    :param games_played: games_played, defaults to None
    :type games_played: float, optional
    :param wins: wins, defaults to None
    :type wins: float, optional
    :param losses: losses, defaults to None
    :type losses: float, optional
    :param ot: ot, defaults to None
    :type ot: float, optional
    :param pts: pts, defaults to None
    :type pts: float, optional
    :param pt_pctg: pt_pctg, defaults to None
    :type pt_pctg: str, optional
    :param goals_per_game: goals_per_game, defaults to None
    :type goals_per_game: float, optional
    :param goals_against_per_game: goals_against_per_game, defaults to None
    :type goals_against_per_game: float, optional
    :param ev_gga_ratio: ev_gga_ratio, defaults to None
    :type ev_gga_ratio: 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_goals_against: power_play_goals_against, defaults to None
    :type power_play_goals_against: float, optional
    :param power_play_opportunities: power_play_opportunities, defaults to None
    :type power_play_opportunities: float, optional
    :param penalty_kill_percentage: penalty_kill_percentage, defaults to None
    :type penalty_kill_percentage: str, optional
    :param shots_per_game: shots_per_game, defaults to None
    :type shots_per_game: float, optional
    :param shots_allowed: shots_allowed, defaults to None
    :type shots_allowed: float, optional
    :param win_score_first: win_score_first, defaults to None
    :type win_score_first: float, optional
    :param win_opp_score_first: win_opp_score_first, defaults to None
    :type win_opp_score_first: float, optional
    :param win_lead_first_per: win_lead_first_per, defaults to None
    :type win_lead_first_per: float, optional
    :param win_lead_second_per: win_lead_second_per, defaults to None
    :type win_lead_second_per: float, optional
    :param win_outshoot_opp: win_outshoot_opp, defaults to None
    :type win_outshoot_opp: float, optional
    :param win_outshot_by_opp: win_outshot_by_opp, defaults to None
    :type win_outshot_by_opp: float, optional
    :param face_offs_taken: face_offs_taken, defaults to None
    :type face_offs_taken: float, optional
    :param face_offs_won: face_offs_won, defaults to None
    :type face_offs_won: float, optional
    :param face_offs_lost: face_offs_lost, defaults to None
    :type face_offs_lost: float, optional
    :param face_off_win_percentage: face_off_win_percentage, defaults to None
    :type face_off_win_percentage: str, optional
    :param shooting_pctg: shooting_pctg, defaults to None
    :type shooting_pctg: float, optional
    :param save_pctg: save_pctg, defaults to None
    :type save_pctg: float, optional
    """

    def __init__(
        self,
        games_played: float = None,
        wins: float = None,
        losses: float = None,
        ot: float = None,
        pts: float = None,
        pt_pctg: str = None,
        goals_per_game: float = None,
        goals_against_per_game: float = None,
        ev_gga_ratio: float = None,
        power_play_percentage: str = None,
        power_play_goals: float = None,
        power_play_goals_against: float = None,
        power_play_opportunities: float = None,
        penalty_kill_percentage: str = None,
        shots_per_game: float = None,
        shots_allowed: float = None,
        win_score_first: float = None,
        win_opp_score_first: float = None,
        win_lead_first_per: float = None,
        win_lead_second_per: float = None,
        win_outshoot_opp: float = None,
        win_outshot_by_opp: float = None,
        face_offs_taken: float = None,
        face_offs_won: float = None,
        face_offs_lost: float = None,
        face_off_win_percentage: str = None,
        shooting_pctg: float = None,
        save_pctg: float = None,
    ):
        if games_played is not None:
            self.games_played = games_played
        if wins is not None:
            self.wins = wins
        if losses is not None:
            self.losses = losses
        if ot is not None:
            self.ot = ot
        if pts is not None:
            self.pts = pts
        if pt_pctg is not None:
            self.pt_pctg = pt_pctg
        if goals_per_game is not None:
            self.goals_per_game = goals_per_game
        if goals_against_per_game is not None:
            self.goals_against_per_game = goals_against_per_game
        if ev_gga_ratio is not None:
            self.ev_gga_ratio = ev_gga_ratio
        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_goals_against is not None:
            self.power_play_goals_against = power_play_goals_against
        if power_play_opportunities is not None:
            self.power_play_opportunities = power_play_opportunities
        if penalty_kill_percentage is not None:
            self.penalty_kill_percentage = penalty_kill_percentage
        if shots_per_game is not None:
            self.shots_per_game = shots_per_game
        if shots_allowed is not None:
            self.shots_allowed = shots_allowed
        if win_score_first is not None:
            self.win_score_first = win_score_first
        if win_opp_score_first is not None:
            self.win_opp_score_first = win_opp_score_first
        if win_lead_first_per is not None:
            self.win_lead_first_per = win_lead_first_per
        if win_lead_second_per is not None:
            self.win_lead_second_per = win_lead_second_per
        if win_outshoot_opp is not None:
            self.win_outshoot_opp = win_outshoot_opp
        if win_outshot_by_opp is not None:
            self.win_outshot_by_opp = win_outshot_by_opp
        if face_offs_taken is not None:
            self.face_offs_taken = face_offs_taken
        if face_offs_won is not None:
            self.face_offs_won = face_offs_won
        if face_offs_lost is not None:
            self.face_offs_lost = face_offs_lost
        if face_off_win_percentage is not None:
            self.face_off_win_percentage = face_off_win_percentage
        if shooting_pctg is not None:
            self.shooting_pctg = shooting_pctg
        if save_pctg is not None:
            self.save_pctg = save_pctg


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

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

    :param stat: stat, defaults to None
    :type stat: SplitsStat2, optional
    :param team: team, defaults to None
    :type team: SplitsTeam, optional
    """

    def __init__(self, stat: SplitsStat2 = None, team: SplitsTeam = None):
        if stat is not None:
            self.stat = self._define_object(stat, SplitsStat2)
        if team is not None:
            self.team = self._define_object(team, SplitsTeam)


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

    :param type_: type_, defaults to None
    :type type_: StatsType2, optional
    :param splits: splits, defaults to None
    :type splits: List[StatsSplits2], optional
    """

    def __init__(self, type_: StatsType2 = None, splits: List[StatsSplits2] = None):
        if type_ is not None:
            self.type_ = self._define_object(type_, StatsType2)
        if splits is not None:
            self.splits = self._define_list(splits, StatsSplits2)


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

    :param copyright: copyright, defaults to None
    :type copyright: str, optional
    :param stats: stats, defaults to None
    :type stats: List[TeamStatsStats], optional
    """

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