# coding: utf-8

"""
    OneRoster OpenAPI (JSON) Definition

    The OneRoster service binding is available in WSDL/XSD and REST/JSON. The model is based upon the IMS PSM modelling approach.  # noqa: E501

    OpenAPI spec version: 1.1
    Contact: platform@strongmind.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six
from oneroster_client.models.base_type import BaseType  # noqa: F401,E501

class ResultType(BaseType):
    """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 = {
        'line_item': 'GUIDRefType',
        'student': 'GUIDRefType',
        'score_status': 'str',
        'score': 'float',
        'score_date': 'date',
        'comment': 'str'
    }
    if hasattr(BaseType, "swagger_types"):
        swagger_types.update(BaseType.swagger_types)

    attribute_map = {
        'line_item': 'lineItem',
        'student': 'student',
        'score_status': 'scoreStatus',
        'score': 'score',
        'score_date': 'scoreDate',
        'comment': 'comment'
    }
    if hasattr(BaseType, "attribute_map"):
        attribute_map.update(BaseType.attribute_map)

    def __init__(self, line_item=None, student=None, score_status=None, score=None, score_date=None, comment=None, *args, **kwargs):  # noqa: E501
        """ResultType - a model defined in Swagger"""  # noqa: E501
        self._line_item = None
        self._student = None
        self._score_status = None
        self._score = None
        self._score_date = None
        self._comment = None
        self.discriminator = None
        self.line_item = line_item
        self.student = student
        self.score_status = score_status
        self.score = score
        self.score_date = score_date
        if comment is not None:
            self.comment = comment
        BaseType.__init__(self, *args, **kwargs)

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


        :return: The line_item of this ResultType.  # noqa: E501
        :rtype: GUIDRefType
        """
        return self._line_item

    @line_item.setter
    def line_item(self, line_item):
        """Sets the line_item of this ResultType.


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

        self._line_item = line_item

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


        :return: The student of this ResultType.  # noqa: E501
        :rtype: GUIDRefType
        """
        return self._student

    @student.setter
    def student(self, student):
        """Sets the student of this ResultType.


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

        self._student = student

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


        :return: The score_status of this ResultType.  # noqa: E501
        :rtype: str
        """
        return self._score_status

    @score_status.setter
    def score_status(self, score_status):
        """Sets the score_status of this ResultType.


        :param score_status: The score_status of this ResultType.  # noqa: E501
        :type: str
        """
        if score_status is None:
            raise ValueError("Invalid value for `score_status`, must not be `None`")  # noqa: E501
        allowed_values = ["exempt", "fully graded", "not submmitted", "partially graded", "submitted"]  # noqa: E501
        if score_status not in allowed_values:
            raise ValueError(
                "Invalid value for `score_status` ({0}), must be one of {1}"  # noqa: E501
                .format(score_status, allowed_values)
            )

        self._score_status = score_status

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

        Model Primitive Datatype = Float  # noqa: E501

        :return: The score of this ResultType.  # noqa: E501
        :rtype: float
        """
        return self._score

    @score.setter
    def score(self, score):
        """Sets the score of this ResultType.

        Model Primitive Datatype = Float  # noqa: E501

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

        self._score = score

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

        Model Primitive Datatype = Date  # noqa: E501

        :return: The score_date of this ResultType.  # noqa: E501
        :rtype: date
        """
        return self._score_date

    @score_date.setter
    def score_date(self, score_date):
        """Sets the score_date of this ResultType.

        Model Primitive Datatype = Date  # noqa: E501

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

        self._score_date = score_date

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

        Model Primitive Datatype = String  # noqa: E501

        :return: The comment of this ResultType.  # noqa: E501
        :rtype: str
        """
        return self._comment

    @comment.setter
    def comment(self, comment):
        """Sets the comment of this ResultType.

        Model Primitive Datatype = String  # noqa: E501

        :param comment: The comment of this ResultType.  # noqa: E501
        :type: str
        """

        self._comment = comment

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

        return self.__dict__ == other.__dict__

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