ocpp/v2_0_1/datatype/id_token_info
OCPP 2.0.1 IdTokenInfo data type (schema IdTokenInfoType).
to_json/decoder map to/from its OCPP-J JSON object; new (when
present) builds a value from the required fields only.
Types
Contains status information about an identifier. It is advised to not stop charging for a token that expires during charging, as ExpiryDate is only used for caching purposes. If ExpiryDate is not given, the status has no end date.
| Field | Type | Req | Description |
|---|---|---|---|
cache_expiry_date_time | DateTime | — | Date and Time after which the token must be considered invalid. |
charging_priority | Int | — | Priority from a business point of view. Default priority is 0, The range is from -9 to 9. Higher values indicate a higher priority. The chargingPriority in TransactionEventResponse overrules this one. |
custom_data | CustomData | — | |
evse_id | List(Int) | — | Only used when the IdToken is only valid for one or more specific EVSEs, not for the entire Charging Station. |
group_id_token | IdTokenType | — | |
language1 | String | — | Preferred user interface language of identifier user. Contains a language code as defined in [RFC5646]. (max 8 chars) |
language2 | String | — | Second preferred user interface language of identifier user. Don’t use when language1 is omitted, has to be different from language1. Contains a language code as defined in [RFC5646]. (max 8 chars) |
personal_message | MessageContent | — | |
status | AuthorizationStatus | ✓ |
Schema: IdTokenInfoType · ID_Token · urn:x-oca:ocpp:uid:2:233247
pub type IdTokenInfo {
IdTokenInfo(
cache_expiry_date_time: option.Option(timestamp.Timestamp),
charging_priority: option.Option(Int),
custom_data: option.Option(custom_data.CustomData),
evse_id: option.Option(List(Int)),
group_id_token: option.Option(id_token_type.IdTokenType),
language1: option.Option(String),
language2: option.Option(String),
personal_message: option.Option(
message_content.MessageContent,
),
status: authorization_status.AuthorizationStatus,
)
}
Constructors
-
IdTokenInfo( cache_expiry_date_time: option.Option(timestamp.Timestamp), charging_priority: option.Option(Int), custom_data: option.Option(custom_data.CustomData), evse_id: option.Option(List(Int)), group_id_token: option.Option(id_token_type.IdTokenType), language1: option.Option(String), language2: option.Option(String), personal_message: option.Option(message_content.MessageContent), status: authorization_status.AuthorizationStatus, )
Values
pub fn decoder() -> decode.Decoder(IdTokenInfo)
Decode a IdTokenInfo from its OCPP-J JSON object, enforcing schema constraints.
pub fn new(
status status: authorization_status.AuthorizationStatus,
) -> IdTokenInfo
Construct a IdTokenInfo from its required fields, with every optional field set to None.
pub fn to_json(value: IdTokenInfo) -> json.Json
Encode a IdTokenInfo to its OCPP-J JSON object.