# coding: utf-8

"""
    Lightly API

    Lightly.ai enables you to do self-supervised learning in an easy and intuitive way. The lightly.ai OpenAPI spec defines how one can interact with our REST API to unleash the full potential of lightly.ai  # noqa: E501

    OpenAPI spec version: 1.0.0
    Contact: support@lightly.ai
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from lightly.openapi_generated.swagger_client.configuration import Configuration


class DatasourceConfigVerifyData(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 = {
        'can_read': 'bool',
        'can_write': 'bool',
        'can_list': 'bool',
        'can_overwrite': 'bool',
        'errors': 'DatasourceConfigVerifyDataErrors'
    }

    attribute_map = {
        'can_read': 'canRead',
        'can_write': 'canWrite',
        'can_list': 'canList',
        'can_overwrite': 'canOverwrite',
        'errors': 'errors'
    }

    def __init__(self, can_read=None, can_write=None, can_list=None, can_overwrite=None, errors=None, _configuration=None):  # noqa: E501
        """DatasourceConfigVerifyData - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._can_read = None
        self._can_write = None
        self._can_list = None
        self._can_overwrite = None
        self._errors = None
        self.discriminator = None

        self.can_read = can_read
        self.can_write = can_write
        self.can_list = can_list
        self.can_overwrite = can_overwrite
        if errors is not None:
            self.errors = errors

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


        :return: The can_read of this DatasourceConfigVerifyData.  # noqa: E501
        :rtype: bool
        """
        return self._can_read

    @can_read.setter
    def can_read(self, can_read):
        """Sets the can_read of this DatasourceConfigVerifyData.


        :param can_read: The can_read of this DatasourceConfigVerifyData.  # noqa: E501
        :type: bool
        """
        if self._configuration.client_side_validation and can_read is None:
            raise ValueError("Invalid value for `can_read`, must not be `None`")  # noqa: E501

        self._can_read = can_read

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


        :return: The can_write of this DatasourceConfigVerifyData.  # noqa: E501
        :rtype: bool
        """
        return self._can_write

    @can_write.setter
    def can_write(self, can_write):
        """Sets the can_write of this DatasourceConfigVerifyData.


        :param can_write: The can_write of this DatasourceConfigVerifyData.  # noqa: E501
        :type: bool
        """
        if self._configuration.client_side_validation and can_write is None:
            raise ValueError("Invalid value for `can_write`, must not be `None`")  # noqa: E501

        self._can_write = can_write

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


        :return: The can_list of this DatasourceConfigVerifyData.  # noqa: E501
        :rtype: bool
        """
        return self._can_list

    @can_list.setter
    def can_list(self, can_list):
        """Sets the can_list of this DatasourceConfigVerifyData.


        :param can_list: The can_list of this DatasourceConfigVerifyData.  # noqa: E501
        :type: bool
        """
        if self._configuration.client_side_validation and can_list is None:
            raise ValueError("Invalid value for `can_list`, must not be `None`")  # noqa: E501

        self._can_list = can_list

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


        :return: The can_overwrite of this DatasourceConfigVerifyData.  # noqa: E501
        :rtype: bool
        """
        return self._can_overwrite

    @can_overwrite.setter
    def can_overwrite(self, can_overwrite):
        """Sets the can_overwrite of this DatasourceConfigVerifyData.


        :param can_overwrite: The can_overwrite of this DatasourceConfigVerifyData.  # noqa: E501
        :type: bool
        """
        if self._configuration.client_side_validation and can_overwrite is None:
            raise ValueError("Invalid value for `can_overwrite`, must not be `None`")  # noqa: E501

        self._can_overwrite = can_overwrite

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


        :return: The errors of this DatasourceConfigVerifyData.  # noqa: E501
        :rtype: DatasourceConfigVerifyDataErrors
        """
        return self._errors

    @errors.setter
    def errors(self, errors):
        """Sets the errors of this DatasourceConfigVerifyData.


        :param errors: The errors of this DatasourceConfigVerifyData.  # noqa: E501
        :type: DatasourceConfigVerifyDataErrors
        """

        self._errors = errors

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

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