# 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 PlanTask(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 = {
        'locations': 'list[AdvancedLocation]',
        'orders': 'list[Order]',
        'performers': 'list[Performer]',
        'transports': 'list[Transport]',
        'shifts': 'list[Shift]',
        'hardlinks': 'list[Hardlink]',
        'trips': 'list[Trip]',
        'settings': 'PlanSettings'
    }

    attribute_map = {
        'locations': 'locations',
        'orders': 'orders',
        'performers': 'performers',
        'transports': 'transports',
        'shifts': 'shifts',
        'hardlinks': 'hardlinks',
        'trips': 'trips',
        'settings': 'settings'
    }

    def __init__(self, locations=None, orders=None, performers=None, transports=None, shifts=None, hardlinks=None, trips=None, settings=None, local_vars_configuration=None):  # noqa: E501
        """PlanTask - 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._locations = None
        self._orders = None
        self._performers = None
        self._transports = None
        self._shifts = None
        self._hardlinks = None
        self._trips = None
        self._settings = None
        self.discriminator = None

        self.locations = locations
        self.orders = orders
        self.performers = performers
        self.transports = transports
        self.shifts = shifts
        if hardlinks is not None:
            self.hardlinks = hardlinks
        if trips is not None:
            self.trips = trips
        if settings is not None:
            self.settings = settings

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

        List of locations used for orders and shifts.  # noqa: E501

        :return: The locations of this PlanTask.  # noqa: E501
        :rtype: list[AdvancedLocation]
        """
        return self._locations

    @locations.setter
    def locations(self, locations):
        """Sets the locations of this PlanTask.

        List of locations used for orders and shifts.  # noqa: E501

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

        self._locations = locations

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

        Orders list.  # noqa: E501

        :return: The orders of this PlanTask.  # noqa: E501
        :rtype: list[Order]
        """
        return self._orders

    @orders.setter
    def orders(self, orders):
        """Sets the orders of this PlanTask.

        Orders list.  # noqa: E501

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

        self._orders = orders

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

        Available performers list.  # noqa: E501

        :return: The performers of this PlanTask.  # noqa: E501
        :rtype: list[Performer]
        """
        return self._performers

    @performers.setter
    def performers(self, performers):
        """Sets the performers of this PlanTask.

        Available performers list.  # noqa: E501

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

        self._performers = performers

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

        Available vehicles list.  # noqa: E501

        :return: The transports of this PlanTask.  # noqa: E501
        :rtype: list[Transport]
        """
        return self._transports

    @transports.setter
    def transports(self, transports):
        """Sets the transports of this PlanTask.

        Available vehicles list.  # noqa: E501

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

        self._transports = transports

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

        List of work shifts for performers and vehicles.  # noqa: E501

        :return: The shifts of this PlanTask.  # noqa: E501
        :rtype: list[Shift]
        """
        return self._shifts

    @shifts.setter
    def shifts(self, shifts):
        """Sets the shifts of this PlanTask.

        List of work shifts for performers and vehicles.  # noqa: E501

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

        self._shifts = shifts

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

        Assignments list.  # noqa: E501

        :return: The hardlinks of this PlanTask.  # noqa: E501
        :rtype: list[Hardlink]
        """
        return self._hardlinks

    @hardlinks.setter
    def hardlinks(self, hardlinks):
        """Sets the hardlinks of this PlanTask.

        Assignments list.  # noqa: E501

        :param hardlinks: The hardlinks of this PlanTask.  # noqa: E501
        :type: list[Hardlink]
        """

        self._hardlinks = hardlinks

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

        Existing trips that have to be replanned.  # noqa: E501

        :return: The trips of this PlanTask.  # noqa: E501
        :rtype: list[Trip]
        """
        return self._trips

    @trips.setter
    def trips(self, trips):
        """Sets the trips of this PlanTask.

        Existing trips that have to be replanned.  # noqa: E501

        :param trips: The trips of this PlanTask.  # noqa: E501
        :type: list[Trip]
        """

        self._trips = trips

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


        :return: The settings of this PlanTask.  # noqa: E501
        :rtype: PlanSettings
        """
        return self._settings

    @settings.setter
    def settings(self, settings):
        """Sets the settings of this PlanTask.


        :param settings: The settings of this PlanTask.  # noqa: E501
        :type: PlanSettings
        """

        self._settings = settings

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

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