# coding: utf-8

"""
    VeeRoute.LSS Clustering

    Программный интерфейс для кластеризации локаций.  # noqa: E501

    The version of the OpenAPI document: 3.0.159676
    Contact: support@veeroute.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from vrt_lss_clustering.configuration import Configuration


class ClusterTask(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 = {
        'points': 'list[ClusterPoint]',
        'performers': 'list[Performer]',
        'clusters': 'list[Cluster]',
        'settings': 'ClusterSettings'
    }

    attribute_map = {
        'points': 'points',
        'performers': 'performers',
        'clusters': 'clusters',
        'settings': 'settings'
    }

    def __init__(self, points=None, performers=None, clusters=None, settings=None, local_vars_configuration=None):  # noqa: E501
        """ClusterTask - 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._points = None
        self._performers = None
        self._clusters = None
        self._settings = None
        self.discriminator = None

        self.points = points
        self.performers = performers
        if clusters is not None:
            self.clusters = clusters
        if settings is not None:
            self.settings = settings

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

        Список точек.  # noqa: E501

        :return: The points of this ClusterTask.  # noqa: E501
        :rtype: list[ClusterPoint]
        """
        return self._points

    @points.setter
    def points(self, points):
        """Sets the points of this ClusterTask.

        Список точек.  # noqa: E501

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

        self._points = points

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

        Список исполнителей.  # noqa: E501

        :return: The performers of this ClusterTask.  # noqa: E501
        :rtype: list[Performer]
        """
        return self._performers

    @performers.setter
    def performers(self, performers):
        """Sets the performers of this ClusterTask.

        Список исполнителей.  # noqa: E501

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

        self._performers = performers

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

        Список кластеров, которые будут использоваться как базовое решение. Данные кластера не являются ограничением для кластеризации, т.е. точки из указанного кластера могут быть перемещены в другой кластер.   # noqa: E501

        :return: The clusters of this ClusterTask.  # noqa: E501
        :rtype: list[Cluster]
        """
        return self._clusters

    @clusters.setter
    def clusters(self, clusters):
        """Sets the clusters of this ClusterTask.

        Список кластеров, которые будут использоваться как базовое решение. Данные кластера не являются ограничением для кластеризации, т.е. точки из указанного кластера могут быть перемещены в другой кластер.   # noqa: E501

        :param clusters: The clusters of this ClusterTask.  # noqa: E501
        :type: list[Cluster]
        """

        self._clusters = clusters

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


        :return: The settings of this ClusterTask.  # noqa: E501
        :rtype: ClusterSettings
        """
        return self._settings

    @settings.setter
    def settings(self, settings):
        """Sets the settings of this ClusterTask.


        :param settings: The settings of this ClusterTask.  # noqa: E501
        :type: ClusterSettings
        """

        self._settings = settings

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

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