# coding: utf-8

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

from typing import List, Dict  # noqa: F401

from openapi_server.models.base_model_ import Model
from openapi_server.models.platform import Platform
from openapi_server import util

from openapi_server.models.platform import Platform  # 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, title=None, release_year=None, platforms=None):  # noqa: E501
        """Game - a model defined in OpenAPI

        :param title: The title of this Game.  # noqa: E501
        :type title: str
        :param release_year: The release_year of this Game.  # noqa: E501
        :type release_year: int
        :param platforms: The platforms of this Game.  # noqa: E501
        :type platforms: List[Platform]
        """
        self.openapi_types = {
            'title': str,
            'release_year': int,
            'platforms': List[Platform]
        }

        self.attribute_map = {
            'title': 'title',
            'release_year': 'releaseYear',
            'platforms': 'platforms'
        }

        self._title = title
        self._release_year = release_year
        self._platforms = platforms

    @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 title(self):
        """Gets the title of this Game.

        Game title  # noqa: E501

        :return: The title of this Game.
        :rtype: str
        """
        return self._title

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

        Game title  # noqa: E501

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

        self._title = title

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

        Game release year  # noqa: E501

        :return: The release_year of this Game.
        :rtype: int
        """
        return self._release_year

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

        Game release year  # noqa: E501

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

        self._release_year = release_year

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

        Platforms game was released to  # noqa: E501

        :return: The platforms of this Game.
        :rtype: List[Platform]
        """
        return self._platforms

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

        Platforms game was released to  # noqa: E501

        :param platforms: The platforms of this Game.
        :type platforms: List[Platform]
        """
        if platforms is None:
            raise ValueError("Invalid value for `platforms`, must not be `None`")  # noqa: E501

        self._platforms = platforms
