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

from __future__ import annotations
from .utils.json_map import JsonMap
from .base import BaseModel
from .dry_ice_weight_unit_of_measurement import DryIceWeightUnitOfMeasurement


@JsonMap({"unit_of_measurement": "UnitOfMeasurement", "weight": "Weight"})
class DryIceDryIceWeight(BaseModel):
    """Container for Weight information for Dry Ice.

    :param unit_of_measurement: Container for Unit Of Measurement for Dry Ice.
    :type unit_of_measurement: DryIceWeightUnitOfMeasurement
    :param weight: Weight for Dry Ice. Cannot be more than package weight. Should be more than 0.0. Valid characters are 0-9 and "." (Decimal point). Limit to 1 digit after the decimal. The maximum length of the field is 5 including "." and can hold up to 1 decimal place.
    :type weight: str
    """

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