{
    "id": "http://www.ubisoft.com/ugc/acd/v1/quest/behaviours#",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "JSON Schema for Assassin's Creed Dynasty UGC",
    "AmbushBehaviour": {
        "type": "object",
        "properties": {
            "ID": {
                "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#/RequiredString"
            },
            "Type": {
                "type": "string",
                "enum": [
                    "AmbushBehaviour"
                ]
            },
            "NPCs": {
                "$ref": "#/definitions/Targets"
            },
            "AmbushLocation": {
                "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#/RequiredString"
            },
            "CanSwapPosition": {
                "type": "boolean"
            },
            "DenLocation": {
                "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#/ObjectId"
            },
            "ForceVehicleUsage": {
                "type": "boolean"
            },
            "OnlyAmbushIfOutnumbered": {
                "type": "boolean"
            },
            "OnlyTargetInventoryCarries": {
                "type": "boolean"
            },
            "StealTargetLabels": {
                "type": "array",
                "minItems": 1,
                "items": {
                    "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#/ObjectId"
                }
            },
            "StealTargetObjectives": {
                "type": "array",
                "minItems": 1,
                "items": {
                    "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#/ObjectId"
                }
            }
        },
        "additionalProperties": false,
        "anyof": [
            {
                "required": [
                    "ID",
                    "Type",
                    "NPCs",
                    "AmbushLocation",
                    "StealTargetLabels",
                    "StealTargetObjectives"
                ]
            },
            {
                "required": [
                    "ID",
                    "Type",
                    "NPCs",
                    "AmbushLocation",
                    "StealTargetObjectives"
                ]
            },
            {
                "required": [
                    "ID",
                    "Type",
                    "NPCs",
                    "AmbushLocation",
                    "StealTargetLabels"
                ]
            }
        ]
    },
    "AttackBehaviour": {
        "type": "object",
        "properties": {
            "ID": {
                "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#/RequiredString"
            },
            "Type": {
                "type": "string",
                "enum": [
                    "AttackBehaviour"
                ]
            },
            "NPCs": {
                "$ref": "#/definitions/Targets"
            },
            "AutoAllyAttackers": {
                "type": "boolean"
            },
            "AutoAllyTargets" : {
                "type": "boolean"
            },
            "ForceVehicleUsage": {
                "type": "boolean"
            },
            "TargetNPCs": {
                "type": "array",
                "minItems": 1,
                "items": {
                    "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#/RequiredString"
                }
            },
            "UsePlayerAsTarget": {
                "type": "boolean"
            },
            "EndTime": {
                "type": "number",
                "minimum": 0,
                "maximum": 24,
                "exclusiveMinimum": true
            },
            "StartTime": {
                "type": "number",
                "minimum": 0,
                "maximum": 24,
                "exclusiveMaximum": true
            }
        },
        "additionalProperties": false,
        "anyOf": [
            {
                "required": [
                    "ID",
                    "Type",
                    "NPCs",
                    "TargetNPCs",
                    "UsePlayerAsTarget"
                ]
            },
            {
                "required": [
                    "ID",
                    "Type",
                    "NPCs",
                    "TargetNPCs"
                ]
            },
            {
                "required": [
                    "ID",
                    "Type",
                    "NPCs",
                    "UsePlayerAsTarget"
                ]
            }
        ]
    },
    "BodyguardBehaviour": {
        "type": "object",
        "properties": {
            "ID": {
                "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#/RequiredString"
            },
            "Type": {
                "type": "string",
                "enum": [
                    "BodyguardBehaviour"
                ]
            },
            "NPCs": {
                "$ref": "#/definitions/Targets"
            },
            "VIP": {
                "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#/RequiredString"
            },
            "FinalDestination": {
                "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#/RequiredString"
            },
            "AutoAllyVIPAndBodyguards": {
                "type": "boolean"
            },
            "RememberReactionToPlayer": {
                "type": "boolean"
            },
            "RestrictionArea": {
                "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#/ObjectId"
            }
        },
        "additionalProperties": false,
        "required": [
            "ID",
            "Type",
            "NPCs",
            "VIP"
        ]
    },
    "DefendBehaviour": {
        "type": "object",
        "properties": {
            "ID": {
                "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#/RequiredString"
            },
            "Type": {
                "type": "string",
                "enum": [
                    "DefendBehaviour"
                ]
            },
            "NPCs": {
                "$ref": "#/definitions/Targets"
            },
            "Location": {
                "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#/RequiredString"
            }
        },
        "additionalProperties": false,
        "required": [
            "ID",
            "Type",
            "NPCs",
            "Location"
        ]
    },
    "FleeBehaviour": {
        "type": "object",
        "properties": {
            "ID": {
                "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#/RequiredString"
            },
            "Type": {
                "type": "string",
                "enum": [
                    "FleeBehaviour"
                ]
            },
            "NPCs": {
                "$ref": "#/definitions/Targets"
            },
            "UsePlayerAsThreateningNPC": {
                "type": "boolean"
            },
            "ThreateningNPC": {
                "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#/RequiredString"
            },
            "FleeLocations": {
                "type": "array",
                "minItems": 1,
                "items": {
                    "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#/ObjectId"
                }
            }
        },
        "additionalProperties": false,
        "required": [
            "ID",
            "Type",
            "NPCs"
        ]
    },
    "FollowAndGotoBehaviour": {
        "type": "object",
        "properties": {
            "ID": {
                "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#/RequiredString"
            },
            "Type": {
                "type": "string",
                "enum": [
                    "GotoBehaviour",
                    "FollowBehaviour"
                ]
            },
            "NPCs": {
                "$ref": "#/definitions/Targets"
            },
            "Labels": {
                "type": "array",
                "minItems": 1,
                "items": {
                    "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#/ObjectId"
                }
            },
            "Objectives": {
                "type": "array",
                "minItems": 1,
                "items": {
                    "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#/ObjectId"
                }
            },
            "DesiredMovementSpeed": {
                "type": "string",
                "enum": [
                    "SpeedIntention_Default",
                    "SpeedIntention_Slowest",
                    "SpeedIntention_Slow",
                    "SpeedIntention_Regular",
                    "SpeedIntention_Fast",
                    "SpeedIntention_Fastest"
                ]
            },
            "AllowTeleport": {
                "type": "boolean"
            },
            "AsFastAsPossible": {
                "type": "boolean"
            },
            "CanUseRideable": {
                "type": "boolean"
            },
            "LinkPlayer": {
                "type": "boolean"
            }
        },
        "additionalProperties": false,
        "anyOf": [
            {
                "required": [
                    "ID",
                    "Type",
                    "NPCs",
                    "Labels",
                    "Objectives"
                ]
            },
            {
                "required": [
                    "ID",
                    "Type",
                    "NPCs",
                    "Labels"
                ]
            },
            {
                "required": [
                    "ID",
                    "Type",
                    "NPCs",
                    "Objectives"
                ]
            }
        ]
    },
    "EmbeddedFollowAndGotoBehaviour": {
        "type": "object",
        "properties": {
            "ID": {
                "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#/RequiredString"
            },
            "Type": {
                "type": "string",
                "enum": [
                    "GotoBehaviour",
                    "FollowBehaviour"
                ]
            },
            "Labels": {
                "type": "array",
                "minItems": 1,
                "items": {
                    "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#/ObjectId"
                }
            },
            "Objectives": {
                "type": "array",
                "minItems": 1,
                "items": {
                    "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#/ObjectId"
                }
            },
            "DesiredMovementSpeed": {
                "type": "string",
                "enum": [
                    "SpeedIntention_Default",
                    "SpeedIntention_Slowest",
                    "SpeedIntention_Slow",
                    "SpeedIntention_Regular",
                    "SpeedIntention_Fast",
                    "SpeedIntention_Fastest"
                ]
            },
            "AllowTeleport": {
                "type": "boolean"
            },
            "AsFastAsPossible": {
                "type": "boolean"
            },
            "CanUseRideable": {
                "type": "boolean"
            }
        },
        "additionalProperties": false,
        "anyOf": [
            {
                "required": [
                    "ID",
                    "Type",
                    "Labels",
                    "Objectives"
                ]
            },
            {
                "required": [
                    "ID",
                    "Type",
                    "Labels"
                ]
            },
            {
                "required": [
                    "ID",
                    "Type",
                    "Objectives"
                ]
            }
        ]
    },
    "PrisonerBehaviour": {
        "type": "object",
        "properties": {
            "ID": {
                "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#/RequiredString"
            },
            "Type": {
                "type": "string",
                "enum": [
                    "PrisonerBehaviour"
                ]
            },
            "NPCs": {
                "$ref": "#/definitions/Targets"
            },
            "Cage": {
                "$ref": "#/definitions/Cage"
            },
            "Guards": {
                "type": "array",
                "items": {
                    "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#/RequiredString"
                }
            },
            "ForcedImprisonedType": {
                "type": "string",
                "enum": [
                    "ImprisonedType_Auto",
                    "ImprisonedType_Standing",
                    "ImprisonedType_Tied",
                    "ImprisonedType_Weakened"
                ]
            },
            "FinalDestination": {
                "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#/RequiredString"
            },
            "ExitRideableOnCompleted": {
                "type": "boolean"
            },
            "AllowSelectFinalDestination": {
                "type": "boolean"
            },
            "AutoRelease": {
                "type": "boolean"
            }
        },
        "additionalProperties": false,
        "required": [
            "ID",
            "Type",
            "NPCs",
            "Cage"
        ]
    },
    "EmbeddedPrisonerBehaviour": {
        "type": "object",
        "properties": {
            "ID": {
                "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#/RequiredString"
            },
            "Cage": {
                "$ref": "#/definitions/Cage"
            },
            "Guards": {
                "type": "array",
                "items": {
                    "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#/RequiredString"
                }
            },
            "ForcedImprisonedType": {
                "type": "string",
                "enum": [
                    "ImprisonedType_Auto",
                    "ImprisonedType_Standing",
                    "ImprisonedType_Tied",
                    "ImprisonedType_Weakened"
                ]
            },
            "FinalDestination": {
                "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#/RequiredString"
            },
            "ExitRideableOnCompleted": {
                "type": "boolean"
            },
            "AllowSelectFinalDestination": {
                "type": "boolean"
            },
            "AutoRelease": {
                "type": "boolean"
            }
        },
        "additionalProperties": false,
        "required": [
            "ID",
            "Cage"
        ]
    },
    "definitions": {
        "Cage":{
            "type": "object",
            "properties":{
                "CageAcquisitionMethod": {
                    "type": "string",
                    "enum": [
                        "CageAcquisitionMethod_Entity",
                        "CageAcquisitionMethod_LocationNode"
                    ]
                },
                "Resource": {
                    "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#/RequiredString"
                }
            },
            "required":[
                "AcquisitionMethod",
                "Resource"
            ],
            "additionalProperties": false
        },
        "Targets": {
            "type": "array",
            "minItems": 1,
            "items": {
                "$ref": "http://www.ubisoft.com/ugc/acd/v1/types#/RequiredString"
            }
        }
    }
}