# 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 SelectionConfigEntryStrategy(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 = {
        'type': 'SelectionStrategyType',
        'stopping_condition_minimum_distance': 'float',
        'threshold': 'float',
        'operation': 'SelectionStrategyThresholdOperation',
        'target': 'object'
    }

    attribute_map = {
        'type': 'type',
        'stopping_condition_minimum_distance': 'stopping_condition_minimum_distance',
        'threshold': 'threshold',
        'operation': 'operation',
        'target': 'target'
    }

    def __init__(self, type=None, stopping_condition_minimum_distance=None, threshold=None, operation=None, target=None, _configuration=None):  # noqa: E501
        """SelectionConfigEntryStrategy - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._type = None
        self._stopping_condition_minimum_distance = None
        self._threshold = None
        self._operation = None
        self._target = None
        self.discriminator = None

        self.type = type
        if stopping_condition_minimum_distance is not None:
            self.stopping_condition_minimum_distance = stopping_condition_minimum_distance
        if threshold is not None:
            self.threshold = threshold
        if operation is not None:
            self.operation = operation
        if target is not None:
            self.target = target

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


        :return: The type of this SelectionConfigEntryStrategy.  # noqa: E501
        :rtype: SelectionStrategyType
        """
        return self._type

    @type.setter
    def type(self, type):
        """Sets the type of this SelectionConfigEntryStrategy.


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

        self._type = type

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


        :return: The stopping_condition_minimum_distance of this SelectionConfigEntryStrategy.  # noqa: E501
        :rtype: float
        """
        return self._stopping_condition_minimum_distance

    @stopping_condition_minimum_distance.setter
    def stopping_condition_minimum_distance(self, stopping_condition_minimum_distance):
        """Sets the stopping_condition_minimum_distance of this SelectionConfigEntryStrategy.


        :param stopping_condition_minimum_distance: The stopping_condition_minimum_distance of this SelectionConfigEntryStrategy.  # noqa: E501
        :type: float
        """

        self._stopping_condition_minimum_distance = stopping_condition_minimum_distance

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


        :return: The threshold of this SelectionConfigEntryStrategy.  # noqa: E501
        :rtype: float
        """
        return self._threshold

    @threshold.setter
    def threshold(self, threshold):
        """Sets the threshold of this SelectionConfigEntryStrategy.


        :param threshold: The threshold of this SelectionConfigEntryStrategy.  # noqa: E501
        :type: float
        """

        self._threshold = threshold

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


        :return: The operation of this SelectionConfigEntryStrategy.  # noqa: E501
        :rtype: SelectionStrategyThresholdOperation
        """
        return self._operation

    @operation.setter
    def operation(self, operation):
        """Sets the operation of this SelectionConfigEntryStrategy.


        :param operation: The operation of this SelectionConfigEntryStrategy.  # noqa: E501
        :type: SelectionStrategyThresholdOperation
        """

        self._operation = operation

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


        :return: The target of this SelectionConfigEntryStrategy.  # noqa: E501
        :rtype: object
        """
        return self._target

    @target.setter
    def target(self, target):
        """Sets the target of this SelectionConfigEntryStrategy.


        :param target: The target of this SelectionConfigEntryStrategy.  # noqa: E501
        :type: object
        """

        self._target = target

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

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