# generated by datamodel-codegen:
#   filename:  data.json
#   timestamp: 2021-01-27T04:35:02+00:00

from __future__ import annotations

from typing import Any, List, Union, Optional

from pydantic import BaseModel


class Datum(BaseModel):
    reference_id: Optional[int]
    row_id: Optional[int]
    id: Optional[int]
    date: Optional[int]
    started: Optional[int]
    stopped: Optional[int]
    duration: Optional[int]
    paused_counter: Optional[int]
    user_id: Optional[int]
    user: Optional[str]
    friendly_name: Optional[str]
    platform: Optional[str]
    product: Optional[str]
    player: Optional[str]
    ip_address: Optional[str]
    live: Optional[int]
    machine_id: Optional[str]
    media_type: Optional[str]
    rating_key: Optional[int]
    parent_rating_key: Optional[Union[int, str]]
    grandparent_rating_key: Optional[Union[int, str]]
    full_title: Optional[str]
    title: Optional[str]
    parent_title: Optional[str]
    grandparent_title: Optional[str]
    original_title: Optional[str]
    year: Optional[Union[int, str]]
    media_index: Optional[Union[int, str]]
    parent_media_index: Optional[Union[int, str]]
    thumb: Optional[str]
    originally_available_at: Optional[str]
    guid: Optional[str]
    transcode_decision: Optional[str]
    percent_complete: Optional[int]
    watched_status: Optional[float]
    group_count: Optional[int]
    group_ids: Optional[str]
    state: Optional[Any]
    session_key: Optional[Any]


class Data(BaseModel):
    recordsFiltered: Optional[int]
    recordsTotal: Optional[int]
    data: Optional[List[Datum]]
    draw: Optional[int]
    filter_duration: Optional[str]
    total_duration: Optional[str]


class Response(BaseModel):
    result: Optional[str]
    message: Any
    data: Data


class Model(BaseModel):
    response: Response
