# coding: utf-8

"""
    SYSNET CRZP connector API

    SYSNET CRŽP connector REST API (IPPC & CITES extension)  # noqa: E501

    OpenAPI spec version: 1.1.0
    Contact: info@sysnet.cz
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

class User(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',
        'created': 'datetime',
        'updated': 'datetime',
        'deleted': 'datetime',
        'username': 'str',
        'degree': 'str',
        'firstname': 'str',
        'lastname': 'str',
        'email': 'str',
        'phone': 'str',
        'active': 'bool',
        'valid_to': 'date',
        'personal_data_processing_consent': 'bool',
        'mailing_consent': 'bool',
        'version': 'int'
    }

    attribute_map = {
        'id': 'id',
        'created': 'created',
        'updated': 'updated',
        'deleted': 'deleted',
        'username': 'username',
        'degree': 'degree',
        'firstname': 'firstname',
        'lastname': 'lastname',
        'email': 'email',
        'phone': 'phone',
        'active': 'active',
        'valid_to': 'validTo',
        'personal_data_processing_consent': 'personalDataProcessingConsent',
        'mailing_consent': 'mailingConsent',
        'version': 'version'
    }

    def __init__(self, id=None, created=None, updated=None, deleted=None, username=None, degree=None, firstname=None, lastname=None, email=None, phone=None, active=None, valid_to=None, personal_data_processing_consent=None, mailing_consent=None, version=None):  # noqa: E501
        """User - a model defined in Swagger"""  # noqa: E501
        self._id = None
        self._created = None
        self._updated = None
        self._deleted = None
        self._username = None
        self._degree = None
        self._firstname = None
        self._lastname = None
        self._email = None
        self._phone = None
        self._active = None
        self._valid_to = None
        self._personal_data_processing_consent = None
        self._mailing_consent = None
        self._version = None
        self.discriminator = None
        self.id = id
        self.created = created
        if updated is not None:
            self.updated = updated
        if deleted is not None:
            self.deleted = deleted
        self.username = username
        if degree is not None:
            self.degree = degree
        if firstname is not None:
            self.firstname = firstname
        if lastname is not None:
            self.lastname = lastname
        self.email = email
        if phone is not None:
            self.phone = phone
        if active is not None:
            self.active = active
        if valid_to is not None:
            self.valid_to = valid_to
        if personal_data_processing_consent is not None:
            self.personal_data_processing_consent = personal_data_processing_consent
        if mailing_consent is not None:
            self.mailing_consent = mailing_consent
        if version is not None:
            self.version = version

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


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

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


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

        self._id = id

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


        :return: The created of this User.  # noqa: E501
        :rtype: datetime
        """
        return self._created

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


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

        self._created = created

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


        :return: The updated of this User.  # noqa: E501
        :rtype: datetime
        """
        return self._updated

    @updated.setter
    def updated(self, updated):
        """Sets the updated of this User.


        :param updated: The updated of this User.  # noqa: E501
        :type: datetime
        """

        self._updated = updated

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


        :return: The deleted of this User.  # noqa: E501
        :rtype: datetime
        """
        return self._deleted

    @deleted.setter
    def deleted(self, deleted):
        """Sets the deleted of this User.


        :param deleted: The deleted of this User.  # noqa: E501
        :type: datetime
        """

        self._deleted = deleted

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


        :return: The username of this User.  # noqa: E501
        :rtype: str
        """
        return self._username

    @username.setter
    def username(self, username):
        """Sets the username of this User.


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

        self._username = username

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


        :return: The degree of this User.  # noqa: E501
        :rtype: str
        """
        return self._degree

    @degree.setter
    def degree(self, degree):
        """Sets the degree of this User.


        :param degree: The degree of this User.  # noqa: E501
        :type: str
        """

        self._degree = degree

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


        :return: The firstname of this User.  # noqa: E501
        :rtype: str
        """
        return self._firstname

    @firstname.setter
    def firstname(self, firstname):
        """Sets the firstname of this User.


        :param firstname: The firstname of this User.  # noqa: E501
        :type: str
        """

        self._firstname = firstname

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


        :return: The lastname of this User.  # noqa: E501
        :rtype: str
        """
        return self._lastname

    @lastname.setter
    def lastname(self, lastname):
        """Sets the lastname of this User.


        :param lastname: The lastname of this User.  # noqa: E501
        :type: str
        """

        self._lastname = lastname

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


        :return: The email of this User.  # noqa: E501
        :rtype: str
        """
        return self._email

    @email.setter
    def email(self, email):
        """Sets the email of this User.


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

        self._email = email

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


        :return: The phone of this User.  # noqa: E501
        :rtype: str
        """
        return self._phone

    @phone.setter
    def phone(self, phone):
        """Sets the phone of this User.


        :param phone: The phone of this User.  # noqa: E501
        :type: str
        """

        self._phone = phone

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


        :return: The active of this User.  # noqa: E501
        :rtype: bool
        """
        return self._active

    @active.setter
    def active(self, active):
        """Sets the active of this User.


        :param active: The active of this User.  # noqa: E501
        :type: bool
        """

        self._active = active

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


        :return: The valid_to of this User.  # noqa: E501
        :rtype: date
        """
        return self._valid_to

    @valid_to.setter
    def valid_to(self, valid_to):
        """Sets the valid_to of this User.


        :param valid_to: The valid_to of this User.  # noqa: E501
        :type: date
        """

        self._valid_to = valid_to

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


        :return: The personal_data_processing_consent of this User.  # noqa: E501
        :rtype: bool
        """
        return self._personal_data_processing_consent

    @personal_data_processing_consent.setter
    def personal_data_processing_consent(self, personal_data_processing_consent):
        """Sets the personal_data_processing_consent of this User.


        :param personal_data_processing_consent: The personal_data_processing_consent of this User.  # noqa: E501
        :type: bool
        """

        self._personal_data_processing_consent = personal_data_processing_consent

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


        :return: The mailing_consent of this User.  # noqa: E501
        :rtype: bool
        """
        return self._mailing_consent

    @mailing_consent.setter
    def mailing_consent(self, mailing_consent):
        """Sets the mailing_consent of this User.


        :param mailing_consent: The mailing_consent of this User.  # noqa: E501
        :type: bool
        """

        self._mailing_consent = mailing_consent

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


        :return: The version of this User.  # noqa: E501
        :rtype: int
        """
        return self._version

    @version.setter
    def version(self, version):
        """Sets the version of this User.


        :param version: The version of this User.  # noqa: E501
        :type: int
        """

        self._version = version

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

        return self.__dict__ == other.__dict__

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