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

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


class TypeDisplayName(Enum):
    """An enumeration representing different categories.

    :cvar BYDAYOFWEEK: "byDayOfWeek"
    :vartype BYDAYOFWEEK: str
    :cvar BYMONTH: "byMonth"
    :vartype BYMONTH: str
    :cvar GOALSBYGAMESITUATION: "goalsByGameSituation"
    :vartype GOALSBYGAMESITUATION: str
    :cvar HOMEANDAWAY: "homeAndAway"
    :vartype HOMEANDAWAY: str
    :cvar ONPACEREGULARSEASON: "onPaceRegularSeason"
    :vartype ONPACEREGULARSEASON: str
    :cvar REGULARSEASONSTATRANKINGS: "regularSeasonStatRankings"
    :vartype REGULARSEASONSTATRANKINGS: str
    :cvar STATSSINGLESEASON: "statsSingleSeason"
    :vartype STATSSINGLESEASON: str
    :cvar VSCONFERENCE: "vsConference"
    :vartype VSCONFERENCE: str
    :cvar VSDIVISION: "vsDivision"
    :vartype VSDIVISION: str
    :cvar VSTEAM: "vsTeam"
    :vartype VSTEAM: str
    :cvar WINLOSS: "winLoss"
    :vartype WINLOSS: str
    """

    BYDAYOFWEEK = "byDayOfWeek"
    BYMONTH = "byMonth"
    GOALSBYGAMESITUATION = "goalsByGameSituation"
    HOMEANDAWAY = "homeAndAway"
    ONPACEREGULARSEASON = "onPaceRegularSeason"
    REGULARSEASONSTATRANKINGS = "regularSeasonStatRankings"
    STATSSINGLESEASON = "statsSingleSeason"
    VSCONFERENCE = "vsConference"
    VSDIVISION = "vsDivision"
    VSTEAM = "vsTeam"
    WINLOSS = "winLoss"

    def list():
        """Lists all category values.

        :return: A list of all category values.
        :rtype: list
        """
        return list(map(lambda x: x.value, TypeDisplayName._member_map_.values()))


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

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

    def __init__(self, display_name: TypeDisplayName = None):
        if display_name is not None:
            self.display_name = self._enum_matching(
                display_name, TypeDisplayName.list(), "display_name"
            )


