# 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 DemographicType(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 = {
        'birth_date': 'date',
        'sex': 'str',
        'american_indian_or_alaska_native': 'bool',
        'asian': 'bool',
        'black_or_african_american': 'bool',
        'native_hawaiian_or_other_pacific_islander': 'bool',
        'white': 'bool',
        'demographic_race_two_or_more_races': 'bool',
        'hispanic_or_latino_ethnicity': 'bool',
        'country_of_birth_code': 'str',
        'state_of_birth_abbreviation': 'str',
        'city_of_birth': 'str',
        'public_school_residence_status': 'str'
    }
    if hasattr(BaseType, "swagger_types"):
        swagger_types.update(BaseType.swagger_types)

    attribute_map = {
        'birth_date': 'birthDate',
        'sex': 'sex',
        'american_indian_or_alaska_native': 'americanIndianOrAlaskaNative',
        'asian': 'asian',
        'black_or_african_american': 'blackOrAfricanAmerican',
        'native_hawaiian_or_other_pacific_islander': 'nativeHawaiianOrOtherPacificIslander',
        'white': 'white',
        'demographic_race_two_or_more_races': 'demographicRaceTwoOrMoreRaces',
        'hispanic_or_latino_ethnicity': 'hispanicOrLatinoEthnicity',
        'country_of_birth_code': 'countryOfBirthCode',
        'state_of_birth_abbreviation': 'stateOfBirthAbbreviation',
        'city_of_birth': 'cityOfBirth',
        'public_school_residence_status': 'publicSchoolResidenceStatus'
    }
    if hasattr(BaseType, "attribute_map"):
        attribute_map.update(BaseType.attribute_map)

    def __init__(self, birth_date=None, sex=None, american_indian_or_alaska_native=None, asian=None, black_or_african_american=None, native_hawaiian_or_other_pacific_islander=None, white=None, demographic_race_two_or_more_races=None, hispanic_or_latino_ethnicity=None, country_of_birth_code=None, state_of_birth_abbreviation=None, city_of_birth=None, public_school_residence_status=None, *args, **kwargs):  # noqa: E501
        """DemographicType - a model defined in Swagger"""  # noqa: E501
        self._birth_date = None
        self._sex = None
        self._american_indian_or_alaska_native = None
        self._asian = None
        self._black_or_african_american = None
        self._native_hawaiian_or_other_pacific_islander = None
        self._white = None
        self._demographic_race_two_or_more_races = None
        self._hispanic_or_latino_ethnicity = None
        self._country_of_birth_code = None
        self._state_of_birth_abbreviation = None
        self._city_of_birth = None
        self._public_school_residence_status = None
        self.discriminator = None
        if birth_date is not None:
            self.birth_date = birth_date
        if sex is not None:
            self.sex = sex
        if american_indian_or_alaska_native is not None:
            self.american_indian_or_alaska_native = american_indian_or_alaska_native
        if asian is not None:
            self.asian = asian
        if black_or_african_american is not None:
            self.black_or_african_american = black_or_african_american
        if native_hawaiian_or_other_pacific_islander is not None:
            self.native_hawaiian_or_other_pacific_islander = native_hawaiian_or_other_pacific_islander
        if white is not None:
            self.white = white
        if demographic_race_two_or_more_races is not None:
            self.demographic_race_two_or_more_races = demographic_race_two_or_more_races
        if hispanic_or_latino_ethnicity is not None:
            self.hispanic_or_latino_ethnicity = hispanic_or_latino_ethnicity
        if country_of_birth_code is not None:
            self.country_of_birth_code = country_of_birth_code
        if state_of_birth_abbreviation is not None:
            self.state_of_birth_abbreviation = state_of_birth_abbreviation
        if city_of_birth is not None:
            self.city_of_birth = city_of_birth
        if public_school_residence_status is not None:
            self.public_school_residence_status = public_school_residence_status
        BaseType.__init__(self, *args, **kwargs)

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

        Model Primitive Datatype = Date  # noqa: E501

        :return: The birth_date of this DemographicType.  # noqa: E501
        :rtype: date
        """
        return self._birth_date

    @birth_date.setter
    def birth_date(self, birth_date):
        """Sets the birth_date of this DemographicType.

        Model Primitive Datatype = Date  # noqa: E501

        :param birth_date: The birth_date of this DemographicType.  # noqa: E501
        :type: date
        """

        self._birth_date = birth_date

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


        :return: The sex of this DemographicType.  # noqa: E501
        :rtype: str
        """
        return self._sex

    @sex.setter
    def sex(self, sex):
        """Sets the sex of this DemographicType.


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

        self._sex = sex

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

        Model Primitive Datatype = Boolean  # noqa: E501

        :return: The american_indian_or_alaska_native of this DemographicType.  # noqa: E501
        :rtype: bool
        """
        return self._american_indian_or_alaska_native

    @american_indian_or_alaska_native.setter
    def american_indian_or_alaska_native(self, american_indian_or_alaska_native):
        """Sets the american_indian_or_alaska_native of this DemographicType.

        Model Primitive Datatype = Boolean  # noqa: E501

        :param american_indian_or_alaska_native: The american_indian_or_alaska_native of this DemographicType.  # noqa: E501
        :type: bool
        """

        self._american_indian_or_alaska_native = american_indian_or_alaska_native

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

        Model Primitive Datatype = Boolean  # noqa: E501

        :return: The asian of this DemographicType.  # noqa: E501
        :rtype: bool
        """
        return self._asian

    @asian.setter
    def asian(self, asian):
        """Sets the asian of this DemographicType.

        Model Primitive Datatype = Boolean  # noqa: E501

        :param asian: The asian of this DemographicType.  # noqa: E501
        :type: bool
        """

        self._asian = asian

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

        Model Primitive Datatype = Boolean  # noqa: E501

        :return: The black_or_african_american of this DemographicType.  # noqa: E501
        :rtype: bool
        """
        return self._black_or_african_american

    @black_or_african_american.setter
    def black_or_african_american(self, black_or_african_american):
        """Sets the black_or_african_american of this DemographicType.

        Model Primitive Datatype = Boolean  # noqa: E501

        :param black_or_african_american: The black_or_african_american of this DemographicType.  # noqa: E501
        :type: bool
        """

        self._black_or_african_american = black_or_african_american

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

        Model Primitive Datatype = Boolean  # noqa: E501

        :return: The native_hawaiian_or_other_pacific_islander of this DemographicType.  # noqa: E501
        :rtype: bool
        """
        return self._native_hawaiian_or_other_pacific_islander

    @native_hawaiian_or_other_pacific_islander.setter
    def native_hawaiian_or_other_pacific_islander(self, native_hawaiian_or_other_pacific_islander):
        """Sets the native_hawaiian_or_other_pacific_islander of this DemographicType.

        Model Primitive Datatype = Boolean  # noqa: E501

        :param native_hawaiian_or_other_pacific_islander: The native_hawaiian_or_other_pacific_islander of this DemographicType.  # noqa: E501
        :type: bool
        """

        self._native_hawaiian_or_other_pacific_islander = native_hawaiian_or_other_pacific_islander

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

        Model Primitive Datatype = Boolean  # noqa: E501

        :return: The white of this DemographicType.  # noqa: E501
        :rtype: bool
        """
        return self._white

    @white.setter
    def white(self, white):
        """Sets the white of this DemographicType.

        Model Primitive Datatype = Boolean  # noqa: E501

        :param white: The white of this DemographicType.  # noqa: E501
        :type: bool
        """

        self._white = white

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

        Model Primitive Datatype = Boolean  # noqa: E501

        :return: The demographic_race_two_or_more_races of this DemographicType.  # noqa: E501
        :rtype: bool
        """
        return self._demographic_race_two_or_more_races

    @demographic_race_two_or_more_races.setter
    def demographic_race_two_or_more_races(self, demographic_race_two_or_more_races):
        """Sets the demographic_race_two_or_more_races of this DemographicType.

        Model Primitive Datatype = Boolean  # noqa: E501

        :param demographic_race_two_or_more_races: The demographic_race_two_or_more_races of this DemographicType.  # noqa: E501
        :type: bool
        """

        self._demographic_race_two_or_more_races = demographic_race_two_or_more_races

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

        Model Primitive Datatype = Boolean  # noqa: E501

        :return: The hispanic_or_latino_ethnicity of this DemographicType.  # noqa: E501
        :rtype: bool
        """
        return self._hispanic_or_latino_ethnicity

    @hispanic_or_latino_ethnicity.setter
    def hispanic_or_latino_ethnicity(self, hispanic_or_latino_ethnicity):
        """Sets the hispanic_or_latino_ethnicity of this DemographicType.

        Model Primitive Datatype = Boolean  # noqa: E501

        :param hispanic_or_latino_ethnicity: The hispanic_or_latino_ethnicity of this DemographicType.  # noqa: E501
        :type: bool
        """

        self._hispanic_or_latino_ethnicity = hispanic_or_latino_ethnicity

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

        Model Primitive Datatype = NormalizedString  # noqa: E501

        :return: The country_of_birth_code of this DemographicType.  # noqa: E501
        :rtype: str
        """
        return self._country_of_birth_code

    @country_of_birth_code.setter
    def country_of_birth_code(self, country_of_birth_code):
        """Sets the country_of_birth_code of this DemographicType.

        Model Primitive Datatype = NormalizedString  # noqa: E501

        :param country_of_birth_code: The country_of_birth_code of this DemographicType.  # noqa: E501
        :type: str
        """

        self._country_of_birth_code = country_of_birth_code

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

        Model Primitive Datatype = NormalizedString  # noqa: E501

        :return: The state_of_birth_abbreviation of this DemographicType.  # noqa: E501
        :rtype: str
        """
        return self._state_of_birth_abbreviation

    @state_of_birth_abbreviation.setter
    def state_of_birth_abbreviation(self, state_of_birth_abbreviation):
        """Sets the state_of_birth_abbreviation of this DemographicType.

        Model Primitive Datatype = NormalizedString  # noqa: E501

        :param state_of_birth_abbreviation: The state_of_birth_abbreviation of this DemographicType.  # noqa: E501
        :type: str
        """

        self._state_of_birth_abbreviation = state_of_birth_abbreviation

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

        Model Primitive Datatype = NormalizedString  # noqa: E501

        :return: The city_of_birth of this DemographicType.  # noqa: E501
        :rtype: str
        """
        return self._city_of_birth

    @city_of_birth.setter
    def city_of_birth(self, city_of_birth):
        """Sets the city_of_birth of this DemographicType.

        Model Primitive Datatype = NormalizedString  # noqa: E501

        :param city_of_birth: The city_of_birth of this DemographicType.  # noqa: E501
        :type: str
        """

        self._city_of_birth = city_of_birth

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

        Model Primitive Datatype = NormalizedString  # noqa: E501

        :return: The public_school_residence_status of this DemographicType.  # noqa: E501
        :rtype: str
        """
        return self._public_school_residence_status

    @public_school_residence_status.setter
    def public_school_residence_status(self, public_school_residence_status):
        """Sets the public_school_residence_status of this DemographicType.

        Model Primitive Datatype = NormalizedString  # noqa: E501

        :param public_school_residence_status: The public_school_residence_status of this DemographicType.  # noqa: E501
        :type: str
        """

        self._public_school_residence_status = public_school_residence_status

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

        return self.__dict__ == other.__dict__

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