{
    "$id": "../common/core.json",
    "$schema": "http://json-schema.org/draft-06/schema#",
    "title": "core",
    "description": "Common properties and behavior across all STIX Domain Objects and STIX Relationship Objects.",
    "type": "object",
    "properties": {
        "type": {
            "title": "type",
            "type": "string",
            "pattern": "^\\-?[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*\\-?$",
            "minLength": 3,
            "maxLength": 250,
            "description": "The type property identifies the type of STIX Object (SDO, Relationship Object, etc). The value of the type field MUST be one of the types defined by a STIX Object (e.g., indicator).",
            "not": {
                "enum": [
                    "incident",
                    "infrastructure"
                ]
            }
        },
        "id": {
            "$ref": "identifier.json",
            "description": "The id property universally and uniquely identifies this object."
        },
        "created_by_ref": {
            "$ref": "identifier.json",
            "description": "The ID of the Source object that describes who created this object."
        },
        "labels": {
            "type": "array",
            "description": "The labels property specifies a set of classifications.",
            "items": {
                "type": "string"
            },
            "minItems": 1
        },
        "created": {
            "description": "The created property represents the time at which the first version of this object was created. The timstamp value MUST be precise to the nearest millisecond.",
            "allOf": [
                {
                    "$ref": "timestamp.json"
                },
                {
                    "title": "timestamp_millis",
                    "pattern": "T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
                }
            ]
        },
        "modified": {
            "description": "The modified property represents the time that this particular version of the object was created. The timstamp value MUST be precise to the nearest millisecond.",
            "allOf": [
                {
                    "$ref": "timestamp.json"
                },
                {
                    "title": "timestamp_millis",
                    "pattern": "T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
                }
            ]
        },
        "revoked": {
            "type": "boolean",
            "description": "The revoked property indicates whether the object has been revoked."
        },
        "external_references": {
            "type": "array",
            "description": "A list of external references which refers to non-STIX information.",
            "items": {
                "$ref": "external-reference.json"
            },
            "minItems": 1
        },
        "object_marking_refs": {
            "type": "array",
            "description": "The list of marking-definition objects to be applied to this object.",
            "items": {
                "$ref": "identifier.json"
            },
            "minItems": 1
        },
        "granular_markings": {
            "type": "array",
            "description": "The set of granular markings that apply to this object.",
            "items": {
                "$ref": "granular-marking.json"
            },
            "minItems": 1
        }
    },
    "patternProperties": {
        "^[a-z0-9_]{3,250}$": {
            "anyOf": [
                {
                    "type": "array",
                    "minItems": 1
                },
                {
                    "type": "string"
                },
                {
                    "type": "integer"
                },
                {
                    "type": "boolean"
                },
                {
                    "type": "number"
                },
                {
                    "type": "object"
                }
            ]
        }
    },
    "additionalProperties": false,
    "not": {
        "anyOf": [
            {
                "required": [
                    "confidence"
                ]
            },
            {
                "required": [
                    "severity"
                ]
            },
            {
                "required": [
                    "action"
                ]
            },
            {
                "required": [
                    "usernames"
                ]
            },
            {
                "required": [
                    "phone_numbers"
                ]
            },
            {
                "required": [
                    "addresses"
                ]
            },
            {
                "required": [
                    "first_seen_precision"
                ]
            },
            {
                "required": [
                    "last_seen_precision"
                ]
            },
            {
                "required": [
                    "valid_from_precision"
                ]
            },
            {
                "required": [
                    "valid_until_precision"
                ]
            }
        ]
    },
    "required": [
        "type",
        "id",
        "created",
        "modified"
    ]
}