# coding: utf-8

"""
    Trip Planner

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

    OpenAPI spec version: 1.0
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from swagger_client.models.trip_request_response_journey_leg_hints import TripRequestResponseJourneyLegHints  # noqa: F401,E501
from swagger_client.models.trip_request_response_journey_leg_interchange import TripRequestResponseJourneyLegInterchange  # noqa: F401,E501
from swagger_client.models.trip_request_response_journey_leg_path_description import TripRequestResponseJourneyLegPathDescription  # noqa: F401,E501
from swagger_client.models.trip_request_response_journey_leg_properties import TripRequestResponseJourneyLegProperties  # noqa: F401,E501
from swagger_client.models.trip_request_response_journey_leg_stop import TripRequestResponseJourneyLegStop  # noqa: F401,E501
from swagger_client.models.trip_request_response_journey_leg_stop_footpath_info import TripRequestResponseJourneyLegStopFootpathInfo  # noqa: F401,E501
from swagger_client.models.trip_request_response_journey_leg_stop_info import TripRequestResponseJourneyLegStopInfo  # noqa: F401,E501
from swagger_client.models.trip_transportation import TripTransportation  # noqa: F401,E501


class TripRequestResponseJourneyLeg(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 = {
        'duration': 'int',
        'is_realtime_controlled': 'bool',
        'origin': 'TripRequestResponseJourneyLegStop',
        'destination': 'TripRequestResponseJourneyLegStop',
        'transportation': 'TripTransportation',
        'hints': 'list[TripRequestResponseJourneyLegHints]',
        'stop_sequence': 'list[TripRequestResponseJourneyLegStop]',
        'foot_path_info': 'list[TripRequestResponseJourneyLegStopFootpathInfo]',
        'infos': 'list[TripRequestResponseJourneyLegStopInfo]',
        'path_descriptions': 'list[TripRequestResponseJourneyLegPathDescription]',
        'interchange': 'TripRequestResponseJourneyLegInterchange',
        'coords': 'list[list[float]]',
        'properties': 'TripRequestResponseJourneyLegProperties'
    }

    attribute_map = {
        'duration': 'duration',
        'is_realtime_controlled': 'isRealtimeControlled',
        'origin': 'origin',
        'destination': 'destination',
        'transportation': 'transportation',
        'hints': 'hints',
        'stop_sequence': 'stopSequence',
        'foot_path_info': 'footPathInfo',
        'infos': 'infos',
        'path_descriptions': 'pathDescriptions',
        'interchange': 'interchange',
        'coords': 'coords',
        'properties': 'properties'
    }

    def __init__(self, duration=None, is_realtime_controlled=None, origin=None, destination=None, transportation=None, hints=None, stop_sequence=None, foot_path_info=None, infos=None, path_descriptions=None, interchange=None, coords=None, properties=None):  # noqa: E501
        """TripRequestResponseJourneyLeg - a model defined in Swagger"""  # noqa: E501

        self._duration = None
        self._is_realtime_controlled = None
        self._origin = None
        self._destination = None
        self._transportation = None
        self._hints = None
        self._stop_sequence = None
        self._foot_path_info = None
        self._infos = None
        self._path_descriptions = None
        self._interchange = None
        self._coords = None
        self._properties = None
        self.discriminator = None

        if duration is not None:
            self.duration = duration
        if is_realtime_controlled is not None:
            self.is_realtime_controlled = is_realtime_controlled
        if origin is not None:
            self.origin = origin
        if destination is not None:
            self.destination = destination
        if transportation is not None:
            self.transportation = transportation
        if hints is not None:
            self.hints = hints
        if stop_sequence is not None:
            self.stop_sequence = stop_sequence
        if foot_path_info is not None:
            self.foot_path_info = foot_path_info
        if infos is not None:
            self.infos = infos
        if path_descriptions is not None:
            self.path_descriptions = path_descriptions
        if interchange is not None:
            self.interchange = interchange
        if coords is not None:
            self.coords = coords
        if properties is not None:
            self.properties = properties

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

        The approximate amount of time in seconds required to complete this journey leg.  # noqa: E501

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

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

        The approximate amount of time in seconds required to complete this journey leg.  # noqa: E501

        :param duration: The duration of this TripRequestResponseJourneyLeg.  # noqa: E501
        :type: int
        """

        self._duration = duration

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

        This indicates whether or not real-time data has been used to calculate the departure/arrival timestamps  # noqa: E501

        :return: The is_realtime_controlled of this TripRequestResponseJourneyLeg.  # noqa: E501
        :rtype: bool
        """
        return self._is_realtime_controlled

    @is_realtime_controlled.setter
    def is_realtime_controlled(self, is_realtime_controlled):
        """Sets the is_realtime_controlled of this TripRequestResponseJourneyLeg.

        This indicates whether or not real-time data has been used to calculate the departure/arrival timestamps  # noqa: E501

        :param is_realtime_controlled: The is_realtime_controlled of this TripRequestResponseJourneyLeg.  # noqa: E501
        :type: bool
        """

        self._is_realtime_controlled = is_realtime_controlled

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

        This is the starting location of the leg.  # noqa: E501

        :return: The origin of this TripRequestResponseJourneyLeg.  # noqa: E501
        :rtype: TripRequestResponseJourneyLegStop
        """
        return self._origin

    @origin.setter
    def origin(self, origin):
        """Sets the origin of this TripRequestResponseJourneyLeg.

        This is the starting location of the leg.  # noqa: E501

        :param origin: The origin of this TripRequestResponseJourneyLeg.  # noqa: E501
        :type: TripRequestResponseJourneyLegStop
        """

        self._origin = origin

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

        This is the finishing location of the leg.  # noqa: E501

        :return: The destination of this TripRequestResponseJourneyLeg.  # noqa: E501
        :rtype: TripRequestResponseJourneyLegStop
        """
        return self._destination

    @destination.setter
    def destination(self, destination):
        """Sets the destination of this TripRequestResponseJourneyLeg.

        This is the finishing location of the leg.  # noqa: E501

        :param destination: The destination of this TripRequestResponseJourneyLeg.  # noqa: E501
        :type: TripRequestResponseJourneyLegStop
        """

        self._destination = destination

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

        This element contains information about the mode of transport and/or route used to complete this journey leg.   # noqa: E501

        :return: The transportation of this TripRequestResponseJourneyLeg.  # noqa: E501
        :rtype: TripTransportation
        """
        return self._transportation

    @transportation.setter
    def transportation(self, transportation):
        """Sets the transportation of this TripRequestResponseJourneyLeg.

        This element contains information about the mode of transport and/or route used to complete this journey leg.   # noqa: E501

        :param transportation: The transportation of this TripRequestResponseJourneyLeg.  # noqa: E501
        :type: TripTransportation
        """

        self._transportation = transportation

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

        Contains a number of additional informational messages that may be useful for travellers.  # noqa: E501

        :return: The hints of this TripRequestResponseJourneyLeg.  # noqa: E501
        :rtype: list[TripRequestResponseJourneyLegHints]
        """
        return self._hints

    @hints.setter
    def hints(self, hints):
        """Sets the hints of this TripRequestResponseJourneyLeg.

        Contains a number of additional informational messages that may be useful for travellers.  # noqa: E501

        :param hints: The hints of this TripRequestResponseJourneyLeg.  # noqa: E501
        :type: list[TripRequestResponseJourneyLegHints]
        """

        self._hints = hints

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

        This is a list of all stops that are made for this leg. It is sorted in order of its stopping sequence. If the leg is a walking leg between two stops, then this will contain these two stops in order.   # noqa: E501

        :return: The stop_sequence of this TripRequestResponseJourneyLeg.  # noqa: E501
        :rtype: list[TripRequestResponseJourneyLegStop]
        """
        return self._stop_sequence

    @stop_sequence.setter
    def stop_sequence(self, stop_sequence):
        """Sets the stop_sequence of this TripRequestResponseJourneyLeg.

        This is a list of all stops that are made for this leg. It is sorted in order of its stopping sequence. If the leg is a walking leg between two stops, then this will contain these two stops in order.   # noqa: E501

        :param stop_sequence: The stop_sequence of this TripRequestResponseJourneyLeg.  # noqa: E501
        :type: list[TripRequestResponseJourneyLegStop]
        """

        self._stop_sequence = stop_sequence

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

        If the leg corresponds to a walking leg, this element contains walking directions.   # noqa: E501

        :return: The foot_path_info of this TripRequestResponseJourneyLeg.  # noqa: E501
        :rtype: list[TripRequestResponseJourneyLegStopFootpathInfo]
        """
        return self._foot_path_info

    @foot_path_info.setter
    def foot_path_info(self, foot_path_info):
        """Sets the foot_path_info of this TripRequestResponseJourneyLeg.

        If the leg corresponds to a walking leg, this element contains walking directions.   # noqa: E501

        :param foot_path_info: The foot_path_info of this TripRequestResponseJourneyLeg.  # noqa: E501
        :type: list[TripRequestResponseJourneyLegStopFootpathInfo]
        """

        self._foot_path_info = foot_path_info

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

        Contains a number of service alert messages relating to this journey leg. Information returned here is also available using the `XML_ADDINFO_REQUEST` API endpoint.   # noqa: E501

        :return: The infos of this TripRequestResponseJourneyLeg.  # noqa: E501
        :rtype: list[TripRequestResponseJourneyLegStopInfo]
        """
        return self._infos

    @infos.setter
    def infos(self, infos):
        """Sets the infos of this TripRequestResponseJourneyLeg.

        Contains a number of service alert messages relating to this journey leg. Information returned here is also available using the `XML_ADDINFO_REQUEST` API endpoint.   # noqa: E501

        :param infos: The infos of this TripRequestResponseJourneyLeg.  # noqa: E501
        :type: list[TripRequestResponseJourneyLegStopInfo]
        """

        self._infos = infos

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

        Contains walking information for completing this journey leg.  # noqa: E501

        :return: The path_descriptions of this TripRequestResponseJourneyLeg.  # noqa: E501
        :rtype: list[TripRequestResponseJourneyLegPathDescription]
        """
        return self._path_descriptions

    @path_descriptions.setter
    def path_descriptions(self, path_descriptions):
        """Sets the path_descriptions of this TripRequestResponseJourneyLeg.

        Contains walking information for completing this journey leg.  # noqa: E501

        :param path_descriptions: The path_descriptions of this TripRequestResponseJourneyLeg.  # noqa: E501
        :type: list[TripRequestResponseJourneyLegPathDescription]
        """

        self._path_descriptions = path_descriptions

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

        Contains information for how to interchange between the end of one leg to the next journey leg.   # noqa: E501

        :return: The interchange of this TripRequestResponseJourneyLeg.  # noqa: E501
        :rtype: TripRequestResponseJourneyLegInterchange
        """
        return self._interchange

    @interchange.setter
    def interchange(self, interchange):
        """Sets the interchange of this TripRequestResponseJourneyLeg.

        Contains information for how to interchange between the end of one leg to the next journey leg.   # noqa: E501

        :param interchange: The interchange of this TripRequestResponseJourneyLeg.  # noqa: E501
        :type: TripRequestResponseJourneyLegInterchange
        """

        self._interchange = interchange

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

        This elements contains a list of coordinates that this journey leg follows. A line between can be plotted between these coordinates in order when representing the journey on a map in order to show where the vehicle travels (or for a walking leg, the path to be walked).   # noqa: E501

        :return: The coords of this TripRequestResponseJourneyLeg.  # noqa: E501
        :rtype: list[list[float]]
        """
        return self._coords

    @coords.setter
    def coords(self, coords):
        """Sets the coords of this TripRequestResponseJourneyLeg.

        This elements contains a list of coordinates that this journey leg follows. A line between can be plotted between these coordinates in order when representing the journey on a map in order to show where the vehicle travels (or for a walking leg, the path to be walked).   # noqa: E501

        :param coords: The coords of this TripRequestResponseJourneyLeg.  # noqa: E501
        :type: list[list[float]]
        """

        self._coords = coords

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


        :return: The properties of this TripRequestResponseJourneyLeg.  # noqa: E501
        :rtype: TripRequestResponseJourneyLegProperties
        """
        return self._properties

    @properties.setter
    def properties(self, properties):
        """Sets the properties of this TripRequestResponseJourneyLeg.


        :param properties: The properties of this TripRequestResponseJourneyLeg.  # noqa: E501
        :type: TripRequestResponseJourneyLegProperties
        """

        self._properties = properties

    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(TripRequestResponseJourneyLeg, 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, TripRequestResponseJourneyLeg):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        return not self == other
