# generated by datamodel-codegen:
#   filename:  data.json
#   timestamp: 2021-01-27T05:08:21+00:00

from __future__ import annotations

from typing import Any, List, Optional

from pydantic import BaseModel


class StreamModel(BaseModel):
    id: Optional[str] = None
    type: Optional[str] = None
    video_codec: Optional[str] = None
    video_codec_level: Optional[str] = None
    video_bitrate: Optional[str] = None
    video_bit_depth: Optional[str] = None
    video_chroma_subsampling: Optional[str] = None
    video_color_primaries: Optional[str] = None
    video_color_range: Optional[str] = None
    video_color_space: Optional[str] = None
    video_color_trc: Optional[str] = None
    video_frame_rate: Optional[str] = None
    video_ref_frames: Optional[str] = None
    video_height: Optional[str] = None
    video_width: Optional[str] = None
    video_language: Optional[str] = None
    video_language_code: Optional[str] = None
    video_profile: Optional[str] = None
    video_scan_type: Optional[str] = None
    selected: Optional[int] = None
    audio_codec: Optional[str] = None
    audio_bitrate: Optional[str] = None
    audio_bitrate_mode: Optional[str] = None
    audio_channels: Optional[str] = None
    audio_channel_layout: Optional[str] = None
    audio_sample_rate: Optional[str] = None
    audio_language: Optional[str] = None
    audio_language_code: Optional[str] = None
    audio_profile: Optional[str] = None
    subtitle_codec: Optional[str] = None
    subtitle_container: Optional[str] = None
    subtitle_format: Optional[str] = None
    subtitle_forced: Optional[int] = None
    subtitle_location: Optional[str] = None
    subtitle_language: Optional[str] = None
    subtitle_language_code: Optional[str] = None


class PartModel(BaseModel):
    id: Optional[str] = None
    file: Optional[str] = None
    file_size: Optional[str] = None
    indexes: Optional[int] = None
    streams: Optional[List[StreamModel]] = None
    selected: Optional[int] = None


class MediaInfoItemModel(BaseModel):
    id: Optional[str] = None
    container: Optional[str] = None
    bitrate: Optional[str] = None
    height: Optional[str] = None
    width: Optional[str] = None
    aspect_ratio: Optional[str] = None
    video_codec: Optional[str] = None
    video_resolution: Optional[str] = None
    video_full_resolution: Optional[str] = None
    video_framerate: Optional[str] = None
    video_profile: Optional[str] = None
    audio_codec: Optional[str] = None
    audio_channels: Optional[str] = None
    audio_channel_layout: Optional[str] = None
    audio_profile: Optional[str] = None
    optimized_version: Optional[int] = None
    channel_call_sign: Optional[str] = None
    channel_identifier: Optional[str] = None
    channel_thumb: Optional[str] = None
    parts: Optional[List[PartModel]] = None


class MovieItemModel(BaseModel):
    media_type: Optional[str] = None
    section_id: Optional[str] = None
    library_name: Optional[str] = None
    rating_key: Optional[str] = None
    parent_rating_key: Optional[str] = None
    grandparent_rating_key: Optional[str] = None
    title: Optional[str] = None
    parent_title: Optional[str] = None
    grandparent_title: Optional[str] = None
    original_title: Optional[str] = None
    sort_title: Optional[str] = None
    media_index: Optional[str] = None
    parent_media_index: Optional[str] = None
    studio: Optional[str] = None
    content_rating: Optional[str] = None
    summary: Optional[str] = None
    tagline: Optional[str] = None
    rating: Optional[str] = None
    rating_image: Optional[str] = None
    audience_rating: Optional[str] = None
    audience_rating_image: Optional[str] = None
    user_rating: Optional[str] = None
    duration: Optional[str] = None
    year: Optional[str] = None
    thumb: Optional[str] = None
    parent_thumb: Optional[str] = None
    grandparent_thumb: Optional[str] = None
    art: Optional[str] = None
    banner: Optional[str] = None
    originally_available_at: Optional[str] = None
    added_at: Optional[str] = None
    updated_at: Optional[str] = None
    last_viewed_at: Optional[str] = None
    guid: Optional[str] = None
    parent_guid: Optional[str] = None
    grandparent_guid: Optional[str] = None
    directors: Optional[List] = None
    writers: Optional[List] = None
    actors: Optional[List] = None
    genres: Optional[List] = None
    labels: Optional[List] = None
    collections: Optional[List] = None
    guids: Optional[List] = None
    full_title: Optional[str] = None
    children_count: Optional[int] = None
    live: Optional[int] = None
    media_info: Optional[List[MediaInfoItemModel]] = None


