{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/zywave/json-schema/zywave-paged-result-of-course-schema.json",
  "title": "PagedResultOfCourse",
  "description": "A page of results from a larger result set, along with paging metadata.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/zywave-course-api-openapi.yml#/components/schemas/PagedResultOfCourse",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "items"
  ],
  "properties": {
    "hasMoreResults": {
      "type": "boolean",
      "description": "A value indicating whether the larger result set has more results."
    },
    "skip": {
      "type": "integer",
      "description": "A value indicating how many of the previous values in the larger result set were omitted.",
      "format": "int32",
      "maximum": 2147483647,
      "minimum": 0
    },
    "take": {
      "type": "integer",
      "description": "The number of records retrieved from the larger result set.",
      "format": "int32",
      "maximum": 2147483647,
      "minimum": 0
    },
    "totalCount": {
      "type": "integer",
      "description": "The total number of records in the larger result set.",
      "format": "int32",
      "maximum": 2147483647,
      "minimum": 0
    },
    "items": {
      "type": "array",
      "description": "The records retrieved from the larger result set.",
      "items": {
        "$ref": "#/$defs/Course"
      }
    }
  },
  "$defs": {
    "Course": {
      "allOf": [
        {
          "$ref": "#/$defs/CourseCreateInfo"
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "id",
            "isReadOnly"
          ],
          "properties": {
            "id": {
              "type": "string",
              "format": "guid"
            },
            "isReadOnly": {
              "type": "boolean"
            },
            "isProcessing": {
              "type": "boolean"
            },
            "categories": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "createdDateTime": {
              "type": [
                "string",
                "null"
              ],
              "format": "date-time"
            },
            "createdUserPrincipalId": {
              "type": [
                "string",
                "null"
              ],
              "format": "guid"
            },
            "updatedDateTime": {
              "type": [
                "string",
                "null"
              ],
              "format": "date-time"
            },
            "updatedUserPrincipalId": {
              "type": [
                "string",
                "null"
              ],
              "format": "guid"
            }
          }
        }
      ]
    },
    "CourseAudience": {
      "type": "string",
      "description": "",
      "x-enumNames": [
        "Employees",
        "Managers"
      ],
      "enum": [
        "Employees",
        "Managers"
      ]
    },
    "CourseContentType": {
      "type": "string",
      "description": "",
      "x-enumNames": [
        "SCORM",
        "AICC",
        "XAPI",
        "CMI5",
        "PDF",
        "MP4",
        "MP3",
        "YouTube"
      ],
      "enum": [
        "SCORM",
        "AICC",
        "XAPI",
        "CMI5",
        "PDF",
        "MP4",
        "MP3",
        "YouTube"
      ]
    },
    "CourseCreateInfo": {
      "allOf": [
        {
          "$ref": "#/$defs/CourseUpdateInfo"
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "accountId": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int32"
            }
          }
        }
      ]
    },
    "CourseUpdateInfo": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name",
        "language"
      ],
      "properties": {
        "name": {
          "type": "string",
          "maxLength": 255,
          "minLength": 1
        },
        "hasClosedCaptions": {
          "type": "boolean"
        },
        "language": {
          "type": "string",
          "maxLength": 10,
          "minLength": 1
        },
        "audience": {
          "oneOf": [
            {
              "$ref": "#/$defs/CourseAudience"
            }
          ]
        },
        "description": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 1000
        },
        "durationInMinutes": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int32"
        },
        "categoryIds": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "integer",
            "format": "int32"
          }
        },
        "contentType": {
          "oneOf": [
            {
              "$ref": "#/$defs/CourseContentType"
            }
          ]
        }
      }
    }
  }
}