{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/zywave/main/json-schema/zywave-paged-result-of-content-schema.json",
  "title": "PagedResultOfContent",
  "description": "A model containing a collection of Content pieces and metadata about their position in a larger result list.",
  "x-generated": "2026-10-13",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/zywave-content-v2-openapi.json#/components/schemas/PagedResultOfContent",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "hasMoreResults": {
      "type": "boolean",
      "description": "A value indicating whether the larger result set has more results."
    },
    "pageIndex": {
      "type": [
        "integer",
        "null"
      ],
      "description": "The index of the page reflected by the collection.",
      "format": "int32"
    },
    "pageSize": {
      "type": [
        "integer",
        "null"
      ],
      "description": "The size of the page relfected by the collection.",
      "format": "int32"
    },
    "skip": {
      "type": "integer",
      "description": "A value indicating how many of the previous values in the larger result set were omitted.",
      "format": "int32"
    },
    "take": {
      "type": "integer",
      "description": "The number of records retrieved from larger result set.",
      "format": "int32"
    },
    "totalCount": {
      "type": "integer",
      "description": "The total number of records in the larger result set.",
      "format": "int32"
    },
    "items": {
      "type": [
        "array",
        "null"
      ],
      "description": "The records retrieved from the larger result set.",
      "items": {
        "$ref": "#/$defs/Content"
      }
    }
  },
  "$defs": {
    "Content": {
      "allOf": [
        {
          "$ref": "#/$defs/ContentInfo"
        },
        {
          "type": "object",
          "description": "A piece of content represents a container for files and metadata in the Zywave system. Can be maintained by an agency or Zywave.",
          "additionalProperties": false,
          "properties": {
            "id": {
              "type": "integer",
              "description": "The unique Zywave identifier for the content.",
              "format": "int32"
            },
            "fileId": {
              "type": "integer",
              "description": "The unique identifier for the lastest ContentFile for the content.",
              "format": "int32"
            },
            "fileName": {
              "type": [
                "string",
                "null"
              ],
              "description": "The name of the lastest ContentFile for the content."
            },
            "thumbnailUrl": {
              "type": [
                "string",
                "null"
              ],
              "description": "Thumbnail image source for the content."
            },
            "tagNames": {
              "type": [
                "array",
                "null"
              ],
              "description": "A list of tags that describes what the content is.",
              "items": {
                "type": "string"
              }
            }
          }
        }
      ]
    },
    "ContentInfo": {
      "type": "object",
      "description": "ContentInfo represents the editable properties of a piece of content.",
      "additionalProperties": false,
      "properties": {
        "title": {
          "type": [
            "string",
            "null"
          ],
          "description": "The title of the piece of content."
        },
        "description": {
          "type": [
            "string",
            "null"
          ],
          "description": "The description of the piece of content."
        },
        "clientDescription": {
          "type": [
            "string",
            "null"
          ],
          "description": "The description clients see for the piece of content."
        },
        "isActive": {
          "type": "boolean",
          "description": "Whether the content is active"
        },
        "file": {
          "type": [
            "string",
            "null"
          ],
          "description": "The file that will be associated to the content.",
          "format": "binary"
        },
        "createdDateTime": {
          "type": [
            "string",
            "null"
          ],
          "description": "The date the content was created",
          "format": "date-time"
        },
        "updatedDateTime": {
          "type": [
            "string",
            "null"
          ],
          "description": "The date the file was last edited",
          "format": "date-time"
        },
        "metadata": {
          "type": [
            "array",
            "null"
          ],
          "description": "Additional dynamic information about the content.",
          "items": {
            "$ref": "#/$defs/KeyValuePairOfStringAndString"
          }
        }
      }
    },
    "KeyValuePairOfStringAndString": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "key": {
          "type": [
            "string",
            "null"
          ]
        },
        "value": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    }
  }
}