{
  "type": "CourseInstance",
  "hasId": true,
  "subClassOf": "#Event",
  "derivedFrom": "https://schema.org/CourseInstance",
  "sampleId": "https://api.example.com/course-instances/12345",
  "requiredFields": [
    "type",
    "id",
    "url",
    "name",
    "location",
    "activity",
    "organizer",
    "offers",
    "startDate",
    "endDate"
  ],
  "requiredOptions": [
    {
      "description": [
        "A data publisher must provide either a `subEvent` or specify an `eventSchedule` for a CourseInstance."
      ],
      "options": [
        "subEvent",
        "eventSchedule"
      ],
      "oneOf": true
    }
  ],
  "recommendedFields": [
    "description",
    "image",
    "eventStatus",
    "ageRange",
    "genderRestriction",
    "leader",
    "level",
    "maximumAttendeeCapacity",
    "remainingAttendeeCapacity"
  ],
  "shallNotInclude": [],
  "validationMode": {
    "C1Request": "request",
    "C1Response": "response",
    "C1ResponseOrderItemError": "response",
    "C2Request": "request",
    "C2Response": "response",
    "C2ResponseOrderItemError": "response",
    "PRequest": "request",
    "PResponse": "response",
    "PResponseOrderItemError": "response",
    "BRequest": "request",
    "BResponse": "response",
    "BResponseOrderItemError": "response",
    "OrdersFeed": "response",
    "OrderProposalsFeed": "response",
    "OrderStatus": "response",
    "TestInterface": "testInterface"
  },
  "imperativeConfiguration": {
    "testInterface": {
      "requiredFields": [
        "type"
      ],
      "recommendedFields": [],
      "shallNotInclude": []
    },
    "request": {
      "requiredFields": [
        "type",
        "id"
      ],
      "shallNotInclude": [
        "identifier",
        "url",
        "name",
        "description",
        "image",
        "startDate",
        "endDate",
        "duration",
        "location",
        "organizer",
        "contributor",
        "maximumAttendeeCapacity",
        "maximumVirtualAttendeeCapacity",
        "remainingAttendeeCapacity",
        "eventStatus",
        "subEvent",
        "superEvent",
        "activity",
        "category",
        "ageRange",
        "genderRestriction",
        "ageRestriction",
        "additionalAdmissionRestriction",
        "customerAccountBookingRestriction",
        "isOpenBookingWithCustomerAccountAllowed",
        "programme",
        "attendeeInstructions",
        "leader",
        "accessibilitySupport",
        "accessibilityInformation",
        "isCoached",
        "level",
        "meetingPoint",
        "isAccessibleForFree",
        "offers",
        "schedulingNote",
        "eventSchedule"
      ]
    },
    "response": {
      "requiredFields": [
        "type",
        "id",
        "url",
        "name",
        "location",
        "activity",
        "startDate"
      ],
      "recommendedFields": [
        "endDate",
        "duration",
        "ageRange",
        "genderRestriction",
        "eventStatus",
        "maximumAttendeeCapacity",
        "remainingAttendeeCapacity"
      ],
      "shallNotInclude": [
        "offers",
        "subEvent",
        "organizer"
      ]
    }
  },
  "inSpec": [
    "id",
    "type",
    "identifier",
    "url",
    "name",
    "description",
    "image",
    "startDate",
    "endDate",
    "duration",
    "location",
    "organizer",
    "contributor",
    "maximumAttendeeCapacity",
    "maximumVirtualAttendeeCapacity",
    "remainingAttendeeCapacity",
    "eventStatus",
    "subEvent",
    "superEvent",
    "eventSchedule",
    "activity",
    "category",
    "ageRange",
    "genderRestriction",
    "ageRestriction",
    "additionalAdmissionRestriction",
    "customerAccountBookingRestriction",
    "isOpenBookingWithCustomerAccountAllowed",
    "programme",
    "attendeeInstructions",
    "leader",
    "accessibilitySupport",
    "accessibilityInformation",
    "isCoached",
    "level",
    "meetingPoint",
    "isAccessibleForFree",
    "offers",
    "schedulingNote",
    "eventAttendanceMode",
    "instanceOfCourse"
  ],
  "notInSpec": [
    "superEvent"
  ],
  "fields": {
    "type": {
      "fieldName": "type",
      "requiredType": "https://schema.org/Text",
      "requiredContent": "CourseInstance"
    },
    "startDate": {
      "fieldName": "startDate",
      "sameAs": "https://schema.org/startDate",
      "requiredType": "https://schema.org/Date",
      "description": [
        "The start date of this course."
      ],
      "example": "2018-01-06"
    },
    "endDate": {
      "fieldName": "endDate",
      "sameAs": "https://schema.org/endDate",
      "requiredType": "https://schema.org/Date",
      "description": [
        "The end date of this course."
      ],
      "example": "2018-01-27"
    },
    "instanceOfCourse": {
      "fieldName": "instanceOfCourse",
      "sameAs": "https://openactive.io/instanceOfCourse",
      "model": "#Course",
      "description": [
        "The description of the Course for which this is a distinct instance."
      ],
      "inheritsFrom": {
        "exclude": [
          "id",
          "identifier"
        ]
      }
    },
    "subEvent": {
      "fieldName": "subEvent",
      "sameAs": "https://schema.org/subEvent",
      "model": "ArrayOf#Event",
      "description": [
        "The occurrences of this CourseInstance."
      ],
      "inheritsTo": {
        "exclude": [
          "id",
          "identifier",
          "subEvent",
          "superEvent",
          "eventSchedule",
          "offers",
          "startDate",
          "endDate"
        ]
      }
    },
    "eventSchedule": {
      "fieldName": "eventSchedule",
      "sameAs": "https://pending.schema.org/eventSchedule",
      "model": "ArrayOf#Schedule",
      "description": [
        "A an array of oa:Schedule or oa:PartialSchedule, which represents a recurrence pattern."
      ],
      "example": [
        {
          "@type": "PartialSchedule",
          "repeatFrequency": "P1W",
          "startTime": "20:15",
          "endTime": "20:45",
          "byDay": [
            "http://schema.org/Tuesday"
          ],
          "scheduleTimezone": "Europe/London"
        }
      ]
    }
  }
}