# coding: utf-8

"""
    

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

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


from pprint import pformat

from six import iteritems


class DataSource(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',
        'format': 'str',
        'categories': 'list[str]',
        'pk': 'DataSourcePK'
    }

    attribute_map = {
        'name': 'name',
        'format': 'format',
        'categories': 'categories',
        'pk': 'pk'
    }

    def __init__(self, name=None, format=None, categories=None, pk=None):
        """
        DataSource - a model defined in Swagger
        """

        self._name = None
        self._format = None
        self._categories = None
        self._pk = None

        self.name = name
        if format is not None:
          self.format = format
        if categories is not None:
          self.categories = categories
        self.pk = pk

    @property
    def name(self):
        """
        Gets the name of this DataSource.

        :return: The name of this DataSource.
        :rtype: str
        """
        return self._name

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

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

        self._name = name

    @property
    def format(self):
        """
        Gets the format of this DataSource.
        datasource format (a file type or even a data-store type), e.g. parquet, csv, mysql, kafka

        :return: The format of this DataSource.
        :rtype: str
        """
        return self._format

    @format.setter
    def format(self, format):
        """
        Sets the format of this DataSource.
        datasource format (a file type or even a data-store type), e.g. parquet, csv, mysql, kafka

        :param format: The format of this DataSource.
        :type: str
        """

        self._format = format

    @property
    def categories(self):
        """
        Gets the categories of this DataSource.
        datasource categories (Their IDs)

        :return: The categories of this DataSource.
        :rtype: list[str]
        """
        return self._categories

    @categories.setter
    def categories(self, categories):
        """
        Sets the categories of this DataSource.
        datasource categories (Their IDs)

        :param categories: The categories of this DataSource.
        :type: list[str]
        """

        self._categories = categories

    @property
    def pk(self):
        """
        Gets the pk of this DataSource.

        :return: The pk of this DataSource.
        :rtype: DataSourcePK
        """
        return self._pk

    @pk.setter
    def pk(self, pk):
        """
        Sets the pk of this DataSource.

        :param pk: The pk of this DataSource.
        :type: DataSourcePK
        """
        if pk is None:
            raise ValueError("Invalid value for `pk`, must not be `None`")

        self._pk = pk

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

        for attr, _ in 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

        return result

    def to_str(self):
        """
        Returns the string representation of the model
        """
        return 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, DataSource):
            return False

        return self.__dict__ == other.__dict__

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