{
    "type": "computer",
    "extends": "map",
    "definitions": {
        "get_ports": {
            "id": "get_ports",
            "type": "function",
            "tags": [
                "method"
            ],
            "returns": [
                {
                    "type": "list",
                    "valueType": "port"
                }
            ]
        },
        "get_name": {
            "id": "get_name",
            "type": "function",
            "tags": [
                "method"
            ],
            "returns": [
                "string"
            ]
        },
        "local_ip": {
            "id": "lan_ip",
            "type": "function",
            "tags": [
                "method"
            ],
            "returns": [
                "string"
            ]
        },
        "public_ip": {
            "id": "public_ip_pc",
            "type": "function",
            "tags": [
                "method"
            ],
            "returns": [
                "string"
            ]
        },
        "File": {
            "id": "File",
            "type": "function",
            "tags": [
                "method"
            ],
            "arguments": [
                {
                    "label": "path",
                    "type": "string"
                }
            ],
            "returns": [
                "file",
                "null"
            ]
        },
        "create_folder": {
            "id": "create_folder",
            "type": "function",
            "tags": [
                "method",
                "ssh incompatible"
            ],
            "arguments": [
                {
                    "label": "path",
                    "type": "string"
                },
                {
                    "label": "folder",
                    "type": "string",
                    "default": {
                        "type": "string",
                        "value": "newFolder"
                    }
                }
            ],
            "returnVariations": [
                "Error: only alphanumeric allowed as folder name.",
                "Error: name cannot exceed the limit of 128 characters.",
                "create_folder: path too large",
                "Error: invalid path",
                "!PlayerUtils.CrearCarpeta",
                1
            ],
            "returns": [
                "string",
                "number"
            ]
        },
        "is_network_active": {
            "id": "is_network_active",
            "type": "function",
            "tags": [
                "method"
            ],
            "returnVariations": [
                0,
                1
            ],
            "returns": [
                "number"
            ]
        },
        "touch": {
            "id": "touch",
            "type": "function",
            "tags": [
                "method",
                "ssh incompatible"
            ],
            "arguments": [
                {
                    "label": "path",
                    "type": "string"
                },
                {
                    "label": "fileName",
                    "type": "string"
                }
            ],
            "returnVariations": [
                "Error: invalid path",
                "Error: nameFile must be string",
                "Error: only alphanumeric allowed as file name.",
                "Error: name cannot exceed the limit of 128 characters.",
                "touch: path too large",
                "The file already exists",
                "!PlayerUtils.CrearArchivo",
                1
            ],
            "returns": [
                "number",
                "string"
            ]
        },
        "show_procs": {
            "id": "show_procs",
            "type": "function",
            "tags": [
                "method",
                "ssh incompatible"
            ],
            "returns": [
                "string"
            ]
        },
        "network_devices": {
            "id": "network_devices",
            "type": "function",
            "tags": [
                "method"
            ],
            "returns": [
                "string"
            ]
        },
        "change_password": {
            "id": "change_password",
            "type": "function",
            "tags": [
                "method"
            ],
            "arguments": [
                {
                    "label": "username",
                    "type": "string"
                },
                {
                    "label": "password",
                    "type": "string"
                }
            ],
            "returnVariations": [
                "Error: only alphanumeric allowed as password.",
                "Error: the password cannot exceed the limit of 15 characters.",
                "Denied. Only root user can execute this command.",
                "user ${username} does not exist",
                1
            ],
            "returns": [
                "number",
                "string",
                "null"
            ]
        },
        "create_user": {
            "id": "create_user",
            "type": "function",
            "tags": [
                "method"
            ],
            "arguments": [
                {
                    "label": "usename",
                    "type": "string"
                },
                {
                    "label": "password",
                    "type": "string"
                }
            ],
            "returnVariations": [
                "Error: only alphanumeric allowed as user name and password.",
                "Denied. Only root user can execute this command.",
                "!Computer.ValidateNewUser",
                "Denied. Maximum number of registered users reached.",
                1
            ],
            "returns": [
                "number",
                "string",
                "null"
            ]
        },
        "delete_user": {
            "id": "delete_user",
            "type": "function",
            "tags": [
                "method"
            ],
            "arguments": [
                {
                    "label": "username",
                    "type": "string"
                },
                {
                    "label": "removeHome",
                    "type": "number",
                    "default": {
                        "type": "number",
                        "value": 0
                    }
                }
            ],
            "returnVariations": [
                "Denied. Only root user can execute this command.",
                "can't delete user. ${username} does not exist",
                "the root user can't be deleted.",
                "sorry, at the moment that account can't be deleted.",
                "user ${username} not found.",
                1
            ],
            "returns": [
                "number",
                "string",
                "null"
            ]
        },
        "create_group": {
            "id": "create_group",
            "type": "function",
            "tags": [
                "method"
            ],
            "arguments": [
                {
                    "label": "username",
                    "type": "string"
                },
                {
                    "label": "group",
                    "type": "string"
                }
            ],
            "returnVariations": [
                "Error: only alphanumeric allowed as user and group names.",
                "Denied. Only root user can execute this command.",
                "Error: user ${username} does not exist.",
                1
            ],
            "returns": [
                "number",
                "string",
                "null"
            ]
        },
        "delete_group": {
            "id": "delete_group",
            "type": "function",
            "tags": [
                "method"
            ],
            "arguments": [
                {
                    "label": "username",
                    "type": "string"
                },
                {
                    "label": "group",
                    "type": "string"
                }
            ],
            "returnVariations": [
                "Denied. Only root user can execute this command.",
                "Error: user ${username} does not exist.",
                "Error: group ${group} not found in user ${username}",
                1
            ],
            "returns": [
                "number",
                "string",
                "null"
            ]
        },
        "groups": {
            "id": "groups",
            "type": "function",
            "tags": [
                "method"
            ],
            "arguments": [
                {
                    "label": "username",
                    "type": "string"
                }
            ],
            "returnVariations": [
                "Error: user ${username} does not exist."
            ],
            "returns": [
                "string",
                "null"
            ]
        },
        "close_program": {
            "id": "close_program",
            "type": "function",
            "tags": [
                "method"
            ],
            "arguments": [
                {
                    "label": "pid",
                    "type": "number"
                }
            ],
            "returnVariations": [
                "Permission denied. PID ${pid} belongs to user <b>${username}</b>",
                "Permission denied. Process protected.",
                "Unable to close this process. The process belongs to this script.",
                1,
                0
            ],
            "returns": [
                "number",
                "string",
                "null"
            ]
        },
        "wifi_networks": {
            "id": "wifi_networks",
            "type": "function",
            "tags": [
                "method"
            ],
            "arguments": [
                {
                    "label": "netDevice",
                    "type": "string"
                }
            ],
            "returns": [
                {
                    "type": "list",
                    "valueType": "string"
                },
                "null"
            ]
        },
        "connect_wifi": {
            "id": "connect_wifi",
            "type": "function",
            "tags": [
                "method"
            ],
            "arguments": [
                {
                    "label": "netDevice",
                    "type": "string"
                },
                {
                    "label": "bssid",
                    "type": "string"
                },
                {
                    "label": "essid",
                    "type": "string"
                },
                {
                    "label": "password",
                    "type": "string"
                }
            ],
            "returnVariations": [
                "connect_wifi: permission denied. Guest users can not execute this method",
                "connect_wifi: Network device not found",
                "connect_wifi: Only wifi cards are supported",
                "Can't connect. Incorrect password.",
                "Can't connect. Router not found.",
                "can't connect: the remote server has been temporarily disabled due to non-payment",
                "Can't connect. Target is out of reach.",
                "Can't connect. Incorrect password.",
                1
            ],
            "returns": [
                "number",
                "string",
                "null"
            ]
        },
        "connect_ethernet": {
            "id": "connect_ethernet",
            "type": "function",
            "tags": [
                "method"
            ],
            "arguments": [
                {
                    "label": "netDevice",
                    "type": "string"
                },
                {
                    "label": "address",
                    "type": "string"
                },
                {
                    "label": "gateway",
                    "type": "string"
                }
            ],
            "returnVariations": [
                "connect_ethernet: permission denied. Guest users can not execute this method",
                "Error: Invalid IP address",
                "Error: invalid gateway",
                "Error: the IP address and the gateway must belong to the same subnet",
                "connect_ethernet: Network device not found",
                "connect_ethernet: Only ethernet cards are supported",
                "!NetworkLan.ConnectEthernet"
            ],
            "returns": [
                "string",
                "null"
            ]
        },
        "network_gateway": {
            "id": "network_gateway",
            "type": "function",
            "tags": [
                "method"
            ],
            "returns": [
                "string"
            ]
        },
        "active_net_card": {
            "id": "active_net_card",
            "type": "function",
            "tags": [
                "method"
            ],
            "returns": [
                "string"
            ]
        },
        "reboot": {
            "id": "reboot",
            "type": "function",
            "tags": [
                "method",
                "ssh incompatible"
            ],
            "arguments": [
                {
                    "label": "safeMode",
                    "type": "number",
                    "default": {
                        "type": "number",
                        "value": 0
                    }
                }
            ],
            "returnVariations": [
                "Error: unable to call reboot from a Terminal started automatically from /etc/init.d",
                "Error: unable to restart in safe mode on remote computers.",
                1
            ],
            "returns": [
                "number",
                "string",
                "null"
            ]
        }
    }
}
