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

from __future__ import annotations
from .utils.json_map import JsonMap
from .base import BaseModel
from .dimensions_unit_of_measurement import DimensionsUnitOfMeasurement


@JsonMap(
    {
        "unit_of_measurement": "UnitOfMeasurement",
        "length": "Length",
        "width": "Width",
        "height": "Height",
    }
)
class PackageDimensions(BaseModel):
    """Dimensions Container. This container is not applicable for GFP Rating request.  Required for Heavy Goods service. Package Dimension will be ignored for Simple Rate

    :param unit_of_measurement: UnitOfMeasurement container.
    :type unit_of_measurement: DimensionsUnitOfMeasurement
    :param length: Length of the package used to determine dimensional weight.  Required for GB to GB and Poland to Poland shipments. 6 digits in length with 2 digits of significance after the decimal point.
    :type length: str
    :param width: Width of the package used to determine dimensional weight.  Required for GB to GB and Poland to Poland shipments. 6 digits in length with 2 digits of significance after the decimal point.
    :type width: str
    :param height: Height of the package used to determine dimensional weight.  Required for GB to GB and Poland to Poland shipments. 6 digits in length with 2 digits of significance after the decimal point.
    :type height: str
    """

    def __init__(
        self,
        unit_of_measurement: DimensionsUnitOfMeasurement,
        length: str,
        width: str,
        height: str,
    ):
        self.unit_of_measurement = self._define_object(
            unit_of_measurement, DimensionsUnitOfMeasurement
        )
        self.length = length
        self.width = width
        self.height = height
