# This file was generated by liblab | https://liblab.com/

from __future__ import annotations
from typing import List
from .utils.json_map import JsonMap
from .base import BaseModel
from .delivery_time_information_pickup import DeliveryTimeInformationPickup
from .delivery_time_information_return_contract_services import (
    DeliveryTimeInformationReturnContractServices,
)


@JsonMap(
    {
        "package_bill_type": "PackageBillType",
        "pickup": "Pickup",
        "return_contract_services": "ReturnContractServices",
    }
)
class ShipmentDeliveryTimeInformation(BaseModel):
    """Container for requesting Time In Transit Information. Required to view time in transit information.  Required to view any time in transit information.

    :param package_bill_type: Valid values are: - 02 - Document only - 03 - Non-Document - 04 - WWEF Pallet - 07 - Domestic Pallet If 04 is included, Worldwide Express Freight and UPS Worldwide Express Freight Midday services (if applicable) will be included in the response.
    :type package_bill_type: str
    :param pickup: Pickup container., defaults to None
    :type pickup: DeliveryTimeInformationPickup, optional
    :param return_contract_services: return_contract_services, defaults to None
    :type return_contract_services: List[DeliveryTimeInformationReturnContractServices], optional
    """

    def __init__(
        self,
        package_bill_type: str,
        pickup: DeliveryTimeInformationPickup = None,
        return_contract_services: List[
            DeliveryTimeInformationReturnContractServices
        ] = None,
    ):
        self.package_bill_type = package_bill_type
        if pickup is not None:
            self.pickup = self._define_object(pickup, DeliveryTimeInformationPickup)
        if return_contract_services is not None:
            self.return_contract_services = self._define_list(
                return_contract_services, DeliveryTimeInformationReturnContractServices
            )
