# coding: utf-8

"""
    Vidispine API

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: 5.x
    Contact: info@vidispine.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six
from . import *

class LDAPResourceType(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'use_start_tls': 'bool',
        'group_search_filter': 'str',
        'bind_password': 'str',
        'bind_dn': 'str',
        'url': 'list[str]',
        '_import': 'LDAPImportType',
        'groupname_attribute': 'str',
        'username_format': 'str',
        'user_dn': 'str',
        'sync': 'LDAPSyncType',
        'real_name_attribute': 'str',
        'user_search_filter': 'str',
        'username_attribute': 'str',
        'group_dn': 'str',
        'cache_lifetime': 'int'
    }

    attribute_map = {
        'use_start_tls': 'useStartTLS',
        'group_search_filter': 'groupSearchFilter',
        'bind_password': 'bindPassword',
        'bind_dn': 'bindDN',
        'url': 'url',
        '_import': 'import',
        'groupname_attribute': 'groupnameAttribute',
        'username_format': 'usernameFormat',
        'user_dn': 'userDN',
        'sync': 'sync',
        'real_name_attribute': 'realNameAttribute',
        'user_search_filter': 'userSearchFilter',
        'username_attribute': 'usernameAttribute',
        'group_dn': 'groupDN',
        'cache_lifetime': 'cacheLifetime'
    }

    def __init__(self, use_start_tls=None, group_search_filter=None, bind_password=None, bind_dn=None, url=None, _import=None, groupname_attribute=None, username_format=None, user_dn=None, sync=None, real_name_attribute=None, user_search_filter=None, username_attribute=None, group_dn=None, cache_lifetime=None):  # noqa: E501
        """LDAPResourceType - a model defined in OpenAPI"""  # noqa: E501

        self._use_start_tls = None
        self._group_search_filter = None
        self._bind_password = None
        self._bind_dn = None
        self._url = None
        self.__import = None
        self._groupname_attribute = None
        self._username_format = None
        self._user_dn = None
        self._sync = None
        self._real_name_attribute = None
        self._user_search_filter = None
        self._username_attribute = None
        self._group_dn = None
        self._cache_lifetime = None
        self.discriminator = None

        self.use_start_tls = use_start_tls
        if group_search_filter is not None:
            self.group_search_filter = group_search_filter
        if bind_password is not None:
            self.bind_password = bind_password
        if bind_dn is not None:
            self.bind_dn = bind_dn
        if url is not None:
            self.url = url
        if _import is not None:
            self._import = _import
        if groupname_attribute is not None:
            self.groupname_attribute = groupname_attribute
        if username_format is not None:
            self.username_format = username_format
        self.user_dn = user_dn
        if sync is not None:
            self.sync = sync
        if real_name_attribute is not None:
            self.real_name_attribute = real_name_attribute
        if user_search_filter is not None:
            self.user_search_filter = user_search_filter
        self.username_attribute = username_attribute
        if group_dn is not None:
            self.group_dn = group_dn
        if cache_lifetime is not None:
            self.cache_lifetime = cache_lifetime

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


        :return: The use_start_tls of this LDAPResourceType.  # noqa: E501
        :rtype: bool
        """
        return self._use_start_tls

    @use_start_tls.setter
    def use_start_tls(self, use_start_tls):
        """Sets the use_start_tls of this LDAPResourceType.


        :param use_start_tls: The use_start_tls of this LDAPResourceType.  # noqa: E501
        :type: bool
        """
        if use_start_tls is None:
            raise ValueError("Invalid value for `use_start_tls`, must not be `None`")  # noqa: E501

        self._use_start_tls = use_start_tls

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


        :return: The group_search_filter of this LDAPResourceType.  # noqa: E501
        :rtype: str
        """
        return self._group_search_filter

    @group_search_filter.setter
    def group_search_filter(self, group_search_filter):
        """Sets the group_search_filter of this LDAPResourceType.


        :param group_search_filter: The group_search_filter of this LDAPResourceType.  # noqa: E501
        :type: str
        """

        self._group_search_filter = group_search_filter

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


        :return: The bind_password of this LDAPResourceType.  # noqa: E501
        :rtype: str
        """
        return self._bind_password

    @bind_password.setter
    def bind_password(self, bind_password):
        """Sets the bind_password of this LDAPResourceType.


        :param bind_password: The bind_password of this LDAPResourceType.  # noqa: E501
        :type: str
        """

        self._bind_password = bind_password

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


        :return: The bind_dn of this LDAPResourceType.  # noqa: E501
        :rtype: str
        """
        return self._bind_dn

    @bind_dn.setter
    def bind_dn(self, bind_dn):
        """Sets the bind_dn of this LDAPResourceType.


        :param bind_dn: The bind_dn of this LDAPResourceType.  # noqa: E501
        :type: str
        """

        self._bind_dn = bind_dn

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


        :return: The url of this LDAPResourceType.  # noqa: E501
        :rtype: list[str]
        """
        return self._url

    @url.setter
    def url(self, url):
        """Sets the url of this LDAPResourceType.


        :param url: The url of this LDAPResourceType.  # noqa: E501
        :type: list[str]
        """

        self._url = url

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


        :return: The _import of this LDAPResourceType.  # noqa: E501
        :rtype: LDAPImportType
        """
        return self.__import

    @_import.setter
    def _import(self, _import):
        """Sets the _import of this LDAPResourceType.


        :param _import: The _import of this LDAPResourceType.  # noqa: E501
        :type: LDAPImportType
        """

        self.__import = _import

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


        :return: The groupname_attribute of this LDAPResourceType.  # noqa: E501
        :rtype: str
        """
        return self._groupname_attribute

    @groupname_attribute.setter
    def groupname_attribute(self, groupname_attribute):
        """Sets the groupname_attribute of this LDAPResourceType.


        :param groupname_attribute: The groupname_attribute of this LDAPResourceType.  # noqa: E501
        :type: str
        """

        self._groupname_attribute = groupname_attribute

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


        :return: The username_format of this LDAPResourceType.  # noqa: E501
        :rtype: str
        """
        return self._username_format

    @username_format.setter
    def username_format(self, username_format):
        """Sets the username_format of this LDAPResourceType.


        :param username_format: The username_format of this LDAPResourceType.  # noqa: E501
        :type: str
        """

        self._username_format = username_format

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


        :return: The user_dn of this LDAPResourceType.  # noqa: E501
        :rtype: str
        """
        return self._user_dn

    @user_dn.setter
    def user_dn(self, user_dn):
        """Sets the user_dn of this LDAPResourceType.


        :param user_dn: The user_dn of this LDAPResourceType.  # noqa: E501
        :type: str
        """
        if user_dn is None:
            raise ValueError("Invalid value for `user_dn`, must not be `None`")  # noqa: E501

        self._user_dn = user_dn

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


        :return: The sync of this LDAPResourceType.  # noqa: E501
        :rtype: LDAPSyncType
        """
        return self._sync

    @sync.setter
    def sync(self, sync):
        """Sets the sync of this LDAPResourceType.


        :param sync: The sync of this LDAPResourceType.  # noqa: E501
        :type: LDAPSyncType
        """

        self._sync = sync

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


        :return: The real_name_attribute of this LDAPResourceType.  # noqa: E501
        :rtype: str
        """
        return self._real_name_attribute

    @real_name_attribute.setter
    def real_name_attribute(self, real_name_attribute):
        """Sets the real_name_attribute of this LDAPResourceType.


        :param real_name_attribute: The real_name_attribute of this LDAPResourceType.  # noqa: E501
        :type: str
        """

        self._real_name_attribute = real_name_attribute

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


        :return: The user_search_filter of this LDAPResourceType.  # noqa: E501
        :rtype: str
        """
        return self._user_search_filter

    @user_search_filter.setter
    def user_search_filter(self, user_search_filter):
        """Sets the user_search_filter of this LDAPResourceType.


        :param user_search_filter: The user_search_filter of this LDAPResourceType.  # noqa: E501
        :type: str
        """

        self._user_search_filter = user_search_filter

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


        :return: The username_attribute of this LDAPResourceType.  # noqa: E501
        :rtype: str
        """
        return self._username_attribute

    @username_attribute.setter
    def username_attribute(self, username_attribute):
        """Sets the username_attribute of this LDAPResourceType.


        :param username_attribute: The username_attribute of this LDAPResourceType.  # noqa: E501
        :type: str
        """
        if username_attribute is None:
            raise ValueError("Invalid value for `username_attribute`, must not be `None`")  # noqa: E501

        self._username_attribute = username_attribute

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


        :return: The group_dn of this LDAPResourceType.  # noqa: E501
        :rtype: str
        """
        return self._group_dn

    @group_dn.setter
    def group_dn(self, group_dn):
        """Sets the group_dn of this LDAPResourceType.


        :param group_dn: The group_dn of this LDAPResourceType.  # noqa: E501
        :type: str
        """

        self._group_dn = group_dn

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


        :return: The cache_lifetime of this LDAPResourceType.  # noqa: E501
        :rtype: int
        """
        return self._cache_lifetime

    @cache_lifetime.setter
    def cache_lifetime(self, cache_lifetime):
        """Sets the cache_lifetime of this LDAPResourceType.


        :param cache_lifetime: The cache_lifetime of this LDAPResourceType.  # noqa: E501
        :type: int
        """

        self._cache_lifetime = cache_lifetime

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.openapi_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

        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, LDAPResourceType):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        return not self == other
