# coding: utf-8

"""
    DataDomain Rest API Documentation

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from dd_sdk_1_0.configuration import Configuration


class UserCreate(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 = {
        'name': 'str',
        'role': 'UserRole',
        'password': 'Password',
        'min_days_between_change': 'int',
        'max_days_between_change': 'int',
        'warn_days_before_expire': 'int',
        'disable_days_after_expire': 'int',
        'disable_date': 'DateFormat',
        'force_password_change': 'bool'
    }

    attribute_map = {
        'name': 'name',
        'role': 'role',
        'password': 'password',
        'min_days_between_change': 'min_days_between_change',
        'max_days_between_change': 'max_days_between_change',
        'warn_days_before_expire': 'warn_days_before_expire',
        'disable_days_after_expire': 'disable_days_after_expire',
        'disable_date': 'disable_date',
        'force_password_change': 'force_password_change'
    }

    def __init__(self, name=None, role=None, password=None, min_days_between_change=None, max_days_between_change=None, warn_days_before_expire=None, disable_days_after_expire=None, disable_date=None, force_password_change=None, _configuration=None):  # noqa: E501
        """UserCreate - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._name = None
        self._role = None
        self._password = None
        self._min_days_between_change = None
        self._max_days_between_change = None
        self._warn_days_before_expire = None
        self._disable_days_after_expire = None
        self._disable_date = None
        self._force_password_change = None
        self.discriminator = None

        self.name = name
        if role is not None:
            self.role = role
        self.password = password
        if min_days_between_change is not None:
            self.min_days_between_change = min_days_between_change
        if max_days_between_change is not None:
            self.max_days_between_change = max_days_between_change
        if warn_days_before_expire is not None:
            self.warn_days_before_expire = warn_days_before_expire
        if disable_days_after_expire is not None:
            self.disable_days_after_expire = disable_days_after_expire
        if disable_date is not None:
            self.disable_date = disable_date
        if force_password_change is not None:
            self.force_password_change = force_password_change

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


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

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


        :param name: The name of this UserCreate.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and name is None:
            raise ValueError("Invalid value for `name`, must not be `None`")  # noqa: E501

        self._name = name

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


        :return: The role of this UserCreate.  # noqa: E501
        :rtype: UserRole
        """
        return self._role

    @role.setter
    def role(self, role):
        """Sets the role of this UserCreate.


        :param role: The role of this UserCreate.  # noqa: E501
        :type: UserRole
        """

        self._role = role

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


        :return: The password of this UserCreate.  # noqa: E501
        :rtype: Password
        """
        return self._password

    @password.setter
    def password(self, password):
        """Sets the password of this UserCreate.


        :param password: The password of this UserCreate.  # noqa: E501
        :type: Password
        """
        if self._configuration.client_side_validation and password is None:
            raise ValueError("Invalid value for `password`, must not be `None`")  # noqa: E501

        self._password = password

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

        min_days_between_change does not apply if role is security  # noqa: E501

        :return: The min_days_between_change of this UserCreate.  # noqa: E501
        :rtype: int
        """
        return self._min_days_between_change

    @min_days_between_change.setter
    def min_days_between_change(self, min_days_between_change):
        """Sets the min_days_between_change of this UserCreate.

        min_days_between_change does not apply if role is security  # noqa: E501

        :param min_days_between_change: The min_days_between_change of this UserCreate.  # noqa: E501
        :type: int
        """

        self._min_days_between_change = min_days_between_change

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


        :return: The max_days_between_change of this UserCreate.  # noqa: E501
        :rtype: int
        """
        return self._max_days_between_change

    @max_days_between_change.setter
    def max_days_between_change(self, max_days_between_change):
        """Sets the max_days_between_change of this UserCreate.


        :param max_days_between_change: The max_days_between_change of this UserCreate.  # noqa: E501
        :type: int
        """

        self._max_days_between_change = max_days_between_change

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


        :return: The warn_days_before_expire of this UserCreate.  # noqa: E501
        :rtype: int
        """
        return self._warn_days_before_expire

    @warn_days_before_expire.setter
    def warn_days_before_expire(self, warn_days_before_expire):
        """Sets the warn_days_before_expire of this UserCreate.


        :param warn_days_before_expire: The warn_days_before_expire of this UserCreate.  # noqa: E501
        :type: int
        """

        self._warn_days_before_expire = warn_days_before_expire

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

        disable_days_after_expire does not apply if role is security  # noqa: E501

        :return: The disable_days_after_expire of this UserCreate.  # noqa: E501
        :rtype: int
        """
        return self._disable_days_after_expire

    @disable_days_after_expire.setter
    def disable_days_after_expire(self, disable_days_after_expire):
        """Sets the disable_days_after_expire of this UserCreate.

        disable_days_after_expire does not apply if role is security  # noqa: E501

        :param disable_days_after_expire: The disable_days_after_expire of this UserCreate.  # noqa: E501
        :type: int
        """

        self._disable_days_after_expire = disable_days_after_expire

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

        Date format is YYYY/MM/DD, does not apply if role is security  # noqa: E501

        :return: The disable_date of this UserCreate.  # noqa: E501
        :rtype: DateFormat
        """
        return self._disable_date

    @disable_date.setter
    def disable_date(self, disable_date):
        """Sets the disable_date of this UserCreate.

        Date format is YYYY/MM/DD, does not apply if role is security  # noqa: E501

        :param disable_date: The disable_date of this UserCreate.  # noqa: E501
        :type: DateFormat
        """

        self._disable_date = disable_date

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


        :return: The force_password_change of this UserCreate.  # noqa: E501
        :rtype: bool
        """
        return self._force_password_change

    @force_password_change.setter
    def force_password_change(self, force_password_change):
        """Sets the force_password_change of this UserCreate.


        :param force_password_change: The force_password_change of this UserCreate.  # noqa: E501
        :type: bool
        """

        self._force_password_change = force_password_change

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

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