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

from __future__ import annotations
from .utils.json_map import JsonMap
from .base import BaseModel
from .insurance_basic_flexible_parcel_indicator import (
    InsuranceBasicFlexibleParcelIndicator,
)
from .insurance_extended_flexible_parcel_indicator import (
    InsuranceExtendedFlexibleParcelIndicator,
)
from .insurance_time_in_transit_flexible_parcel_indicator import (
    InsuranceTimeInTransitFlexibleParcelIndicator,
)


@JsonMap(
    {
        "basic_flexible_parcel_indicator": "BasicFlexibleParcelIndicator",
        "extended_flexible_parcel_indicator": "ExtendedFlexibleParcelIndicator",
        "time_in_transit_flexible_parcel_indicator": "TimeInTransitFlexibleParcelIndicator",
    }
)
class PackageServiceOptionsInsurance(BaseModel):
    """Insurance Accesorial. Only one type of insurance can exist at a time on the shipment. Valid for UPS World Wide Express Freight shipments.

    :param basic_flexible_parcel_indicator: Container to hold Basic Flexible Parcel Indicator information.  Valid for UPS World Wide Express Freight shipments., defaults to None
    :type basic_flexible_parcel_indicator: InsuranceBasicFlexibleParcelIndicator, optional
    :param extended_flexible_parcel_indicator: Container for Extended Flexible Parcel Indicator  Valid for UPS World Wide Express Freight shipments., defaults to None
    :type extended_flexible_parcel_indicator: InsuranceExtendedFlexibleParcelIndicator, optional
    :param time_in_transit_flexible_parcel_indicator: Container to hold Time In Transit Flexible Parcel Indicator information.  Valid for UPS World Wide Express Freight shipments., defaults to None
    :type time_in_transit_flexible_parcel_indicator: InsuranceTimeInTransitFlexibleParcelIndicator, optional
    """

    def __init__(
        self,
        basic_flexible_parcel_indicator: InsuranceBasicFlexibleParcelIndicator = None,
        extended_flexible_parcel_indicator: InsuranceExtendedFlexibleParcelIndicator = None,
        time_in_transit_flexible_parcel_indicator: InsuranceTimeInTransitFlexibleParcelIndicator = None,
    ):
        if basic_flexible_parcel_indicator is not None:
            self.basic_flexible_parcel_indicator = self._define_object(
                basic_flexible_parcel_indicator, InsuranceBasicFlexibleParcelIndicator
            )
        if extended_flexible_parcel_indicator is not None:
            self.extended_flexible_parcel_indicator = self._define_object(
                extended_flexible_parcel_indicator,
                InsuranceExtendedFlexibleParcelIndicator,
            )
        if time_in_transit_flexible_parcel_indicator is not None:
            self.time_in_transit_flexible_parcel_indicator = self._define_object(
                time_in_transit_flexible_parcel_indicator,
                InsuranceTimeInTransitFlexibleParcelIndicator,
            )
