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

from __future__ import annotations
from .utils.json_map import JsonMap
from .base import BaseModel
from .service_summary_service import ServiceSummaryService
from .service_summary_estimated_arrival import ServiceSummaryEstimatedArrival


@JsonMap(
    {
        "service": "Service",
        "guaranteed_indicator": "GuaranteedIndicator",
        "disclaimer": "Disclaimer",
        "estimated_arrival": "EstimatedArrival",
        "saturday_delivery": "SaturdayDelivery",
        "saturday_delivery_disclaimer": "SaturdayDeliveryDisclaimer",
        "sunday_delivery": "SundayDelivery",
        "sunday_delivery_disclaimer": "SundayDeliveryDisclaimer",
    }
)
class TimeInTransitServiceSummary(BaseModel):
    """Container for all available service information.

    :param service: Container for the the UPS service selected for a shipment.
    :type service: ServiceSummaryService
    :param guaranteed_indicator: Empty Tag. Indicates whether the service will be guaranteed or not.  Required for International Requests., defaults to None
    :type guaranteed_indicator: str, optional
    :param disclaimer: The Disclaimer is provided based upon the origin and destination country or territory codes provided in the request document. The disclaimer is returned as a conditional statement to the validity of the service being guaranteed. The possible disclaimers that can be returned are available in the Service Guaranteed Disclaimers table., defaults to None
    :type disclaimer: str, optional
    :param estimated_arrival: Container for the Time-In-Transit arrival information by service
    :type estimated_arrival: ServiceSummaryEstimatedArrival
    :param saturday_delivery: Saturday delivery information for a service. Values are1 - Saturday Delivery Available with additional charges 0 - Saturday Delivery not available or no additional charge, please check Delivery Date to confirm if the Delivery will be SaturdayPlease see Saturday Delivery business rules section for more information., defaults to None
    :type saturday_delivery: str, optional
    :param saturday_delivery_disclaimer: Saturday delivery disclaimer message., defaults to None
    :type saturday_delivery_disclaimer: str, optional
    :param sunday_delivery: Sunday delivery information for a service. Values are1 - Sunday Delivery Available with additional charges 0 - Sunday Delivery not available or no additional charge, please check Delivery Date to confirm if the Delivery will be SundayPlease see Saturday Delivery business rules section for more information.  Applies only if SubVersion is greater than or equal to 2007, defaults to None
    :type sunday_delivery: str, optional
    :param sunday_delivery_disclaimer: Sunday delivery disclaimer message.  Applies only if SubVersion is greater than or equal to 2007, defaults to None
    :type sunday_delivery_disclaimer: str, optional
    """

    def __init__(
        self,
        service: ServiceSummaryService,
        estimated_arrival: ServiceSummaryEstimatedArrival,
        guaranteed_indicator: str = None,
        disclaimer: str = None,
        saturday_delivery: str = None,
        saturday_delivery_disclaimer: str = None,
        sunday_delivery: str = None,
        sunday_delivery_disclaimer: str = None,
    ):
        self.service = self._define_object(service, ServiceSummaryService)
        if guaranteed_indicator is not None:
            self.guaranteed_indicator = guaranteed_indicator
        if disclaimer is not None:
            self.disclaimer = disclaimer
        self.estimated_arrival = self._define_object(
            estimated_arrival, ServiceSummaryEstimatedArrival
        )
        if saturday_delivery is not None:
            self.saturday_delivery = saturday_delivery
        if saturday_delivery_disclaimer is not None:
            self.saturday_delivery_disclaimer = saturday_delivery_disclaimer
        if sunday_delivery is not None:
            self.sunday_delivery = sunday_delivery
        if sunday_delivery_disclaimer is not None:
            self.sunday_delivery_disclaimer = sunday_delivery_disclaimer
