# 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 PasswordActions(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 = {
        'change': 'bool',
        'change_generated': 'bool',
        'generate': 'bool',
        'allow_generation': 'bool',
        'disable': 'bool',
        'enable': 'bool',
        'reset_generated': 'bool',
        'reset_and_send': 'bool',
        'unblock': 'bool'
    }

    attribute_map = {
        'change': 'change',
        'change_generated': 'changeGenerated',
        'generate': 'generate',
        'allow_generation': 'allowGeneration',
        'disable': 'disable',
        'enable': 'enable',
        'reset_generated': 'resetGenerated',
        'reset_and_send': 'resetAndSend',
        'unblock': 'unblock'
    }

    def __init__(self, change=None, change_generated=None, generate=None, allow_generation=None, disable=None, enable=None, reset_generated=None, reset_and_send=None, unblock=None, _configuration=None):  # noqa: E501
        """PasswordActions - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._change = None
        self._change_generated = None
        self._generate = None
        self._allow_generation = None
        self._disable = None
        self._enable = None
        self._reset_generated = None
        self._reset_and_send = None
        self._unblock = None
        self.discriminator = None

        if change is not None:
            self.change = change
        if change_generated is not None:
            self.change_generated = change_generated
        if generate is not None:
            self.generate = generate
        if allow_generation is not None:
            self.allow_generation = allow_generation
        if disable is not None:
            self.disable = disable
        if enable is not None:
            self.enable = enable
        if reset_generated is not None:
            self.reset_generated = reset_generated
        if reset_and_send is not None:
            self.reset_and_send = reset_and_send
        if unblock is not None:
            self.unblock = unblock

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

        Manually change the password.   # noqa: E501

        :return: The change of this PasswordActions.  # noqa: E501
        :rtype: bool
        """
        return self._change

    @change.setter
    def change(self, change):
        """Sets the change of this PasswordActions.

        Manually change the password.   # noqa: E501

        :param change: The change of this PasswordActions.  # noqa: E501
        :type: bool
        """

        self._change = change

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

        Manually generate another value for a generated password. Can only be  done for the authenticated user himself.   # noqa: E501

        :return: The change_generated of this PasswordActions.  # noqa: E501
        :rtype: bool
        """
        return self._change_generated

    @change_generated.setter
    def change_generated(self, change_generated):
        """Sets the change_generated of this PasswordActions.

        Manually generate another value for a generated password. Can only be  done for the authenticated user himself.   # noqa: E501

        :param change_generated: The change_generated of this PasswordActions.  # noqa: E501
        :type: bool
        """

        self._change_generated = change_generated

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

        Generate the password value for the first time. Can only be done for the authenticated user himself.   # noqa: E501

        :return: The generate of this PasswordActions.  # noqa: E501
        :rtype: bool
        """
        return self._generate

    @generate.setter
    def generate(self, generate):
        """Sets the generate of this PasswordActions.

        Generate the password value for the first time. Can only be done for the authenticated user himself.   # noqa: E501

        :param generate: The generate of this PasswordActions.  # noqa: E501
        :type: bool
        """

        self._generate = generate

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

        Granted only for those generated passwords that have a setting to  require administration authorization and have the status  `neverCreated`. Can only be done by administrators with permissions to enable/disable  the password.   # noqa: E501

        :return: The allow_generation of this PasswordActions.  # noqa: E501
        :rtype: bool
        """
        return self._allow_generation

    @allow_generation.setter
    def allow_generation(self, allow_generation):
        """Sets the allow_generation of this PasswordActions.

        Granted only for those generated passwords that have a setting to  require administration authorization and have the status  `neverCreated`. Can only be done by administrators with permissions to enable/disable  the password.   # noqa: E501

        :param allow_generation: The allow_generation of this PasswordActions.  # noqa: E501
        :type: bool
        """

        self._allow_generation = allow_generation

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

        Disables a password, making it unusable until being enabled again.   # noqa: E501

        :return: The disable of this PasswordActions.  # noqa: E501
        :rtype: bool
        """
        return self._disable

    @disable.setter
    def disable(self, disable):
        """Sets the disable of this PasswordActions.

        Disables a password, making it unusable until being enabled again.   # noqa: E501

        :param disable: The disable of this PasswordActions.  # noqa: E501
        :type: bool
        """

        self._disable = disable

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

        Enables a disabled password, either manually disabled or by exceeding the wrong tries, depending on the password type configuration.   # noqa: E501

        :return: The enable of this PasswordActions.  # noqa: E501
        :rtype: bool
        """
        return self._enable

    @enable.setter
    def enable(self, enable):
        """Sets the enable of this PasswordActions.

        Enables a disabled password, either manually disabled or by exceeding the wrong tries, depending on the password type configuration.   # noqa: E501

        :param enable: The enable of this PasswordActions.  # noqa: E501
        :type: bool
        """

        self._enable = enable

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

        Resets a generated password, making it go back to the  `pending` state. The user will then be able to generate a new value for it.   # noqa: E501

        :return: The reset_generated of this PasswordActions.  # noqa: E501
        :rtype: bool
        """
        return self._reset_generated

    @reset_generated.setter
    def reset_generated(self, reset_generated):
        """Sets the reset_generated of this PasswordActions.

        Resets a generated password, making it go back to the  `pending` state. The user will then be able to generate a new value for it.   # noqa: E501

        :param reset_generated: The reset_generated of this PasswordActions.  # noqa: E501
        :type: bool
        """

        self._reset_generated = reset_generated

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

        Resets a manual password to a generated value and send it to the user. Can also be used to reset and send the main channel's access password if it is generated. The new password is initially expired, so the user needs to change it on first login.   # noqa: E501

        :return: The reset_and_send of this PasswordActions.  # noqa: E501
        :rtype: bool
        """
        return self._reset_and_send

    @reset_and_send.setter
    def reset_and_send(self, reset_and_send):
        """Sets the reset_and_send of this PasswordActions.

        Resets a manual password to a generated value and send it to the user. Can also be used to reset and send the main channel's access password if it is generated. The new password is initially expired, so the user needs to change it on first login.   # noqa: E501

        :param reset_and_send: The reset_and_send of this PasswordActions.  # noqa: E501
        :type: bool
        """

        self._reset_and_send = reset_and_send

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

        Unblocks a password which has been blocked by exceeding the wrong tries   # noqa: E501

        :return: The unblock of this PasswordActions.  # noqa: E501
        :rtype: bool
        """
        return self._unblock

    @unblock.setter
    def unblock(self, unblock):
        """Sets the unblock of this PasswordActions.

        Unblocks a password which has been blocked by exceeding the wrong tries   # noqa: E501

        :param unblock: The unblock of this PasswordActions.  # noqa: E501
        :type: bool
        """

        self._unblock = unblock

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

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