ocpp/v2_0_1/datatype/message_content
OCPP 2.0.1 MessageContent data type (schema MessageContentType).
to_json/decoder map to/from its OCPP-J JSON object; new (when
present) builds a value from the required fields only.
Types
Contains message details, for a message to be displayed on a Charging Station.
| Field | Type | Req | Description |
|---|---|---|---|
content | String | ✓ | Message contents. (max 512 chars) |
custom_data | CustomData | — | |
format | MessageFormat | ✓ | |
language | String | — | Message language identifier. Contains a language code as defined in [RFC5646]. (max 8 chars) |
Schema: MessageContentType · Message_Content · urn:x-enexis:ecdm:uid:2:234490
pub type MessageContent {
MessageContent(
content: String,
custom_data: option.Option(custom_data.CustomData),
format: message_format.MessageFormat,
language: option.Option(String),
)
}
Constructors
-
MessageContent( content: String, custom_data: option.Option(custom_data.CustomData), format: message_format.MessageFormat, language: option.Option(String), )
Values
pub fn decoder() -> decode.Decoder(MessageContent)
Decode a MessageContent from its OCPP-J JSON object, enforcing schema constraints.
pub fn new(
content content: String,
format format: message_format.MessageFormat,
) -> MessageContent
Construct a MessageContent from its required fields, with every optional field set to None.
pub fn to_json(value: MessageContent) -> json.Json
Encode a MessageContent to its OCPP-J JSON object.