# This file was generated by liblab | https://liblab.com/

from __future__ import annotations
from enum import Enum
from typing import List
from .utils.json_map import JsonMap
from .base import BaseModel
from .game_editorial_keyword import GameEditorialKeyword
from .photo import Photo


class GameHighlightType1(Enum):
    """An enumeration representing different categories.

    :cvar VIDEO: "video"
    :vartype VIDEO: str
    """

    VIDEO = "video"

    def list():
        """Lists all category values.

        :return: A list of all category values.
        :rtype: list
        """
        return list(map(lambda x: x.value, GameHighlightType1._member_map_.values()))


class PlaybacksName(Enum):
    """An enumeration representing different categories.

    :cvar FLASH_192K_320X180: "FLASH_192K_320X180"
    :vartype FLASH_192K_320X180: str
    :cvar FLASH_450K_400X224: "FLASH_450K_400X224"
    :vartype FLASH_450K_400X224: str
    :cvar FLASH_1200K_640X360: "FLASH_1200K_640X360"
    :vartype FLASH_1200K_640X360: str
    :cvar FLASH_1800K_960X540: "FLASH_1800K_960X540"
    :vartype FLASH_1800K_960X540: str
    :cvar HTTP_CLOUD_MOBILE: "HTTP_CLOUD_MOBILE"
    :vartype HTTP_CLOUD_MOBILE: str
    :cvar HTTP_CLOUD_TABLET: "HTTP_CLOUD_TABLET"
    :vartype HTTP_CLOUD_TABLET: str
    :cvar HTTP_CLOUD_TABLET_60: "HTTP_CLOUD_TABLET_60"
    :vartype HTTP_CLOUD_TABLET_60: str
    :cvar HTTP_CLOUD_WIRED: "HTTP_CLOUD_WIRED"
    :vartype HTTP_CLOUD_WIRED: str
    :cvar HTTP_CLOUD_WIRED_60: "HTTP_CLOUD_WIRED_60"
    :vartype HTTP_CLOUD_WIRED_60: str
    :cvar HTTP_CLOUD_WIRED_WEB: "HTTP_CLOUD_WIRED_WEB"
    :vartype HTTP_CLOUD_WIRED_WEB: str
    """

    FLASH_192K_320X180 = "FLASH_192K_320X180"
    FLASH_450K_400X224 = "FLASH_450K_400X224"
    FLASH_1200K_640X360 = "FLASH_1200K_640X360"
    FLASH_1800K_960X540 = "FLASH_1800K_960X540"
    HTTP_CLOUD_MOBILE = "HTTP_CLOUD_MOBILE"
    HTTP_CLOUD_TABLET = "HTTP_CLOUD_TABLET"
    HTTP_CLOUD_TABLET_60 = "HTTP_CLOUD_TABLET_60"
    HTTP_CLOUD_WIRED = "HTTP_CLOUD_WIRED"
    HTTP_CLOUD_WIRED_60 = "HTTP_CLOUD_WIRED_60"
    HTTP_CLOUD_WIRED_WEB = "HTTP_CLOUD_WIRED_WEB"

    def list():
        """Lists all category values.

        :return: A list of all category values.
        :rtype: list
        """
        return list(map(lambda x: x.value, PlaybacksName._member_map_.values()))


@JsonMap({})
class Playbacks(BaseModel):
    """Playbacks

    :param name: name, defaults to None
    :type name: PlaybacksName, optional
    :param width: width, defaults to None
    :type width: str, optional
    :param height: height, defaults to None
    :type height: str, optional
    :param url: url, defaults to None
    :type url: str, optional
    """

    def __init__(
        self,
        name: PlaybacksName = None,
        width: str = None,
        height: str = None,
        url: str = None,
    ):
        if name is not None:
            self.name = self._enum_matching(name, PlaybacksName.list(), "name")
        if width is not None:
            self.width = width
        if height is not None:
            self.height = height
        if url is not None:
            self.url = url


@JsonMap(
    {
        "type_": "type",
        "id_": "id",
        "date_": "date",
        "auth_flow": "authFlow",
        "media_playback_id": "mediaPlaybackId",
        "media_state": "mediaState",
    }
)
class GameHighlight(BaseModel):
    """GameHighlight

    :param type_: type_, defaults to None
    :type type_: GameHighlightType1, optional
    :param id_: id_, defaults to None
    :type id_: str, optional
    :param date_: date_, defaults to None
    :type date_: str, optional
    :param title: title, defaults to None
    :type title: str, optional
    :param blurb: blurb, defaults to None
    :type blurb: str, optional
    :param description: description, defaults to None
    :type description: str, optional
    :param duration: duration, defaults to None
    :type duration: str, optional
    :param auth_flow: auth_flow, defaults to None
    :type auth_flow: bool, optional
    :param media_playback_id: media_playback_id, defaults to None
    :type media_playback_id: str, optional
    :param media_state: media_state, defaults to None
    :type media_state: str, optional
    :param keywords: keywords, defaults to None
    :type keywords: List[GameEditorialKeyword], optional
    :param image: image, defaults to None
    :type image: Photo, optional
    :param playbacks: playbacks, defaults to None
    :type playbacks: List[Playbacks], optional
    """

    def __init__(
        self,
        type_: GameHighlightType1 = None,
        id_: str = None,
        date_: str = None,
        title: str = None,
        blurb: str = None,
        description: str = None,
        duration: str = None,
        auth_flow: bool = None,
        media_playback_id: str = None,
        media_state: str = None,
        keywords: List[GameEditorialKeyword] = None,
        image: Photo = None,
        playbacks: List[Playbacks] = None,
    ):
        if type_ is not None:
            self.type_ = self._enum_matching(type_, GameHighlightType1.list(), "type_")
        if id_ is not None:
            self.id_ = id_
        if date_ is not None:
            self.date_ = date_
        if title is not None:
            self.title = title
        if blurb is not None:
            self.blurb = blurb
        if description is not None:
            self.description = description
        if duration is not None:
            self.duration = duration
        if auth_flow is not None:
            self.auth_flow = auth_flow
        if media_playback_id is not None:
            self.media_playback_id = media_playback_id
        if media_state is not None:
            self.media_state = media_state
        if keywords is not None:
            self.keywords = self._define_list(keywords, GameEditorialKeyword)
        if image is not None:
            self.image = self._define_object(image, Photo)
        if playbacks is not None:
            self.playbacks = self._define_list(playbacks, Playbacks)
