# coding: utf-8

"""
    Knowledge-Graph Create API

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

    The version of the OpenAPI document: 1.0.0
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from deepsearch.cps.apis.kg.create.configuration import Configuration


class DatabaseSource(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 = {
        'categories': 'list[str]',
        'collections': 'list[str]',
        'data_fields': 'list[str]',
        'mongo': 'DatabaseSourceMongo',
        's3': 'DatabaseSourceS3'
    }

    attribute_map = {
        'categories': 'categories',
        'collections': 'collections',
        'data_fields': 'data-fields',
        'mongo': 'mongo',
        's3': 's3'
    }

    def __init__(self, categories=None, collections=None, data_fields=None, mongo=None, s3=None, local_vars_configuration=None):  # noqa: E501
        """DatabaseSource - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._categories = None
        self._collections = None
        self._data_fields = None
        self._mongo = None
        self._s3 = None
        self.discriminator = None

        self.categories = categories
        self.collections = collections
        if data_fields is not None:
            self.data_fields = data_fields
        if mongo is not None:
            self.mongo = mongo
        if s3 is not None:
            self.s3 = s3

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


        :return: The categories of this DatabaseSource.  # noqa: E501
        :rtype: list[str]
        """
        return self._categories

    @categories.setter
    def categories(self, categories):
        """Sets the categories of this DatabaseSource.


        :param categories: The categories of this DatabaseSource.  # noqa: E501
        :type: list[str]
        """
        if self.local_vars_configuration.client_side_validation and categories is None:  # noqa: E501
            raise ValueError("Invalid value for `categories`, must not be `None`")  # noqa: E501

        self._categories = categories

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


        :return: The collections of this DatabaseSource.  # noqa: E501
        :rtype: list[str]
        """
        return self._collections

    @collections.setter
    def collections(self, collections):
        """Sets the collections of this DatabaseSource.


        :param collections: The collections of this DatabaseSource.  # noqa: E501
        :type: list[str]
        """
        if self.local_vars_configuration.client_side_validation and collections is None:  # noqa: E501
            raise ValueError("Invalid value for `collections`, must not be `None`")  # noqa: E501

        self._collections = collections

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


        :return: The data_fields of this DatabaseSource.  # noqa: E501
        :rtype: list[str]
        """
        return self._data_fields

    @data_fields.setter
    def data_fields(self, data_fields):
        """Sets the data_fields of this DatabaseSource.


        :param data_fields: The data_fields of this DatabaseSource.  # noqa: E501
        :type: list[str]
        """

        self._data_fields = data_fields

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


        :return: The mongo of this DatabaseSource.  # noqa: E501
        :rtype: DatabaseSourceMongo
        """
        return self._mongo

    @mongo.setter
    def mongo(self, mongo):
        """Sets the mongo of this DatabaseSource.


        :param mongo: The mongo of this DatabaseSource.  # noqa: E501
        :type: DatabaseSourceMongo
        """

        self._mongo = mongo

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


        :return: The s3 of this DatabaseSource.  # noqa: E501
        :rtype: DatabaseSourceS3
        """
        return self._s3

    @s3.setter
    def s3(self, s3):
        """Sets the s3 of this DatabaseSource.


        :param s3: The s3 of this DatabaseSource.  # noqa: E501
        :type: DatabaseSourceS3
        """

        self._s3 = s3

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

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