ocpp/v2_1/datatype/id_token
OCPP 2.1 IdToken data type (schema IdTokenType).
to_json/decoder map to/from its OCPP-J JSON object; new (when
present) builds a value from the required fields only.
Types
Contains a case insensitive identifier to use for the authorization and the type of authorization to support multiple forms of identifiers.
| Field | Type | Req | Description |
|---|---|---|---|
additional_info | List(AdditionalInfo) | — | |
custom_data | CustomData | — | |
id_token | String | ✓ | (2.1) IdToken is case insensitive. Might hold the hidden id of an RFID tag, but can for example also contain a UUID. (max 255 chars) |
type_ | String | ✓ | (2.1) Enumeration of possible idToken types. Values defined in Appendix as IdTokenEnumStringType. (max 20 chars) |
Schema: IdTokenType
pub type IdToken {
IdToken(
additional_info: option.Option(
List(additional_info.AdditionalInfo),
),
custom_data: option.Option(custom_data.CustomData),
id_token: String,
type_: String,
)
}
Constructors
-
IdToken( additional_info: option.Option( List(additional_info.AdditionalInfo), ), custom_data: option.Option(custom_data.CustomData), id_token: String, type_: String, )
Values
pub fn decoder() -> decode.Decoder(IdToken)
Decode a IdToken from its OCPP-J JSON object, enforcing schema constraints.
pub fn new(
id_token id_token: String,
type_ type_: String,
) -> IdToken
Construct a IdToken from its required fields, with every optional field set to None.