# coding: utf-8

"""
    Zadara VPSA Storage Array REST API

     # Overview  This document outlines the methods available for administrating your Zadara Storage VPSA&#8482;. The Zadara Storage Array REST API   supports form-encoded, JSON, and XML requests, and can return either JSON or XML responses.  ## Usage  The majority of the APIs available require authentication which requires an API token to use. You can retrieve this token through the   Users section of your VPSA, or through the API using the \"Return a user's access key\" API in the Users Section below.  ## Authentication Methods  The authentication token can be passed either through the access_key parameter inside of the body of the REST API request, or   through the X-Access-Key header.  ## Timeouts  By default, all operations that don't complete within five seconds will return a message informing you that the action may take some  time to complete. When using the API, this can cause some actions, such as large volume creation, to be undesirably asynchronous.  You can specify your own timeout with the timeout parameter, in seconds, and a timeout value of -1 specifies an infinite timeout.  ## Specific Fields For Product  Some of the fields/actions used in the API should be used only for a specific product. The following tags are used to mark which   product responds to the fields/actions  VPSA Flash Array  VPSA Storage Array - Hybrid VPSA  ## Questions  If you have any questions or need support involving the REST API, please contact for assistance.   # noqa: E501

    OpenAPI spec version: 23.03-sp1
    Contact: support@zadarastorage.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from Vpsa.configuration import Configuration


class SetPassPolicy(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 = {
        'expire_password': 'bool',
        'expire_password_after': 'int',
        'password_history': 'int',
        'min_password_length': 'int',
        'password_must_contain_letters': 'bool',
        'password_must_contain_numbers': 'bool',
        'password_must_contain_uppercase_letters': 'bool',
        'password_must_contain_special_characters': 'bool'
    }

    attribute_map = {
        'expire_password': 'expire_password',
        'expire_password_after': 'expire_password_after',
        'password_history': 'password_history',
        'min_password_length': 'min_password_length',
        'password_must_contain_letters': 'password_must_contain_letters',
        'password_must_contain_numbers': 'password_must_contain_numbers',
        'password_must_contain_uppercase_letters': 'password_must_contain_uppercase_letters',
        'password_must_contain_special_characters': 'password_must_contain_special_characters'
    }

    def __init__(self, expire_password=False, expire_password_after=None, password_history=None, min_password_length=None, password_must_contain_letters=True, password_must_contain_numbers=True, password_must_contain_uppercase_letters=False, password_must_contain_special_characters=False, _configuration=None):  # noqa: E501
        """SetPassPolicy - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._expire_password = None
        self._expire_password_after = None
        self._password_history = None
        self._min_password_length = None
        self._password_must_contain_letters = None
        self._password_must_contain_numbers = None
        self._password_must_contain_uppercase_letters = None
        self._password_must_contain_special_characters = None
        self.discriminator = None

        if expire_password is not None:
            self.expire_password = expire_password
        if expire_password_after is not None:
            self.expire_password_after = expire_password_after
        if password_history is not None:
            self.password_history = password_history
        if min_password_length is not None:
            self.min_password_length = min_password_length
        if password_must_contain_letters is not None:
            self.password_must_contain_letters = password_must_contain_letters
        if password_must_contain_numbers is not None:
            self.password_must_contain_numbers = password_must_contain_numbers
        if password_must_contain_uppercase_letters is not None:
            self.password_must_contain_uppercase_letters = password_must_contain_uppercase_letters
        if password_must_contain_special_characters is not None:
            self.password_must_contain_special_characters = password_must_contain_special_characters

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

        Enforce password expiration  # noqa: E501

        :return: The expire_password of this SetPassPolicy.  # noqa: E501
        :rtype: bool
        """
        return self._expire_password

    @expire_password.setter
    def expire_password(self, expire_password):
        """Sets the expire_password of this SetPassPolicy.

        Enforce password expiration  # noqa: E501

        :param expire_password: The expire_password of this SetPassPolicy.  # noqa: E501
        :type: bool
        """

        self._expire_password = expire_password

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

        Expire passwords after (seconds), between 1296000 to 432000000 seconds (15 to 5000 days)  # noqa: E501

        :return: The expire_password_after of this SetPassPolicy.  # noqa: E501
        :rtype: int
        """
        return self._expire_password_after

    @expire_password_after.setter
    def expire_password_after(self, expire_password_after):
        """Sets the expire_password_after of this SetPassPolicy.

        Expire passwords after (seconds), between 1296000 to 432000000 seconds (15 to 5000 days)  # noqa: E501

        :param expire_password_after: The expire_password_after of this SetPassPolicy.  # noqa: E501
        :type: int
        """

        self._expire_password_after = expire_password_after

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

        Number of passwords to remember, between 1 to 10  # noqa: E501

        :return: The password_history of this SetPassPolicy.  # noqa: E501
        :rtype: int
        """
        return self._password_history

    @password_history.setter
    def password_history(self, password_history):
        """Sets the password_history of this SetPassPolicy.

        Number of passwords to remember, between 1 to 10  # noqa: E501

        :param password_history: The password_history of this SetPassPolicy.  # noqa: E501
        :type: int
        """

        self._password_history = password_history

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

        Min password length, between 8 to 12  # noqa: E501

        :return: The min_password_length of this SetPassPolicy.  # noqa: E501
        :rtype: int
        """
        return self._min_password_length

    @min_password_length.setter
    def min_password_length(self, min_password_length):
        """Sets the min_password_length of this SetPassPolicy.

        Min password length, between 8 to 12  # noqa: E501

        :param min_password_length: The min_password_length of this SetPassPolicy.  # noqa: E501
        :type: int
        """

        self._min_password_length = min_password_length

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

        Password must contain letters  # noqa: E501

        :return: The password_must_contain_letters of this SetPassPolicy.  # noqa: E501
        :rtype: bool
        """
        return self._password_must_contain_letters

    @password_must_contain_letters.setter
    def password_must_contain_letters(self, password_must_contain_letters):
        """Sets the password_must_contain_letters of this SetPassPolicy.

        Password must contain letters  # noqa: E501

        :param password_must_contain_letters: The password_must_contain_letters of this SetPassPolicy.  # noqa: E501
        :type: bool
        """

        self._password_must_contain_letters = password_must_contain_letters

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

        Password must contain numbers  # noqa: E501

        :return: The password_must_contain_numbers of this SetPassPolicy.  # noqa: E501
        :rtype: bool
        """
        return self._password_must_contain_numbers

    @password_must_contain_numbers.setter
    def password_must_contain_numbers(self, password_must_contain_numbers):
        """Sets the password_must_contain_numbers of this SetPassPolicy.

        Password must contain numbers  # noqa: E501

        :param password_must_contain_numbers: The password_must_contain_numbers of this SetPassPolicy.  # noqa: E501
        :type: bool
        """

        self._password_must_contain_numbers = password_must_contain_numbers

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

        Password must contain uppercase letters  # noqa: E501

        :return: The password_must_contain_uppercase_letters of this SetPassPolicy.  # noqa: E501
        :rtype: bool
        """
        return self._password_must_contain_uppercase_letters

    @password_must_contain_uppercase_letters.setter
    def password_must_contain_uppercase_letters(self, password_must_contain_uppercase_letters):
        """Sets the password_must_contain_uppercase_letters of this SetPassPolicy.

        Password must contain uppercase letters  # noqa: E501

        :param password_must_contain_uppercase_letters: The password_must_contain_uppercase_letters of this SetPassPolicy.  # noqa: E501
        :type: bool
        """

        self._password_must_contain_uppercase_letters = password_must_contain_uppercase_letters

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

        Password must contain special characters  # noqa: E501

        :return: The password_must_contain_special_characters of this SetPassPolicy.  # noqa: E501
        :rtype: bool
        """
        return self._password_must_contain_special_characters

    @password_must_contain_special_characters.setter
    def password_must_contain_special_characters(self, password_must_contain_special_characters):
        """Sets the password_must_contain_special_characters of this SetPassPolicy.

        Password must contain special characters  # noqa: E501

        :param password_must_contain_special_characters: The password_must_contain_special_characters of this SetPassPolicy.  # noqa: E501
        :type: bool
        """

        self._password_must_contain_special_characters = password_must_contain_special_characters

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

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