{
    "description": "The topology",
    "properties": {
        "auto_start": {
            "description": "Start the topology when opened",
            "type": "boolean"
        },
        "topology": {
            "description": "The topology content",
            "properties": {
                "computes": {
                    "description": "Computes servers",
                    "items": {
                        "description": "Request validation to a GNS3 compute object instance",
                        "properties": {
                            "user": {
                                "description": "User for authentication",
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "port": {
                                "description": "Server port",
                                "type": "integer"
                            },
                            "version": {
                                "description": "Version of the GNS3 remote compute server",
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "memory_usage_percent": {
                                "description": "RAM usage of the compute. Read only",
                                "minimum": 0,
                                "type": [
                                    "number",
                                    "null"
                                ],
                                "maximum": 100
                            },
                            "compute_id": {
                                "description": "Server identifier",
                                "type": "string"
                            },
                            "name": {
                                "description": "Server name",
                                "type": "string"
                            },
                            "cpu_usage_percent": {
                                "description": "CPU usage of the compute. Read only",
                                "minimum": 0,
                                "type": [
                                    "number",
                                    "null"
                                ],
                                "maximum": 100
                            },
                            "protocol": {
                                "description": "Server protocol",
                                "enum": [
                                    "http",
                                    "https"
                                ]
                            },
                            "connected": {
                                "description": "Whether the controller is connected to the compute server or not",
                                "type": "boolean"
                            },
                            "host": {
                                "description": "Server host",
                                "type": "string"
                            }
                        },
                        "additionalProperties": false,
                        "$schema": "http://json-schema.org/draft-04/schema#",
                        "required": [
                            "compute_id",
                            "protocol",
                            "host",
                            "port",
                            "name"
                        ],
                        "type": "object"
                    },
                    "type": "array"
                },
                "drawings": {
                    "description": "Drawings elements",
                    "items": {
                        "description": "An drawing object",
                        "properties": {
                            "rotation": {
                                "description": "Rotation of the element",
                                "maximum": 360,
                                "type": "integer",
                                "minimum": 0
                            },
                            "y": {
                                "description": "Y property",
                                "type": "integer"
                            },
                            "drawing_id": {
                                "description": "Drawing UUID",
                                "maxLength": 36,
                                "minLength": 36,
                                "type": "string",
                                "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
                            },
                            "project_id": {
                                "description": "Project UUID",
                                "maxLength": 36,
                                "minLength": 36,
                                "type": "string",
                                "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
                            },
                            "z": {
                                "description": "Z property",
                                "type": "integer"
                            },
                            "x": {
                                "description": "X property",
                                "type": "integer"
                            },
                            "svg": {
                                "description": "SVG content of the drawing",
                                "type": "string"
                            }
                        },
                        "additionalProperties": false,
                        "$schema": "http://json-schema.org/draft-04/schema#",
                        "type": "object"
                    },
                    "type": "array"
                },
                "nodes": {
                    "description": "Nodes elements",
                    "items": {
                        "description": "A node object",
                        "properties": {
                            "symbol": {
                                "description": "Symbol of the node",
                                "minLength": 1,
                                "type": "string"
                            },
                            "y": {
                                "description": "Y position of the node",
                                "type": "integer"
                            },
                            "command_line": {
                                "description": "Command line use to start the node",
                                "type": [
                                    "null",
                                    "string"
                                ]
                            },
                            "console_host": {
                                "description": "Console host",
                                "minLength": 1,
                                "type": "string"
                            },
                            "compute_id": {
                                "description": "Compute identifier",
                                "type": "string"
                            },
                            "node_directory": {
                                "description": "Working directory of the node. Read only",
                                "type": [
                                    "null",
                                    "string"
                                ]
                            },
                            "z": {
                                "description": "Z position of the node",
                                "type": "integer"
                            },
                            "console": {
                                "description": "Console TCP port",
                                "minimum": 1,
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "maximum": 65535
                            },
                            "properties": {
                                "description": "Properties specific to an emulator",
                                "type": "object"
                            },
                            "status": {
                                "description": "Status of the node",
                                "enum": [
                                    "stopped",
                                    "started",
                                    "suspended"
                                ]
                            },
                            "node_id": {
                                "description": "Node UUID",
                                "maxLength": 36,
                                "minLength": 36,
                                "type": "string",
                                "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
                            },
                            "node_type": {
                                "description": "Type of node",
                                "enum": [
                                    "cloud",
                                    "ethernet_hub",
                                    "ethernet_switch",
                                    "frame_relay_switch",
                                    "atm_switch",
                                    "docker",
                                    "dynamips",
                                    "vpcs",
                                    "virtualbox",
                                    "vmware",
                                    "iou",
                                    "qemu"
                                ]
                            },
                            "label": {
                                "properties": {
                                    "rotation": {
                                        "description": "Rotation of the label",
                                        "type": "integer"
                                    },
                                    "text": {
                                        "type": "string"
                                    },
                                    "y": {
                                        "description": "Relative Y position of the label",
                                        "type": "integer"
                                    },
                                    "x": {
                                        "description": "Relative X position of the label",
                                        "type": "integer"
                                    },
                                    "style": {
                                        "description": "SVG style attribute",
                                        "type": "string"
                                    }
                                },
                                "additionalProperties": false,
                                "type": "object",
                                "required": [
                                    "text",
                                    "x",
                                    "y"
                                ]
                            },
                            "width": {
                                "description": "Width of the node",
                                "type": "integer"
                            },
                            "project_id": {
                                "description": "Project UUID",
                                "maxLength": 36,
                                "minLength": 36,
                                "type": "string",
                                "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
                            },
                            "name": {
                                "description": "Node name",
                                "minLength": 1,
                                "type": "string"
                            },
                            "x": {
                                "description": "X position of the node",
                                "type": "integer"
                            },
                            "height": {
                                "description": "Height of the node",
                                "type": "integer"
                            },
                            "console_type": {
                                "description": "Console type",
                                "enum": [
                                    "serial",
                                    "vnc",
                                    "telnet",
                                    null
                                ]
                            }
                        },
                        "additionalProperties": false,
                        "$schema": "http://json-schema.org/draft-04/schema#",
                        "type": "object"
                    },
                    "type": "array"
                },
                "links": {
                    "description": "Link elements",
                    "items": {
                        "description": "A link object",
                        "properties": {
                            "nodes": {
                                "description": "List of the VMS",
                                "items": {
                                    "properties": {
                                        "adapter_number": {
                                            "description": "Adapter number",
                                            "type": "integer"
                                        },
                                        "node_id": {
                                            "description": "Node UUID",
                                            "maxLength": 36,
                                            "minLength": 36,
                                            "type": "string",
                                            "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
                                        },
                                        "label": {
                                            "properties": {
                                                "rotation": {
                                                    "description": "Rotation of the label",
                                                    "type": "integer"
                                                },
                                                "text": {
                                                    "type": "string"
                                                },
                                                "y": {
                                                    "description": "Relative Y position of the label",
                                                    "type": "integer"
                                                },
                                                "x": {
                                                    "description": "Relative X position of the label",
                                                    "type": "integer"
                                                },
                                                "style": {
                                                    "description": "SVG style attribute",
                                                    "type": "string"
                                                }
                                            },
                                            "additionalProperties": false,
                                            "type": "object",
                                            "required": [
                                                "text",
                                                "x",
                                                "y"
                                            ]
                                        },
                                        "port_number": {
                                            "description": "Port number",
                                            "type": "integer"
                                        }
                                    },
                                    "additionalProperties": false,
                                    "type": "object",
                                    "required": [
                                        "node_id",
                                        "adapter_number",
                                        "port_number"
                                    ]
                                },
                                "type": "array"
                            },
                            "capturing": {
                                "description": "Read only property. True if a capture running on the link",
                                "type": "boolean"
                            },
                            "capture_file_path": {
                                "description": "Read only property. The full path of the capture file if capture is running",
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "project_id": {
                                "description": "Project UUID",
                                "maxLength": 36,
                                "minLength": 36,
                                "type": "string",
                                "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
                            },
                            "link_id": {
                                "description": "Link UUID",
                                "maxLength": 36,
                                "minLength": 36,
                                "type": "string",
                                "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
                            },
                            "capture_file_name": {
                                "description": "Read only property. The name of the capture file if capture is running",
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        },
                        "additionalProperties": false,
                        "$schema": "http://json-schema.org/draft-04/schema#",
                        "required": [
                            "nodes"
                        ],
                        "type": "object"
                    },
                    "type": "array"
                }
            },
            "additionalProperties": false,
            "type": "object",
            "required": [
                "nodes",
                "links",
                "drawings",
                "computes"
            ]
        },
        "project_id": {
            "description": "Project UUID",
            "maxLength": 36,
            "minLength": 36,
            "type": "string",
            "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
        },
        "version": {
            "description": "Version of the GNS3 software which have update the file for the last time",
            "type": "string"
        },
        "name": {
            "description": "Name of the project",
            "type": "string"
        },
        "type": {
            "description": "Type of file. It's always topology",
            "enum": [
                "topology"
            ]
        },
        "revision": {
            "description": "Version of the .gns3 specification.",
            "type": "integer"
        }
    },
    "additionalProperties": false,
    "$schema": "http://json-schema.org/draft-04/schema#",
    "required": [
        "project_id",
        "type",
        "revision",
        "version",
        "name",
        "topology"
    ],
    "type": "object"
}