{
	"$schema": "https://json-schema.org/draft/2020-12/schema",
	"$id": "https://schema.twindev.org/gs1-epcis/EpcisAggregationEvent",
	"title": "EpcisAggregationEvent",
	"description": "EPCIS 2.0 AggregationEvent describing how child objects are associated with or\ndisassociated from a parent object.",
	"type": "object",
	"properties": {
		"type": {
			"const": "AggregationEvent",
			"description": "The type."
		},
		"parentID": {
			"type": "string",
			"description": "(Optional when action is OBSERVE, required otherwise) Identifier of the parent\nof the aggregation or association; use the pure identity URI when the parent is\nan EPC."
		},
		"childEPCs": {
			"type": "array",
			"items": {
				"type": "string"
			},
			"description": "(Optional) Unordered list of contained objects identified at the instance\nlevel; AggregationEvents normally include childEPCs or childQuantityList unless\naction is DELETE."
		},
		"childQuantityList": {
			"type": "array",
			"items": {
				"$ref": "https://schema.twindev.org/gs1-epcis/EpcisQuantity"
			},
			"description": "Unordered list of one or more QuantityElements identifying contained objects\nat the class level; may be empty only with action DELETE when disaggregating\nall children."
		},
		"action": {
			"$ref": "https://schema.twindev.org/gs1-epcis/EpcisActionTypes",
			"description": "How this event relates to the lifecycle of the EPCs named in this event."
		},
		"bizStep": {
			"anyOf": [
				{
					"$ref": "https://schema.twindev.org/gs1-epcis/EpcisBizStepTypes"
				},
				{
					"type": "string"
				}
			],
			"description": "(Optional) The business step of which this event was a part."
		},
		"disposition": {
			"anyOf": [
				{
					"$ref": "https://schema.twindev.org/gs1-epcis/EpcisDispositionTypes"
				},
				{
					"type": "string"
				}
			],
			"description": "(Optional) The business condition of the objects associated with the EPCs,\npresumed to hold true until contradicted by a subsequent event."
		},
		"readPoint": {
			"$ref": "https://schema.twindev.org/gs1-epcis/EpcisLocation",
			"description": "(Optional) The read point at which the event took place."
		},
		"bizLocation": {
			"$ref": "https://schema.twindev.org/gs1-epcis/EpcisLocation",
			"description": "(Optional) The business location where the objects associated with the EPCs\nmay be found, until contradicted by a subsequent event."
		},
		"bizTransactionList": {
			"type": "array",
			"items": {
				"$ref": "https://schema.twindev.org/gs1-epcis/EpcisBizTransaction"
			},
			"description": "(Optional) An unordered list of business transactions that define the context\nof this event."
		},
		"sourceList": {
			"type": "array",
			"items": {
				"$ref": "https://schema.twindev.org/gs1-epcis/EpcisSource"
			},
			"description": "(Optional) Unordered list of Source elements that provide context about the\noriginating endpoint of a business transfer of which this event is a part."
		},
		"destinationList": {
			"type": "array",
			"items": {
				"$ref": "https://schema.twindev.org/gs1-epcis/EpcisDestination"
			},
			"description": "(Optional) Unordered list of Destination elements that provide context about the\nterminating endpoint of a business transfer of which this event is a part."
		},
		"sensorElementList": {
			"type": "array",
			"items": {
				"$ref": "https://schema.twindev.org/gs1-epcis/EpcisSensorElement"
			},
			"description": "(Optional) Connects event to one or more SensorElements."
		}
	},
	"required": ["type", "action"],
	"allOf": [
		{
			"$ref": "https://schema.twindev.org/gs1-epcis/EpcisEvent"
		}
	]
}
