# 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 District(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 = {
        'id': 'str',
        'name': 'str',
        'mdr_number': 'str',
        'nces_id': 'str',
        'sis_type': 'str',
        'state': 'str',
        'last_sync': 'str',
        'error': 'str',
        'pause_start': 'str',
        'pause_end': 'str',
        'launch_date': 'date',
        'portal_url': 'str',
        'login_methods': 'list[str]',
        'district_contact': 'DistrictContact'
    }

    attribute_map = {
        'id': 'id',
        'name': 'name',
        'mdr_number': 'mdr_number',
        'nces_id': 'nces_id',
        'sis_type': 'sis_type',
        'state': 'state',
        'last_sync': 'last_sync',
        'error': 'error',
        'pause_start': 'pause_start',
        'pause_end': 'pause_end',
        'launch_date': 'launch_date',
        'portal_url': 'portal_url',
        'login_methods': 'login_methods',
        'district_contact': 'district_contact'
    }

    def __init__(self, id=None, name=None, mdr_number=None, nces_id=None, sis_type=None, state=None, last_sync=None, error=None, pause_start=None, pause_end=None, launch_date=None, portal_url=None, login_methods=None, district_contact=None, _configuration=None):  # noqa: E501
        """District - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._id = None
        self._name = None
        self._mdr_number = None
        self._nces_id = None
        self._sis_type = None
        self._state = None
        self._last_sync = None
        self._error = None
        self._pause_start = None
        self._pause_end = None
        self._launch_date = None
        self._portal_url = None
        self._login_methods = None
        self._district_contact = None
        self.discriminator = None

        if id is not None:
            self.id = id
        if name is not None:
            self.name = name
        if mdr_number is not None:
            self.mdr_number = mdr_number
        if nces_id is not None:
            self.nces_id = nces_id
        if sis_type is not None:
            self.sis_type = sis_type
        if state is not None:
            self.state = state
        if last_sync is not None:
            self.last_sync = last_sync
        if error is not None:
            self.error = error
        if pause_start is not None:
            self.pause_start = pause_start
        if pause_end is not None:
            self.pause_end = pause_end
        if launch_date is not None:
            self.launch_date = launch_date
        if portal_url is not None:
            self.portal_url = portal_url
        if login_methods is not None:
            self.login_methods = login_methods
        if district_contact is not None:
            self.district_contact = district_contact

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


        :return: The id of this District.  # noqa: E501
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this District.


        :param id: The id of this District.  # noqa: E501
        :type: str
        """

        self._id = id

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


        :return: The name of this District.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this District.


        :param name: The name of this District.  # noqa: E501
        :type: str
        """

        self._name = name

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


        :return: The mdr_number of this District.  # noqa: E501
        :rtype: str
        """
        return self._mdr_number

    @mdr_number.setter
    def mdr_number(self, mdr_number):
        """Sets the mdr_number of this District.


        :param mdr_number: The mdr_number of this District.  # noqa: E501
        :type: str
        """

        self._mdr_number = mdr_number

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


        :return: The nces_id of this District.  # noqa: E501
        :rtype: str
        """
        return self._nces_id

    @nces_id.setter
    def nces_id(self, nces_id):
        """Sets the nces_id of this District.


        :param nces_id: The nces_id of this District.  # noqa: E501
        :type: str
        """

        self._nces_id = nces_id

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


        :return: The sis_type of this District.  # noqa: E501
        :rtype: str
        """
        return self._sis_type

    @sis_type.setter
    def sis_type(self, sis_type):
        """Sets the sis_type of this District.


        :param sis_type: The sis_type of this District.  # noqa: E501
        :type: str
        """

        self._sis_type = sis_type

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


        :return: The state of this District.  # noqa: E501
        :rtype: str
        """
        return self._state

    @state.setter
    def state(self, state):
        """Sets the state of this District.


        :param state: The state of this District.  # noqa: E501
        :type: str
        """
        allowed_values = ["running", "pending", "error", "paused", "", "success"]  # noqa: E501
        if (self._configuration.client_side_validation and
                state not in allowed_values):
            raise ValueError(
                "Invalid value for `state` ({0}), must be one of {1}"  # noqa: E501
                .format(state, allowed_values)
            )

        self._state = state

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


        :return: The last_sync of this District.  # noqa: E501
        :rtype: str
        """
        return self._last_sync

    @last_sync.setter
    def last_sync(self, last_sync):
        """Sets the last_sync of this District.


        :param last_sync: The last_sync of this District.  # noqa: E501
        :type: str
        """

        self._last_sync = last_sync

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


        :return: The error of this District.  # noqa: E501
        :rtype: str
        """
        return self._error

    @error.setter
    def error(self, error):
        """Sets the error of this District.


        :param error: The error of this District.  # noqa: E501
        :type: str
        """

        self._error = error

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


        :return: The pause_start of this District.  # noqa: E501
        :rtype: str
        """
        return self._pause_start

    @pause_start.setter
    def pause_start(self, pause_start):
        """Sets the pause_start of this District.


        :param pause_start: The pause_start of this District.  # noqa: E501
        :type: str
        """

        self._pause_start = pause_start

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


        :return: The pause_end of this District.  # noqa: E501
        :rtype: str
        """
        return self._pause_end

    @pause_end.setter
    def pause_end(self, pause_end):
        """Sets the pause_end of this District.


        :param pause_end: The pause_end of this District.  # noqa: E501
        :type: str
        """

        self._pause_end = pause_end

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


        :return: The launch_date of this District.  # noqa: E501
        :rtype: date
        """
        return self._launch_date

    @launch_date.setter
    def launch_date(self, launch_date):
        """Sets the launch_date of this District.


        :param launch_date: The launch_date of this District.  # noqa: E501
        :type: date
        """

        self._launch_date = launch_date

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


        :return: The portal_url of this District.  # noqa: E501
        :rtype: str
        """
        return self._portal_url

    @portal_url.setter
    def portal_url(self, portal_url):
        """Sets the portal_url of this District.


        :param portal_url: The portal_url of this District.  # noqa: E501
        :type: str
        """

        self._portal_url = portal_url

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


        :return: The login_methods of this District.  # noqa: E501
        :rtype: list[str]
        """
        return self._login_methods

    @login_methods.setter
    def login_methods(self, login_methods):
        """Sets the login_methods of this District.


        :param login_methods: The login_methods of this District.  # noqa: E501
        :type: list[str]
        """

        self._login_methods = login_methods

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


        :return: The district_contact of this District.  # noqa: E501
        :rtype: DistrictContact
        """
        return self._district_contact

    @district_contact.setter
    def district_contact(self, district_contact):
        """Sets the district_contact of this District.


        :param district_contact: The district_contact of this District.  # noqa: E501
        :type: DistrictContact
        """

        self._district_contact = district_contact

    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(District, 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, District):
            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, District):
            return True

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