{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/zywave/json-schema/zywave-paged-result-of-assignment-schema.json",
  "title": "PagedResultOfAssignment",
  "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-assignment-api-openapi.yml#/components/schemas/PagedResultOfAssignment",
  "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/Assignment"
      }
    }
  },
  "$defs": {
    "Assignment": {
      "allOf": [
        {
          "$ref": "#/$defs/AssignmentCreateInfo"
        },
        {
          "type": "object",
          "description": "Employee course assignment.",
          "additionalProperties": false,
          "required": [
            "id"
          ],
          "properties": {
            "id": {
              "type": "integer",
              "format": "int32"
            },
            "status": {
              "$ref": "#/$defs/AssignmentStatus"
            },
            "courseName": {
              "type": "string"
            },
            "startedDateTime": {
              "type": [
                "string",
                "null"
              ],
              "format": "date-time"
            },
            "completedDateTime": {
              "type": [
                "string",
                "null"
              ],
              "format": "date-time"
            },
            "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"
            }
          }
        }
      ]
    },
    "AssignmentCreateInfo": {
      "allOf": [
        {
          "$ref": "#/$defs/AssignmentUpdateInfo"
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "courseId",
            "accountId",
            "employeeId"
          ],
          "properties": {
            "courseId": {
              "type": "string",
              "format": "guid",
              "minLength": 1
            },
            "accountId": {
              "type": "integer",
              "format": "int32"
            },
            "employeeId": {
              "type": "integer",
              "format": "int32"
            }
          }
        }
      ]
    },
    "AssignmentStatus": {
      "type": "string",
      "description": "",
      "x-enumNames": [
        "Unknown",
        "NotStarted",
        "Started",
        "Completed"
      ],
      "enum": [
        "Unknown",
        "NotStarted",
        "Started",
        "Completed"
      ]
    },
    "AssignmentUpdateInfo": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "dueDate": {
          "type": [
            "string",
            "null"
          ],
          "format": "date"
        }
      }
    }
  }
}