# 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 LineItemType(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 = {
        'title': 'str',
        'description': 'str',
        'assign_date': 'datetime',
        'due_date': 'datetime',
        '_class': 'GUIDRefType',
        'category': 'GUIDRefType',
        'grading_period': 'GUIDRefType',
        'result_value_min': 'float',
        'result_value_max': 'float'
    }
    if hasattr(BaseType, "swagger_types"):
        swagger_types.update(BaseType.swagger_types)

    attribute_map = {
        'title': 'title',
        'description': 'description',
        'assign_date': 'assignDate',
        'due_date': 'dueDate',
        '_class': 'class',
        'category': 'category',
        'grading_period': 'gradingPeriod',
        'result_value_min': 'resultValueMin',
        'result_value_max': 'resultValueMax'
    }
    if hasattr(BaseType, "attribute_map"):
        attribute_map.update(BaseType.attribute_map)

    def __init__(self, title=None, description=None, assign_date=None, due_date=None, _class=None, category=None, grading_period=None, result_value_min=None, result_value_max=None, *args, **kwargs):  # noqa: E501
        """LineItemType - a model defined in Swagger"""  # noqa: E501
        self._title = None
        self._description = None
        self._assign_date = None
        self._due_date = None
        self.__class = None
        self._category = None
        self._grading_period = None
        self._result_value_min = None
        self._result_value_max = None
        self.discriminator = None
        self.title = title
        if description is not None:
            self.description = description
        self.assign_date = assign_date
        if due_date is not None:
            self.due_date = due_date
        self._class = _class
        self.category = category
        if grading_period is not None:
            self.grading_period = grading_period
        self.result_value_min = result_value_min
        if result_value_max is not None:
            self.result_value_max = result_value_max
        BaseType.__init__(self, *args, **kwargs)

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

        Model Primitive Datatype = NormalizedString  # noqa: E501

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

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

        Model Primitive Datatype = NormalizedString  # noqa: E501

        :param title: The title of this LineItemType.  # 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 description(self):
        """Gets the description of this LineItemType.  # noqa: E501

        Model Primitive Datatype = String  # noqa: E501

        :return: The description of this LineItemType.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this LineItemType.

        Model Primitive Datatype = String  # noqa: E501

        :param description: The description of this LineItemType.  # noqa: E501
        :type: str
        """

        self._description = description

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

        Model Primitive Datatype = DateTime  # noqa: E501

        :return: The assign_date of this LineItemType.  # noqa: E501
        :rtype: datetime
        """
        return self._assign_date

    @assign_date.setter
    def assign_date(self, assign_date):
        """Sets the assign_date of this LineItemType.

        Model Primitive Datatype = DateTime  # noqa: E501

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

        self._assign_date = assign_date

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

        Model Primitive Datatype = DateTime  # noqa: E501

        :return: The due_date of this LineItemType.  # noqa: E501
        :rtype: datetime
        """
        return self._due_date

    @due_date.setter
    def due_date(self, due_date):
        """Sets the due_date of this LineItemType.

        Model Primitive Datatype = DateTime  # noqa: E501

        :param due_date: The due_date of this LineItemType.  # noqa: E501
        :type: datetime
        """

        self._due_date = due_date

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


        :return: The _class of this LineItemType.  # noqa: E501
        :rtype: GUIDRefType
        """
        return self.__class

    @_class.setter
    def _class(self, _class):
        """Sets the _class of this LineItemType.


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

        self.__class = _class

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


        :return: The category of this LineItemType.  # noqa: E501
        :rtype: GUIDRefType
        """
        return self._category

    @category.setter
    def category(self, category):
        """Sets the category of this LineItemType.


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

        self._category = category

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


        :return: The grading_period of this LineItemType.  # noqa: E501
        :rtype: GUIDRefType
        """
        return self._grading_period

    @grading_period.setter
    def grading_period(self, grading_period):
        """Sets the grading_period of this LineItemType.


        :param grading_period: The grading_period of this LineItemType.  # noqa: E501
        :type: GUIDRefType
        """

        self._grading_period = grading_period

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

        Model Primitive Datatype = Float  # noqa: E501

        :return: The result_value_min of this LineItemType.  # noqa: E501
        :rtype: float
        """
        return self._result_value_min

    @result_value_min.setter
    def result_value_min(self, result_value_min):
        """Sets the result_value_min of this LineItemType.

        Model Primitive Datatype = Float  # noqa: E501

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

        self._result_value_min = result_value_min

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

        Model Primitive Datatype = Float  # noqa: E501

        :return: The result_value_max of this LineItemType.  # noqa: E501
        :rtype: float
        """
        return self._result_value_max

    @result_value_max.setter
    def result_value_max(self, result_value_max):
        """Sets the result_value_max of this LineItemType.

        Model Primitive Datatype = Float  # noqa: E501

        :param result_value_max: The result_value_max of this LineItemType.  # noqa: E501
        :type: float
        """

        self._result_value_max = result_value_max

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

        return self.__dict__ == other.__dict__

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