# coding: utf-8

"""
    Clever Data API

    Serves the Clever Data API  # noqa: E501

    OpenAPI spec version: 3.0.0
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from clever_client.configuration import Configuration


class Student(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 = {
        'legacy_id': 'str',
        'created': 'str',
        'credentials': 'Credentials',
        'dob': 'str',
        'ell_status': 'str',
        'enrollments': 'list[SchoolEnrollment]',
        'gender': 'str',
        'graduation_year': 'str',
        'grade': 'str',
        'hispanic_ethnicity': 'str',
        'home_language': 'str',
        'iep_status': 'str',
        'last_modified': 'str',
        'location': 'Location',
        'race': 'str',
        'school': 'str',
        'schools': 'list[str]',
        'sis_id': 'str',
        'state_id': 'str',
        'student_number': 'str',
        'unweighted_gpa': 'str',
        'weighted_gpa': 'str',
        'ext': 'object'
    }

    attribute_map = {
        'legacy_id': 'legacy_id',
        'created': 'created',
        'credentials': 'credentials',
        'dob': 'dob',
        'ell_status': 'ell_status',
        'enrollments': 'enrollments',
        'gender': 'gender',
        'graduation_year': 'graduation_year',
        'grade': 'grade',
        'hispanic_ethnicity': 'hispanic_ethnicity',
        'home_language': 'home_language',
        'iep_status': 'iep_status',
        'last_modified': 'last_modified',
        'location': 'location',
        'race': 'race',
        'school': 'school',
        'schools': 'schools',
        'sis_id': 'sis_id',
        'state_id': 'state_id',
        'student_number': 'student_number',
        'unweighted_gpa': 'unweighted_gpa',
        'weighted_gpa': 'weighted_gpa',
        'ext': 'ext'
    }

    def __init__(self, legacy_id=None, created=None, credentials=None, dob=None, ell_status=None, enrollments=None, gender=None, graduation_year=None, grade=None, hispanic_ethnicity=None, home_language=None, iep_status=None, last_modified=None, location=None, race=None, school=None, schools=None, sis_id=None, state_id=None, student_number=None, unweighted_gpa=None, weighted_gpa=None, ext=None, _configuration=None):  # noqa: E501
        """Student - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._legacy_id = None
        self._created = None
        self._credentials = None
        self._dob = None
        self._ell_status = None
        self._enrollments = None
        self._gender = None
        self._graduation_year = None
        self._grade = None
        self._hispanic_ethnicity = None
        self._home_language = None
        self._iep_status = None
        self._last_modified = None
        self._location = None
        self._race = None
        self._school = None
        self._schools = None
        self._sis_id = None
        self._state_id = None
        self._student_number = None
        self._unweighted_gpa = None
        self._weighted_gpa = None
        self._ext = None
        self.discriminator = None

        if legacy_id is not None:
            self.legacy_id = legacy_id
        if created is not None:
            self.created = created
        if credentials is not None:
            self.credentials = credentials
        if dob is not None:
            self.dob = dob
        if ell_status is not None:
            self.ell_status = ell_status
        if enrollments is not None:
            self.enrollments = enrollments
        if gender is not None:
            self.gender = gender
        if graduation_year is not None:
            self.graduation_year = graduation_year
        if grade is not None:
            self.grade = grade
        if hispanic_ethnicity is not None:
            self.hispanic_ethnicity = hispanic_ethnicity
        if home_language is not None:
            self.home_language = home_language
        if iep_status is not None:
            self.iep_status = iep_status
        if last_modified is not None:
            self.last_modified = last_modified
        if location is not None:
            self.location = location
        if race is not None:
            self.race = race
        if school is not None:
            self.school = school
        if schools is not None:
            self.schools = schools
        if sis_id is not None:
            self.sis_id = sis_id
        if state_id is not None:
            self.state_id = state_id
        if student_number is not None:
            self.student_number = student_number
        if unweighted_gpa is not None:
            self.unweighted_gpa = unweighted_gpa
        if weighted_gpa is not None:
            self.weighted_gpa = weighted_gpa
        if ext is not None:
            self.ext = ext

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


        :return: The legacy_id of this Student.  # noqa: E501
        :rtype: str
        """
        return self._legacy_id

    @legacy_id.setter
    def legacy_id(self, legacy_id):
        """Sets the legacy_id of this Student.


        :param legacy_id: The legacy_id of this Student.  # noqa: E501
        :type: str
        """

        self._legacy_id = legacy_id

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


        :return: The created of this Student.  # noqa: E501
        :rtype: str
        """
        return self._created

    @created.setter
    def created(self, created):
        """Sets the created of this Student.


        :param created: The created of this Student.  # noqa: E501
        :type: str
        """

        self._created = created

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


        :return: The credentials of this Student.  # noqa: E501
        :rtype: Credentials
        """
        return self._credentials

    @credentials.setter
    def credentials(self, credentials):
        """Sets the credentials of this Student.


        :param credentials: The credentials of this Student.  # noqa: E501
        :type: Credentials
        """

        self._credentials = credentials

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


        :return: The dob of this Student.  # noqa: E501
        :rtype: str
        """
        return self._dob

    @dob.setter
    def dob(self, dob):
        """Sets the dob of this Student.


        :param dob: The dob of this Student.  # noqa: E501
        :type: str
        """
        if (self._configuration.client_side_validation and
                dob is not None and not re.search(r'(?:[0-9]{1,2})\/([0-9]{1,2})\/([0-9]{4})', dob)):  # noqa: E501
            raise ValueError(r"Invalid value for `dob`, must be a follow pattern or equal to `/(?:[0-9]{1,2})\/([0-9]{1,2})\/([0-9]{4})/`")  # noqa: E501

        self._dob = dob

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


        :return: The ell_status of this Student.  # noqa: E501
        :rtype: str
        """
        return self._ell_status

    @ell_status.setter
    def ell_status(self, ell_status):
        """Sets the ell_status of this Student.


        :param ell_status: The ell_status of this Student.  # noqa: E501
        :type: str
        """
        allowed_values = ["Y", "N", ""]  # noqa: E501
        if (self._configuration.client_side_validation and
                ell_status not in allowed_values):
            raise ValueError(
                "Invalid value for `ell_status` ({0}), must be one of {1}"  # noqa: E501
                .format(ell_status, allowed_values)
            )

        self._ell_status = ell_status

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


        :return: The enrollments of this Student.  # noqa: E501
        :rtype: list[SchoolEnrollment]
        """
        return self._enrollments

    @enrollments.setter
    def enrollments(self, enrollments):
        """Sets the enrollments of this Student.


        :param enrollments: The enrollments of this Student.  # noqa: E501
        :type: list[SchoolEnrollment]
        """

        self._enrollments = enrollments

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


        :return: The gender of this Student.  # noqa: E501
        :rtype: str
        """
        return self._gender

    @gender.setter
    def gender(self, gender):
        """Sets the gender of this Student.


        :param gender: The gender of this Student.  # noqa: E501
        :type: str
        """
        allowed_values = ["M", "F", "X", ""]  # noqa: E501
        if (self._configuration.client_side_validation and
                gender not in allowed_values):
            raise ValueError(
                "Invalid value for `gender` ({0}), must be one of {1}"  # noqa: E501
                .format(gender, allowed_values)
            )

        self._gender = gender

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


        :return: The graduation_year of this Student.  # noqa: E501
        :rtype: str
        """
        return self._graduation_year

    @graduation_year.setter
    def graduation_year(self, graduation_year):
        """Sets the graduation_year of this Student.


        :param graduation_year: The graduation_year of this Student.  # noqa: E501
        :type: str
        """

        self._graduation_year = graduation_year

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


        :return: The grade of this Student.  # noqa: E501
        :rtype: str
        """
        return self._grade

    @grade.setter
    def grade(self, grade):
        """Sets the grade of this Student.


        :param grade: The grade of this Student.  # noqa: E501
        :type: str
        """
        allowed_values = ["InfantToddler", "Preschool", "PreKindergarten", "TransitionalKindergarten", "Kindergarten", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "PostGraduate", "Ungraded", "Other", ""]  # noqa: E501
        if (self._configuration.client_side_validation and
                grade not in allowed_values):
            raise ValueError(
                "Invalid value for `grade` ({0}), must be one of {1}"  # noqa: E501
                .format(grade, allowed_values)
            )

        self._grade = grade

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


        :return: The hispanic_ethnicity of this Student.  # noqa: E501
        :rtype: str
        """
        return self._hispanic_ethnicity

    @hispanic_ethnicity.setter
    def hispanic_ethnicity(self, hispanic_ethnicity):
        """Sets the hispanic_ethnicity of this Student.


        :param hispanic_ethnicity: The hispanic_ethnicity of this Student.  # noqa: E501
        :type: str
        """
        allowed_values = ["Y", "N", ""]  # noqa: E501
        if (self._configuration.client_side_validation and
                hispanic_ethnicity not in allowed_values):
            raise ValueError(
                "Invalid value for `hispanic_ethnicity` ({0}), must be one of {1}"  # noqa: E501
                .format(hispanic_ethnicity, allowed_values)
            )

        self._hispanic_ethnicity = hispanic_ethnicity

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


        :return: The home_language of this Student.  # noqa: E501
        :rtype: str
        """
        return self._home_language

    @home_language.setter
    def home_language(self, home_language):
        """Sets the home_language of this Student.


        :param home_language: The home_language of this Student.  # noqa: E501
        :type: str
        """
        allowed_values = ["English", "Albanian", "Amharic", "Arabic", "Bengali", "Bosnian", "Burmese", "Cantonese", "Chinese", "Dutch", "Farsi", "French", "German", "Hebrew", "Hindi", "Hmong", "Ilocano", "Japanese", "Javanese", "Karen", "Khmer", "Korean", "Laotian", "Latvian", "Malay", "Mandarin", "Nepali", "Oromo", "Polish", "Portuguese", "Punjabi", "Romanian", "Russian", "Samoan", "Serbian", "Somali", "Spanish", "Swahili", "Tagalog", "Tamil", "Telugu", "Thai", "Tigrinya", "Turkish", "Ukrainian", "Urdu", "Vietnamese", ""]  # noqa: E501
        if (self._configuration.client_side_validation and
                home_language not in allowed_values):
            raise ValueError(
                "Invalid value for `home_language` ({0}), must be one of {1}"  # noqa: E501
                .format(home_language, allowed_values)
            )

        self._home_language = home_language

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


        :return: The iep_status of this Student.  # noqa: E501
        :rtype: str
        """
        return self._iep_status

    @iep_status.setter
    def iep_status(self, iep_status):
        """Sets the iep_status of this Student.


        :param iep_status: The iep_status of this Student.  # noqa: E501
        :type: str
        """

        self._iep_status = iep_status

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


        :return: The last_modified of this Student.  # noqa: E501
        :rtype: str
        """
        return self._last_modified

    @last_modified.setter
    def last_modified(self, last_modified):
        """Sets the last_modified of this Student.


        :param last_modified: The last_modified of this Student.  # noqa: E501
        :type: str
        """

        self._last_modified = last_modified

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


        :return: The location of this Student.  # noqa: E501
        :rtype: Location
        """
        return self._location

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


        :param location: The location of this Student.  # noqa: E501
        :type: Location
        """

        self._location = location

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


        :return: The race of this Student.  # noqa: E501
        :rtype: str
        """
        return self._race

    @race.setter
    def race(self, race):
        """Sets the race of this Student.


        :param race: The race of this Student.  # noqa: E501
        :type: str
        """
        allowed_values = ["Caucasian", "Asian", "Black or African American", "American Indian", "Hawaiian or Other Pacific Islander", "Two or More Races", "Unknown", ""]  # noqa: E501
        if (self._configuration.client_side_validation and
                race not in allowed_values):
            raise ValueError(
                "Invalid value for `race` ({0}), must be one of {1}"  # noqa: E501
                .format(race, allowed_values)
            )

        self._race = race

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


        :return: The school of this Student.  # noqa: E501
        :rtype: str
        """
        return self._school

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


        :param school: The school of this Student.  # noqa: E501
        :type: str
        """

        self._school = school

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


        :return: The schools of this Student.  # noqa: E501
        :rtype: list[str]
        """
        return self._schools

    @schools.setter
    def schools(self, schools):
        """Sets the schools of this Student.


        :param schools: The schools of this Student.  # noqa: E501
        :type: list[str]
        """

        self._schools = schools

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


        :return: The sis_id of this Student.  # noqa: E501
        :rtype: str
        """
        return self._sis_id

    @sis_id.setter
    def sis_id(self, sis_id):
        """Sets the sis_id of this Student.


        :param sis_id: The sis_id of this Student.  # noqa: E501
        :type: str
        """

        self._sis_id = sis_id

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


        :return: The state_id of this Student.  # noqa: E501
        :rtype: str
        """
        return self._state_id

    @state_id.setter
    def state_id(self, state_id):
        """Sets the state_id of this Student.


        :param state_id: The state_id of this Student.  # noqa: E501
        :type: str
        """

        self._state_id = state_id

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


        :return: The student_number of this Student.  # noqa: E501
        :rtype: str
        """
        return self._student_number

    @student_number.setter
    def student_number(self, student_number):
        """Sets the student_number of this Student.


        :param student_number: The student_number of this Student.  # noqa: E501
        :type: str
        """

        self._student_number = student_number

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


        :return: The unweighted_gpa of this Student.  # noqa: E501
        :rtype: str
        """
        return self._unweighted_gpa

    @unweighted_gpa.setter
    def unweighted_gpa(self, unweighted_gpa):
        """Sets the unweighted_gpa of this Student.


        :param unweighted_gpa: The unweighted_gpa of this Student.  # noqa: E501
        :type: str
        """

        self._unweighted_gpa = unweighted_gpa

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


        :return: The weighted_gpa of this Student.  # noqa: E501
        :rtype: str
        """
        return self._weighted_gpa

    @weighted_gpa.setter
    def weighted_gpa(self, weighted_gpa):
        """Sets the weighted_gpa of this Student.


        :param weighted_gpa: The weighted_gpa of this Student.  # noqa: E501
        :type: str
        """

        self._weighted_gpa = weighted_gpa

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


        :return: The ext of this Student.  # noqa: E501
        :rtype: object
        """
        return self._ext

    @ext.setter
    def ext(self, ext):
        """Sets the ext of this Student.


        :param ext: The ext of this Student.  # noqa: E501
        :type: object
        """

        self._ext = ext

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

        return self.to_dict() == other.to_dict()

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

        return self.to_dict() != other.to_dict()
