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

from __future__ import annotations
from .utils.json_map import JsonMap
from .base import BaseModel
from .handling_units_type import HandlingUnitsType
from .handling_units_dimensions import HandlingUnitsDimensions
from .handling_units_adjusted_height import HandlingUnitsAdjustedHeight


@JsonMap(
    {
        "quantity": "Quantity",
        "type_": "Type",
        "dimensions": "Dimensions",
        "adjusted_height": "AdjustedHeight",
    }
)
class FrsShipmentDataHandlingUnits(BaseModel):
    """FrsShipmentDataHandlingUnits

    :param quantity: Handling Unit Quantity for Density based rating.
    :type quantity: str
    :param type_: Handling Unit Type for Density based rating.
    :type type_: HandlingUnitsType
    :param dimensions: Dimension of the HandlingUnit container for density based pricing.
    :type dimensions: HandlingUnitsDimensions
    :param adjusted_height: Container to hold Adjusted Height information., defaults to None
    :type adjusted_height: HandlingUnitsAdjustedHeight, optional
    """

    def __init__(
        self,
        quantity: str,
        type_: HandlingUnitsType,
        dimensions: HandlingUnitsDimensions,
        adjusted_height: HandlingUnitsAdjustedHeight = None,
    ):
        self.quantity = quantity
        self.type_ = self._define_object(type_, HandlingUnitsType)
        self.dimensions = self._define_object(dimensions, HandlingUnitsDimensions)
        if adjusted_height is not None:
            self.adjusted_height = self._define_object(
                adjusted_height, HandlingUnitsAdjustedHeight
            )
