{
	"$schema": "https://json-schema.org/draft/2020-12/schema",
	"$id": "https://schema.twindev.org/dataspace-protocol/DataspaceProtocolOfferBase",
	"title": "DataspaceProtocolOfferBase",
	"description": "Context-free offer interface compliant with Eclipse Data Space Protocol, for embedding within parent documents.",
	"type": "object",
	"properties": {
		"@id": {
			"type": "string",
			"description": "Unique identifier for the offer."
		}
	},
	"required": ["@id"],
	"allOf": [
		{
			"description": "Interface representing an ODRL Offer.\nAn Offer requires an assigner (the party making the offer).\nhttps://www.w3.org/TR/odrl-model/#policy-offer",
			"type": "object",
			"properties": {
				"@type": {
					"const": "Offer",
					"description": "The type must be \"Offer\".",
					"$comment": "Inherited from OdrlOffer"
				},
				"profile": {
					"anyOf": [
						{
							"type": "string"
						},
						{
							"type": "array",
							"items": {
								"type": "string"
							}
						}
					],
					"description": "The profile(s) this policy conforms to.\nIRIs identifying the ODRL Profile(s).",
					"$comment": "Inherited from OdrlPolicy"
				},
				"assigner": {
					"anyOf": [
						{
							"type": "string"
						},
						{
							"$ref": "https://schema.twindev.org/w3c-odrl/OdrlParty"
						}
					],
					"description": "The assigner of the offer.\nRequired for Offer policies.",
					"$comment": "Inherited from OdrlOffer"
				},
				"assignee": {
					"anyOf": [
						{
							"type": "string"
						},
						{
							"$ref": "https://schema.twindev.org/w3c-odrl/OdrlParty"
						},
						{
							"$ref": "https://schema.twindev.org/w3c-odrl/OdrlPartyCollection"
						},
						{
							"type": "array",
							"items": {
								"anyOf": [
									{
										"type": "string"
									},
									{
										"$ref": "https://schema.twindev.org/w3c-odrl/OdrlParty"
									},
									{
										"$ref": "https://schema.twindev.org/w3c-odrl/OdrlPartyCollection"
									}
								]
							}
						}
					],
					"description": "The assignee of the policy.\nApplies to all rules unless overridden at rule level.",
					"$comment": "Inherited from OdrlPolicy"
				},
				"target": {
					"anyOf": [
						{
							"type": "string"
						},
						{
							"$ref": "https://schema.twindev.org/w3c-odrl/OdrlAsset"
						},
						{
							"$ref": "https://schema.twindev.org/w3c-odrl/OdrlAssetCollection"
						},
						{
							"type": "array",
							"items": {
								"anyOf": [
									{
										"type": "string"
									},
									{
										"$ref": "https://schema.twindev.org/w3c-odrl/OdrlAsset"
									},
									{
										"$ref": "https://schema.twindev.org/w3c-odrl/OdrlAssetCollection"
									}
								]
							}
						}
					],
					"description": "The target asset for the rule.",
					"$comment": "Inherited from OdrlPolicy"
				},
				"action": {
					"anyOf": [
						{
							"$ref": "https://schema.twindev.org/w3c-odrl/OdrlActionType"
						},
						{
							"type": "string"
						},
						{
							"$ref": "https://schema.twindev.org/w3c-odrl/OdrlAction"
						},
						{
							"type": "array",
							"items": {
								"anyOf": [
									{
										"$ref": "https://schema.twindev.org/w3c-odrl/OdrlActionType"
									},
									{
										"type": "string"
									},
									{
										"$ref": "https://schema.twindev.org/w3c-odrl/OdrlAction"
									}
								]
							}
						}
					],
					"description": "The action associated with the rule.",
					"$comment": "Inherited from OdrlPolicy"
				},
				"inheritFrom": {
					"anyOf": [
						{
							"type": "string"
						},
						{
							"type": "array",
							"items": {
								"type": "string"
							}
						}
					],
					"description": "The parent policy(ies) this policy inherits from.\nIRIs identifying the parent Policy(ies).",
					"$comment": "Inherited from OdrlPolicy"
				},
				"conflict": {
					"$ref": "https://schema.twindev.org/w3c-odrl/OdrlConflictStrategyType",
					"description": "The conflict resolution strategy.\n- perm: Permissions override Prohibitions\n- prohibit: Prohibitions override Permissions\n- invalid: Policy is void if conflicts exist (default)",
					"$comment": "Inherited from OdrlPolicy"
				},
				"permission": {
					"anyOf": [
						{
							"$ref": "https://schema.twindev.org/w3c-odrl/OdrlPermission"
						},
						{
							"type": "array",
							"items": {
								"$ref": "https://schema.twindev.org/w3c-odrl/OdrlPermission"
							}
						}
					],
					"description": "The permissions in the policy.\nAt least one of permission, prohibition, or obligation must be present.",
					"$comment": "Inherited from OdrlPolicy"
				},
				"prohibition": {
					"anyOf": [
						{
							"$ref": "https://schema.twindev.org/w3c-odrl/OdrlProhibition"
						},
						{
							"type": "array",
							"items": {
								"$ref": "https://schema.twindev.org/w3c-odrl/OdrlProhibition"
							}
						}
					],
					"description": "The prohibitions in the policy.\nAt least one of permission, prohibition, or obligation must be present.",
					"$comment": "Inherited from OdrlPolicy"
				},
				"obligation": {
					"anyOf": [
						{
							"$ref": "https://schema.twindev.org/w3c-odrl/OdrlDuty"
						},
						{
							"type": "array",
							"items": {
								"$ref": "https://schema.twindev.org/w3c-odrl/OdrlDuty"
							}
						}
					],
					"description": "The obligations in the policy.\nAt least one of permission, prohibition, or obligation must be present.",
					"$comment": "Inherited from OdrlPolicy"
				}
			},
			"required": ["@type", "assigner"],
			"$comment": "Inlined utility base type OdrlOffer so utility transformations can operate on concrete properties instead of a $ref."
		}
	]
}
