# 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 ClassType(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',
        'class_code': 'str',
        'class_type': 'str',
        'location': 'str',
        'grades': 'list[str]',
        'subjects': 'list[str]',
        'course': 'GUIDRefType',
        'school': 'GUIDRefType',
        'terms': 'list[GUIDRefType]',
        'subject_codes': 'list[str]',
        'periods': 'str',
        'resources': 'list[GUIDRefType]'
    }
    if hasattr(BaseType, "swagger_types"):
        swagger_types.update(BaseType.swagger_types)

    attribute_map = {
        'title': 'title',
        'class_code': 'classCode',
        'class_type': 'classType',
        'location': 'location',
        'grades': 'grades',
        'subjects': 'subjects',
        'course': 'course',
        'school': 'school',
        'terms': 'terms',
        'subject_codes': 'subjectCodes',
        'periods': 'periods',
        'resources': 'resources'
    }
    if hasattr(BaseType, "attribute_map"):
        attribute_map.update(BaseType.attribute_map)

    def __init__(self, title=None, class_code=None, class_type=None, location=None, grades=None, subjects=None, course=None, school=None, terms=None, subject_codes=None, periods=None, resources=None, *args, **kwargs):  # noqa: E501
        """ClassType - a model defined in Swagger"""  # noqa: E501
        self._title = None
        self._class_code = None
        self._class_type = None
        self._location = None
        self._grades = None
        self._subjects = None
        self._course = None
        self._school = None
        self._terms = None
        self._subject_codes = None
        self._periods = None
        self._resources = None
        self.discriminator = None
        self.title = title
        if class_code is not None:
            self.class_code = class_code
        if class_type is not None:
            self.class_type = class_type
        if location is not None:
            self.location = location
        if grades is not None:
            self.grades = grades
        if subjects is not None:
            self.subjects = subjects
        if course is not None:
            self.course = course
        self.school = school
        if terms is not None:
            self.terms = terms
        if subject_codes is not None:
            self.subject_codes = subject_codes
        if periods is not None:
            self.periods = periods
        if resources is not None:
            self.resources = resources
        BaseType.__init__(self, *args, **kwargs)

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

        Model Primitive Datatype = NormalizedString  # noqa: E501

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

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

        Model Primitive Datatype = NormalizedString  # noqa: E501

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

        Model Primitive Datatype = NormalizedString  # noqa: E501

        :return: The class_code of this ClassType.  # noqa: E501
        :rtype: str
        """
        return self._class_code

    @class_code.setter
    def class_code(self, class_code):
        """Sets the class_code of this ClassType.

        Model Primitive Datatype = NormalizedString  # noqa: E501

        :param class_code: The class_code of this ClassType.  # noqa: E501
        :type: str
        """

        self._class_code = class_code

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


        :return: The class_type of this ClassType.  # noqa: E501
        :rtype: str
        """
        return self._class_type

    @class_type.setter
    def class_type(self, class_type):
        """Sets the class_type of this ClassType.


        :param class_type: The class_type of this ClassType.  # noqa: E501
        :type: str
        """
        allowed_values = ["homeroom", "scheduled"]  # noqa: E501
        if class_type not in allowed_values:
            raise ValueError(
                "Invalid value for `class_type` ({0}), must be one of {1}"  # noqa: E501
                .format(class_type, allowed_values)
            )

        self._class_type = class_type

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

        Model Primitive Datatype = NormalizedString  # noqa: E501

        :return: The location of this ClassType.  # noqa: E501
        :rtype: str
        """
        return self._location

    @location.setter
    def location(self, location):
        """Sets the location of this ClassType.

        Model Primitive Datatype = NormalizedString  # noqa: E501

        :param location: The location of this ClassType.  # noqa: E501
        :type: str
        """

        self._location = location

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

        Model Primitive Datatype = NormalizedString  # noqa: E501

        :return: The grades of this ClassType.  # noqa: E501
        :rtype: list[str]
        """
        return self._grades

    @grades.setter
    def grades(self, grades):
        """Sets the grades of this ClassType.

        Model Primitive Datatype = NormalizedString  # noqa: E501

        :param grades: The grades of this ClassType.  # noqa: E501
        :type: list[str]
        """

        self._grades = grades

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

        Model Primitive Datatype = NormalizedString  # noqa: E501

        :return: The subjects of this ClassType.  # noqa: E501
        :rtype: list[str]
        """
        return self._subjects

    @subjects.setter
    def subjects(self, subjects):
        """Sets the subjects of this ClassType.

        Model Primitive Datatype = NormalizedString  # noqa: E501

        :param subjects: The subjects of this ClassType.  # noqa: E501
        :type: list[str]
        """

        self._subjects = subjects

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


        :return: The course of this ClassType.  # noqa: E501
        :rtype: GUIDRefType
        """
        return self._course

    @course.setter
    def course(self, course):
        """Sets the course of this ClassType.


        :param course: The course of this ClassType.  # noqa: E501
        :type: GUIDRefType
        """

        self._course = course

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


        :return: The school of this ClassType.  # noqa: E501
        :rtype: GUIDRefType
        """
        return self._school

    @school.setter
    def school(self, school):
        """Sets the school of this ClassType.


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

        self._school = school

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


        :return: The terms of this ClassType.  # noqa: E501
        :rtype: list[GUIDRefType]
        """
        return self._terms

    @terms.setter
    def terms(self, terms):
        """Sets the terms of this ClassType.


        :param terms: The terms of this ClassType.  # noqa: E501
        :type: list[GUIDRefType]
        """

        self._terms = terms

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

        Model Primitive Datatype = NormalizedString  # noqa: E501

        :return: The subject_codes of this ClassType.  # noqa: E501
        :rtype: list[str]
        """
        return self._subject_codes

    @subject_codes.setter
    def subject_codes(self, subject_codes):
        """Sets the subject_codes of this ClassType.

        Model Primitive Datatype = NormalizedString  # noqa: E501

        :param subject_codes: The subject_codes of this ClassType.  # noqa: E501
        :type: list[str]
        """

        self._subject_codes = subject_codes

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

        Model Primitive Datatype = NormalizedString  # noqa: E501

        :return: The periods of this ClassType.  # noqa: E501
        :rtype: str
        """
        return self._periods

    @periods.setter
    def periods(self, periods):
        """Sets the periods of this ClassType.

        Model Primitive Datatype = NormalizedString  # noqa: E501

        :param periods: The periods of this ClassType.  # noqa: E501
        :type: str
        """

        self._periods = periods

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


        :return: The resources of this ClassType.  # noqa: E501
        :rtype: list[GUIDRefType]
        """
        return self._resources

    @resources.setter
    def resources(self, resources):
        """Sets the resources of this ClassType.


        :param resources: The resources of this ClassType.  # noqa: E501
        :type: list[GUIDRefType]
        """

        self._resources = resources

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

        return self.__dict__ == other.__dict__

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