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

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

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

-- ** Chat photo

-- | Chat photo. Returned only in getChat.
data ChatPhoto = ChatPhoto
  { ChatPhoto -> FileId
chatPhotoSmallFileId       :: FileId -- ^ Unique file identifier of small (160x160) chat photo. This file_id can be used only for photo download.
  , ChatPhoto -> FileId
chatPhotoSmallFileUniqueId :: FileId -- ^ Unique file identifier of small (160x160) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.
  , ChatPhoto -> FileId
chatPhotoBigFileId         :: FileId -- ^ Unique file identifier of big (640x640) chat photo. This file_id can be used only for photo download.
  , ChatPhoto -> FileId
chatPhotoBigFileUniqueId   :: FileId -- ^ Unique file identifier of big (640x640) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.
  }
  deriving (forall x. Rep ChatPhoto x -> ChatPhoto
forall x. ChatPhoto -> Rep ChatPhoto x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ChatPhoto x -> ChatPhoto
$cfrom :: forall x. ChatPhoto -> Rep ChatPhoto x
Generic, Int -> ChatPhoto -> ShowS
[ChatPhoto] -> ShowS
ChatPhoto -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ChatPhoto] -> ShowS
$cshowList :: [ChatPhoto] -> ShowS
show :: ChatPhoto -> String
$cshow :: ChatPhoto -> String
showsPrec :: Int -> ChatPhoto -> ShowS
$cshowsPrec :: Int -> ChatPhoto -> ShowS
Show)

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