{-# LANGUAGE DeriveGeneric #-}
module Telegram.Bot.API.Types.UserProfilePhotos where

import Data.Aeson (FromJSON (..), ToJSON (..))
import GHC.Generics (Generic)

import Telegram.Bot.API.Types.PhotoSize
import Telegram.Bot.API.Internal.Utils

-- ** 'UserProfilePhotos'

-- | This object represent a user's profile pictures.
data UserProfilePhotos = UserProfilePhotos
  { UserProfilePhotos -> Int
userProfilePhotosTotalCount :: Int -- ^ Total number of profile pictures the target user has
  , UserProfilePhotos -> [[PhotoSize]]
userProfilePhotosPhotos     :: [[PhotoSize]] -- ^ Requested profile pictures (in up to 4 sizes each)
  }
  deriving ((forall x. UserProfilePhotos -> Rep UserProfilePhotos x)
-> (forall x. Rep UserProfilePhotos x -> UserProfilePhotos)
-> Generic UserProfilePhotos
forall x. Rep UserProfilePhotos x -> UserProfilePhotos
forall x. UserProfilePhotos -> Rep UserProfilePhotos x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. UserProfilePhotos -> Rep UserProfilePhotos x
from :: forall x. UserProfilePhotos -> Rep UserProfilePhotos x
$cto :: forall x. Rep UserProfilePhotos x -> UserProfilePhotos
to :: forall x. Rep UserProfilePhotos x -> UserProfilePhotos
Generic, Int -> UserProfilePhotos -> ShowS
[UserProfilePhotos] -> ShowS
UserProfilePhotos -> String
(Int -> UserProfilePhotos -> ShowS)
-> (UserProfilePhotos -> String)
-> ([UserProfilePhotos] -> ShowS)
-> Show UserProfilePhotos
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> UserProfilePhotos -> ShowS
showsPrec :: Int -> UserProfilePhotos -> ShowS
$cshow :: UserProfilePhotos -> String
show :: UserProfilePhotos -> String
$cshowList :: [UserProfilePhotos] -> ShowS
showList :: [UserProfilePhotos] -> ShowS
Show)

instance ToJSON   UserProfilePhotos where toJSON :: UserProfilePhotos -> Value
toJSON = UserProfilePhotos -> Value
forall a (d :: Meta) (f :: * -> *).
(Generic a, GToJSON Zero (Rep a), Rep a ~ D1 d f, Datatype d) =>
a -> Value
gtoJSON
instance FromJSON UserProfilePhotos where parseJSON :: Value -> Parser UserProfilePhotos
parseJSON = Value -> Parser UserProfilePhotos
forall a (d :: Meta) (f :: * -> *).
(Generic a, GFromJSON Zero (Rep a), Rep a ~ D1 d f, Datatype d) =>
Value -> Parser a
gparseJSON