{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "$id": "#Entity",
    "description": "A node in the graph database that represents an Entity. This reference schema defines common shared properties among most Entities.",
    "type": "object",
    "allOf": [
        { "$ref": "#GraphObject" },
        {
            "properties": {
                "id": {
                    "description": "Identifiers of this entity assigned by the providers. Values are expected to be unique within the provider scope.",
                    "anyOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    ]
                },
                "name": {
                    "description": "Name of this entity",
                    "type": "string"
                },
                "displayName": {
                    "description": "Display name, e.g. a person's preferred name or an AWS account alias",
                    "type": "string"
                },
                "summary": {
                    "description": "A summary / short description of this entity.",
                    "type": "string"
                },
                "description": {
                    "description": "An extended description of this entity.",
                    "type": "string"
                },
                "classification": {
                    "description": "The sensitivity of the data; should match company data classification scheme",
                    "type": ["string", "null"],
                    "examples": ["critical", "confidential", "internal", "public"]
                },
                "criticality": {
                    "description": "A number that represents the value or criticality of this entity, on a scale between 1-10.",
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10
                },
                "risk": {
                    "description": "The risk level of this entity, on a scale between 1-10.",
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10
                },
                "trust": {
                    "description": "The trust level of this entity, on a scale between 1-10.",
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10
                },
                "complianceStatus": {
                    "description": "The compliance status of the entity, as a percentage of compliancy.",
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                },
                "status": {
                    "description": "Status of this entity set by the external source system or by a user, e.g. Active, Inactive, Decommissioned",
                    "type": "string",
                    "examples": [
                        "active",
                        "inactive",
                        "suspended",
                        "terminated",
                        "open",
                        "closed",
                        "pending",
                        "unknown",
                        "other"
                    ]
                },
                "active": {
                    "description": "Indicates if this entity is currently active.",
                    "type": "boolean"
                },
                "public": {
                    "description": "Indicates if this is a public-facing resource (e.g. a public IP or public DNS record) or if the entity is publicly accessible. Default is false.",
                    "type": "boolean"
                },
                "validated": {
                    "description": "Indicates if this node has been validated as a known/valid Entity.",
                    "type": "boolean"
                },
                "temporary": {
                    "description": "Indicates if this node is a temporary resource, such as a lambda instance or an EC2 instance started by ECS.",
                    "type": "boolean"
                },
                "trusted": {
                    "description": "Indicates if this is a trusted resource. For example, a trusted Network, Host, Device, Application, Person, User, or Vendor.",
                    "type": "boolean"
                },
                "createdOn": {
                    "description": "The timestamp (in milliseconds since epoch) when the entity was created at the source. This is different than `_createdOn` which is the timestamp the entity was first ingested into JupiterOne.",
                    "type": "number",
                    "format": "date-time"
                },
                "updatedOn": {
                    "description": "The timestamp (in milliseconds since epoch) when the entity was last updated at the source.",
                    "type": "number",
                    "format": "date-time"
                },
                "deletedOn": {
                    "description": "The timestamp (in milliseconds since epoch) when the entity was deleted at the source.",
                    "type": "number",
                    "format": "date-time"
                },
                "discoveredOn": {
                    "description": "The timestamp (in milliseconds since epoch) when the entity was discovered.",
                    "type": "number",
                    "format": "date-time"
                },
                "expiresOn": {
                    "description": "If the entity is a temporary resource, optionally set the expiration date. For example, the expiration date of an SSL cert.",
                    "type": "number",
                    "format": "date-time"
                },
                "createdBy": {
                    "description": "The source/principal/user that created the entity",
                    "type": "string"
                },
                "updatedBy": {
                    "description": "The source/principal/user that updated the entity",
                    "type": "string"
                },
                "deletedBy": {
                    "description": "The source/principal/user that deleted the entity",
                    "type": "string"
                },
                "discoveredBy": {
                    "description": "The source/principal/user that discovered the entity",
                    "type": "string"
                },
                "webLink": {
                    "description": "Web link to the source. For example: https://console.aws.amazon.com/iam/home#/roles/Administrator. This property is used by the UI to add a hyperlink to the entity.",
                    "type": "string",
                    "format": "uri"
                },
                "owner": {
                    "description": "The owner of this entity. This could reference the name of the owner, or as reference ID/key to another entity in the graph as the owner.",
                    "type": "string"
                },
                "tags": {
                    "description": "An array of unnamed tags",
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "notes": {
                    "description": "User provided notes about this entity",
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                }
            },
            "required": ["name", "displayName"]
        }
    ]
}
