# coding: utf-8

"""
    Signate API

    API for Signate  # 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 Competition(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 = {
        'competition_id': 'int',
        'title': 'str',
        'closing': 'datetime',
        'prize': 'str',
        'participants': 'int'
    }

    attribute_map = {
        'competition_id': 'competitionId',
        'title': 'title',
        'closing': 'closing',
        'prize': 'prize',
        'participants': 'participants'
    }

    def __init__(self, competition_id=None, title=None, closing=None, prize=None, participants=None):  # noqa: E501
        """Competition - a model defined in Swagger"""  # noqa: E501

        self._competition_id = None
        self._title = None
        self._closing = None
        self._prize = None
        self._participants = None
        self.discriminator = None

        self.competition_id = competition_id
        self.title = title
        if closing is not None:
            self.closing = closing
        if prize is not None:
            self.prize = prize
        if participants is not None:
            self.participants = participants

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


        :return: The competition_id of this Competition.  # noqa: E501
        :rtype: int
        """
        return self._competition_id

    @competition_id.setter
    def competition_id(self, competition_id):
        """Sets the competition_id of this Competition.


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

        self._competition_id = competition_id

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


        :return: The title of this Competition.  # noqa: E501
        :rtype: str
        """
        return self._title

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


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

        self._title = title

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


        :return: The closing of this Competition.  # noqa: E501
        :rtype: datetime
        """
        return self._closing

    @closing.setter
    def closing(self, closing):
        """Sets the closing of this Competition.


        :param closing: The closing of this Competition.  # noqa: E501
        :type: datetime
        """

        self._closing = closing

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


        :return: The prize of this Competition.  # noqa: E501
        :rtype: str
        """
        return self._prize

    @prize.setter
    def prize(self, prize):
        """Sets the prize of this Competition.


        :param prize: The prize of this Competition.  # noqa: E501
        :type: str
        """

        self._prize = prize

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


        :return: The participants of this Competition.  # noqa: E501
        :rtype: int
        """
        return self._participants

    @participants.setter
    def participants(self, participants):
        """Sets the participants of this Competition.


        :param participants: The participants of this Competition.  # noqa: E501
        :type: int
        """

        self._participants = participants

    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(Competition, 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, Competition):
            return False

        return self.__dict__ == other.__dict__

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