# coding: utf-8

"""
    NHL API

    Documenting the publicly accessible portions of the NHL API.  # noqa: E501

    OpenAPI spec version: 1.0.0
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

class GamePeriod(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """
    """
    Attributes:
      swagger_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    swagger_types = {
        'period_type': 'str',
        'start_time': 'datetime',
        'end_time': 'datetime',
        'num': 'float',
        'ordinal_num': 'str',
        'home': 'GamePeriodHome',
        'away': 'GamePeriodAway'
    }

    attribute_map = {
        'period_type': 'periodType',
        'start_time': 'startTime',
        'end_time': 'endTime',
        'num': 'num',
        'ordinal_num': 'ordinalNum',
        'home': 'home',
        'away': 'away'
    }

    def __init__(self, period_type=None, start_time=None, end_time=None, num=None, ordinal_num=None, home=None, away=None):  # noqa: E501
        """GamePeriod - a model defined in Swagger"""  # noqa: E501
        self._period_type = None
        self._start_time = None
        self._end_time = None
        self._num = None
        self._ordinal_num = None
        self._home = None
        self._away = None
        self.discriminator = None
        if period_type is not None:
            self.period_type = period_type
        if start_time is not None:
            self.start_time = start_time
        if end_time is not None:
            self.end_time = end_time
        if num is not None:
            self.num = num
        if ordinal_num is not None:
            self.ordinal_num = ordinal_num
        if home is not None:
            self.home = home
        if away is not None:
            self.away = away

    @property
    def period_type(self):
        """Gets the period_type of this GamePeriod.  # noqa: E501


        :return: The period_type of this GamePeriod.  # noqa: E501
        :rtype: str
        """
        return self._period_type

    @period_type.setter
    def period_type(self, period_type):
        """Sets the period_type of this GamePeriod.


        :param period_type: The period_type of this GamePeriod.  # noqa: E501
        :type: str
        """

        self._period_type = period_type

    @property
    def start_time(self):
        """Gets the start_time of this GamePeriod.  # noqa: E501


        :return: The start_time of this GamePeriod.  # noqa: E501
        :rtype: datetime
        """
        return self._start_time

    @start_time.setter
    def start_time(self, start_time):
        """Sets the start_time of this GamePeriod.


        :param start_time: The start_time of this GamePeriod.  # noqa: E501
        :type: datetime
        """

        self._start_time = start_time

    @property
    def end_time(self):
        """Gets the end_time of this GamePeriod.  # noqa: E501


        :return: The end_time of this GamePeriod.  # noqa: E501
        :rtype: datetime
        """
        return self._end_time

    @end_time.setter
    def end_time(self, end_time):
        """Sets the end_time of this GamePeriod.


        :param end_time: The end_time of this GamePeriod.  # noqa: E501
        :type: datetime
        """

        self._end_time = end_time

    @property
    def num(self):
        """Gets the num of this GamePeriod.  # noqa: E501


        :return: The num of this GamePeriod.  # noqa: E501
        :rtype: float
        """
        return self._num

    @num.setter
    def num(self, num):
        """Sets the num of this GamePeriod.


        :param num: The num of this GamePeriod.  # noqa: E501
        :type: float
        """

        self._num = num

    @property
    def ordinal_num(self):
        """Gets the ordinal_num of this GamePeriod.  # noqa: E501


        :return: The ordinal_num of this GamePeriod.  # noqa: E501
        :rtype: str
        """
        return self._ordinal_num

    @ordinal_num.setter
    def ordinal_num(self, ordinal_num):
        """Sets the ordinal_num of this GamePeriod.


        :param ordinal_num: The ordinal_num of this GamePeriod.  # noqa: E501
        :type: str
        """

        self._ordinal_num = ordinal_num

    @property
    def home(self):
        """Gets the home of this GamePeriod.  # noqa: E501


        :return: The home of this GamePeriod.  # noqa: E501
        :rtype: GamePeriodHome
        """
        return self._home

    @home.setter
    def home(self, home):
        """Sets the home of this GamePeriod.


        :param home: The home of this GamePeriod.  # noqa: E501
        :type: GamePeriodHome
        """

        self._home = home

    @property
    def away(self):
        """Gets the away of this GamePeriod.  # noqa: E501


        :return: The away of this GamePeriod.  # noqa: E501
        :rtype: GamePeriodAway
        """
        return self._away

    @away.setter
    def away(self, away):
        """Sets the away of this GamePeriod.


        :param away: The away of this GamePeriod.  # noqa: E501
        :type: GamePeriodAway
        """

        self._away = away

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.swagger_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value
        if issubclass(GamePeriod, dict):
            for key, value in self.items():
                result[key] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self):
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, GamePeriod):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        return not self == other
