{
  "$id": "https://tigroo31.github.io/its-client/schema/info",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "description": "Information JSon schema",
  "properties": {
    "cells_id": {
      "description": "list of cell id of the server",
      "items": {
        "description": "cell id",
        "type": "integer"
      },
      "type": "array"
    },
    "domain_name_servers": {
      "description": "list of Domain Name Server",
      "items": {
        "description": "Domain Name Server",
        "examples": [
          "1.1.1.1",
          "194.28.10.20"
        ],
        "type": "string"
      },
      "type": "array"
    },
    "fbeat_loggers": {
      "description": "list of Filebeat server and port separated by a colon",
      "items": {
        "description": "Filebeat server and port (classically 2203) separated by a colon",
        "examples": [
          "90.11.41.133:2203",
          "81.16.11.164:12203"
        ],
        "type": "string"
      },
      "minItems": 1,
      "type": "array"
    },
    "gelf_loggers": {
      "description": "list of Graylog Extended Log Format server and port separated by a colon",
      "items": {
        "description": "Graylog Extended Log Format server and port (classically 2201) separated by a colon",
        "examples": [
          "90.11.41.133:2201",
          "81.169.166.64:12201"
        ],
        "type": "string"
      },
      "type": "array"
    },
    "http_proxy": {
      "description": "list of HTTP IP address and port separated by a colon",
      "items": {
        "description": "HTTP IP address and port (classically 8080) separated by a colon",
        "examples": [
          "84.188.43.159:8080",
          "172.116.82.124:1280"
        ],
        "type": "string"
      },
      "type": "array"
    },
    "instance_id": {
      "description": "unique id all other the world for a server",
      "type": "string"
    },
    "mqtt_ip": {
      "description": "list of MQTT IP address and port separated by a colon",
      "items": {
        "description": "MQTT IP address and port (classically 1883) separated by a colon",
        "examples": [
          "84.188.43.159:1883",
          "172.116.12.182:11883"
        ],
        "type": "string"
      },
      "type": "array"
    },
    "mqtt_tls_ip": {
      "description": "list of MQTT IP address and TLS port separated by a colon",
      "items": {
        "description": "MQTT IP address and TLS port (classically 8883) separated by a colon",
        "examples": [
          "84.188.43.159:8883",
          "172.116.82.124:18883"
        ],
        "type": "string"
      },
      "type": "array"
    },
    "ntp_servers": {
      "description": "list of Network Time Protocol server",
      "items": {
        "description": "Network Time Protocol server",
        "examples": [
          "ntp-sop.inria.fr",
          "0.debian.pool.ntp.org",
          "1.pool.ntp.org"
        ],
        "type": "string"
      },
      "type": "array"
    },
    "public_ip_address": {
      "description": "list of public IP address",
      "examples": [
        "161.05.21.166",
        "190.14.19.50",
        "127.0.0.1"
      ],
      "items": {
        "description": "public IP address",
        "type": "string"
      },
      "type": "array"
    },
    "role": {
      "description": "role of the server",
      "enum": [
        "edge",
        "central"
      ],
      "type": "string"
    },
    "running": {
      "default": false,
      "description": "state of the server: true id running, false else.",
      "type": "boolean"
    },
    "service_area": {
      "description": "handled service area of the server",
      "properties": {
        "coordinates": {
          "description": "coordinates of the point",
          "items": {
            "description": "coordinate of the point",
            "type": "number"
          },
          "maxItems": 2,
          "minItems": 2,
          "type": "array"
        },
        "quadkeys": {
          "description": "list of quadkey of the tiles",
          "items": {
            "description": "quadkey",
            "examples": [
              "12020322313211",
              "12020322313213",
              "1203"
            ],
            "type": "string"
          },
          "type": "array"
        },
        "radius": {
          "default": 0,
          "description": "radius of the point",
          "type": "integer"
        },
        "type": {
          "description": "type of service area",
          "enum": [
            "point",
            "polygon",
            "tiles"
          ],
          "type": "string"
        },
        "vertices": {
          "description": "vertices (corners) of the polygon",
          "items": {
            "coordinates": {
              "description": "coordinates for a vertex (corner) of the polygon",
              "items": {
                "description": "coordinate",
                "type": "number"
              },
              "maxItems": 2,
              "minItems": 2,
              "type": "array"
            }
          },
          "minItems": 3,
          "type": "array"
        }
      },
      "required": [
        "type"
      ],
      "type": "object"
    },
    "timestamp": {
      "description": "generation timestamp of the information, millisecond since epoch (1970/01/01)",
      "type": "integer"
    },
    "type": {
      "description": "type of server",
      "enum": [
        "broker"
      ],
      "type": "string"
    },
    "udp_loggers": {
      "description": "list of User Datagram Protocol server and port separated by a colon",
      "items": {
        "description": "User Datagram Protocol server and port (classically 2202) separated by a colon",
        "examples": [
          "90.11.41.133:2202",
          "81.169.166.64:12202"
        ],
        "type": "string"
      },
      "type": "array"
    },
    "validity_duration": {
      "description": "validity period of the information relatively to the timestamp in seconds",
      "type": "integer"
    },
    "version": {
      "const": "1.0.6",
      "description": "json message format version",
      "type": "string"
    }
  },
  "required": [
    "type",
    "version",
    "instance_id",
    "running",
    "timestamp",
    "validity_duration",
    "role"
  ],
  "type": "object"
}