# coding: utf-8

"""
    Cyclos 4.11.5 API

    The REST API for Cyclos 4.11.5  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from swagger_client.configuration import Configuration


class PasswordStatus(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 = {
        'status': 'PasswordStatusEnum',
        '_date': 'datetime'
    }

    attribute_map = {
        'status': 'status',
        '_date': 'date'
    }

    def __init__(self, status=None, _date=None, _configuration=None):  # noqa: E501
        """PasswordStatus - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._status = None
        self.__date = None
        self.discriminator = None

        if status is not None:
            self.status = status
        if _date is not None:
            self._date = _date

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

        The password status Possible values are: * active: The password is active and valid * disabled: The password has been manually disabled * expired: The password is expired * indefinitelyBlocked: The password is blocked by exceeding the maximum attempts until it is manually unblocked * neverCreated: The password has never been created for the user * pending: The password was manually allowed (by admins) for the user to generate it, but it was not yet generated (never used for manual passwords) * reset: The password has been reset (can be used for login but must then be changed) * temporarilyBlocked: The password is temporarily blocked by exceeding the maximum attempts   # noqa: E501

        :return: The status of this PasswordStatus.  # noqa: E501
        :rtype: PasswordStatusEnum
        """
        return self._status

    @status.setter
    def status(self, status):
        """Sets the status of this PasswordStatus.

        The password status Possible values are: * active: The password is active and valid * disabled: The password has been manually disabled * expired: The password is expired * indefinitelyBlocked: The password is blocked by exceeding the maximum attempts until it is manually unblocked * neverCreated: The password has never been created for the user * pending: The password was manually allowed (by admins) for the user to generate it, but it was not yet generated (never used for manual passwords) * reset: The password has been reset (can be used for login but must then be changed) * temporarilyBlocked: The password is temporarily blocked by exceeding the maximum attempts   # noqa: E501

        :param status: The status of this PasswordStatus.  # noqa: E501
        :type: PasswordStatusEnum
        """

        self._status = status

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

        The date this status took place  # noqa: E501

        :return: The _date of this PasswordStatus.  # noqa: E501
        :rtype: datetime
        """
        return self.__date

    @_date.setter
    def _date(self, _date):
        """Sets the _date of this PasswordStatus.

        The date this status took place  # noqa: E501

        :param _date: The _date of this PasswordStatus.  # noqa: E501
        :type: datetime
        """

        self.__date = _date

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

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