# coding: utf-8

"""
    Collibra Protect API - Partner

    API to retrieve the data access rule set it needs to synchronize. This API is targeted to be used by Collibra Partners.  # noqa: E501

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

import pprint
import re  # noqa: F401

import six

class Database(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 = {
        'provider': 'Provider',
        'provider_details': 'ProviderDetails',
        'id': 'str',
        'name': 'str',
        'schemas': 'list[DatabaseSchema]',
        'tags': 'list[DatabaseTag]',
        'custom_maskings': 'list[DatabaseCustomMasking]'
    }

    attribute_map = {
        'provider': 'provider',
        'provider_details': 'providerDetails',
        'id': 'id',
        'name': 'name',
        'schemas': 'schemas',
        'tags': 'tags',
        'custom_maskings': 'customMaskings'
    }

    def __init__(self, provider=None, provider_details=None, id=None, name=None, schemas=None, tags=None, custom_maskings=None):  # noqa: E501
        """Database - a model defined in Swagger"""  # noqa: E501
        self._provider = None
        self._provider_details = None
        self._id = None
        self._name = None
        self._schemas = None
        self._tags = None
        self._custom_maskings = None
        self.discriminator = None
        self.provider = provider
        if provider_details is not None:
            self.provider_details = provider_details
        self.id = id
        self.name = name
        if schemas is not None:
            self.schemas = schemas
        self.tags = tags
        self.custom_maskings = custom_maskings

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


        :return: The provider of this Database.  # noqa: E501
        :rtype: Provider
        """
        return self._provider

    @provider.setter
    def provider(self, provider):
        """Sets the provider of this Database.


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

        self._provider = provider

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


        :return: The provider_details of this Database.  # noqa: E501
        :rtype: ProviderDetails
        """
        return self._provider_details

    @provider_details.setter
    def provider_details(self, provider_details):
        """Sets the provider_details of this Database.


        :param provider_details: The provider_details of this Database.  # noqa: E501
        :type: ProviderDetails
        """

        self._provider_details = provider_details

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

        The id of the database  # noqa: E501

        :return: The id of this Database.  # noqa: E501
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this Database.

        The id of the database  # noqa: E501

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

        self._id = id

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

        The name of the database  # noqa: E501

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

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

        The name of the database  # noqa: E501

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

        self._name = name

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


        :return: The schemas of this Database.  # noqa: E501
        :rtype: list[DatabaseSchema]
        """
        return self._schemas

    @schemas.setter
    def schemas(self, schemas):
        """Sets the schemas of this Database.


        :param schemas: The schemas of this Database.  # noqa: E501
        :type: list[DatabaseSchema]
        """

        self._schemas = schemas

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


        :return: The tags of this Database.  # noqa: E501
        :rtype: list[DatabaseTag]
        """
        return self._tags

    @tags.setter
    def tags(self, tags):
        """Sets the tags of this Database.


        :param tags: The tags of this Database.  # noqa: E501
        :type: list[DatabaseTag]
        """
        if tags is None:
            raise ValueError("Invalid value for `tags`, must not be `None`")  # noqa: E501

        self._tags = tags

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


        :return: The custom_maskings of this Database.  # noqa: E501
        :rtype: list[DatabaseCustomMasking]
        """
        return self._custom_maskings

    @custom_maskings.setter
    def custom_maskings(self, custom_maskings):
        """Sets the custom_maskings of this Database.


        :param custom_maskings: The custom_maskings of this Database.  # noqa: E501
        :type: list[DatabaseCustomMasking]
        """
        if custom_maskings is None:
            raise ValueError("Invalid value for `custom_maskings`, must not be `None`")  # noqa: E501

        self._custom_maskings = custom_maskings

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

        return self.__dict__ == other.__dict__

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