# coding: utf-8

"""
    VeeRoute.UD

    VeeRoute.UD API  # noqa: E501

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


from __future__ import absolute_import

import unittest
import datetime

import vrt_ud
from vrt_ud.models.predictor_insert_task import PredictorInsertTask  # noqa: E501
from vrt_ud.rest import ApiException

class TestPredictorInsertTask(unittest.TestCase):
    """PredictorInsertTask unit test stubs"""

    def setUp(self):
        pass

    def tearDown(self):
        pass

    def make_instance(self, include_optional):
        """Test PredictorInsertTask
            include_option is a boolean, when False only required
            params are included, when True both required and
            optional params are included """
        # model = vrt_ud.models.predictor_insert_task.PredictorInsertTask()  # noqa: E501
        if include_optional :
            return PredictorInsertTask(
                order = vrt_ud.models.order.Order(
                    key = 'order01', 
                    id = 'e47c94eb-4628-4b31-9180-c9c1dfa50ed1', 
                    state = 'PLAN', 
                    trip_id = 'e42c94eb-4628-4131-9180-c931dfa50ed1', 
                    trip_short_key = 'AFG', 
                    order_features = ["Special"], 
                    order_restrictions = ["Special"], 
                    performer_restrictions = ["B1"], 
                    cargos = [
                        vrt_ud.models.cargo.Cargo(
                            key = 'cargo01', 
                            capacity = vrt_ud.models.capacity.Capacity(
                                mass = 10, 
                                volume = 2, 
                                capacity_x = 1, 
                                capacity_y = 2, 
                                capacity_z = 3, ), 
                            width = 1, 
                            height = 0.3, 
                            length = 2.2, 
                            max_storage_time = 45, 
                            restrictions = ["Freezer"], )
                        ], 
                    demands = [
                        vrt_ud.models.demand.Demand(
                            key = 'demand01.1', 
                            demand_type = 'WORK', 
                            target_cargos = ["cargo01"], 
                            precedence_in_trip = 1, 
                            precedence_in_order = 1, 
                            possible_events = [
                                vrt_ud.models.possible_event.PossibleEvent(
                                    location_key = 'location01', 
                                    duration = 10, 
                                    reward = 199.9, 
                                    time_window = vrt_ud.models.time_window.TimeWindow(
                                        from = '2020-10-21T09:30+03:00', 
                                        to = '2020-10-21T19:45Z', ), )
                                ], )
                        ], ), 
                locations = [
                    vrt_ud.models.advanced_location.AdvancedLocation(
                        key = 'location01', 
                        location = vrt_ud.models.location.Location(
                            latitude = 55.692789, 
                            longitude = 37.554554, 
                            arrival_duration = 15, 
                            departure_duration = 5, ), 
                        transport_restrictions = ["2T"], 
                        load_windows = [
                            vrt_ud.models.load_window.LoadWindow(
                                time_window = vrt_ud.models.time_window.TimeWindow(
                                    from = '2020-10-21T09:30+03:00', 
                                    to = '2020-10-21T19:45Z', ), 
                                gates_count = 1, )
                            ], )
                    ], 
                max_cost = 3000, 
                allow_to_update_order = True
            )
        else :
            return PredictorInsertTask(
                order = vrt_ud.models.order.Order(
                    key = 'order01', 
                    id = 'e47c94eb-4628-4b31-9180-c9c1dfa50ed1', 
                    state = 'PLAN', 
                    trip_id = 'e42c94eb-4628-4131-9180-c931dfa50ed1', 
                    trip_short_key = 'AFG', 
                    order_features = ["Special"], 
                    order_restrictions = ["Special"], 
                    performer_restrictions = ["B1"], 
                    cargos = [
                        vrt_ud.models.cargo.Cargo(
                            key = 'cargo01', 
                            capacity = vrt_ud.models.capacity.Capacity(
                                mass = 10, 
                                volume = 2, 
                                capacity_x = 1, 
                                capacity_y = 2, 
                                capacity_z = 3, ), 
                            width = 1, 
                            height = 0.3, 
                            length = 2.2, 
                            max_storage_time = 45, 
                            restrictions = ["Freezer"], )
                        ], 
                    demands = [
                        vrt_ud.models.demand.Demand(
                            key = 'demand01.1', 
                            demand_type = 'WORK', 
                            target_cargos = ["cargo01"], 
                            precedence_in_trip = 1, 
                            precedence_in_order = 1, 
                            possible_events = [
                                vrt_ud.models.possible_event.PossibleEvent(
                                    location_key = 'location01', 
                                    duration = 10, 
                                    reward = 199.9, 
                                    time_window = vrt_ud.models.time_window.TimeWindow(
                                        from = '2020-10-21T09:30+03:00', 
                                        to = '2020-10-21T19:45Z', ), )
                                ], )
                        ], ),
                locations = [
                    vrt_ud.models.advanced_location.AdvancedLocation(
                        key = 'location01', 
                        location = vrt_ud.models.location.Location(
                            latitude = 55.692789, 
                            longitude = 37.554554, 
                            arrival_duration = 15, 
                            departure_duration = 5, ), 
                        transport_restrictions = ["2T"], 
                        load_windows = [
                            vrt_ud.models.load_window.LoadWindow(
                                time_window = vrt_ud.models.time_window.TimeWindow(
                                    from = '2020-10-21T09:30+03:00', 
                                    to = '2020-10-21T19:45Z', ), 
                                gates_count = 1, )
                            ], )
                    ],
                max_cost = 3000,
        )

    def testPredictorInsertTask(self):
        """Test PredictorInsertTask"""
        inst_req_only = self.make_instance(include_optional=False)
        inst_req_and_optional = self.make_instance(include_optional=True)


if __name__ == '__main__':
    unittest.main()
