{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "id": "https://ibl.api.bbci.co.uk/ibl/v1/schema/ibl.json",
  "type": "object",
  "properties": {
    "schema": {
      "type": "string"
    },
    "version": {
      "type": "string"
    },
    "status": {
      "type": "object",
      "properties": {
        "service": {
          "type": "string"
        },
        "release": {
          "type": "string"
        }
      },
      "required": [
        "service",
        "release"
      ],
      "additionalProperties": false
    },
    "error": {
      "type": "object",
      "properties": {
        "details": {
          "type": "string"
        },
        "http_response_code": {
          "type": "number"
        }
      },
      "required": [
        "details",
        "http_response_code"
      ],
      "additionalProperties": false
    },
    "categories": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/category"
      }
    },
    "channels": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/channel"
      }
    },
    "regions": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/region"
      }
    },
    "episodes": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/episode"
      }
    },
    "programmes": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/programme"
      }
    },
    "programme_episodes": {
      "type": "object",
      "properties": {
        "page": {
          "type": "number"
        },
        "per_page": {
          "type": "number"
        },
        "count": {
          "type": "number"
        },
        "elements": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/episode"
          }
        }
      },
      "required": [
        "elements",
        "page",
        "per_page",
        "count"
      ],
      "additionalProperties": false
    },
    "group_episodes": {
      "type": "object",
      "properties": {
        "page": {
          "type": "number"
        },
        "per_page": {
          "type": "number"
        },
        "count": {
          "type": "number"
        },
        "elements": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/episode"
          }
        },
        "group": {
          "$ref": "#/definitions/group"
        }
      },
      "required": [
        "elements",
        "page",
        "per_page",
        "count"
      ],
      "additionalProperties": false
    },
    "episode_recommendations": {
      "type": "object",
      "properties": {
        "count": {
          "type": "number"
        },
        "elements": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/episode"
          }
        },
        "blend": {
          "enum": [
            "curated",
            "algorithmic"
          ]
        }
      },
      "required": [
        "elements",
        "count",
        "blend"
      ],
      "additionalProperties": false
    },
    "broadcasts": {
      "type": "object",
      "properties": {
        "page": {
          "type": "number"
        },
        "per_page": {
          "type": "number"
        },
        "count": {
          "type": "number"
        },
        "elements": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/broadcast"
          }
        },
        "channel": {
          "$ref": "#/definitions/channel"
        }
      },
      "required": [
        "elements",
        "page",
        "per_page",
        "count",
        "channel"
      ],
      "additionalProperties": false
    },
    "schedule": {
      "type": "object",
      "properties": {
        "elements": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/broadcast"
          }
        },
        "channel": {
          "$ref": "#/definitions/channel"
        }
      },
      "required": [
        "elements",
        "channel"
      ],
      "additionalProperties": false
    },
    "category_programmes": {
      "type": "object",
      "properties": {
        "count": {
          "type": "number"
        },
        "category": {
          "$ref": "#/definitions/category"
        },
        "elements": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/programme"
          }
        },
        "page": {
          "type": "number"
        },
        "per_page": {
          "type": "number"
        }
      },
      "required": [
        "category",
        "page",
        "count",
        "per_page",
        "elements"
      ],
      "additionalProperties": false
    },
    "atoz_programmes": {
      "type": "object",
      "properties": {
        "count": {
          "type": "number"
        },
        "character": {
          "type": "string"
        },
        "elements": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/programme"
          }
        },
        "page": {
          "type": "number"
        },
        "per_page": {
          "type": "number"
        }
      },
      "required": [
        "character",
        "page",
        "count",
        "per_page",
        "elements"
      ],
      "additionalProperties": false
    },
    "home_highlights": {
      "type": "object",
      "properties": {
        "elements": {
          "type": "array",
          "items": {
            "anyOf": [
              {
                "$ref": "#/definitions/episode"
              },
              {
                "$ref": "#/definitions/group"
              },
              {
                "$ref": "#/definitions/promotion"
              }
            ]
          }
        }
      },
      "required": [
        "elements"
      ],
      "additionalProperties": false
    },
    "channel_highlights": {
      "type": "object",
      "properties": {
        "channel": {
          "$ref": "#/definitions/channel"
        },
        "elements": {
          "type": "array",
          "items": {
            "anyOf": [
              {
                "$ref": "#/definitions/episode"
              },
              {
                "$ref": "#/definitions/group"
              },
              {
                "$ref": "#/definitions/promotion"
              }
            ]
          }
        }
      },
      "required": [
        "channel",
        "elements"
      ],
      "additionalProperties": false
    },
    "category_highlights": {
      "type": "object",
      "properties": {
        "category": {
          "$ref": "#/definitions/category"
        },
        "elements": {
          "type": "array",
          "items": {
            "anyOf": [
              {
                "$ref": "#/definitions/episode"
              },
              {
                "$ref": "#/definitions/group"
              },
              {
                "$ref": "#/definitions/promotion"
              }
            ]
          }
        }
      },
      "required": [
        "category",
        "elements"
      ],
      "additionalProperties": false
    },
    "prerolls": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/trailer"
      }
    },
    "postrolls": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/trailer"
      }
    },
    "search": {
      "type": "object",
      "properties": {
        "query": {
          "type": "string"
        },
        "page": {
          "type": "number"
        },
        "per_page": {
          "type": "number"
        },
        "count": {
          "type": "number"
        },
        "results": {
          "type": "array",
          "items": {
            "anyOf": [
              {
                "$ref": "#/definitions/episode"
              },
              {
                "$ref": "#/definitions/programme"
              },
              {
                "$ref": "#/definitions/search_group"
              }
            ]
          }
        }
      },
      "required": [
        "results",
        "query"
      ],
      "additionalProperties": false
    },
    "search_suggest": {
      "type": "object",
      "properties": {
        "query": {
          "type": "string"
        },
        "results": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/programme"
          }
        }
      },
      "required": [
        "results",
        "query"
      ],
      "additionalProperties": false
    },
    "watching": {
      "type": "object",
      "properties": {
        "elements": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/watching"
          }
        },
        "count": {
          "type": "number"
        },
        "count_all": {
          "type": "number"
        }
      },
      "required": [
        "elements",
        "count",
        "count_all"
      ],
      "additionalProperties": false
    },
    "user_recommendations": {
      "type": "object",
      "properties": {
        "elements": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/user_recommendation"
          }
        },
        "rec_source": {
          "type": "string"
        },
        "rec_set": {
          "type": "string"
        }
      },
      "required": [
        "elements",
        "rec_source",
        "rec_set"
      ],
      "additionalProperties": false
    },
    "added": {
      "type": "object",
      "properties": {
        "elements": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/added"
          }
        },
        "count": {
          "type": "number"
        },
        "count_all": {
          "type": "number"
        }
      },
      "required": [
        "elements",
        "count",
        "count_all"
      ],
      "additionalProperties": false
    },
    "purchases": {
      "type": "object",
      "properties": {
        "elements": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/episode"
          }
        },
        "count": {
          "type": "number"
        },
        "page": {
          "type": "number"
        },
        "per_page": {
          "type": "number"
        },
        "value_added_material": {
          "type": "boolean"
        },
        "revocations": {
          "type": "boolean"
        }
      },
      "required": [
        "elements",
        "page",
        "per_page",
        "count",
        "revocations",
        "value_added_material"
      ],
      "additionalProperties": false
    },
    "versions": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/store_version"
      }
    },
    "next": {
      "type": "object",
      "properties": {
        "programme": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/episode"
          },
          "minItems": 0,
          "maxItems": 1
        }
      }
    },
    "category": {
      "$ref": "#/definitions/category"
    },
    "trailers": {
      "type": "object",
      "properties": {
        "elements": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/clip"
          }
        }
      },
      "required": [
        "elements"
      ],
      "additionalProperties": false
    },
    "clips": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/clip"
      },
      "maxItems": 1
    }
  },
  "required": [
    "schema",
    "version"
  ],
  "additionalProperties": false,
  "definitions": {
    "category": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "type": {
          "enum": [
            "category"
          ]
        },
        "title": {
          "type": "string"
        },
        "kind": {
          "enum": [
            "genre",
            "accessibility",
            "national"
          ]
        },
        "child_episode_count": {
          "type": "number"
        },
        "child_programme_count": {
          "type": "number"
        },
        "parent_category": {
          "type": "string"
        },
        "contextual_title": {
          "type": "string"
        },
        "sub_categories": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/category"
          }
        }
      },
      "required": [
        "id",
        "title",
        "type",
        "kind"
      ],
      "additionalProperties": false
    },
    "channel": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "type": {
          "enum": [
            "channel"
          ]
        },
        "title": {
          "type": "string"
        },
        "has_schedule": {
          "type": "boolean"
        },
        "master_brand_id": {
          "type": "string"
        },
        "master_brand_title": {
          "type": "string"
        },
        "on_air": {
          "type": "boolean"
        }
      },
      "required": [
        "id",
        "title",
        "type",
        "has_schedule",
        "master_brand_id",
        "master_brand_title"
      ],
      "additionalProperties": false
    },
    "region": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "short_id": {
          "type": "string"
        },
        "type": {
          "enum": [
            "region"
          ]
        },
        "title": {
          "type": "string"
        },
        "kind": {
          "enum": [
            "regional",
            "national"
          ]
        }
      },
      "required": [
        "id",
        "short_id",
        "type",
        "title",
        "kind"
      ],
      "additionalProperties": false
    },
    "episode": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "type": {
          "enum": [
            "episode",
            "episode_large"
          ]
        },
        "title": {
          "type": "string"
        },
        "original_title": {
          "type": "string"
        },
        "live": {
          "type": "boolean"
        },
        "images": {
          "type": "object",
          "properties": {
            "type": {
              "enum": [
                "image"
              ]
            },
            "standard": {
              "type": "string"
            },
            "inherited_from": {
              "type": "string"
            }
          },
          "required": [
            "type",
            "standard"
          ],
          "additionalProperties": false
        },
        "has_credits": {
          "type": "boolean"
        },
        "signed": {
          "type": "boolean"
        },
        "audio_described": {
          "type": "boolean"
        },
        "status": {
          "enum": [
            "available",
            "unavailable"
          ]
        },
        "requires_tv_licence": {
          "type": "boolean"
        },
        "requires_sign_in": {
          "type": "boolean"
        },
        "tleo_id": {
          "type": "string"
        },
        "guidance": {
          "type": "boolean"
        },
        "subtitle": {
          "type": "string"
        },
        "editorial_subtitle": {
          "type": "string"
        },
        "editorial_title": {
          "type": "string"
        },
        "synopses": {
          "type": "object",
          "properties": {
            "small": {
              "type": "string"
            },
            "medium": {
              "type": "string"
            },
            "large": {
              "type": "string"
            },
            "editorial": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "versions": {
          "type": "array",
          "items": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "type": {
                    "enum": [
                      "version",
                      "version_large"
                    ]
                  },
                  "hd": {
                    "type": "boolean"
                  },
                  "download": {
                    "type": "boolean"
                  },
                  "kind": {
                    "type": "string"
                  },
                  "duration": {
                    "type": "object",
                    "properties": {
                      "text": {
                        "type": "string"
                      },
                      "value": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "text",
                      "value"
                    ],
                    "additionalProperties": false
                  },
                  "rrc": {
                    "type": "object",
                    "properties": {
                      "url": {
                        "type": "string"
                      },
                      "description": {
                        "type": "object",
                        "properties": {
                          "small": {
                            "type": "string"
                          },
                          "large": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "small",
                          "large"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "description"
                    ],
                    "additionalProperties": false
                  },
                  "guidance": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "text": {
                        "type": "object",
                        "properties": {
                          "small": {
                            "type": "string"
                          },
                          "medium": {
                            "type": "string"
                          },
                          "large": {
                            "type": "string"
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "additionalProperties": false
                  },
                  "first_broadcast": {
                    "type": "string"
                  },
                  "credits_start": {
                    "type": "number"
                  },
                  "service_id": {
                    "type": "string"
                  },
                  "availability": {
                    "type": "object",
                    "properties": {
                      "start": {
                        "type": "string"
                      },
                      "end": {
                        "type": "string"
                      },
                      "remaining": {
                        "type": "object",
                        "properties": {
                          "text": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "text"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "start"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "id",
                  "type",
                  "hd",
                  "download",
                  "duration",
                  "kind",
                  "availability"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "type": {
                    "enum": [
                      "store_version"
                    ]
                  },
                  "store_id": {
                    "type": "string"
                  },
                  "store_profile": {
                    "type": "string"
                  },
                  "hd": {
                    "type": "boolean"
                  },
                  "kind": {
                    "type": "string"
                  },
                  "download": {
                    "type": "boolean"
                  },
                  "duration": {
                    "type": "object",
                    "properties": {
                      "text": {
                        "type": "string"
                      },
                      "value": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "text",
                      "value"
                    ],
                    "additionalProperties": false
                  },
                  "guidance": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "text": {
                        "type": "object",
                        "properties": {
                          "small": {
                            "type": "string"
                          },
                          "medium": {
                            "type": "string"
                          },
                          "large": {
                            "type": "string"
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "additionalProperties": false
                  },
                  "store_session": {
                    "type": "object",
                    "properties": {
                      "token": {
                        "type": "string"
                      },
                      "stats": {
                        "type": "object",
                        "properties": {
                          "parentPID": {
                            "type": "string"
                          },
                          "parentPIDType": {
                            "type": "string"
                          },
                          "viewerId": {
                            "type": "string"
                          },
                          "contentType": {
                            "type": "string"
                          },
                          "contentVariant": {
                            "type": "string"
                          },
                          "episodeName": {
                            "type": "string"
                          },
                          "assetName": {
                            "type": "string"
                          },
                          "productVariant": {
                            "type": "string"
                          }
                        }
                      },
                      "ceiling": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "token",
                      "stats"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "id",
                  "type",
                  "store_id",
                  "store_profile",
                  "hd",
                  "download",
                  "duration",
                  "kind"
                ],
                "additionalProperties": false
              }
            ]
          }
        },
        "parent_id": {
          "type": "string"
        },
        "suppliers": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "title": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "title"
            ]
          },
          "additionalProperties": false
        },
        "tleo_type": {
          "enum": [
            "episode",
            "brand",
            "series"
          ]
        },
        "categories": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "next_broadcast": {
          "type": "object",
          "properties": {
            "channel_title": {
              "type": "string"
            },
            "scheduled_start": {
              "type": "string"
            }
          },
          "required": [
            "channel_title",
            "scheduled_start"
          ],
          "additionalProperties": false
        },
        "labels": {
          "type": "object",
          "properties": {
            "editorial": {
              "type": "string"
            },
            "time": {
              "type": "string"
            },
            "category": {
              "type": "string"
            },
            "editorial_category": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "master_brand": {
          "$ref": "#/definitions/master_brand"
        },
        "parent_position": {
          "type": "number"
        },
        "release_date_time": {
          "type": "string"
        },
        "lexical_sort_letter": {
          "type": "string"
        },
        "release_date": {
          "type": "string"
        },
        "related_links": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "url": {
                "type": "string"
              },
              "kind": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "type": {
                "enum": [
                  "link"
                ]
              }
            },
            "required": [
              "id",
              "url",
              "type",
              "kind",
              "title"
            ],
            "additionalProperties": false
          }
        },
        "promoted": {
          "type": "boolean"
        }
      },
      "required": [
        "id",
        "type",
        "title",
        "images",
        "signed",
        "audio_described",
        "status",
        "tleo_id",
        "guidance",
        "synopses",
        "versions",
        "suppliers",
        "tleo_type",
        "categories",
        "master_brand",
        "lexical_sort_letter",
        "requires_sign_in"
      ],
      "additionalProperties": false
    },
    "programme": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "type": {
          "enum": [
            "programme",
            "programme_large"
          ]
        },
        "title": {
          "type": "string"
        },
        "labels": {
          "type": "object",
          "properties": {
            "category": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "tleo_type": {
          "enum": [
            "brand",
            "series",
            "episode"
          ]
        },
        "synopses": {
          "type": "object",
          "properties": {
            "small": {
              "type": "string"
            },
            "medium": {
              "type": "string"
            },
            "large": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "lexical_sort_letter": {
          "type": "string"
        },
        "images": {
          "type": "object",
          "properties": {
            "type": {
              "enum": [
                "image"
              ]
            },
            "standard": {
              "type": "string"
            },
            "inherited_from": {
              "type": "string"
            }
          },
          "required": [
            "type",
            "standard"
          ],
          "additionalProperties": false
        },
        "master_brand": {
          "$ref": "#/definitions/master_brand"
        },
        "suppliers": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "title": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "title"
            ]
          },
          "additionalProperties": false
        },
        "categories": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "status": {
          "enum": [
            "available",
            "unavailable"
          ]
        },
        "count": {
          "type": "number"
        },
        "initial_children": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/episode"
          }
        }
      },
      "required": [
        "id",
        "type",
        "title",
        "synopses",
        "lexical_sort_letter",
        "images",
        "master_brand",
        "suppliers",
        "categories",
        "status",
        "count",
        "initial_children"
      ],
      "additionalProperties": false
    },
    "master_brand": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "titles": {
          "type": "object",
          "properties": {
            "small": {
              "type": "string"
            },
            "medium": {
              "type": "string"
            },
            "large": {
              "type": "string"
            }
          },
          "required": [
            "small",
            "medium",
            "large"
          ],
          "additionalProperties": false
        },
        "ident_id": {
          "type": "string"
        },
        "attribution": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "titles",
        "attribution"
      ],
      "additionalProperties": false
    },
    "group": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "type": {
          "enum": [
            "group",
            "group_large"
          ]
        },
        "title": {
          "type": "string"
        },
        "group_type": {
          "enum": [
            "tleo",
            "curated"
          ]
        },
        "stacked": {
          "type": "boolean"
        },
        "images": {
          "type": "object",
          "properties": {
            "type": {
              "enum": [
                "image"
              ]
            },
            "standard": {
              "type": "string"
            },
            "vertical": {
              "type": "string"
            }
          },
          "required": [
            "type",
            "standard",
            "vertical"
          ],
          "additionalProperties": false
        },
        "episode_sort_direction": {
          "type": "string"
        },
        "synopses": {
          "type": "object",
          "properties": {
            "small": {
              "type": "string"
            },
            "medium": {
              "type": "string"
            },
            "large": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "master_brand": {
          "$ref": "#/definitions/master_brand"
        },
        "related_links": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string"
              },
              "url": {
                "type": "string"
              },
              "title": {
                "type": "string"
              }
            },
            "required": [
              "kind",
              "url",
              "title"
            ],
            "additionalProperties": false
          }
        },
        "initial_children": {
          "type": "array",
          "items": {
            "anyOf": [
              {
                "$ref": "#/definitions/episode"
              },
              {
                "$ref": "#/definitions/broadcast"
              }
            ]
          }
        },
        "count": {
          "type": "number"
        }
      },
      "required": [
        "id",
        "type"
      ],
      "additionalProperties": false
    },
    "broadcast": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "episode_id": {
          "type": "string"
        },
        "version_id": {
          "type": "string"
        },
        "service_id": {
          "type": "string"
        },
        "type": {
          "enum": [
            "broadcast"
          ]
        },
        "scheduled_start": {
          "type": "string"
        },
        "scheduled_end": {
          "type": "string"
        },
        "transmission_start": {
          "type": "string"
        },
        "transmission_end": {
          "type": "string"
        },
        "duration": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "value": {
              "type": "string"
            }
          },
          "required": [
            "value",
            "text"
          ],
          "additionalProperties": false
        },
        "blanked": {
          "type": "boolean"
        },
        "repeat": {
          "type": "boolean"
        },
        "episode": {
          "$ref": "#/definitions/episode"
        },
        "channel_title": {
          "type": "string"
        },
        "available_on_hd_service": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "id",
        "type",
        "scheduled_start",
        "scheduled_end",
        "repeat",
        "blanked",
        "episode",
        "episode_id",
        "version_id",
        "service_id"
      ],
      "additionalProperties": false
    },
    "promotion": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "type": {
          "enum": [
            "promotion"
          ]
        },
        "title": {
          "type": "string"
        },
        "subtitle": {
          "type": "string"
        },
        "url": {
          "type": "string"
        },
        "synopses": {
          "type": "object",
          "properties": {
            "small": {
              "type": "string"
            },
            "medium": {
              "type": "string"
            },
            "large": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "images": {
          "type": "object",
          "properties": {
            "type": {
              "enum": [
                "image"
              ]
            },
            "standard": {
              "type": "string"
            },
            "inherited_from": {
              "type": "string"
            }
          },
          "required": [
            "type",
            "standard"
          ],
          "additionalProperties": false
        },
        "labels": {
          "type": "object",
          "properties": {
            "promotion": {
              "type": "string"
            }
          },
          "required": [
            "promotion"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "id",
        "type"
      ],
      "additionalProperties": false
    },
    "trailer": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "type": {
          "enum": [
            "trailer"
          ]
        },
        "title": {
          "type": "string"
        },
        "kind": {
          "enum": [
            "available_now",
            "coming_soon",
            "other"
          ]
        },
        "version_id": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "type",
        "title",
        "kind",
        "version_id"
      ],
      "additionalProperties": false
    },
    "search_group": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "type": {
          "enum": [
            "search_group"
          ]
        },
        "episode": {
          "$ref": "#/definitions/episode"
        }
      },
      "required": [
        "id",
        "type",
        "episode"
      ],
      "additionalProperties": false
    },
    "watching": {
      "type": "object",
      "properties": {
        "urn": {
          "type": "string"
        },
        "type": {
          "enum": [
            "watching"
          ]
        },
        "episode": {
          "$ref": "#/definitions/episode"
        },
        "programme": {
          "$ref": "#/definitions/programme"
        },
        "version": {
          "$ref": "#/definitions/version"
        },
        "status": {
          "enum": [
            "current",
            "next"
          ]
        },
        "offset": {
          "type": "number"
        },
        "progress": {
          "type": "number"
        },
        "remaining": {
          "type": "number"
        },
        "has_next": {
          "type": "boolean"
        }
      },
      "required": [
        "type",
        "urn",
        "episode",
        "programme",
        "version",
        "has_next"
      ],
      "additionalProperties": false
    },
    "user_recommendation": {
      "type": "object",
      "properties": {
        "algorithm": {
          "type": "string"
        },
        "type": {
          "enum": [
            "user_recommendation"
          ]
        },
        "episode": {
          "$ref": "#/definitions/episode"
        }
      },
      "required": [
        "algorithm",
        "type",
        "episode"
      ],
      "additionalProperties": false
    },
    "added": {
      "type": "object",
      "properties": {
        "urn": {
          "type": "string"
        },
        "type": {
          "enum": [
            "added"
          ]
        },
        "programme": {
          "$ref": "#/definitions/programme"
        }
      },
      "required": [
        "urn",
        "type",
        "programme"
      ],
      "additionalProperties": false
    },
    "store_version": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "type": {
          "enum": [
            "store_version"
          ]
        },
        "store_id": {
          "type": "string"
        },
        "store_profile": {
          "type": "string"
        },
        "hd": {
          "type": "boolean"
        },
        "kind": {
          "type": "string"
        },
        "download": {
          "type": "boolean"
        },
        "duration": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "value": {
              "type": "string"
            }
          },
          "required": [
            "text",
            "value"
          ],
          "additionalProperties": false
        },
        "guidance": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "text": {
              "type": "object",
              "properties": {
                "small": {
                  "type": "string"
                },
                "medium": {
                  "type": "string"
                },
                "large": {
                  "type": "string"
                }
              },
              "additionalProperties": false
            }
          },
          "required": [
            "id"
          ],
          "additionalProperties": false
        },
        "store_session": {
          "type": "object",
          "properties": {
            "token": {
              "type": "string"
            },
            "stats": {
              "type": "object",
              "properties": {
                "parentPID": {
                  "type": "string"
                },
                "parentPIDType": {
                  "type": "string"
                },
                "viewerId": {
                  "type": "string"
                },
                "contentType": {
                  "type": "string"
                },
                "contentVariant": {
                  "type": "string"
                },
                "episodeName": {
                  "type": "string"
                },
                "assetName": {
                  "type": "string"
                },
                "productVariant": {
                  "type": "string"
                }
              }
            },
            "ceiling": {
              "type": "number"
            }
          },
          "required": [
            "token",
            "stats"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "id",
        "type",
        "store_id",
        "store_profile",
        "hd",
        "download",
        "duration",
        "kind"
      ],
      "additionalProperties": false
    },
    "clip": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "type": {
          "enum": [
            "clip"
          ]
        },
        "title": {
          "type": "string"
        },
        "images": {
          "type": "object",
          "properties": {
            "type": {
              "enum": [
                "image"
              ]
            },
            "standard": {
              "type": "string"
            },
            "inherited_from": {
              "type": "string"
            }
          },
          "required": [
            "type",
            "standard"
          ],
          "additionalProperties": false
        },
        "tleo_id": {
          "type": "string"
        },
        "synopses": {
          "type": "object",
          "properties": {
            "small": {
              "type": "string"
            },
            "medium": {
              "type": "string"
            },
            "large": {
              "type": "string"
            },
            "editorial": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "versions": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "type": {
                "enum": [
                  "version",
                  "version_large"
                ]
              },
              "hd": {
                "type": "boolean"
              },
              "download": {
                "type": "boolean"
              },
              "kind": {
                "type": "string"
              },
              "duration": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string"
                  },
                  "value": {
                    "type": "string"
                  }
                },
                "required": [
                  "text",
                  "value"
                ],
                "additionalProperties": false
              },
              "rrc": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string"
                  },
                  "description": {
                    "type": "object",
                    "properties": {
                      "small": {
                        "type": "string"
                      },
                      "large": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "small",
                      "large"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "description"
                ],
                "additionalProperties": false
              },
              "guidance": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "text": {
                    "type": "object",
                    "properties": {
                      "small": {
                        "type": "string"
                      },
                      "medium": {
                        "type": "string"
                      },
                      "large": {
                        "type": "string"
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              },
              "first_broadcast": {
                "type": "string"
              },
              "credits_start": {
                "type": "number"
              },
              "service_id": {
                "type": "string"
              },
              "availability": {
                "type": "object",
                "properties": {
                  "start": {
                    "type": "string"
                  },
                  "end": {
                    "type": "string"
                  },
                  "remaining": {
                    "type": "object",
                    "properties": {
                      "text": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "text"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "start"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "type",
              "hd",
              "download",
              "duration",
              "kind",
              "availability"
            ],
            "additionalProperties": false
          }
        },
        "tleo_type": {
          "enum": [
            "episode",
            "brand",
            "series"
          ]
        },
        "labels": {
          "type": "object",
          "properties": {
            "editorial": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "master_brand": {
          "$ref": "#/definitions/master_brand"
        },
        "promotion_type": {
          "enum": [
            "available_now",
            "coming_soon"
          ]
        },
        "onward_journey": {
          "type": "object",
          "properties": {
            "type": {
              "enum": [
                "episode"
              ]
            },
            "id": {
              "type": "string"
            }
          },
          "additionalProperties": false
        }
      },
      "required": [
        "id",
        "type",
        "title",
        "images",
        "tleo_id",
        "synopses",
        "versions",
        "master_brand"
      ],
      "additionalProperties": false
    },
    "version": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "type": {
          "enum": [
            "version",
            "version_large"
          ]
        },
        "hd": {
          "type": "boolean"
        },
        "download": {
          "type": "boolean"
        },
        "kind": {
          "type": "string"
        },
        "duration": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "value": {
              "type": "string"
            }
          },
          "required": [
            "text",
            "value"
          ],
          "additionalProperties": false
        },
        "rrc": {
          "type": "object",
          "properties": {
            "url": {
              "type": "string"
            },
            "description": {
              "type": "object",
              "properties": {
                "small": {
                  "type": "string"
                },
                "large": {
                  "type": "string"
                }
              },
              "required": [
                "small",
                "large"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "description"
          ],
          "additionalProperties": false
        },
        "guidance": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "text": {
              "type": "object",
              "properties": {
                "small": {
                  "type": "string"
                },
                "medium": {
                  "type": "string"
                },
                "large": {
                  "type": "string"
                }
              },
              "additionalProperties": false
            }
          },
          "required": [
            "id"
          ],
          "additionalProperties": false
        },
        "first_broadcast": {
          "type": "string"
        },
        "credits_start": {
          "type": "number"
        },
        "service_id": {
          "type": "string"
        },
        "availability": {
          "type": "object",
          "properties": {
            "start": {
              "type": "string"
            },
            "end": {
              "type": "string"
            },
            "remaining": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string"
                }
              },
              "required": [
                "text"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "start"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "id",
        "type",
        "hd",
        "download",
        "duration",
        "kind",
        "availability"
      ],
      "additionalProperties": false
    }
  }
}