{
  "description": "Defines the schema for Library.",
  "type": "object",
  "properties": {
    "id": {
      "description": "The identifier of the Library",
      "minLength": 3,
      "maxLength": 64,
      "type": "string"
    },
    "name": {
      "description": "The name of the Library.",
      "minLength": 1,
      "maxLength": 128,
      "type": "string"
    },
    "xmProjectId": {
      "description": "The identifier referencing XM project library is created for. This enables additional security features that only\nallow XM Users having access to that project access the library.",
      "minLength": 1,
      "maxLength": 128,
      "type": "string"
    },
    "apiKey": {
      "description": "API Key is used to access the library programmatically.",
      "minLength": 0,
      "maxLength": 64,
      "type": "string"
    },
    "organizationId": {
      "type": "string"
    },
    "templateId": {
      "anyOf": [
        {
          "description": "ID of a library that should be used as a template on creation.",
          "minLength": 0,
          "maxLength": 64,
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "settings": {
      "$ref": "#/definitions/LibrarySettings",
      "description": "Library settings"
    }
  },
  "additionalProperties": false,
  "required": [
    "id",
    "name"
  ],
  "definitions": {
    "LibrarySettings": {
      "type": "object",
      "properties": {
        "externalPreviewURL": {
          "type": "string"
        },
        "renderingHostEnv": {
          "type": "string"
        },
        "templates": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "contentHubOneDeliveryKey": {
          "type": "string"
        },
        "contentHubOnePreviewKey": {
          "type": "string"
        }
      },
      "additionalProperties": false
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#"
}