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

from __future__ import annotations
from .utils.json_map import JsonMap
from .base import BaseModel
from .shipment_total_weight_unit_of_measurement import (
    ShipmentTotalWeightUnitOfMeasurement,
)


@JsonMap({"unit_of_measurement": "UnitOfMeasurement", "weight": "Weight"})
class ShipmentShipmentTotalWeight(BaseModel):
    """Shipment Total Weight Container. This container is only applicable for "ratetimeintransit" and "shoptimeintransit" request options.  Required for all international shipments when retreiving time in transit information, including letters and documents shipments.

    :param unit_of_measurement: UnitOfMeasurement Container.
    :type unit_of_measurement: ShipmentTotalWeightUnitOfMeasurement
    :param weight: Non-zero total weight of all packages in the shipment.
    :type weight: str
    """

    def __init__(
        self, unit_of_measurement: ShipmentTotalWeightUnitOfMeasurement, weight: str
    ):
        self.unit_of_measurement = self._define_object(
            unit_of_measurement, ShipmentTotalWeightUnitOfMeasurement
        )
        self.weight = weight
