{
  "$udmi_version": "1.5.7",
  "title": "Discovery Events",
  "description": "[Discovery result](../docs/specs/discovery.md) with implicit discovery",
  "$section": "Messages",
  "type": "object",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "additionalProperties": false,
  "properties": {
    "timestamp": {
      "description": "RFC 3339 UTC timestamp the discover telemetry event was generated",
      "type": "string",
      "format": "date-time",
      "examples": ["2019-01-17T14:02:29.364Z"]
    },
    "version": {
      "description": "Version of the UDMI schema",
      "type": "string"
    },
    "generation": {
      "description": "The event's discovery scan trigger's generation timestamp",
      "type": "string",
      "format": "date-time",
      "examples": ["2019-01-17T14:02:29.364Z"]
    },
    "status": {
      "$ref": "file:entry.json"
    },
    "family": {
      "existingJavaType": "String"
    },
    "addr": {
      "description": "The primary address of the device (for indicated family)",
      "type": "string"
    },
    "network": {
      "description": "The family network designator of the discovered device",
      "type": "string"
    },
    "event_no": {
      "description": "The active or passive series number of this result (matches reported state values)",
      "type": "integer"
    },
    "families": {
      "description": "Links to other address families (family and id)",
      "type": "object",
      "additionalProperties": false,
      "existingJavaType": "java.util.Map<String, FamilyDiscovery>",
      "patternProperties": {
        "^[a-z][a-z0-9]*(_[a-z0-9]+)*$": {
          "$ref": "file:discovery_family.json"
        }
      }
    },
    "registries": {
      "description": "Registry iot cloud models",
      "type": "object",
      "additionalProperties": false,
      "existingJavaType": "java.util.Map<String, CloudModel>",
      "patternProperties": {
        "^[A-Z]{2,6}-[1-9][0-9]*$": {
          "$ref": "file:model_cloud.json"
        }
      }
    },
    "devices": {
      "description": "Device iot cloud models",
      "type": "object",
      "additionalProperties": false,
      "existingJavaType": "java.util.Map<String, CloudModel>",
      "patternProperties": {
        "^[A-Z]{2,6}-[1-9][0-9]*$": {
          "$ref": "file:model_cloud.json"
        }
      }
    },
    "points": {
      "description": "Information about a specific point name of the device.",
      "additionalProperties": false,
      "existingJavaType": "java.util.Map<String, PointPointsetModel>",
      "patternProperties": {
        "^[a-z][a-z0-9]*(_[a-z0-9]+)*$": {
          "$ref": "file:model_pointset_point.json#"
        }
      }
    },
    "refs": {
      "description": "Collection of point references",
      "additionalProperties": false,
      "existingJavaType": "java.util.Map<String, RefDiscovery>",
      "patternProperties": {
        "^[-_.:/#a-zA-Z0-9]+$": {
          "$ref": "file:discovery_ref.json#"
        }
      }
    },
    "features": {
      "description": "Discovery of features supported by this device.",
      "additionalProperties": false,
      "existingJavaType": "java.util.Map<String, FeatureDiscovery>",
      "patternProperties": {
        "^[._a-zA-Z]+$": {
          "$ref": "file:discovery_feature.json"
        }
      }
    },
    "cloud_model": {
      "$ref": "file:model_cloud.json"
    },
    "system": {
      "title": "System Discovery Data",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "description": {
          "description": "Full textual desctiiption of this device",
          "type": "string"
        },
        "name": {
          "description": "Friendly name of this device",
          "type": "string"
        },
        "serial_no": {
          "description": "The serial number of the physical device",
          "type": "string"
        },
        "ancillary": {
          "$ref": "file:ancillary_properties.json"
        },
        "hardware": {
          "$ref": "file:state_system_hardware.json"
        }
      }
    }
  }
}
