[docs]classValueUnit(IdsElement):"""A quantity, represented by a value with a unit."""value:Required[Nullable[float]]=IdsField(description="A numerical value.")unit:Required[Nullable[str]]=IdsField(description="Unit for the numerical value.")
[docs]@deprecated("Use RawValueRawUnit, which also records the unit as it was expressed in the ""primary data.",category=None,)classRawValueUnit(ValueUnit):"""A value with a unit, including the raw representation of the value from the primary data."""raw_value:Required[Nullable[str]]=IdsField(description="The raw, untransformed value from the primary data.")
# RawValueRawUnit extends ValueUnit so that a raw quantity is also a ValueUnit.# It redeclares the inherited fields without Required because every field here is# nullable, so a missing field and a null field mean the same thing.
[docs]classRawValueRawUnit(ValueUnit):"""A value with a unit, including the raw representations of the value and the unit from the primary data."""value:Nullable[float]=IdsField(description="A numerical value.")unit:Nullable[str]=IdsField(description="Unit for the numerical value.")raw_value:Nullable[str]=IdsField(description="The raw, untransformed value from the primary data.")raw_unit:Nullable[str]=IdsField(description="The raw, untransformed unit from the primary data.")