ocpp/v2_1/datatype/cost_dimension_type
OCPP 2.1 CostDimensionType data type.
to_json/decoder map to/from its OCPP-J JSON object; new (when
present) builds a value from the required fields only.
Types
Volume consumed of cost dimension.
| Field | Type | Req | Description |
|---|---|---|---|
custom_data | CustomData | — | |
type_ | CostDimension | ✓ | |
volume | Float | ✓ | Volume of the dimension consumed, measured according to the dimension type. |
Schema: CostDimensionType
pub type CostDimensionType {
CostDimensionType(
custom_data: option.Option(custom_data.CustomData),
type_: cost_dimension.CostDimension,
volume: Float,
)
}
Constructors
-
CostDimensionType( custom_data: option.Option(custom_data.CustomData), type_: cost_dimension.CostDimension, volume: Float, )
Values
pub fn decoder() -> decode.Decoder(CostDimensionType)
Decode a CostDimensionType from its OCPP-J JSON object, enforcing schema constraints.
pub fn new(
type_ type_: cost_dimension.CostDimension,
volume volume: Float,
) -> CostDimensionType
Construct a CostDimensionType from its required fields, with every optional field set to None.
pub fn to_json(value: CostDimensionType) -> json.Json
Encode a CostDimensionType to its OCPP-J JSON object.