ocpp/v1_6/datatype/charging_profile

OCPP 1.6 ChargingProfile 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

FieldTypeReqDescription
charging_profile_idInt
charging_profile_kindChargingProfileKindType
charging_profile_purposeChargingProfilePurposeType
charging_scheduleChargingSchedule
recurrency_kindRecurrencyKindType
stack_levelInt
transaction_idInt
valid_fromDateTime
valid_toDateTime

Schema: ChargingProfile

pub type ChargingProfile {
  ChargingProfile(
    charging_profile_id: Int,
    charging_profile_kind: charging_profile_kind_type.ChargingProfileKindType,
    charging_profile_purpose: charging_profile_purpose_type.ChargingProfilePurposeType,
    charging_schedule: charging_schedule.ChargingSchedule,
    recurrency_kind: option.Option(
      recurrency_kind_type.RecurrencyKindType,
    ),
    stack_level: Int,
    transaction_id: option.Option(Int),
    valid_from: option.Option(timestamp.Timestamp),
    valid_to: option.Option(timestamp.Timestamp),
  )
}

Constructors

Values

pub fn decoder() -> decode.Decoder(ChargingProfile)

Decode a ChargingProfile from its OCPP-J JSON object, enforcing schema constraints.

pub fn new(
  charging_profile_id charging_profile_id: Int,
  charging_profile_kind charging_profile_kind: charging_profile_kind_type.ChargingProfileKindType,
  charging_profile_purpose charging_profile_purpose: charging_profile_purpose_type.ChargingProfilePurposeType,
  charging_schedule charging_schedule: charging_schedule.ChargingSchedule,
  stack_level stack_level: Int,
) -> ChargingProfile

Construct a ChargingProfile from its required fields, with every optional field set to None.

pub fn to_json(value: ChargingProfile) -> json.Json

Encode a ChargingProfile to its OCPP-J JSON object.

Search Document