# coding: utf-8

"""
    VeeRoute.LSS Routing

    VeeRoute.LSS Routing 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_routing.configuration import Configuration


class RouteStatistics(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 = {
        'distance': 'int',
        'duration': 'int',
        'stopping_time': 'int',
        'time_window': 'RouteStatisticsTimeWindow'
    }

    attribute_map = {
        'distance': 'distance',
        'duration': 'duration',
        'stopping_time': 'stopping_time',
        'time_window': 'time_window'
    }

    def __init__(self, distance=None, duration=None, stopping_time=None, time_window=None, local_vars_configuration=None):  # noqa: E501
        """RouteStatistics - 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._distance = None
        self._duration = None
        self._stopping_time = None
        self._time_window = None
        self.discriminator = None

        self.distance = distance
        self.duration = duration
        if stopping_time is not None:
            self.stopping_time = stopping_time
        if time_window is not None:
            self.time_window = time_window

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

        Total length, in meters.  # noqa: E501

        :return: The distance of this RouteStatistics.  # noqa: E501
        :rtype: int
        """
        return self._distance

    @distance.setter
    def distance(self, distance):
        """Sets the distance of this RouteStatistics.

        Total length, in meters.  # noqa: E501

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

        self._distance = distance

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

        Total duration, in minutes.  # noqa: E501

        :return: The duration of this RouteStatistics.  # noqa: E501
        :rtype: int
        """
        return self._duration

    @duration.setter
    def duration(self, duration):
        """Sets the duration of this RouteStatistics.

        Total duration, in minutes.  # noqa: E501

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

        self._duration = duration

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

        The total duration of stops at points, in minutes.  # noqa: E501

        :return: The stopping_time of this RouteStatistics.  # noqa: E501
        :rtype: int
        """
        return self._stopping_time

    @stopping_time.setter
    def stopping_time(self, stopping_time):
        """Sets the stopping_time of this RouteStatistics.

        The total duration of stops at points, in minutes.  # noqa: E501

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

        self._stopping_time = stopping_time

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


        :return: The time_window of this RouteStatistics.  # noqa: E501
        :rtype: RouteStatisticsTimeWindow
        """
        return self._time_window

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


        :param time_window: The time_window of this RouteStatistics.  # noqa: E501
        :type: RouteStatisticsTimeWindow
        """

        self._time_window = time_window

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

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