# coding: utf-8

"""
    VeeRoute.LSS Clustering

    VeeRoute.LSS Clustering API  # noqa: E501

    The version of the OpenAPI document: 3.2.160181
    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 TrafficFactor(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 = {
        'time_window': 'TimeWindow',
        'length_multiplier': 'float',
        'length_additive': 'float',
        'time_multiplier': 'float',
        'time_additive': 'float'
    }

    attribute_map = {
        'time_window': 'time_window',
        'length_multiplier': 'length_multiplier',
        'length_additive': 'length_additive',
        'time_multiplier': 'time_multiplier',
        'time_additive': 'time_additive'
    }

    def __init__(self, time_window=None, length_multiplier=1, length_additive=0, time_multiplier=1, time_additive=0, local_vars_configuration=None):  # noqa: E501
        """TrafficFactor - 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._time_window = None
        self._length_multiplier = None
        self._length_additive = None
        self._time_multiplier = None
        self._time_additive = None
        self.discriminator = None

        self.time_window = time_window
        if length_multiplier is not None:
            self.length_multiplier = length_multiplier
        if length_additive is not None:
            self.length_additive = length_additive
        if time_multiplier is not None:
            self.time_multiplier = time_multiplier
        if time_additive is not None:
            self.time_additive = time_additive

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


        :return: The time_window of this TrafficFactor.  # noqa: E501
        :rtype: TimeWindow
        """
        return self._time_window

    @time_window.setter
    def time_window(self, time_window):
        """Sets the time_window of this TrafficFactor.


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

        self._time_window = time_window

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

        Distance factor.  # noqa: E501

        :return: The length_multiplier of this TrafficFactor.  # noqa: E501
        :rtype: float
        """
        return self._length_multiplier

    @length_multiplier.setter
    def length_multiplier(self, length_multiplier):
        """Sets the length_multiplier of this TrafficFactor.

        Distance factor.  # noqa: E501

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

        self._length_multiplier = length_multiplier

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

        Increasing the distance by this number, in meters.  # noqa: E501

        :return: The length_additive of this TrafficFactor.  # noqa: E501
        :rtype: float
        """
        return self._length_additive

    @length_additive.setter
    def length_additive(self, length_additive):
        """Sets the length_additive of this TrafficFactor.

        Increasing the distance by this number, in meters.  # noqa: E501

        :param length_additive: The length_additive of this TrafficFactor.  # noqa: E501
        :type: float
        """
        if (self.local_vars_configuration.client_side_validation and
                length_additive is not None and length_additive > 100000):  # noqa: E501
            raise ValueError("Invalid value for `length_additive`, must be a value less than or equal to `100000`")  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                length_additive is not None and length_additive < -100000):  # noqa: E501
            raise ValueError("Invalid value for `length_additive`, must be a value greater than or equal to `-100000`")  # noqa: E501

        self._length_additive = length_additive

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

        Time factor.  # noqa: E501

        :return: The time_multiplier of this TrafficFactor.  # noqa: E501
        :rtype: float
        """
        return self._time_multiplier

    @time_multiplier.setter
    def time_multiplier(self, time_multiplier):
        """Sets the time_multiplier of this TrafficFactor.

        Time factor.  # noqa: E501

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

        self._time_multiplier = time_multiplier

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

        Increasing the time by this number, in meters.  # noqa: E501

        :return: The time_additive of this TrafficFactor.  # noqa: E501
        :rtype: float
        """
        return self._time_additive

    @time_additive.setter
    def time_additive(self, time_additive):
        """Sets the time_additive of this TrafficFactor.

        Increasing the time by this number, in meters.  # noqa: E501

        :param time_additive: The time_additive of this TrafficFactor.  # noqa: E501
        :type: float
        """
        if (self.local_vars_configuration.client_side_validation and
                time_additive is not None and time_additive > 1440):  # noqa: E501
            raise ValueError("Invalid value for `time_additive`, must be a value less than or equal to `1440`")  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                time_additive is not None and time_additive < -1440):  # noqa: E501
            raise ValueError("Invalid value for `time_additive`, must be a value greater than or equal to `-1440`")  # noqa: E501

        self._time_additive = time_additive

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

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