class ShowItemModel(BaseModel):
    media_type: Optional[str] = None
    section_id: Optional[str] = None
    library_name: Optional[str] = None
    rating_key: Optional[str] = None
    parent_rating_key: Optional[str] = None
    grandparent_rating_key: Optional[str] = None
    title: Optional[str] = None
    parent_title: Optional[str] = None
    grandparent_title: Optional[str] = None
    original_title: Optional[str] = None
    sort_title: Optional[str] = None
    media_index: Optional[str] = None
    parent_media_index: Optional[str] = None
    studio: Optional[str] = None
    content_rating: Optional[str] = None
    summary: Optional[str] = None
    tagline: Optional[str] = None
    rating: Optional[str] = None
    rating_image: Optional[str] = None
    audience_rating: Optional[str] = None
    audience_rating_image: Optional[str] = None
    user_rating: Optional[str] = None
    duration: Optional[str] = None
    year: Optional[str] = None
    thumb: Optional[str] = None
    parent_thumb: Optional[str] = None
    grandparent_thumb: Optional[str] = None
    art: Optional[str] = None
    banner: Optional[str] = None
    originally_available_at: Optional[str] = None
    added_at: Optional[str] = None
    updated_at: Optional[str] = None
    last_viewed_at: Optional[str] = None
    guid: Optional[str] = None
    parent_guid: Optional[str] = None
    grandparent_guid: Optional[str] = None
    directors: Optional[List] = None
    writers: Optional[List] = None
    actors: Optional[List[str]] = None
    genres: Optional[List[str]] = None
    labels: Optional[List] = None
    collections: Optional[List] = None
    guids: Optional[List] = None
    full_title: Optional[str] = None
    children_count: Optional[int] = None
    live: Optional[int] = None
    media_info: Optional[List] = None


class SeasonItemModel(BaseModel):
    media_type: Optional[str] = None
    section_id: Optional[str] = None
    library_name: Optional[str] = None
    rating_key: Optional[str] = None
    parent_rating_key: Optional[str] = None
    grandparent_rating_key: Optional[str] = None
    title: Optional[str] = None
    parent_title: Optional[str] = None
    grandparent_title: Optional[str] = None
    original_title: Optional[str] = None
    sort_title: Optional[str] = None
    media_index: Optional[str] = None
    parent_media_index: Optional[str] = None
    studio: Optional[str] = None
    content_rating: Optional[str] = None
    summary: Optional[str] = None
    tagline: Optional[str] = None
    rating: Optional[str] = None
    rating_image: Optional[str] = None
    audience_rating: Optional[str] = None
    audience_rating_image: Optional[str] = None
    user_rating: Optional[str] = None
    duration: Optional[str] = None
    year: Optional[str] = None
    thumb: Optional[str] = None
    parent_thumb: Optional[str] = None
    grandparent_thumb: Optional[str] = None
    art: Optional[str] = None
    banner: Optional[str] = None
    originally_available_at: Optional[str] = None
    added_at: Optional[str] = None
    updated_at: Optional[str] = None
    last_viewed_at: Optional[str] = None
    guid: Optional[str] = None
    parent_guid: Optional[str] = None
    grandparent_guid: Optional[str] = None
    directors: Optional[List] = None
    writers: Optional[List] = None
    actors: Optional[List[str]] = None
    genres: Optional[List[str]] = None
    labels: Optional[List] = None
    collections: Optional[List] = None
    guids: Optional[List] = None
    full_title: Optional[str] = None
    children_count: Optional[int] = None
    live: Optional[int] = None
    media_info: Optional[List] = None


class EpisodeItemModel(BaseModel):
    media_type: Optional[str] = None
    section_id: Optional[str] = None
    library_name: Optional[str] = None
    rating_key: Optional[str] = None
    parent_rating_key: Optional[str] = None
    grandparent_rating_key: Optional[str] = None
    title: Optional[str] = None
    parent_title: Optional[str] = None
    grandparent_title: Optional[str] = None
    original_title: Optional[str] = None
    sort_title: Optional[str] = None
    media_index: Optional[str] = None
    parent_media_index: Optional[str] = None
    studio: Optional[str] = None
    content_rating: Optional[str] = None
    summary: Optional[str] = None
    tagline: Optional[str] = None
    rating: Optional[str] = None
    rating_image: Optional[str] = None
    audience_rating: Optional[str] = None
    audience_rating_image: Optional[str] = None
    user_rating: Optional[str] = None
    duration: Optional[str] = None
    year: Optional[str] = None
    thumb: Optional[str] = None
    parent_thumb: Optional[str] = None
    grandparent_thumb: Optional[str] = None
    art: Optional[str] = None
    banner: Optional[str] = None
    originally_available_at: Optional[str] = None
    added_at: Optional[str] = None
    updated_at: Optional[str] = None
    last_viewed_at: Optional[str] = None
    guid: Optional[str] = None
    parent_guid: Optional[str] = None
    grandparent_guid: Optional[str] = None
    directors: Optional[List[str]] = None
    writers: Optional[List[str]] = None
    actors: Optional[List[str]] = None
    genres: Optional[List[str]] = None
    labels: Optional[List] = None
    collections: Optional[List] = None
    guids: Optional[List] = None
    full_title: Optional[str] = None
    children_count: Optional[int] = None
    live: Optional[int] = None
    media_info: Optional[List[MediaInfoItemModel]] = None


class ResultsListModel(BaseModel):
    movie: Optional[List[MovieItemModel]] = None
    show: Optional[List[ShowItemModel]] = None
    season: Optional[List[SeasonItemModel]] = None
    episode: Optional[List[EpisodeItemModel]] = None
    artist: Optional[List] = None
    album: Optional[List] = None
    track: Optional[List] = None
    collection: Optional[List] = None


class SearchResultsModel(BaseModel):
    results_count: Optional[int] = None
    results_list: Optional[ResultsListModel] = None



