ocpp/v2_0_1/datatype/id_token_type

OCPP 2.0.1 IdTokenType 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

Contains a case insensitive identifier to use for the authorization and the type of authorization to support multiple forms of identifiers.

FieldTypeReqDescription
additional_infoList(AdditionalInfo)
custom_dataCustomData
id_tokenStringIdToken is case insensitive. Might hold the hidden id of an RFID tag, but can for example also contain a UUID. (max 36 chars)
type_IdToken

Schema: IdTokenType

pub type IdTokenType {
  IdTokenType(
    additional_info: option.Option(
      List(additional_info.AdditionalInfo),
    ),
    custom_data: option.Option(custom_data.CustomData),
    id_token: String,
    type_: id_token.IdToken,
  )
}

Constructors

Values

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

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

pub fn new(
  id_token id_token: String,
  type_ type_: id_token.IdToken,
) -> IdTokenType

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

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

Encode a IdTokenType to its OCPP-J JSON object.

Search Document