{
  "$defs": {
    "EnvironmentEvidence": {
      "additionalProperties": false,
      "properties": {
        "python_implementation": {
          "anyOf": [
            {
              "$ref": "#/$defs/EnvironmentValue"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "python_version": {
          "anyOf": [
            {
              "$ref": "#/$defs/EnvironmentValue"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "platform": {
          "anyOf": [
            {
              "$ref": "#/$defs/EnvironmentValue"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "architecture": {
          "anyOf": [
            {
              "$ref": "#/$defs/EnvironmentValue"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "packages": {
          "default": [],
          "items": {
            "$ref": "#/$defs/PackageEvidence"
          },
          "maxItems": 4096,
          "title": "Packages",
          "type": "array"
        },
        "artifacts": {
          "default": [],
          "items": {
            "$ref": "#/$defs/InputArtifact"
          },
          "maxItems": 64,
          "title": "Artifacts",
          "type": "array"
        }
      },
      "title": "EnvironmentEvidence",
      "type": "object"
    },
    "EnvironmentValue": {
      "additionalProperties": false,
      "properties": {
        "value": {
          "anyOf": [
            {
              "maxLength": 256,
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Value"
        },
        "origin": {
          "$ref": "#/$defs/EvidenceOrigin"
        }
      },
      "required": [
        "value",
        "origin"
      ],
      "title": "EnvironmentValue",
      "type": "object"
    },
    "EvidenceOrigin": {
      "enum": [
        "declared",
        "static",
        "runtime",
        "unknown"
      ],
      "title": "EvidenceOrigin",
      "type": "string"
    },
    "ExecutionIntent": {
      "additionalProperties": false,
      "properties": {
        "kind": {
          "maxLength": 128,
          "minLength": 1,
          "title": "Kind",
          "type": "string"
        },
        "policy_digest": {
          "anyOf": [
            {
              "pattern": "^[0-9a-f]{64}$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Policy Digest"
        },
        "controls": {
          "default": [],
          "items": {
            "$ref": "#/$defs/Parameter"
          },
          "maxItems": 128,
          "title": "Controls",
          "type": "array"
        }
      },
      "required": [
        "kind"
      ],
      "title": "ExecutionIntent",
      "type": "object"
    },
    "FrozenJSON": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "maximum": 9223372036854775807,
          "minimum": -9223372036854775808,
          "type": "integer"
        },
        {
          "type": "number"
        },
        {
          "maxLength": 8192,
          "type": "string"
        },
        {
          "items": {
            "$ref": "#/$defs/FrozenJSON"
          },
          "maxItems": 1024,
          "type": "array"
        },
        {
          "additionalProperties": {
            "$ref": "#/$defs/FrozenJSON"
          },
          "maxProperties": 1024,
          "propertyNames": {
            "maxLength": 256
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ]
    },
    "InputArtifact": {
      "additionalProperties": false,
      "properties": {
        "name": {
          "maxLength": 128,
          "minLength": 1,
          "title": "Name",
          "type": "string"
        },
        "reference": {
          "anyOf": [
            {
              "maxLength": 1024,
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Reference"
        },
        "digest": {
          "anyOf": [
            {
              "pattern": "^[0-9a-f]{64}$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Digest"
        },
        "size": {
          "anyOf": [
            {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Size"
        },
        "origin": {
          "$ref": "#/$defs/EvidenceOrigin"
        },
        "content_origin": {
          "anyOf": [
            {
              "$ref": "#/$defs/EvidenceOrigin"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "format_hint": {
          "anyOf": [
            {
              "enum": [
                "csv",
                "parquet",
                "numpy",
                "joblib"
              ],
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Format Hint"
        },
        "uri": {
          "anyOf": [
            {
              "maxLength": 1024,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Uri"
        }
      },
      "required": [
        "name",
        "origin"
      ],
      "title": "InputArtifact",
      "type": "object"
    },
    "PackageEvidence": {
      "additionalProperties": false,
      "properties": {
        "name": {
          "maxLength": 128,
          "minLength": 1,
          "title": "Name",
          "type": "string"
        },
        "version": {
          "anyOf": [
            {
              "maxLength": 128,
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Version"
        },
        "origin": {
          "$ref": "#/$defs/EvidenceOrigin"
        }
      },
      "required": [
        "name",
        "version",
        "origin"
      ],
      "title": "PackageEvidence",
      "type": "object"
    },
    "Parameter": {
      "additionalProperties": false,
      "properties": {
        "name": {
          "maxLength": 128,
          "minLength": 1,
          "title": "Name",
          "type": "string"
        },
        "value": {
          "$ref": "#/$defs/FrozenJSON"
        },
        "origin": {
          "$ref": "#/$defs/EvidenceOrigin"
        }
      },
      "required": [
        "name",
        "value",
        "origin"
      ],
      "title": "Parameter",
      "type": "object"
    },
    "RandomnessControl": {
      "additionalProperties": false,
      "properties": {
        "name": {
          "maxLength": 128,
          "minLength": 1,
          "title": "Name",
          "type": "string"
        },
        "value": {
          "$ref": "#/$defs/FrozenJSON"
        },
        "origin": {
          "$ref": "#/$defs/EvidenceOrigin"
        },
        "provider": {
          "maxLength": 128,
          "minLength": 1,
          "title": "Provider",
          "type": "string"
        }
      },
      "required": [
        "name",
        "value",
        "origin",
        "provider"
      ],
      "title": "RandomnessControl",
      "type": "object"
    },
    "SourceIdentity": {
      "additionalProperties": false,
      "properties": {
        "kind": {
          "enum": [
            "python",
            "notebook"
          ],
          "title": "Kind",
          "type": "string"
        },
        "reference": {
          "maxLength": 1024,
          "minLength": 1,
          "title": "Reference",
          "type": "string"
        },
        "digest": {
          "pattern": "^[0-9a-f]{64}$",
          "title": "Digest",
          "type": "string"
        },
        "executable_digest": {
          "anyOf": [
            {
              "pattern": "^[0-9a-f]{64}$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Executable Digest"
        },
        "module": {
          "anyOf": [
            {
              "maxLength": 128,
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Module"
        },
        "capability_id": {
          "anyOf": [
            {
              "maxLength": 512,
              "minLength": 1,
              "pattern": "^[^\\s/\\\\]+$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Capability Id"
        }
      },
      "required": [
        "kind",
        "reference",
        "digest"
      ],
      "title": "SourceIdentity",
      "type": "object"
    }
  },
  "additionalProperties": false,
  "properties": {
    "schema_version": {
      "const": "apizr.experiment-plan/v1",
      "default": "apizr.experiment-plan/v1",
      "title": "Schema Version",
      "type": "string"
    },
    "subject": {
      "$ref": "#/$defs/SourceIdentity"
    },
    "execution": {
      "$ref": "#/$defs/ExecutionIntent"
    },
    "inputs": {
      "default": [],
      "items": {
        "$ref": "#/$defs/InputArtifact"
      },
      "maxItems": 256,
      "title": "Inputs",
      "type": "array"
    },
    "parameters": {
      "default": [],
      "items": {
        "$ref": "#/$defs/Parameter"
      },
      "maxItems": 256,
      "title": "Parameters",
      "type": "array"
    },
    "randomness": {
      "default": [],
      "items": {
        "$ref": "#/$defs/RandomnessControl"
      },
      "maxItems": 128,
      "title": "Randomness",
      "type": "array"
    },
    "environment": {
      "anyOf": [
        {
          "$ref": "#/$defs/EnvironmentEvidence"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    }
  },
  "required": [
    "subject",
    "execution"
  ],
  "title": "ExperimentPlan",
  "type": "object"
}
