{
	"$schema": "http://json-schema.org/draft-07/schema#",
	"id": "drillplan://aea/custom-parameters/1.0.0",
	"title": "AEA custom parameters (custom-parameters-v1)",
	"type": "object",
	"description": "The collection of DrillPlan object references with parameters.",
	"required": [
		"object_parameters",
		"is_outdated"
	],
	"example": {
		"object_parameters": [
			{
				"object_type": "Well",
				"object_id": "e0970ff6bf51496090aca1e2ac8ce399",
				"parameters": [
					{
						"name": "Resevoir CO2 (%)",
						"type": "Number",
						"value": 2.5
					}
				]
			},
			{
				"type": "Wellbore",
				"id": "5fe825350dc15947966fadc880f2c643",
				"parameters": [
					{
						"name": "Wellbore objective",
						"type": "String",
						"value": "Gas"
					}
				]
			}
		],
		"is_outdated": false
	},
	"properties": {
		"object_parameters": {
			"type": "array",
			"items": {
				"$ref": "#/$defs/DrillPlanObject"
			}
		},
		"is_outdated": {
			"type": "boolean",
			"description": "False if the the object parameters is up to date."
		}
	},
	"$defs": {
		"DrillPlanObject": {
			"type": "object",
			"description": "The DrillPlan object.",
			"required": [
				"object_id",
				"object_type",
				"parameters"
			],
			"properties": {
				"object_id": {
					"type": "string",
					"description": "The ID of the object."
				},
				"object_type": {
					"$ref": "#/$defs/ObjectType"
				},
				"parameters": {
					"type": "array",
					"items": {
						"$ref": "#/$defs/Parameter"
					}
				}
			}
		},
		"Parameter": {
			"oneOf": [
				{
					"$ref": "#/$defs/String"
				},
				{
					"$ref": "#/$defs/Number"
				},
				{
					"$ref": "#/$defs/Boolean"
				}
			],
			"discriminator": {
				"propertyName": "type"
			}
		},
		"String": {
			"type": "object",
			"required": [
				"name",
				"type",
				"value"
			],
			"properties": {
				"name": {
					"type": "string",
					"description": "The parameter name."
				},
				"type": {
					"type": "string",
					"default": "String",
					"description": "The value type (String)."
				},
				"value": {
					"type": "string",
					"description": "The value."
				}
			}
		},
		"Number": {
			"type": "object",
			"required": [
				"name",
				"type",
				"value"
			],
			"properties": {
				"name": {
					"type": "string",
					"description": "The parameter name."
				},
				"type": {
					"type": "string",
					"default": "Number",
					"description": "The value type (Number)."
				},
				"value": {
					"type": "number",
					"format": "double",
					"description": "The value."
				}
			}
		},
		"Boolean": {
			"type": "object",
			"required": [
				"name",
				"type",
				"value"
			],
			"properties": {
				"name": {
					"type": "string",
					"description": "The parameter name."
				},
				"type": {
					"type": "string",
					"default": "Boolean",
					"description": "The value type (Boolean)."
				},
				"value": {
					"type": "boolean",
					"description": "The value."
				}
			}
		},
		"ObjectType": {
			"type": "string",
			"description": "The DrillPlan object type.",
			"enum": [
				"Well",
				"Wellbore",
				"Section"
			]
		}
	}
}