"""
Class object for CasaTunesMedia
Documentation: https://github.com/jonkristian/pycasatunes

Generated by generator/generator.py - 2021-08-09 10:27:19.167654
"""
from .base import CasaBase, CasaBaseClient


class Contextmenuitems(CasaBase):
    @property
    def Type(self):
        return self.attributes.get("Type", None)

    @property
    def Key(self):
        return self.attributes.get("Key", "")

    @property
    def Title(self):
        return self.attributes.get("Title", "")

    @property
    def Value(self):
        return self.attributes.get("Value", "")


class Mediaitems(CasaBase):
    @property
    def Flags(self):
        return self.attributes.get("Flags", None)

    @property
    def QueueType(self):
        return self.attributes.get("QueueType", "")

    @property
    def ID(self):
        return self.attributes.get("ID", "")

    @property
    def PersistentID(self):
        return self.attributes.get("PersistentID", "")

    @property
    def GroupName(self):
        return self.attributes.get("GroupName", "")

    @property
    def Title(self):
        return self.attributes.get("Title", "")

    @property
    def Type(self):
        return self.attributes.get("Type", None)

    @property
    def ArtworkURI(self):
        return self.attributes.get("ArtworkURI", "")

    @property
    def ArtworkRatio(self):
        return self.attributes.get("ArtworkRatio", None)

    @property
    def Duration(self):
        return self.attributes.get("Duration", None)

    @property
    def BitRate(self):
        return self.attributes.get("BitRate", None)

    @property
    def ListenerCount(self):
        return self.attributes.get("ListenerCount", None)

    @property
    def Rating(self):
        return self.attributes.get("Rating", None)

    @property
    def TotalItems(self):
        return self.attributes.get("TotalItems", None)

    @property
    def DisplayInfo(self):
        return self.attributes.get("DisplayInfo", [])

    @property
    def ContextMenuItems(self):
        return [
            Contextmenuitems(x) for x in self.attributes.get("ContextMenuItems", [])
        ]


class CasaTunesMedia(CasaBaseClient):
    @property
    def Flags(self):
        return self.attributes.get("Flags", None)

    @property
    def QueueType(self):
        return self.attributes.get("QueueType", "")

    @property
    def ID(self):
        return self.attributes.get("ID", "")

    @property
    def PersistentID(self):
        return self.attributes.get("PersistentID", "")

    @property
    def Title(self):
        return self.attributes.get("Title", "")

    @property
    def DisplayInfo(self):
        return self.attributes.get("DisplayInfo", [])

    @property
    def ArtworkRatio(self):
        return self.attributes.get("ArtworkRatio", None)

    @property
    def SearchPlaceholderText(self):
        return self.attributes.get("SearchPlaceholderText", "")

    @property
    def StartIndex(self):
        return self.attributes.get("StartIndex", None)

    @property
    def TotalAvailable(self):
        return self.attributes.get("TotalAvailable", None)

    @property
    def MediaItems(self):
        return [Mediaitems(x) for x in self.attributes.get("MediaItems", [])]
