# coding: utf-8

"""
    VeeRoute.LSS Lastmile

    VeeRoute.LSS Lastmile API  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from vrt_lss_lastmile.configuration import Configuration


class TripStatistics(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 = {
        'trip_key': 'str',
        'statistics': 'Statistics',
        'stop_statistics': 'list[StopStatistics]',
        'total_load': 'TransportLoad',
        'max_load': 'TransportLoad'
    }

    attribute_map = {
        'trip_key': 'trip_key',
        'statistics': 'statistics',
        'stop_statistics': 'stop_statistics',
        'total_load': 'total_load',
        'max_load': 'max_load'
    }

    def __init__(self, trip_key=None, statistics=None, stop_statistics=None, total_load=None, max_load=None, local_vars_configuration=None):  # noqa: E501
        """TripStatistics - 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._trip_key = None
        self._statistics = None
        self._stop_statistics = None
        self._total_load = None
        self._max_load = None
        self.discriminator = None

        self.trip_key = trip_key
        self.statistics = statistics
        self.stop_statistics = stop_statistics
        self.total_load = total_load
        self.max_load = max_load

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

        Trip key, unique ID  # noqa: E501

        :return: The trip_key of this TripStatistics.  # noqa: E501
        :rtype: str
        """
        return self._trip_key

    @trip_key.setter
    def trip_key(self, trip_key):
        """Sets the trip_key of this TripStatistics.

        Trip key, unique ID  # noqa: E501

        :param trip_key: The trip_key of this TripStatistics.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and trip_key is None:  # noqa: E501
            raise ValueError("Invalid value for `trip_key`, must not be `None`")  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                trip_key is not None and len(trip_key) > 1024):
            raise ValueError("Invalid value for `trip_key`, length must be less than or equal to `1024`")  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                trip_key is not None and len(trip_key) < 1):
            raise ValueError("Invalid value for `trip_key`, length must be greater than or equal to `1`")  # noqa: E501

        self._trip_key = trip_key

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


        :return: The statistics of this TripStatistics.  # noqa: E501
        :rtype: Statistics
        """
        return self._statistics

    @statistics.setter
    def statistics(self, statistics):
        """Sets the statistics of this TripStatistics.


        :param statistics: The statistics of this TripStatistics.  # noqa: E501
        :type: Statistics
        """

        self._statistics = statistics

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

        Statistics per stop during the trip.  # noqa: E501

        :return: The stop_statistics of this TripStatistics.  # noqa: E501
        :rtype: list[StopStatistics]
        """
        return self._stop_statistics

    @stop_statistics.setter
    def stop_statistics(self, stop_statistics):
        """Sets the stop_statistics of this TripStatistics.

        Statistics per stop during the trip.  # noqa: E501

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

        self._stop_statistics = stop_statistics

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


        :return: The total_load of this TripStatistics.  # noqa: E501
        :rtype: TransportLoad
        """
        return self._total_load

    @total_load.setter
    def total_load(self, total_load):
        """Sets the total_load of this TripStatistics.


        :param total_load: The total_load of this TripStatistics.  # noqa: E501
        :type: TransportLoad
        """

        self._total_load = total_load

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


        :return: The max_load of this TripStatistics.  # noqa: E501
        :rtype: TransportLoad
        """
        return self._max_load

    @max_load.setter
    def max_load(self, max_load):
        """Sets the max_load of this TripStatistics.


        :param max_load: The max_load of this TripStatistics.  # noqa: E501
        :type: TransportLoad
        """

        self._max_load = max_load

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

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