module Spotify.Types.Playlists where

import Spotify.Types.Internal.CustomJSON
import Spotify.Types.Misc
import Spotify.Types.Simple
import Spotify.Types.Tracks

import Data.Aeson (FromJSON)
import Data.Text (Text)
import GHC.Generics (Generic)

data Playlist = Playlist
    { Playlist -> Bool
collaborative :: Bool
    , Playlist -> Maybe Text
description :: Maybe Text
    , Playlist -> ExternalURLs
externalUrls :: ExternalURLs
    , Playlist -> Followers
followers :: Followers
    , Playlist -> Href
href :: Href
    , Playlist -> PlaylistID
id :: PlaylistID
    , Playlist -> [Image]
images :: [Image]
    , Playlist -> Text
name :: Text
    , Playlist -> UserSimple
owner :: UserSimple
    , Playlist -> Maybe Bool
public :: Maybe Bool
    , Playlist -> SnapshotID
snapshotId :: SnapshotID
    , Playlist -> Paging SavedTrack
tracks :: Paging SavedTrack
    , Playlist -> URI
uri :: URI
    }
    deriving (Playlist -> Playlist -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Playlist -> Playlist -> Bool
$c/= :: Playlist -> Playlist -> Bool
== :: Playlist -> Playlist -> Bool
$c== :: Playlist -> Playlist -> Bool
Eq, Eq Playlist
Playlist -> Playlist -> Bool
Playlist -> Playlist -> Ordering
Playlist -> Playlist -> Playlist
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Playlist -> Playlist -> Playlist
$cmin :: Playlist -> Playlist -> Playlist
max :: Playlist -> Playlist -> Playlist
$cmax :: Playlist -> Playlist -> Playlist
>= :: Playlist -> Playlist -> Bool
$c>= :: Playlist -> Playlist -> Bool
> :: Playlist -> Playlist -> Bool
$c> :: Playlist -> Playlist -> Bool
<= :: Playlist -> Playlist -> Bool
$c<= :: Playlist -> Playlist -> Bool
< :: Playlist -> Playlist -> Bool
$c< :: Playlist -> Playlist -> Bool
compare :: Playlist -> Playlist -> Ordering
$ccompare :: Playlist -> Playlist -> Ordering
Ord, Int -> Playlist -> ShowS
[Playlist] -> ShowS
Playlist -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Playlist] -> ShowS
$cshowList :: [Playlist] -> ShowS
show :: Playlist -> String
$cshow :: Playlist -> String
showsPrec :: Int -> Playlist -> ShowS
$cshowsPrec :: Int -> Playlist -> ShowS
Show, forall x. Rep Playlist x -> Playlist
forall x. Playlist -> Rep Playlist x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Playlist x -> Playlist
$cfrom :: forall x. Playlist -> Rep Playlist x
Generic)
    deriving (Value -> Parser [Playlist]
Value -> Parser Playlist
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [Playlist]
$cparseJSONList :: Value -> Parser [Playlist]
parseJSON :: Value -> Parser Playlist
$cparseJSON :: Value -> Parser Playlist
FromJSON) via CustomJSON Playlist