{
    "$id": "NotifyDisplayMessagesRequest",
    "comment": "OCPP 2.1 Edition 1 (c) OCA, Creative Commons Attribution-NoDerivatives 4.0 International Public License",
    "definitions": {
        "MessageFormatEnumType": {
            "description": "Format of the message.\r\n",
            "javaType": "MessageFormatEnum",
            "type": "string",
            "additionalProperties": false,
            "enum": ["ASCII", "HTML", "URI", "UTF8", "QRCODE"],
            "tsEnumNames": ["ASCII", "HTML", "URI", "UTF8", "QRCODE"]
        },
        "MessagePriorityEnumType": {
            "description": "With what priority should this message be shown\r\n",
            "javaType": "MessagePriorityEnum",
            "type": "string",
            "additionalProperties": false,
            "enum": ["AlwaysFront", "InFront", "NormalCycle"],
            "tsEnumNames": ["AlwaysFront", "InFront", "NormalCycle"]
        },
        "MessageStateEnumType": {
            "description": "During what state should this message be shown. When omitted this message should be shown in any state of the Charging Station.\r\n",
            "javaType": "MessageStateEnum",
            "type": "string",
            "additionalProperties": false,
            "enum": ["Charging", "Faulted", "Idle", "Unavailable", "Suspended", "Discharging"],
            "tsEnumNames": ["Charging", "Faulted", "Idle", "Unavailable", "Suspended", "Discharging"]
        },
        "ComponentType": {
            "description": "A physical or logical component\r\n",
            "javaType": "Component",
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "evse": {
                    "$ref": "#/definitions/EVSEType"
                },
                "name": {
                    "description": "Name of the component. Name should be taken from the list of standardized component names whenever possible. Case Insensitive. strongly advised to use Camel Case.\r\n",
                    "type": "string",
                    "maxLength": 50,
                    "pattern": "^[a-zA-Z0-9*\\-_=:+|@.]*$"
                },
                "instance": {
                    "description": "Name of instance in case the component exists as multiple instances. Case Insensitive. strongly advised to use Camel Case.\r\n",
                    "type": "string",
                    "maxLength": 50,
                    "pattern": "^[a-zA-Z0-9*\\-_=:+|@.]*$"
                },
                "customData": {
                    "$ref": "#/definitions/CustomDataType"
                }
            },
            "required": ["name"]
        },
        "EVSEType": {
            "description": "Electric Vehicle Supply Equipment\r\n",
            "javaType": "EVSE",
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "id": {
                    "description": "EVSE Identifier. This contains a number (&gt; 0) designating an EVSE of the Charging Station.\r\n",
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 2147483647
                },
                "connectorId": {
                    "description": "An id to designate a specific connector (on an EVSE) by connector index number.\r\n",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 2147483647
                },
                "customData": {
                    "$ref": "#/definitions/CustomDataType"
                }
            },
            "required": ["id"]
        },
        "MessageContentType": {
            "description": "Contains message details, for a message to be displayed on a Charging Station.\r\n\r\n",
            "javaType": "MessageContent",
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "format": {
                    "$ref": "#/definitions/MessageFormatEnumType"
                },
                "language": {
                    "description": "Message language identifier. Contains a language code as defined in &lt;&lt;ref-RFC5646,[RFC5646]&gt;&gt;.\r\n",
                    "type": "string",
                    "maxLength": 8
                },
                "content": {
                    "description": "*(2.1)* Required. Message contents. +\r\nMaximum length supported by Charging Station is given in OCPPCommCtrlr.FieldLength[\"MessageContentType.content\"].\r\n    Maximum length defaults to 1024.\r\n\r\n",
                    "type": "string",
                    "maxLength": 1024
                },
                "customData": {
                    "$ref": "#/definitions/CustomDataType"
                }
            },
            "required": ["format", "content"]
        },
        "MessageInfoType": {
            "description": "Contains message details, for a message to be displayed on a Charging Station.\r\n",
            "javaType": "MessageInfo",
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "display": {
                    "$ref": "#/definitions/ComponentType"
                },
                "id": {
                    "description": "Unique id within an exchange context. It is defined within the OCPP context as a positive Integer value (greater or equal to zero).\r\n",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 2147483647
                },
                "priority": {
                    "$ref": "#/definitions/MessagePriorityEnumType"
                },
                "state": {
                    "$ref": "#/definitions/MessageStateEnumType"
                },
                "startDateTime": {
                    "description": "From what date-time should this message be shown. If omitted: directly.\r\n",
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,3})?(?:Z|[+\\-]\\d{2}:\\d{2})$"
                },
                "endDateTime": {
                    "description": "Until what date-time should this message be shown, after this date/time this message SHALL be removed.\r\n",
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,3})?(?:Z|[+\\-]\\d{2}:\\d{2})$"
                },
                "transactionId": {
                    "description": "During which transaction shall this message be shown.\r\nMessage SHALL be removed by the Charging Station after transaction has\r\nended.\r\n",
                    "type": "string",
                    "maxLength": 36,
                    "pattern": "^[a-zA-Z0-9*\\-_=:+|@.]*$"
                },
                "message": {
                    "$ref": "#/definitions/MessageContentType"
                },
                "messageExtra": {
                    "type": "array",
                    "additionalItems": false,
                    "items": {
                        "$ref": "#/definitions/MessageContentType"
                    },
                    "minItems": 1,
                    "maxItems": 4
                },
                "customData": {
                    "$ref": "#/definitions/CustomDataType"
                }
            },
            "required": ["id", "priority", "message"]
        },
        "CustomDataType": {
            "description": "This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data.",
            "javaType": "CustomData",
            "type": "object",
            "properties": {
                "vendorId": {
                    "type": "string",
                    "maxLength": 255
                }
            },
            "required": ["vendorId"]
        }
    },
    "type": "object",
    "additionalProperties": false,
    "properties": {
        "messageInfo": {
            "type": "array",
            "additionalItems": false,
            "items": {
                "$ref": "#/definitions/MessageInfoType"
            },
            "minItems": 1
        },
        "requestId": {
            "description": "The id of the &lt;&lt;getdisplaymessagesrequest,GetDisplayMessagesRequest&gt;&gt; that requested this message.\r\n",
            "type": "integer",
            "minimum": -2147483648,
            "maximum": 2147483647
        },
        "tbc": {
            "description": "\"to be continued\" indicator. Indicates whether another part of the report follows in an upcoming NotifyDisplayMessagesRequest message. Default value when omitted is false.\r\n",
            "type": "boolean",
            "default": false
        },
        "customData": {
            "$ref": "#/definitions/CustomDataType"
        }
    },
    "required": ["requestId"]
}
