# coding: utf-8

"""
    Harbor API

    These APIs provide services for manipulating Harbor project.  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from harbor_client.configuration import Configuration


class LdapConf(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 = {
        'ldap_url': 'str',
        'ldap_search_dn': 'str',
        'ldap_search_password': 'str',
        'ldap_base_dn': 'str',
        'ldap_filter': 'str',
        'ldap_uid': 'str',
        'ldap_scope': 'int',
        'ldap_connection_timeout': 'int',
        'ldap_verify_cert': 'bool'
    }

    attribute_map = {
        'ldap_url': 'ldap_url',
        'ldap_search_dn': 'ldap_search_dn',
        'ldap_search_password': 'ldap_search_password',
        'ldap_base_dn': 'ldap_base_dn',
        'ldap_filter': 'ldap_filter',
        'ldap_uid': 'ldap_uid',
        'ldap_scope': 'ldap_scope',
        'ldap_connection_timeout': 'ldap_connection_timeout',
        'ldap_verify_cert': 'ldap_verify_cert'
    }

    def __init__(self, ldap_url=None, ldap_search_dn=None, ldap_search_password=None, ldap_base_dn=None, ldap_filter=None, ldap_uid=None, ldap_scope=None, ldap_connection_timeout=None, ldap_verify_cert=None, _configuration=None):  # noqa: E501
        """LdapConf - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._ldap_url = None
        self._ldap_search_dn = None
        self._ldap_search_password = None
        self._ldap_base_dn = None
        self._ldap_filter = None
        self._ldap_uid = None
        self._ldap_scope = None
        self._ldap_connection_timeout = None
        self._ldap_verify_cert = None
        self.discriminator = None

        if ldap_url is not None:
            self.ldap_url = ldap_url
        if ldap_search_dn is not None:
            self.ldap_search_dn = ldap_search_dn
        if ldap_search_password is not None:
            self.ldap_search_password = ldap_search_password
        if ldap_base_dn is not None:
            self.ldap_base_dn = ldap_base_dn
        if ldap_filter is not None:
            self.ldap_filter = ldap_filter
        if ldap_uid is not None:
            self.ldap_uid = ldap_uid
        if ldap_scope is not None:
            self.ldap_scope = ldap_scope
        if ldap_connection_timeout is not None:
            self.ldap_connection_timeout = ldap_connection_timeout
        if ldap_verify_cert is not None:
            self.ldap_verify_cert = ldap_verify_cert

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

        The url of ldap service.  # noqa: E501

        :return: The ldap_url of this LdapConf.  # noqa: E501
        :rtype: str
        """
        return self._ldap_url

    @ldap_url.setter
    def ldap_url(self, ldap_url):
        """Sets the ldap_url of this LdapConf.

        The url of ldap service.  # noqa: E501

        :param ldap_url: The ldap_url of this LdapConf.  # noqa: E501
        :type: str
        """

        self._ldap_url = ldap_url

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

        The search dn of ldap service.  # noqa: E501

        :return: The ldap_search_dn of this LdapConf.  # noqa: E501
        :rtype: str
        """
        return self._ldap_search_dn

    @ldap_search_dn.setter
    def ldap_search_dn(self, ldap_search_dn):
        """Sets the ldap_search_dn of this LdapConf.

        The search dn of ldap service.  # noqa: E501

        :param ldap_search_dn: The ldap_search_dn of this LdapConf.  # noqa: E501
        :type: str
        """

        self._ldap_search_dn = ldap_search_dn

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

        The search password of ldap service.  # noqa: E501

        :return: The ldap_search_password of this LdapConf.  # noqa: E501
        :rtype: str
        """
        return self._ldap_search_password

    @ldap_search_password.setter
    def ldap_search_password(self, ldap_search_password):
        """Sets the ldap_search_password of this LdapConf.

        The search password of ldap service.  # noqa: E501

        :param ldap_search_password: The ldap_search_password of this LdapConf.  # noqa: E501
        :type: str
        """

        self._ldap_search_password = ldap_search_password

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

        The base dn of ldap service.  # noqa: E501

        :return: The ldap_base_dn of this LdapConf.  # noqa: E501
        :rtype: str
        """
        return self._ldap_base_dn

    @ldap_base_dn.setter
    def ldap_base_dn(self, ldap_base_dn):
        """Sets the ldap_base_dn of this LdapConf.

        The base dn of ldap service.  # noqa: E501

        :param ldap_base_dn: The ldap_base_dn of this LdapConf.  # noqa: E501
        :type: str
        """

        self._ldap_base_dn = ldap_base_dn

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

        The serach filter of ldap service.  # noqa: E501

        :return: The ldap_filter of this LdapConf.  # noqa: E501
        :rtype: str
        """
        return self._ldap_filter

    @ldap_filter.setter
    def ldap_filter(self, ldap_filter):
        """Sets the ldap_filter of this LdapConf.

        The serach filter of ldap service.  # noqa: E501

        :param ldap_filter: The ldap_filter of this LdapConf.  # noqa: E501
        :type: str
        """

        self._ldap_filter = ldap_filter

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

        The serach uid from ldap service attributes.  # noqa: E501

        :return: The ldap_uid of this LdapConf.  # noqa: E501
        :rtype: str
        """
        return self._ldap_uid

    @ldap_uid.setter
    def ldap_uid(self, ldap_uid):
        """Sets the ldap_uid of this LdapConf.

        The serach uid from ldap service attributes.  # noqa: E501

        :param ldap_uid: The ldap_uid of this LdapConf.  # noqa: E501
        :type: str
        """

        self._ldap_uid = ldap_uid

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

        The serach scope of ldap service.  # noqa: E501

        :return: The ldap_scope of this LdapConf.  # noqa: E501
        :rtype: int
        """
        return self._ldap_scope

    @ldap_scope.setter
    def ldap_scope(self, ldap_scope):
        """Sets the ldap_scope of this LdapConf.

        The serach scope of ldap service.  # noqa: E501

        :param ldap_scope: The ldap_scope of this LdapConf.  # noqa: E501
        :type: int
        """

        self._ldap_scope = ldap_scope

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

        The connect timeout of ldap service(second).  # noqa: E501

        :return: The ldap_connection_timeout of this LdapConf.  # noqa: E501
        :rtype: int
        """
        return self._ldap_connection_timeout

    @ldap_connection_timeout.setter
    def ldap_connection_timeout(self, ldap_connection_timeout):
        """Sets the ldap_connection_timeout of this LdapConf.

        The connect timeout of ldap service(second).  # noqa: E501

        :param ldap_connection_timeout: The ldap_connection_timeout of this LdapConf.  # noqa: E501
        :type: int
        """

        self._ldap_connection_timeout = ldap_connection_timeout

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

        Verify Ldap server certificate.  # noqa: E501

        :return: The ldap_verify_cert of this LdapConf.  # noqa: E501
        :rtype: bool
        """
        return self._ldap_verify_cert

    @ldap_verify_cert.setter
    def ldap_verify_cert(self, ldap_verify_cert):
        """Sets the ldap_verify_cert of this LdapConf.

        Verify Ldap server certificate.  # noqa: E501

        :param ldap_verify_cert: The ldap_verify_cert of this LdapConf.  # noqa: E501
        :type: bool
        """

        self._ldap_verify_cert = ldap_verify_cert

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

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