@JsonMap(
    {
        "time_on_ice": "timeOnIce",
        "power_play_goals": "powerPlayGoals",
        "power_play_points": "powerPlayPoints",
        "power_play_time_on_ice": "powerPlayTimeOnIce",
        "even_time_on_ice": "evenTimeOnIce",
        "penalty_minutes": "penaltyMinutes",
        "face_off_pct": "faceOffPct",
        "shot_pct": "shotPct",
        "game_winning_goals": "gameWinningGoals",
        "over_time_goals": "overTimeGoals",
        "short_handed_goals": "shortHandedGoals",
        "short_handed_points": "shortHandedPoints",
        "short_handed_time_on_ice": "shortHandedTimeOnIce",
        "plus_minus": "plusMinus",
        "time_on_ice_per_game": "timeOnIcePerGame",
        "even_time_on_ice_per_game": "evenTimeOnIcePerGame",
        "short_handed_time_on_ice_per_game": "shortHandedTimeOnIcePerGame",
        "power_play_time_on_ice_per_game": "powerPlayTimeOnIcePerGame",
        "rank_power_play_goals": "rankPowerPlayGoals",
        "rank_blocked_shots": "rankBlockedShots",
        "rank_assists": "rankAssists",
        "rank_shot_pct": "rankShotPct",
        "rank_goals": "rankGoals",
        "rank_hits": "rankHits",
        "rank_penalty_minutes": "rankPenaltyMinutes",
        "rank_short_handed_goals": "rankShortHandedGoals",
        "rank_plus_minus": "rankPlusMinus",
        "rank_shots": "rankShots",
        "rank_points": "rankPoints",
        "rank_overtime_goals": "rankOvertimeGoals",
        "rank_games_played": "rankGamesPlayed",
        "goals_in_first_period": "goalsInFirstPeriod",
        "goals_in_second_period": "goalsInSecondPeriod",
        "goals_in_third_period": "goalsInThirdPeriod",
        "goals_trailing_by_one": "goalsTrailingByOne",
        "goals_trailing_by_two": "goalsTrailingByTwo",
        "goals_trailing_by_three_plus": "goalsTrailingByThreePlus",
        "goals_when_tied": "goalsWhenTied",
        "goals_leading_by_one": "goalsLeadingByOne",
        "goals_leading_by_two": "goalsLeadingByTwo",
    }
)
class SplitsStat1(BaseModel):
    """SplitsStat1

    :param time_on_ice: time_on_ice, defaults to None
    :type time_on_ice: str, optional
    :param assists: assists, defaults to None
    :type assists: str, optional
    :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 games: games, defaults to None
    :type games: 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_points: power_play_points, defaults to None
    :type power_play_points: float, optional
    :param power_play_time_on_ice: power_play_time_on_ice, defaults to None
    :type power_play_time_on_ice: float, optional
    :param even_time_on_ice: even_time_on_ice, defaults to None
    :type even_time_on_ice: float, optional
    :param penalty_minutes: penalty_minutes, defaults to None
    :type penalty_minutes: float, optional
    :param face_off_pct: face_off_pct, defaults to None
    :type face_off_pct: float, optional
    :param shot_pct: shot_pct, defaults to None
    :type shot_pct: float, optional
    :param game_winning_goals: game_winning_goals, defaults to None
    :type game_winning_goals: float, optional
    :param over_time_goals: over_time_goals, defaults to None
    :type over_time_goals: float, optional
    :param short_handed_goals: short_handed_goals, defaults to None
    :type short_handed_goals: float, optional
    :param short_handed_points: short_handed_points, defaults to None
    :type short_handed_points: float, optional
    :param short_handed_time_on_ice: short_handed_time_on_ice, defaults to None
    :type short_handed_time_on_ice: str, 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 points: points, defaults to None
    :type points: float, optional
    :param shifts: shifts, defaults to None
    :type shifts: float, optional
    :param time_on_ice_per_game: time_on_ice_per_game, defaults to None
    :type time_on_ice_per_game: str, optional
    :param even_time_on_ice_per_game: even_time_on_ice_per_game, defaults to None
    :type even_time_on_ice_per_game: str, optional
    :param short_handed_time_on_ice_per_game: short_handed_time_on_ice_per_game, defaults to None
    :type short_handed_time_on_ice_per_game: str, optional
    :param power_play_time_on_ice_per_game: power_play_time_on_ice_per_game, defaults to None
    :type power_play_time_on_ice_per_game: str, optional
    :param rank_power_play_goals: rank_power_play_goals, defaults to None
    :type rank_power_play_goals: str, optional
    :param rank_blocked_shots: rank_blocked_shots, defaults to None
    :type rank_blocked_shots: str, optional
    :param rank_assists: rank_assists, defaults to None
    :type rank_assists: str, optional
    :param rank_shot_pct: rank_shot_pct, defaults to None
    :type rank_shot_pct: str, optional
    :param rank_goals: rank_goals, defaults to None
    :type rank_goals: str, optional
    :param rank_hits: rank_hits, defaults to None
    :type rank_hits: str, optional
    :param rank_penalty_minutes: rank_penalty_minutes, defaults to None
    :type rank_penalty_minutes: str, optional
    :param rank_short_handed_goals: rank_short_handed_goals, defaults to None
    :type rank_short_handed_goals: str, optional
    :param rank_plus_minus: rank_plus_minus, defaults to None
    :type rank_plus_minus: str, optional
    :param rank_shots: rank_shots, defaults to None
    :type rank_shots: str, optional
    :param rank_points: rank_points, defaults to None
    :type rank_points: str, optional
    :param rank_overtime_goals: rank_overtime_goals, defaults to None
    :type rank_overtime_goals: str, optional
    :param rank_games_played: rank_games_played, defaults to None
    :type rank_games_played: str, optional
    :param goals_in_first_period: goals_in_first_period, defaults to None
    :type goals_in_first_period: float, optional
    :param goals_in_second_period: goals_in_second_period, defaults to None
    :type goals_in_second_period: float, optional
    :param goals_in_third_period: goals_in_third_period, defaults to None
    :type goals_in_third_period: float, optional
    :param goals_trailing_by_one: goals_trailing_by_one, defaults to None
    :type goals_trailing_by_one: float, optional
    :param goals_trailing_by_two: goals_trailing_by_two, defaults to None
    :type goals_trailing_by_two: float, optional
    :param goals_trailing_by_three_plus: goals_trailing_by_three_plus, defaults to None
    :type goals_trailing_by_three_plus: float, optional
    :param goals_when_tied: goals_when_tied, defaults to None
    :type goals_when_tied: float, optional
    :param goals_leading_by_one: goals_leading_by_one, defaults to None
    :type goals_leading_by_one: float, optional
    :param goals_leading_by_two: goals_leading_by_two, defaults to None
    :type goals_leading_by_two: float, optional
    """

    def __init__(
        self,
        time_on_ice: str = None,
        assists: str = None,
        goals: float = None,
        pim: float = None,
        shots: float = None,
        games: float = None,
        hits: float = None,
        power_play_goals: float = None,
        power_play_points: float = None,
        power_play_time_on_ice: float = None,
        even_time_on_ice: float = None,
        penalty_minutes: float = None,
        face_off_pct: float = None,
        shot_pct: float = None,
        game_winning_goals: float = None,
        over_time_goals: float = None,
        short_handed_goals: float = None,
        short_handed_points: float = None,
        short_handed_time_on_ice: str = None,
        blocked: float = None,
        plus_minus: float = None,
        points: float = None,
        shifts: float = None,
        time_on_ice_per_game: str = None,
        even_time_on_ice_per_game: str = None,
        short_handed_time_on_ice_per_game: str = None,
        power_play_time_on_ice_per_game: str = None,
        rank_power_play_goals: str = None,
        rank_blocked_shots: str = None,
        rank_assists: str = None,
        rank_shot_pct: str = None,
        rank_goals: str = None,
        rank_hits: str = None,
        rank_penalty_minutes: str = None,
        rank_short_handed_goals: str = None,
        rank_plus_minus: str = None,
        rank_shots: str = None,
        rank_points: str = None,
        rank_overtime_goals: str = None,
        rank_games_played: str = None,
        goals_in_first_period: float = None,
        goals_in_second_period: float = None,
        goals_in_third_period: float = None,
        goals_trailing_by_one: float = None,
        goals_trailing_by_two: float = None,
        goals_trailing_by_three_plus: float = None,
        goals_when_tied: float = None,
        goals_leading_by_one: float = None,
        goals_leading_by_two: float = 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 pim is not None:
            self.pim = pim
        if shots is not None:
            self.shots = shots
        if games is not None:
            self.games = games
        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_points is not None:
            self.power_play_points = power_play_points
        if power_play_time_on_ice is not None:
            self.power_play_time_on_ice = power_play_time_on_ice
        if even_time_on_ice is not None:
            self.even_time_on_ice = even_time_on_ice
        if penalty_minutes is not None:
            self.penalty_minutes = penalty_minutes
        if face_off_pct is not None:
            self.face_off_pct = face_off_pct
        if shot_pct is not None:
            self.shot_pct = shot_pct
        if game_winning_goals is not None:
            self.game_winning_goals = game_winning_goals
        if over_time_goals is not None:
            self.over_time_goals = over_time_goals
        if short_handed_goals is not None:
            self.short_handed_goals = short_handed_goals
        if short_handed_points is not None:
            self.short_handed_points = short_handed_points
        if short_handed_time_on_ice is not None:
            self.short_handed_time_on_ice = short_handed_time_on_ice
        if blocked is not None:
            self.blocked = blocked
        if plus_minus is not None:
            self.plus_minus = plus_minus
        if points is not None:
            self.points = points
        if shifts is not None:
            self.shifts = shifts
        if time_on_ice_per_game is not None:
            self.time_on_ice_per_game = time_on_ice_per_game
        if even_time_on_ice_per_game is not None:
            self.even_time_on_ice_per_game = even_time_on_ice_per_game
        if short_handed_time_on_ice_per_game is not None:
            self.short_handed_time_on_ice_per_game = short_handed_time_on_ice_per_game
        if power_play_time_on_ice_per_game is not None:
            self.power_play_time_on_ice_per_game = power_play_time_on_ice_per_game
        if rank_power_play_goals is not None:
            self.rank_power_play_goals = rank_power_play_goals
        if rank_blocked_shots is not None:
            self.rank_blocked_shots = rank_blocked_shots
        if rank_assists is not None:
            self.rank_assists = rank_assists
        if rank_shot_pct is not None:
            self.rank_shot_pct = rank_shot_pct
        if rank_goals is not None:
            self.rank_goals = rank_goals
        if rank_hits is not None:
            self.rank_hits = rank_hits
        if rank_penalty_minutes is not None:
            self.rank_penalty_minutes = rank_penalty_minutes
        if rank_short_handed_goals is not None:
            self.rank_short_handed_goals = rank_short_handed_goals
        if rank_plus_minus is not None:
            self.rank_plus_minus = rank_plus_minus
        if rank_shots is not None:
            self.rank_shots = rank_shots
        if rank_points is not None:
            self.rank_points = rank_points
        if rank_overtime_goals is not None:
            self.rank_overtime_goals = rank_overtime_goals
        if rank_games_played is not None:
            self.rank_games_played = rank_games_played
        if goals_in_first_period is not None:
            self.goals_in_first_period = goals_in_first_period
        if goals_in_second_period is not None:
            self.goals_in_second_period = goals_in_second_period
        if goals_in_third_period is not None:
            self.goals_in_third_period = goals_in_third_period
        if goals_trailing_by_one is not None:
            self.goals_trailing_by_one = goals_trailing_by_one
        if goals_trailing_by_two is not None:
            self.goals_trailing_by_two = goals_trailing_by_two
        if goals_trailing_by_three_plus is not None:
            self.goals_trailing_by_three_plus = goals_trailing_by_three_plus
        if goals_when_tied is not None:
            self.goals_when_tied = goals_when_tied
        if goals_leading_by_one is not None:
            self.goals_leading_by_one = goals_leading_by_one
        if goals_leading_by_two is not None:
            self.goals_leading_by_two = goals_leading_by_two


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

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

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

    :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(
    {
        "is_home": "isHome",
        "is_win": "isWin",
        "is_ot": "isOT",
        "day_of_week": "dayOfWeek",
        "opponent_division": "opponentDivision",
        "opponent_conference": "opponentConference",
    }
)
class StatsSplits1(BaseModel):
    """StatsSplits1

    :param season: season, defaults to None
    :type season: str, optional
    :param stat: stat, defaults to None
    :type stat: SplitsStat1, optional
    :param is_home: is_home, defaults to None
    :type is_home: bool, optional
    :param is_win: is_win, defaults to None
    :type is_win: bool, optional
    :param is_ot: is_ot, defaults to None
    :type is_ot: bool, optional
    :param month: month, defaults to None
    :type month: float, optional
    :param day_of_week: day_of_week, defaults to None
    :type day_of_week: float, optional
    :param opponent: opponent, defaults to None
    :type opponent: Opponent, optional
    :param opponent_division: opponent_division, defaults to None
    :type opponent_division: OpponentDivision, optional
    :param opponent_conference: opponent_conference, defaults to None
    :type opponent_conference: OpponentConference, optional
    """

    def __init__(
        self,
        season: str = None,
        stat: SplitsStat1 = None,
        is_home: bool = None,
        is_win: bool = None,
        is_ot: bool = None,
        month: float = None,
        day_of_week: float = None,
        opponent: Opponent = None,
        opponent_division: OpponentDivision = None,
        opponent_conference: OpponentConference = None,
    ):
        if season is not None:
            self.season = season
        if stat is not None:
            self.stat = self._define_object(stat, SplitsStat1)
        if is_home is not None:
            self.is_home = is_home
        if is_win is not None:
            self.is_win = is_win
        if is_ot is not None:
            self.is_ot = is_ot
        if month is not None:
            self.month = month
        if day_of_week is not None:
            self.day_of_week = day_of_week
        if opponent is not None:
            self.opponent = self._define_object(opponent, Opponent)
        if opponent_division is not None:
            self.opponent_division = self._define_object(
                opponent_division, OpponentDivision
            )
        if opponent_conference is not None:
            self.opponent_conference = self._define_object(
                opponent_conference, OpponentConference
            )


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

    :param type_: type_, defaults to None
    :type type_: StatsType1, optional
    :param splits: splits, defaults to None
    :type splits: List[StatsSplits1], optional
    """

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


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

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

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