# coding: utf-8

from __future__ import absolute_import
from datetime import date, datetime  # noqa: F401

from typing import List, Dict  # noqa: F401

from nfldata.models.base_model_ import Model
from nfldata.models.team_short_code_enum import TeamShortCodeEnum
from nfldata import util

from nfldata.models.team_short_code_enum import TeamShortCodeEnum  # noqa: E501

class Game(Model):
    """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

    Do not edit the class manually.
    """

    def __init__(self, id=None, date_time=None, decision=None, home_team=None, home_score=None, field_goals=None, line=None, ot=None, ou=None, roof=None, surface=None, visiting_score=None, visiting_team=None, weather_at_end=None, weather_at_half=None, weather_at_start=None):  # noqa: E501
        """Game - a model defined in OpenAPI

        :param id: The id of this Game.  # noqa: E501
        :type id: str
        :param date_time: The date_time of this Game.  # noqa: E501
        :type date_time: str
        :param decision: The decision of this Game.  # noqa: E501
        :type decision: float
        :param home_team: The home_team of this Game.  # noqa: E501
        :type home_team: TeamShortCodeEnum
        :param home_score: The home_score of this Game.  # noqa: E501
        :type home_score: str
        :param field_goals: The field_goals of this Game.  # noqa: E501
        :type field_goals: List[str]
        :param line: The line of this Game.  # noqa: E501
        :type line: float
        :param ot: The ot of this Game.  # noqa: E501
        :type ot: bool
        :param ou: The ou of this Game.  # noqa: E501
        :type ou: float
        :param roof: The roof of this Game.  # noqa: E501
        :type roof: str
        :param surface: The surface of this Game.  # noqa: E501
        :type surface: str
        :param visiting_score: The visiting_score of this Game.  # noqa: E501
        :type visiting_score: str
        :param visiting_team: The visiting_team of this Game.  # noqa: E501
        :type visiting_team: TeamShortCodeEnum
        :param weather_at_end: The weather_at_end of this Game.  # noqa: E501
        :type weather_at_end: str
        :param weather_at_half: The weather_at_half of this Game.  # noqa: E501
        :type weather_at_half: str
        :param weather_at_start: The weather_at_start of this Game.  # noqa: E501
        :type weather_at_start: str
        """
        self.openapi_types = {
            'id': str,
            'date_time': str,
            'decision': float,
            'home_team': TeamShortCodeEnum,
            'home_score': str,
            'field_goals': List[str],
            'line': float,
            'ot': bool,
            'ou': float,
            'roof': str,
            'surface': str,
            'visiting_score': str,
            'visiting_team': TeamShortCodeEnum,
            'weather_at_end': str,
            'weather_at_half': str,
            'weather_at_start': str
        }

        self.attribute_map = {
            'id': 'id',
            'date_time': 'dateTime',
            'decision': 'decision',
            'home_team': 'homeTeam',
            'home_score': 'homeScore',
            'field_goals': 'fieldGoals',
            'line': 'line',
            'ot': 'ot',
            'ou': 'ou',
            'roof': 'roof',
            'surface': 'surface',
            'visiting_score': 'visitingScore',
            'visiting_team': 'visitingTeam',
            'weather_at_end': 'weatherAtEnd',
            'weather_at_half': 'weatherAtHalf',
            'weather_at_start': 'weatherAtStart'
        }

        self._id = id
        self._date_time = date_time
        self._decision = decision
        self._home_team = home_team
        self._home_score = home_score
        self._field_goals = field_goals
        self._line = line
        self._ot = ot
        self._ou = ou
        self._roof = roof
        self._surface = surface
        self._visiting_score = visiting_score
        self._visiting_team = visiting_team
        self._weather_at_end = weather_at_end
        self._weather_at_half = weather_at_half
        self._weather_at_start = weather_at_start

    @classmethod
    def from_dict(cls, dikt) -> 'Game':
        """Returns the dict as a model

        :param dikt: A dict.
        :type: dict
        :return: The Game of this Game.  # noqa: E501
        :rtype: Game
        """
        return util.deserialize_model(dikt, cls)

    @property
    def id(self):
        """Gets the id of this Game.

        A UUID. This is referred to as the id of any object's property descriptions in the model. It is intended to be unique.  # noqa: E501

        :return: The id of this Game.
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this Game.

        A UUID. This is referred to as the id of any object's property descriptions in the model. It is intended to be unique.  # noqa: E501

        :param id: The id of this Game.
        :type id: str
        """
        if id is None:
            raise ValueError("Invalid value for `id`, must not be `None`")  # noqa: E501

        self._id = id

    @property
    def date_time(self):
        """Gets the date_time of this Game.

        Date and time of the weather report in ISO8601 format, always UTC. For forecasts, this is the date and time the weather report is for.  # noqa: E501

        :return: The date_time of this Game.
        :rtype: str
        """
        return self._date_time

    @date_time.setter
    def date_time(self, date_time):
        """Sets the date_time of this Game.

        Date and time of the weather report in ISO8601 format, always UTC. For forecasts, this is the date and time the weather report is for.  # noqa: E501

        :param date_time: The date_time of this Game.
        :type date_time: str
        """
        if date_time is None:
            raise ValueError("Invalid value for `date_time`, must not be `None`")  # noqa: E501

        self._date_time = date_time

    @property
    def decision(self):
        """Gets the decision of this Game.

        Game outcome. -1 if visiting team won. 0 if tie. 1 if home team won.  # noqa: E501

        :return: The decision of this Game.
        :rtype: float
        """
        return self._decision

    @decision.setter
    def decision(self, decision):
        """Sets the decision of this Game.

        Game outcome. -1 if visiting team won. 0 if tie. 1 if home team won.  # noqa: E501

        :param decision: The decision of this Game.
        :type decision: float
        """
        if decision is None:
            raise ValueError("Invalid value for `decision`, must not be `None`")  # noqa: E501

        self._decision = decision

    @property
    def home_team(self):
        """Gets the home_team of this Game.


        :return: The home_team of this Game.
        :rtype: TeamShortCodeEnum
        """
        return self._home_team

    @home_team.setter
    def home_team(self, home_team):
        """Sets the home_team of this Game.


        :param home_team: The home_team of this Game.
        :type home_team: TeamShortCodeEnum
        """
        if home_team is None:
            raise ValueError("Invalid value for `home_team`, must not be `None`")  # noqa: E501

        self._home_team = home_team

    @property
    def home_score(self):
        """Gets the home_score of this Game.

        The score of the home team at the end of the game.  # noqa: E501

        :return: The home_score of this Game.
        :rtype: str
        """
        return self._home_score

    @home_score.setter
    def home_score(self, home_score):
        """Sets the home_score of this Game.

        The score of the home team at the end of the game.  # noqa: E501

        :param home_score: The home_score of this Game.
        :type home_score: str
        """
        if home_score is None:
            raise ValueError("Invalid value for `home_score`, must not be `None`")  # noqa: E501

        self._home_score = home_score

    @property
    def field_goals(self):
        """Gets the field_goals of this Game.

        An array of Field Goal ids that took place during the game  # noqa: E501

        :return: The field_goals of this Game.
        :rtype: List[str]
        """
        return self._field_goals

    @field_goals.setter
    def field_goals(self, field_goals):
        """Sets the field_goals of this Game.

        An array of Field Goal ids that took place during the game  # noqa: E501

        :param field_goals: The field_goals of this Game.
        :type field_goals: List[str]
        """

        self._field_goals = field_goals

    @property
    def line(self):
        """Gets the line of this Game.

        What was the Vegas line going into the game? Negative favors visitor.  # noqa: E501

        :return: The line of this Game.
        :rtype: float
        """
        return self._line

    @line.setter
    def line(self, line):
        """Sets the line of this Game.

        What was the Vegas line going into the game? Negative favors visitor.  # noqa: E501

        :param line: The line of this Game.
        :type line: float
        """

        self._line = line

    @property
    def ot(self):
        """Gets the ot of this Game.

        Did the game go into overtime?  # noqa: E501

        :return: The ot of this Game.
        :rtype: bool
        """
        return self._ot

    @ot.setter
    def ot(self, ot):
        """Sets the ot of this Game.

        Did the game go into overtime?  # noqa: E501

        :param ot: The ot of this Game.
        :type ot: bool
        """

        self._ot = ot

    @property
    def ou(self):
        """Gets the ou of this Game.

        Over Under on point total  # noqa: E501

        :return: The ou of this Game.
        :rtype: float
        """
        return self._ou

    @ou.setter
    def ou(self, ou):
        """Sets the ou of this Game.

        Over Under on point total  # noqa: E501

        :param ou: The ou of this Game.
        :type ou: float
        """

        self._ou = ou

    @property
    def roof(self):
        """Gets the roof of this Game.

        What kind of roof was there?  # noqa: E501

        :return: The roof of this Game.
        :rtype: str
        """
        return self._roof

    @roof.setter
    def roof(self, roof):
        """Sets the roof of this Game.

        What kind of roof was there?  # noqa: E501

        :param roof: The roof of this Game.
        :type roof: str
        """
        allowed_values = ["outdoors", "retractable roof (closed)", "retractable roof (open)", "dome"]  # noqa: E501
        if roof not in allowed_values:
            raise ValueError(
                "Invalid value for `roof` ({0}), must be one of {1}"
                .format(roof, allowed_values)
            )

        self._roof = roof

    @property
    def surface(self):
        """Gets the surface of this Game.

        What kind of surface was the game played don?  # noqa: E501

        :return: The surface of this Game.
        :rtype: str
        """
        return self._surface

    @surface.setter
    def surface(self, surface):
        """Sets the surface of this Game.

        What kind of surface was the game played don?  # noqa: E501

        :param surface: The surface of this Game.
        :type surface: str
        """
        allowed_values = ["grass", "fieldturf", "sportturf", "astroturf"]  # noqa: E501
        if surface not in allowed_values:
            raise ValueError(
                "Invalid value for `surface` ({0}), must be one of {1}"
                .format(surface, allowed_values)
            )

        self._surface = surface

    @property
    def visiting_score(self):
        """Gets the visiting_score of this Game.

        The score of the visiting team at the end of the game.  # noqa: E501

        :return: The visiting_score of this Game.
        :rtype: str
        """
        return self._visiting_score

    @visiting_score.setter
    def visiting_score(self, visiting_score):
        """Sets the visiting_score of this Game.

        The score of the visiting team at the end of the game.  # noqa: E501

        :param visiting_score: The visiting_score of this Game.
        :type visiting_score: str
        """
        if visiting_score is None:
            raise ValueError("Invalid value for `visiting_score`, must not be `None`")  # noqa: E501

        self._visiting_score = visiting_score

    @property
    def visiting_team(self):
        """Gets the visiting_team of this Game.


        :return: The visiting_team of this Game.
        :rtype: TeamShortCodeEnum
        """
        return self._visiting_team

    @visiting_team.setter
    def visiting_team(self, visiting_team):
        """Sets the visiting_team of this Game.


        :param visiting_team: The visiting_team of this Game.
        :type visiting_team: TeamShortCodeEnum
        """
        if visiting_team is None:
            raise ValueError("Invalid value for `visiting_team`, must not be `None`")  # noqa: E501

        self._visiting_team = visiting_team

    @property
    def weather_at_end(self):
        """Gets the weather_at_end of this Game.

        Weather id of the report at the end of the game.  # noqa: E501

        :return: The weather_at_end of this Game.
        :rtype: str
        """
        return self._weather_at_end

    @weather_at_end.setter
    def weather_at_end(self, weather_at_end):
        """Sets the weather_at_end of this Game.

        Weather id of the report at the end of the game.  # noqa: E501

        :param weather_at_end: The weather_at_end of this Game.
        :type weather_at_end: str
        """

        self._weather_at_end = weather_at_end

    @property
    def weather_at_half(self):
        """Gets the weather_at_half of this Game.

        Weather id of the report at half time.  # noqa: E501

        :return: The weather_at_half of this Game.
        :rtype: str
        """
        return self._weather_at_half

    @weather_at_half.setter
    def weather_at_half(self, weather_at_half):
        """Sets the weather_at_half of this Game.

        Weather id of the report at half time.  # noqa: E501

        :param weather_at_half: The weather_at_half of this Game.
        :type weather_at_half: str
        """

        self._weather_at_half = weather_at_half

    @property
    def weather_at_start(self):
        """Gets the weather_at_start of this Game.

        Weather id of the report at the start of the game.  # noqa: E501

        :return: The weather_at_start of this Game.
        :rtype: str
        """
        return self._weather_at_start

    @weather_at_start.setter
    def weather_at_start(self, weather_at_start):
        """Sets the weather_at_start of this Game.

        Weather id of the report at the start of the game.  # noqa: E501

        :param weather_at_start: The weather_at_start of this Game.
        :type weather_at_start: str
        """

        self._weather_at_start = weather_at_start
