# 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 ClusterResult(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 = {
        'tracedata': 'TraceData',
        'clusters': 'list[Cluster]',
        'validations': 'list[Validation]',
        'unclustered_points': 'list[UnclusteredPoint]',
        'progress': 'int',
        'info': 'PlanInfo'
    }

    attribute_map = {
        'tracedata': 'tracedata',
        'clusters': 'clusters',
        'validations': 'validations',
        'unclustered_points': 'unclustered_points',
        'progress': 'progress',
        'info': 'info'
    }

    def __init__(self, tracedata=None, clusters=None, validations=None, unclustered_points=None, progress=None, info=None, local_vars_configuration=None):  # noqa: E501
        """ClusterResult - 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._tracedata = None
        self._clusters = None
        self._validations = None
        self._unclustered_points = None
        self._progress = None
        self._info = None
        self.discriminator = None

        if tracedata is not None:
            self.tracedata = tracedata
        if clusters is not None:
            self.clusters = clusters
        if validations is not None:
            self.validations = validations
        if unclustered_points is not None:
            self.unclustered_points = unclustered_points
        if progress is not None:
            self.progress = progress
        if info is not None:
            self.info = info

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


        :return: The tracedata of this ClusterResult.  # noqa: E501
        :rtype: TraceData
        """
        return self._tracedata

    @tracedata.setter
    def tracedata(self, tracedata):
        """Sets the tracedata of this ClusterResult.


        :param tracedata: The tracedata of this ClusterResult.  # noqa: E501
        :type: TraceData
        """

        self._tracedata = tracedata

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

        Список кластеров.  # noqa: E501

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

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

        Список кластеров.  # noqa: E501

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

        self._clusters = clusters

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

        Список валидаций  # noqa: E501

        :return: The validations of this ClusterResult.  # noqa: E501
        :rtype: list[Validation]
        """
        return self._validations

    @validations.setter
    def validations(self, validations):
        """Sets the validations of this ClusterResult.

        Список валидаций  # noqa: E501

        :param validations: The validations of this ClusterResult.  # noqa: E501
        :type: list[Validation]
        """

        self._validations = validations

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

        Список точек, которые не попали ни в один кластер.  # noqa: E501

        :return: The unclustered_points of this ClusterResult.  # noqa: E501
        :rtype: list[UnclusteredPoint]
        """
        return self._unclustered_points

    @unclustered_points.setter
    def unclustered_points(self, unclustered_points):
        """Sets the unclustered_points of this ClusterResult.

        Список точек, которые не попали ни в один кластер.  # noqa: E501

        :param unclustered_points: The unclustered_points of this ClusterResult.  # noqa: E501
        :type: list[UnclusteredPoint]
        """

        self._unclustered_points = unclustered_points

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

        Прогресс планирования в процентах. Прогресс отражает текущее количество завершенных шагов.   # noqa: E501

        :return: The progress of this ClusterResult.  # noqa: E501
        :rtype: int
        """
        return self._progress

    @progress.setter
    def progress(self, progress):
        """Sets the progress of this ClusterResult.

        Прогресс планирования в процентах. Прогресс отражает текущее количество завершенных шагов.   # noqa: E501

        :param progress: The progress of this ClusterResult.  # noqa: E501
        :type: int
        """
        if (self.local_vars_configuration.client_side_validation and
                progress is not None and progress > 100):  # noqa: E501
            raise ValueError("Invalid value for `progress`, must be a value less than or equal to `100`")  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                progress is not None and progress < 0):  # noqa: E501
            raise ValueError("Invalid value for `progress`, must be a value greater than or equal to `0`")  # noqa: E501

        self._progress = progress

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


        :return: The info of this ClusterResult.  # noqa: E501
        :rtype: PlanInfo
        """
        return self._info

    @info.setter
    def info(self, info):
        """Sets the info of this ClusterResult.


        :param info: The info of this ClusterResult.  # noqa: E501
        :type: PlanInfo
        """

        self._info = info

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

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