# coding: utf-8

"""
    CodeChef API

    CodeChef API to support different applications.  # 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 Submission(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 = {
        'id': 'int',
        'problem_code': 'str',
        'contest_code': 'str',
        'language': 'str',
        'result': 'str',
        'username': 'str',
        'date': 'str',
        'time': 'str',
        'memory': 'int'
    }

    attribute_map = {
        'id': 'id',
        'problem_code': 'problemCode',
        'contest_code': 'contestCode',
        'language': 'language',
        'result': 'result',
        'username': 'username',
        'date': 'date',
        'time': 'time',
        'memory': 'memory'
    }

    def __init__(self, id=None, problem_code=None, contest_code=None, language=None, result=None, username=None, date=None, time=None, memory=None):  # noqa: E501
        """Submission - a model defined in Swagger"""  # noqa: E501

        self._id = None
        self._problem_code = None
        self._contest_code = None
        self._language = None
        self._result = None
        self._username = None
        self._date = None
        self._time = None
        self._memory = None
        self.discriminator = None

        if id is not None:
            self.id = id
        if problem_code is not None:
            self.problem_code = problem_code
        if contest_code is not None:
            self.contest_code = contest_code
        if language is not None:
            self.language = language
        if result is not None:
            self.result = result
        if username is not None:
            self.username = username
        if date is not None:
            self.date = date
        if time is not None:
            self.time = time
        if memory is not None:
            self.memory = memory

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

        Submission Id.  # noqa: E501

        :return: The id of this Submission.  # noqa: E501
        :rtype: int
        """
        return self._id

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

        Submission Id.  # noqa: E501

        :param id: The id of this Submission.  # noqa: E501
        :type: int
        """

        self._id = id

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


        :return: The problem_code of this Submission.  # noqa: E501
        :rtype: str
        """
        return self._problem_code

    @problem_code.setter
    def problem_code(self, problem_code):
        """Sets the problem_code of this Submission.


        :param problem_code: The problem_code of this Submission.  # noqa: E501
        :type: str
        """

        self._problem_code = problem_code

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


        :return: The contest_code of this Submission.  # noqa: E501
        :rtype: str
        """
        return self._contest_code

    @contest_code.setter
    def contest_code(self, contest_code):
        """Sets the contest_code of this Submission.


        :param contest_code: The contest_code of this Submission.  # noqa: E501
        :type: str
        """

        self._contest_code = contest_code

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


        :return: The language of this Submission.  # noqa: E501
        :rtype: str
        """
        return self._language

    @language.setter
    def language(self, language):
        """Sets the language of this Submission.


        :param language: The language of this Submission.  # noqa: E501
        :type: str
        """

        self._language = language

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


        :return: The result of this Submission.  # noqa: E501
        :rtype: str
        """
        return self._result

    @result.setter
    def result(self, result):
        """Sets the result of this Submission.


        :param result: The result of this Submission.  # noqa: E501
        :type: str
        """

        self._result = result

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


        :return: The username of this Submission.  # noqa: E501
        :rtype: str
        """
        return self._username

    @username.setter
    def username(self, username):
        """Sets the username of this Submission.


        :param username: The username of this Submission.  # noqa: E501
        :type: str
        """

        self._username = username

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

        Time of submission  # noqa: E501

        :return: The date of this Submission.  # noqa: E501
        :rtype: str
        """
        return self._date

    @date.setter
    def date(self, date):
        """Sets the date of this Submission.

        Time of submission  # noqa: E501

        :param date: The date of this Submission.  # noqa: E501
        :type: str
        """

        self._date = date

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

        Time taken in milliseconds.  # noqa: E501

        :return: The time of this Submission.  # noqa: E501
        :rtype: str
        """
        return self._time

    @time.setter
    def time(self, time):
        """Sets the time of this Submission.

        Time taken in milliseconds.  # noqa: E501

        :param time: The time of this Submission.  # noqa: E501
        :type: str
        """

        self._time = time

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

        Total Memory consumed in bytes.  # noqa: E501

        :return: The memory of this Submission.  # noqa: E501
        :rtype: int
        """
        return self._memory

    @memory.setter
    def memory(self, memory):
        """Sets the memory of this Submission.

        Total Memory consumed in bytes.  # noqa: E501

        :param memory: The memory of this Submission.  # noqa: E501
        :type: int
        """

        self._memory = memory

    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

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

        return self.__dict__ == other.__dict__

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