# coding: utf-8

"""
    Leetcode API

    Leetcode API implementation.  # noqa: E501

    OpenAPI spec version: 1.0.1-1
    Contact: pv.safronov@gmail.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six
from leetcode.models.base_submission_result import BaseSubmissionResult  # noqa: F401,E501

class TestSubmissionResult(BaseSubmissionResult):
    """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 = {
        'code_answer': 'list[str]',
        'correct_answer': 'bool',
        'expected_status_code': 'int',
        'expected_lang': 'str',
        'expected_run_success': 'bool',
        'expected_status_runtime': 'str',
        'expected_memory': 'int',
        'expected_code_answer': 'list[str]',
        'expected_code_output': 'list[str]',
        'expected_elapsed_time': 'int',
        'expected_task_finish_time': 'int'
    }
    if hasattr(BaseSubmissionResult, "swagger_types"):
        swagger_types.update(BaseSubmissionResult.swagger_types)

    attribute_map = {
        'code_answer': 'code_answer',
        'correct_answer': 'correct_answer',
        'expected_status_code': 'expected_status_code',
        'expected_lang': 'expected_lang',
        'expected_run_success': 'expected_run_success',
        'expected_status_runtime': 'expected_status_runtime',
        'expected_memory': 'expected_memory',
        'expected_code_answer': 'expected_code_answer',
        'expected_code_output': 'expected_code_output',
        'expected_elapsed_time': 'expected_elapsed_time',
        'expected_task_finish_time': 'expected_task_finish_time'
    }
    if hasattr(BaseSubmissionResult, "attribute_map"):
        attribute_map.update(BaseSubmissionResult.attribute_map)

    def __init__(self, code_answer=None, correct_answer=None, expected_status_code=None, expected_lang=None, expected_run_success=None, expected_status_runtime=None, expected_memory=None, expected_code_answer=None, expected_code_output=None, expected_elapsed_time=None, expected_task_finish_time=None, *args, **kwargs):  # noqa: E501
        """TestSubmissionResult - a model defined in Swagger"""  # noqa: E501
        self._code_answer = None
        self._correct_answer = None
        self._expected_status_code = None
        self._expected_lang = None
        self._expected_run_success = None
        self._expected_status_runtime = None
        self._expected_memory = None
        self._expected_code_answer = None
        self._expected_code_output = None
        self._expected_elapsed_time = None
        self._expected_task_finish_time = None
        self.discriminator = None
        self.code_answer = code_answer
        if correct_answer is not None:
            self.correct_answer = correct_answer
        if expected_status_code is not None:
            self.expected_status_code = expected_status_code
        if expected_lang is not None:
            self.expected_lang = expected_lang
        if expected_run_success is not None:
            self.expected_run_success = expected_run_success
        if expected_status_runtime is not None:
            self.expected_status_runtime = expected_status_runtime
        if expected_memory is not None:
            self.expected_memory = expected_memory
        if expected_code_answer is not None:
            self.expected_code_answer = expected_code_answer
        if expected_code_output is not None:
            self.expected_code_output = expected_code_output
        if expected_elapsed_time is not None:
            self.expected_elapsed_time = expected_elapsed_time
        if expected_task_finish_time is not None:
            self.expected_task_finish_time = expected_task_finish_time
        BaseSubmissionResult.__init__(self, *args, **kwargs)

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


        :return: The code_answer of this TestSubmissionResult.  # noqa: E501
        :rtype: list[str]
        """
        return self._code_answer

    @code_answer.setter
    def code_answer(self, code_answer):
        """Sets the code_answer of this TestSubmissionResult.


        :param code_answer: The code_answer of this TestSubmissionResult.  # noqa: E501
        :type: list[str]
        """
        if code_answer is None:
            raise ValueError("Invalid value for `code_answer`, must not be `None`")  # noqa: E501

        self._code_answer = code_answer

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


        :return: The correct_answer of this TestSubmissionResult.  # noqa: E501
        :rtype: bool
        """
        return self._correct_answer

    @correct_answer.setter
    def correct_answer(self, correct_answer):
        """Sets the correct_answer of this TestSubmissionResult.


        :param correct_answer: The correct_answer of this TestSubmissionResult.  # noqa: E501
        :type: bool
        """

        self._correct_answer = correct_answer

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


        :return: The expected_status_code of this TestSubmissionResult.  # noqa: E501
        :rtype: int
        """
        return self._expected_status_code

    @expected_status_code.setter
    def expected_status_code(self, expected_status_code):
        """Sets the expected_status_code of this TestSubmissionResult.


        :param expected_status_code: The expected_status_code of this TestSubmissionResult.  # noqa: E501
        :type: int
        """
        allowed_values = [10, 11, 15]  # noqa: E501
        if expected_status_code not in allowed_values:
            raise ValueError(
                "Invalid value for `expected_status_code` ({0}), must be one of {1}"  # noqa: E501
                .format(expected_status_code, allowed_values)
            )

        self._expected_status_code = expected_status_code

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


        :return: The expected_lang of this TestSubmissionResult.  # noqa: E501
        :rtype: str
        """
        return self._expected_lang

    @expected_lang.setter
    def expected_lang(self, expected_lang):
        """Sets the expected_lang of this TestSubmissionResult.


        :param expected_lang: The expected_lang of this TestSubmissionResult.  # noqa: E501
        :type: str
        """

        self._expected_lang = expected_lang

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


        :return: The expected_run_success of this TestSubmissionResult.  # noqa: E501
        :rtype: bool
        """
        return self._expected_run_success

    @expected_run_success.setter
    def expected_run_success(self, expected_run_success):
        """Sets the expected_run_success of this TestSubmissionResult.


        :param expected_run_success: The expected_run_success of this TestSubmissionResult.  # noqa: E501
        :type: bool
        """

        self._expected_run_success = expected_run_success

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


        :return: The expected_status_runtime of this TestSubmissionResult.  # noqa: E501
        :rtype: str
        """
        return self._expected_status_runtime

    @expected_status_runtime.setter
    def expected_status_runtime(self, expected_status_runtime):
        """Sets the expected_status_runtime of this TestSubmissionResult.


        :param expected_status_runtime: The expected_status_runtime of this TestSubmissionResult.  # noqa: E501
        :type: str
        """

        self._expected_status_runtime = expected_status_runtime

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


        :return: The expected_memory of this TestSubmissionResult.  # noqa: E501
        :rtype: int
        """
        return self._expected_memory

    @expected_memory.setter
    def expected_memory(self, expected_memory):
        """Sets the expected_memory of this TestSubmissionResult.


        :param expected_memory: The expected_memory of this TestSubmissionResult.  # noqa: E501
        :type: int
        """

        self._expected_memory = expected_memory

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


        :return: The expected_code_answer of this TestSubmissionResult.  # noqa: E501
        :rtype: list[str]
        """
        return self._expected_code_answer

    @expected_code_answer.setter
    def expected_code_answer(self, expected_code_answer):
        """Sets the expected_code_answer of this TestSubmissionResult.


        :param expected_code_answer: The expected_code_answer of this TestSubmissionResult.  # noqa: E501
        :type: list[str]
        """

        self._expected_code_answer = expected_code_answer

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


        :return: The expected_code_output of this TestSubmissionResult.  # noqa: E501
        :rtype: list[str]
        """
        return self._expected_code_output

    @expected_code_output.setter
    def expected_code_output(self, expected_code_output):
        """Sets the expected_code_output of this TestSubmissionResult.


        :param expected_code_output: The expected_code_output of this TestSubmissionResult.  # noqa: E501
        :type: list[str]
        """

        self._expected_code_output = expected_code_output

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


        :return: The expected_elapsed_time of this TestSubmissionResult.  # noqa: E501
        :rtype: int
        """
        return self._expected_elapsed_time

    @expected_elapsed_time.setter
    def expected_elapsed_time(self, expected_elapsed_time):
        """Sets the expected_elapsed_time of this TestSubmissionResult.


        :param expected_elapsed_time: The expected_elapsed_time of this TestSubmissionResult.  # noqa: E501
        :type: int
        """

        self._expected_elapsed_time = expected_elapsed_time

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


        :return: The expected_task_finish_time of this TestSubmissionResult.  # noqa: E501
        :rtype: int
        """
        return self._expected_task_finish_time

    @expected_task_finish_time.setter
    def expected_task_finish_time(self, expected_task_finish_time):
        """Sets the expected_task_finish_time of this TestSubmissionResult.


        :param expected_task_finish_time: The expected_task_finish_time of this TestSubmissionResult.  # noqa: E501
        :type: int
        """

        self._expected_task_finish_time = expected_task_finish_time

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

        return self.__dict__ == other.__dict__

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