{
  "$id": "activity-metadata.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$ref": "metadata.schema.json",
  "additionalProperties": false,
  "allOf": [
    {
      "if": { "properties": { "key": { "const": "src:Platform" } } },
      "then": {
        "properties": {
          "value": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1,
            "items": {
              "type": "string",
              "enum": [ "AIA", "Creatium", "LearningMate" ]
            }
          }
        }
      }
    },
    {
      "if": { "properties": { "key": { "const": "tax:Subject" } } },
      "then": {
        "properties": {
          "value": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1,
            "items": {
              "type": "string",
              "enum": [
                "Math",
                "Language Arts",
                "Science",
                "Social and Emotional Learning",
                "Social Studies",
                "World Languages",
                "General Electives",
                "CTE Electives",
                "Spanish Language Arts",
                "English Language Development"
              ]
            }
          }
        }
      }
    },
    {
      "if": { "properties": { "key": { "const": "meta:ActivitySubtype" } } },
      "then": {
        "properties": {
          "value": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1,
            "items": {
              "type": "string",
              "enum": [
                "Audio Response",
                "Complete a Table",
                "Essay: Drafting",
                "Essay: Prewriting",
                "Essay: Revising",
                "Extended Response",
                "Grammar",
                "Hands-on Lab",
                "Instruction",
                "Lab Report",
                "Listening",
                "Math Lab",
                "Performance Task",
                "Practice",
                "Project",
                "Reading and Writing",
                "Short Response",
                "Summary",
                "Time Line Builder",
                "Virtual Lab",
                "Vocabulary and Pronunciation",
                "Warm-up"
              ]
            }
          }
        }
      }
    },
    {
      "if": { "properties": { "key": { "const": "meta:Copyright" } } },
      "then": {
        "properties": {
          "value": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1,
            "items": {
              "type": "string",
              "enum": [
                "© Edgenuity Inc.",
                "© Imagine Learning LLC",
                "© Illustrative Mathematics"
              ]
            }
          }
        }
      }
    },
    {
      "if": { "properties": { "key": { "const": "meta:Sensitivity" } } },
      "then": {
        "properties": {
          "value": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1,
            "items": {
              "type": "string",
              "enum": [
                "K",
                "1",
                "2",
                "3",
                "4",
                "5",
                "6",
                "7",
                "8",
                "9",
                "10",
                "11",
                "12",
                "Y",
                "N"
              ]
            }
          }
        }
      }
    },
    {
      "if": { "properties": { "key": { "const": "meta:ActivityType" } } },
      "then": {
        "properties": {
          "value": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1,
            "items": {
              "type": "string",
              "enum": [
                "Activity",
                "Assignment",
                "Constructed Response",
                "Guided Learning",
                "Independent Practice",
                "Instruction",
                "Instruction and Supported Practice",
                "Instruction and Practice",
                "Practice",
                "Reader",
                "Recorded Response",
                "Summary",
                "Supported Practice",
                "Teacher-Scored Practice",
                "Uploaded Response",
                "Warm Up",
                "Written Response"
              ]
            }
          }
        }
      }
    },
    {
      "if": { "properties": { "key": { "const": "meta:StateSpec" } } },
      "then": {
        "properties": {
          "value": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1,
            "items": {
              "type": "string",
              "enum": [
                "AL",
                "AK",
                "AZ",
                "AR",
                "CA",
                "CO",
                "CT",
                "DE",
                "FL",
                "GA",
                "HI",
                "ID",
                "IL",
                "IN",
                "IA",
                "KS",
                "KY",
                "LA",
                "ME",
                "MD",
                "MA",
                "MI",
                "MN",
                "MS",
                "MO",
                "MT",
                "NE",
                "NV",
                "NH",
                "NJ",
                "NM",
                "NY",
                "NC",
                "ND",
                "OH",
                "OK",
                "OR",
                "PA",
                "RI",
                "SC",
                "SD",
                "TN",
                "TX",
                "UT",
                "VT",
                "VA",
                "WA",
                "WV",
                "WI",
                "WY",
                "DC",
                "PR",
                "ZZ",
                "National"
              ]
            }
          }
        }
      }
    },
    {
      "if": { "properties": { "key": { "const": "meta:Language" } } },
      "then": {
        "properties": {
          "value": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1,
            "items": {
              "type": "string",
              "enum": [
                "Chinese",
                "English",
                "French",
                "German",
                "Latin",
                "Spanish"
              ]
            }
          }
        }
      }
    },
    {
      "if": { "properties": { "key": { "const": "meta:Product" } } },
      "then": {
        "properties": {
          "value": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1,
            "items": {
              "type": "string",
              "enum": [
                "MPNG",
                "EdgeEX",
                "Project Link",
                "ImaginePlus Math",
                "Imagine Language and Literacy"
              ]
            }
          }
        }
      }
    },
    {
      "if": { "properties": { "key": { "const": "meta:Style" } } },
      "then": {
        "properties": {
          "value": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1,
            "items": {
              "type": "string",
              "enum": [
                "PK-2",
                "K-2",
                "3-5",
                "6-12",
                "3-12"
              ]
            }
          }
        }
      }
    },
    {
      "if": { "properties": { "key": { "const": "meta:Annotations" } } },
      "then": {
        "properties": {
          "value": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1,
            "items": {
              "type": "string",
              "enum": [
                "On"
              ]
            }
          }
        }
      }
    },
    {
      "if": { "properties": { "key": { "const": "meta:GradeLevel" } } },
      "then": {
        "properties": {
          "value": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "string",
              "enum": [
                "PK",
                "K",
                "1",
                "2",
                "3",
                "4",
                "5",
                "6",
                "7",
                "8",
                "9",
                "10",
                "11",
                "12",
                "HS"
              ]
            }
          }
        }
      }
    },
    {
      "if": { "properties": { "key": { "const": "meta:Scope" } } },
      "then": {
        "properties": {
          "value": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1,
            "items": {
              "type": "string",
              "enum": [
                "activity",
                "quiz",
                "test",
                "exam",
                "practiceassessment",
                "Benchmark",
                "Formative",
                "Standalone",
                "Global",
                "Custom",
                "Pre-Quiz",
                "Post-Quiz",
                "Guided Learning",
                "Practice"
              ]
            }
          }
        }
      }
    },
    {
      "if": { "properties": { "key": { "const": "meta:AssessmentStructure" } } },
      "then": {
        "properties": {
          "value": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1,
            "items": {
              "type": "string",
              "enum": [
                "pool",
                "testlet"
              ]
            }
          }
        }
      }
    },
    {
      "if": { "properties": { "key": { "const": "meta:CountedTowardsCourseGrade" } } },
      "then": {
        "properties": {
          "value": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1,
            "items": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          }
        }
      }
    },
    {
      "if": { "properties": { "key": { "const": "meta:GradeWeightCategory" } } },
      "then": {
        "properties": {
          "value": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1,
            "items": {
              "type": "string",
              "enum": [
                "Instruction",
                "Assignments",
                "Short Writing",
                "Essay",
                "Project",
                "Lab Report",
                "Performance Task",
                "Offline Written Response",
                "Speaking Activity",
                "Practice Assessment",
                "Quiz",
                "Test",
                "Exam",
                "Speaking and Writing Assessment"
              ]
            }
          }
        }
      }
    }
  ],
  "properties": {
    "key": {
      "type": "string",
      "enum": [
        "meta:Product",
        "tax:Subject",
        "meta:Keywords",
        "meta:ActivityTitle",
        "meta:ActivitySubtype",
        "meta:Copyright",
        "meta:Sensitivity",
        "meta:ActivityType",
        "meta:CompletionTime",
        "meta:StateSpec",
        "meta:RequiredMaterials",
        "meta:ActivityDescription",
        "meta:Language",
        "meta:CompletionTimeManualReason",
        "meta:RequiredTechnologies",
        "meta:GradeLevel",
        "meta:AssessmentStructure",
        "meta:Scope",
        "meta:Style",
        "tax:Activity",
        "meta:Annotations",
        "tax:LessonCode",
        "meta:GradeWeightCategory",
        "meta:CountedTowardsCourseGrade",
        "src:Title",
        "src:LessonCode",
        "src:Platform",
        "src:Order",
        "src:Version",
        "src:ActivityType",
        "src:Identifier"
      ]
    },
    "value": {
      "type": "array",
      "minItems": 1,
      "items": { "type": "string" }
    }
  },
  "required": [ "key", "value" ],
  "title": "Activity Metadata",
  "type": "object"
}