{
  "$schema" : "https://json-schema.org/draft/2019-09/schema#",
  "$id" : "https://purl.1edtech.org/spec/eduapi/v1p0/schema/json/eduapi_v1p0_collectionoffering-jsonschema1.json",
  "title" : "JSON Schema for the CollectionOffering class.",
  "description" : "A collection of courses or other learning units, used to group them into a coherent whole for enrollment, administrative, or other purposes. A Program is one example of a Course Collection.",
  "type" : "object",
  "properties" : {
    "offeringType" : {
      "description" : "A representation of what the entity defines. It is based on an extensible enumerated vocabulary.",
      "$comment" : "Origin: CollectionTypeEnum (EnumExt); The set of permitted values for `collectionType`.",
      "oneOf" : [ {
        "type" : "string",
        "enum" : [ "program", "generalEducation", "requiredCollection", "electiveCollection", "capstoneCollection", "majorCollection", "minorCollection", "programSpecialization", "nonDegreeCollection" ]
      }, {
        "type" : "string",
        "pattern" : "(ext:)[a-z|A-Z|0-9|.|-|_]+"
      } ]
    },
    "collection" : {
      "description" : "A reference to the collectionTemplate.",
      "$comment" : "Origin: CollectionTemplateGUIDRef (DerivedType); A reference to an `EducationCollection` object that has an allocated sourcedId (`GUID`).",
      "type" : "string"
    },
    "parent" : {
      "type" : "array",
      "items" : {
        "description" : "A reference to parent collectionOffering (if present).",
        "$comment" : "Origin: CollectionOfferingGUIDRef (DerivedType); A reference to an `EducationCollectionOffering` object that has an allocated sourcedId (`GUID`).",
        "type" : "string"
      }
    },
    "sourcedId" : {
      "description" : "The sourcedId of the object. This is the interoperability identifier that systems will refer to when making API calls, or when needing to identify an object. Systems SHOULD be able to map whichever local ids (e.g. database key fields) they use to sourcedId. The sourcedId of an object MUST be an anonymized or pseudonymized identifier of an entity and as such will not contain Personally Identifiable Information (PII) or Personal Data (PD).",
      "$comment" : "Origin: GUID (DerivedType); The data-type for establishing a Globally Unique Identifier (GUID). There is no predefined structure for the GUID.",
      "type" : "string"
    },
    "recordLanguage" : {
      "description" : "The primary language used in the described entity.",
      "$comment" : "Origin: LanguageCode (DerivedType); A language code [[BCP47]].",
      "type" : "string",
      "pattern" : "^[a-z]{2,4}(-[A-Z][a-z]{3})?(-([A-Z]{2}|[0-9]{3}))?$"
    },
    "title" : {
      "type" : "array",
      "minItems" : 1,
      "items" : {
        "$ref" : "#/$defs/LanguageTypedString"
      }
    },
    "description" : {
      "type" : "array",
      "minItems" : 1,
      "items" : {
        "$ref" : "#/$defs/LanguageTypedString"
      }
    },
    "primaryCode" : {
      "$ref" : "#/$defs/IdentifierEntry"
    },
    "otherCodes" : {
      "type" : "array",
      "items" : {
        "$ref" : "#/$defs/IdentifierEntry"
      }
    },
    "locations" : {
      "type" : "array",
      "items" : {
        "$ref" : "#/$defs/Location"
      }
    },
    "organization" : {
      "description" : "A reference to an Edu-API Organization.",
      "$comment" : "Origin: OrganizationGUIDRef (DerivedType); A reference to an `Organization` object that has an allocated sourcedId (`GUID`).",
      "type" : "string"
    },
    "academicSession" : {
      "description" : "A reference to an Edu-API Academic Session",
      "$comment" : "Origin: AcademicSessionGUIDRef (DerivedType); A reference to an `AcademicSession` object that has an allocated sourcedId (`GUID`).",
      "type" : "string"
    },
    "organizationCode" : {
      "description" : "A business code that a system might use to reference an organization. This value is provided for convenience and should match the value in organization.primaryCode. This attribute was added as a convenience shorthand for organization.primaryCode.",
      "$comment" : "Origin: String (PrimitiveType); Character strings.",
      "type" : "string"
    },
    "academicSessionCode" : {
      "description" : "A business code that a system might use to reference an academic session. This value is provided for convenience and should match the value in academicSession.primaryCode. This attribute was added as a convenience shorthand for academicSession.primaryCode.",
      "$comment" : "Origin: String (PrimitiveType); Character strings.",
      "type" : "string"
    },
    "offeringFormat" : {
      "description" : "The modality by which the entity is delivered. This is represented by an extensible enumerated vocabulary",
      "$comment" : "Origin: OfferingFormatEnum (EnumExt); The set of permitted values for `offeringFormat`.",
      "oneOf" : [ {
        "type" : "string",
        "enum" : [ "online", "blended", "onGround" ]
      }, {
        "type" : "string",
        "pattern" : "(ext:)[a-z|A-Z|0-9|.|-|_]+"
      } ]
    },
    "paceOfStudy" : {
      "description" : "The tempo that the course is taught at as a percentage of a normal course.",
      "$comment" : "Origin: Percentage (DerivedType); A percentage expression without fractions. One, two or three digits followed by the '%' character.",
      "type" : "string"
    },
    "registrationStatus" : {
      "description" : "The status of the entity indicating whether it is open for enrollment for teachers and students. This is represented by an extensible enumerated vocabulary.",
      "$comment" : "Origin: RegistrationStatusEnum (Enum); The set of permitted values for `registrationStatus`.",
      "type" : "string",
      "enum" : [ "open", "closed", "pending", "waitlist" ]
    },
    "startDate" : {
      "description" : "The start date of the associated event.",
      "$comment" : "Origin: DateTimeZ (DerivedType); A `DateTime` with the trailing timezone specifier included, e.g. `2021-09-07T02:09:59+02:00`",
      "type" : "string",
      "format" : "date-time"
    },
    "endDate" : {
      "description" : "The end date of the associated event.",
      "$comment" : "Origin: DateTimeZ (DerivedType); A `DateTime` with the trailing timezone specifier included, e.g. `2021-09-07T02:09:59+02:00`",
      "type" : "string",
      "format" : "date-time"
    },
    "teachingLanguage" : {
      "description" : "The main language used to deliver the content of the offering.",
      "$comment" : "Origin: LanguageCode (DerivedType); A language code [[BCP47]].",
      "type" : "string",
      "pattern" : "^[a-z]{2,4}(-[A-Z][a-z]{3})?(-([A-Z]{2}|[0-9]{3}))?$"
    },
    "maxNumberStudents" : {
      "description" : "The maximum number of students allowed to enroll for this offering",
      "$comment" : "Origin: Integer (PrimitiveType)",
      "type" : "integer"
    },
    "minNumberStudents" : {
      "description" : "The minimum number of students allowed to enroll for this offering",
      "$comment" : "Origin: Integer (PrimitiveType)",
      "type" : "integer"
    },
    "enrolledNumberStudents" : {
      "description" : "The number of students that have already enrolled for this offering",
      "$comment" : "Origin: Integer (PrimitiveType)",
      "type" : "integer"
    },
    "pendingNumberStudents" : {
      "description" : "The number of students that have a pending enrollment request for this offering",
      "$comment" : "Origin: Integer (PrimitiveType)",
      "type" : "integer"
    },
    "roleEnablement" : {
      "type" : "array",
      "items" : {
        "$ref" : "#/$defs/RoleEnablement"
      }
    },
    "recordStatus" : {
      "description" : "The status of this record. This value reflects the state of the record itself, not the status of the real-world entity or resource it represents. A record with a status of deleted indicates that it has been marked for removal and may be safely deleted by consuming systems. Systems may choose to remove such records, but are not required to do so",
      "$comment" : "Origin: RecordStatusTypeEnum (Enum); The set of values to describe the state of a record in the source system. For systems migrating from, or making use of OneRoster, deleted is to be considered synonymous with toBeDeleted.",
      "type" : "string",
      "enum" : [ "active", "deleted", "inactive" ]
    },
    "dateLastModified" : {
      "description" : "A timestamp describing when this record was last modified.",
      "$comment" : "Origin: DateTimeZ (DerivedType); A `DateTime` with the trailing timezone specifier included, e.g. `2021-09-07T02:09:59+02:00`",
      "type" : "string",
      "format" : "date-time"
    },
    "synchronicity" : {
      "description" : "An indicator of whether instructor and learner must both be present at the same time",
      "$comment" : "Origin: SynchronicityEnum (EnumExt); The set of permitted values used to describe whether an education offering is taught in person, online, or via a hybrid, combined approach.",
      "oneOf" : [ {
        "type" : "string",
        "enum" : [ "hybrid", "asynchronous", "synchronous" ]
      }, {
        "type" : "string",
        "pattern" : "(ext:)[a-z|A-Z|0-9|.|-|_]+"
      } ]
    },
    "extensions" : {
      "$ref" : "#/$defs/educationOfferingExtensions"
    },
    "learningObjectiveSet" : {
      "type" : "array",
      "items" : {
        "$ref" : "#/$defs/LearningObjectiveSet"
      }
    }
  },
  "required" : [ "offeringType", "collection", "sourcedId", "recordLanguage", "title", "description", "primaryCode", "organization", "academicSession", "offeringFormat", "registrationStatus", "startDate", "endDate", "recordStatus" ],
  "additionalProperties" : false,
  "$defs" : {
    "LearningObjectiveSet" : {
      "description" : "This is the container for the set of learning objective identifiers that are from a single source responsible for creating those identifiers.",
      "type" : "object",
      "properties" : {
        "sourcedId" : {
          "description" : "The sourcedId of the object. This is the interoperability identifier that systems will refer to when making API calls, or when needing to identify an object. Systems SHOULD be able to map whichever local ids (e.g. database key fields) they use to sourcedId. The sourcedId of an object MUST be an anonymized or pseudonymized identifier of an entity and as such will not contain Personally Identifiable Information (PII) or Personal Data (PD).",
          "$comment" : "Origin: GUID (DerivedType); The data-type for establishing a Globally Unique Identifier (GUID). There is no predefined structure for the GUID.",
          "type" : "string"
        },
        "recordLanguage" : {
          "description" : "The primary language used in the described entity.",
          "$comment" : "Origin: LanguageCode (DerivedType); A language code [[BCP47]].",
          "type" : "string",
          "pattern" : "^[a-z]{2,4}(-[A-Z][a-z]{3})?(-([A-Z]{2}|[0-9]{3}))?$"
        },
        "recordStatus" : {
          "description" : "The status of this record. The record has been, or will immediately be, removed from the upstream system; downstream systems can also remove this record as it won't be used again.",
          "$comment" : "Origin: RecordStatusTypeEnum (Enum); The set of values to describe the state of a record in the source system. For systems migrating from, or making use of OneRoster, deleted is to be considered synonymous with toBeDeleted.",
          "type" : "string",
          "enum" : [ "active", "deleted", "inactive" ]
        },
        "dateLastModified" : {
          "description" : "A timestamp describing when this record was last modified.",
          "$comment" : "Origin: DateTimeZ (DerivedType); A `DateTime` with the trailing timezone specifier included, e.g. `2021-09-07T02:09:59+02:00`",
          "type" : "string",
          "format" : "date-time"
        },
        "extensions" : {
          "$ref" : "#/$defs/learningObjectiveSetExtensions"
        },
        "source" : {
          "description" : "The source responsible for creating the learning objective identifiers. The permitted values are from an extensible vocabulary.",
          "$comment" : "Origin: SourceExtEnum (EnumExt); The predefined vocabulary for the source that was responsible for creating the learning objective identifiers.",
          "oneOf" : [ {
            "type" : "string",
            "enum" : [ "case", "unknown", "CTDL-ASN" ]
          }, {
            "type" : "string",
            "pattern" : "(ext:)[a-z|A-Z|0-9|.|-|_]+"
          } ]
        },
        "learningObjectiveIds" : {
          "type" : "array",
          "minItems" : 1,
          "items" : {
            "description" : "The set of unique identifiers for the associated learning objectives. If these are CASE identifiers they MUST be valid UUIDs.",
            "$comment" : "Origin: NormalizedString (PrimitiveType); A `String` conforming to the `normalizedString` definition in [[XMLSCHEMA11-2]].",
            "type" : "string"
          }
        }
      },
      "required" : [ "sourcedId", "recordLanguage", "recordStatus", "source", "learningObjectiveIds" ],
      "additionalProperties" : false
    },
    "IdentifierEntry" : {
      "description" : "A container to transmit additional needed identifiers",
      "type" : "object",
      "properties" : {
        "identifier" : {
          "description" : "An identifier.",
          "$comment" : "Origin: Identifier (DerivedType); A `NormalizedString` that functions as an identifier.",
          "type" : "string"
        },
        "identifierType" : {
          "description" : "The identifier type.",
          "$comment" : "Origin: IdentifierTypeEnum (EnumExt); The set of permitted values for `identifierType`.",
          "oneOf" : [ {
            "type" : "string",
            "enum" : [ "systemId", "productId", "userName", "accountId", "emailAddress", "nationalIdentityNumber", "isbn", "issn", "lisSourcedId", "oneRosterSourcedId", "sisSourcedId", "ltiContextId", "ltiDeploymentId", "ltiToolId", "ltiPlatformId", "ltiUserId", "identifier" ]
          }, {
            "type" : "string",
            "pattern" : "(ext:)[a-z|A-Z|0-9|.|-|_]+"
          } ]
        }
      },
      "required" : [ "identifier", "identifierType" ],
      "additionalProperties" : false
    },
    "RoleEnablement" : {
      "description" : "An array to store associated dates for an education offering. Specifically, additional important date and time offsets surrounding when specific roles may be associated with the offering before or after the official start and end dates. These dates are meant to be considered additional metadata about the course offering and applied independent of the startDate and endDate. They are not intended to be used as replacements.",
      "type" : "object",
      "properties" : {
        "role" : {
          "description" : "The role of the associated person in the given context.",
          "$comment" : "Origin: RoleTypeEnum (EnumExt); The set of permitted values for `roleType`.",
          "oneOf" : [ {
            "type" : "string",
            "enum" : [ "member", "chair", "staff", "student", "administrator", "aide", "guardian", "parent", "proctor", "relative", "teacher", "advisor", "teachingAssistant" ]
          }, {
            "type" : "string",
            "pattern" : "(ext:)[a-z|A-Z|0-9|.|-|_]+"
          } ]
        },
        "startDate" : {
          "description" : "The start date of the associated event.",
          "$comment" : "Origin: DateTimeZ (DerivedType); A `DateTime` with the trailing timezone specifier included, e.g. `2021-09-07T02:09:59+02:00`",
          "type" : "string",
          "format" : "date-time"
        },
        "endDate" : {
          "description" : "The end date of the associated event.",
          "$comment" : "Origin: DateTimeZ (DerivedType); A `DateTime` with the trailing timezone specifier included, e.g. `2021-09-07T02:09:59+02:00`",
          "type" : "string",
          "format" : "date-time"
        }
      },
      "required" : [ "role" ],
      "additionalProperties" : false
    },
    "learningObjectiveSetExtensions" : {
      "description" : "Extension properties related Learning Objective Sets",
      "type" : "object",
      "properties" : { },
      "required" : [ ],
      "additionalProperties" : true
    },
    "LanguageTypedString" : {
      "description" : "A String with an associated language code.",
      "type" : "object",
      "properties" : {
        "recordLanguage" : {
          "description" : "The primary language used in the described entity.",
          "$comment" : "Origin: LanguageCode (DerivedType); A language code [[BCP47]].",
          "type" : "string",
          "pattern" : "^[a-z]{2,4}(-[A-Z][a-z]{3})?(-([A-Z]{2}|[0-9]{3}))?$"
        },
        "value" : {
          "description" : "The string value.",
          "$comment" : "Origin: String (PrimitiveType); Character strings.",
          "type" : "string"
        }
      },
      "required" : [ "recordLanguage", "value" ],
      "additionalProperties" : false
    },
    "Location" : {
      "description" : "A container for describing the location an entity takes place at.",
      "type" : "object",
      "properties" : {
        "identifier" : {
          "description" : "An identifier.",
          "$comment" : "Origin: Identifier (DerivedType); A `NormalizedString` that functions as an identifier.",
          "type" : "string"
        },
        "description" : {
          "type" : "array",
          "items" : {
            "$ref" : "#/$defs/LanguageTypedString"
          }
        },
        "geoLocation" : {
          "$ref" : "#/$defs/GeoCoordinates"
        }
      },
      "required" : [ ],
      "additionalProperties" : false
    },
    "GeoCoordinates" : {
      "description" : "The geographic coordinates of a location.",
      "type" : "object",
      "properties" : {
        "latitude" : {
          "description" : "The latitude of the location [[WGS-84]].",
          "$comment" : "Origin: Float (PrimitiveType)",
          "type" : "number"
        },
        "longitude" : {
          "description" : "The longitude of the location [[WGS-84]].",
          "$comment" : "Origin: Float (PrimitiveType)",
          "type" : "number"
        }
      },
      "required" : [ "latitude", "longitude" ],
      "additionalProperties" : false
    },
    "educationOfferingExtensions" : {
      "description" : "Extension properties related to education offerings",
      "type" : "object",
      "properties" : { },
      "required" : [ ],
      "additionalProperties" : true
    }
  }
}