{
  "$id": "https://schemas.binaryedge.io/minion/modules/snmp",
  "title": "SNMP Module Output Body",
  "type": "object",
  "properties": {
    "mibs": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "community": {
            "type": "string"
          },
          "objects": {
            "type": "array",
            "items": {
              "$ref": "#/$defs/object"
            }
          },
          "version": {
            "$comment": "v3 is not currently supported.",
            "type": "string",
            "enum": [
              "1",
              "2c"
            ]
          }
        },
        "required": [
          "community",
          "objects",
          "version"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "mibs"
  ],
  "additionalProperties": false,
  "$defs": {
    "object": {
      "type": "object",
      "properties": {
        "oid": {
          "type": "string",
          "pattern": "^(?:\\.[0-9]+)+$"
        },
        "type": {
          "$comment": "These are the types that are hoped will contain interesting information.",
          "type": "string",
          "enum": [
            "BitString",
            "Boolean",
            "IPAddress",
            "NsapAddress",
            "ObjectDescription",
            "ObjectIdentifier",
            "OctetString"
          ]
        },
        "value": {
          "type": "string"
        }
      },
      "required": [
        "oid",
        "type",
        "value"
      ],
      "additionalProperties": false
    }
  }
}
