{-# 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
data ChatPhoto = ChatPhoto
{ ChatPhoto -> FileId
chatPhotoSmallFileId :: FileId
, ChatPhoto -> FileId
chatPhotoSmallFileUniqueId :: FileId
, ChatPhoto -> FileId
chatPhotoBigFileId :: FileId
, ChatPhoto -> FileId
chatPhotoBigFileUniqueId :: FileId
}
deriving ((forall x. ChatPhoto -> Rep ChatPhoto x)
-> (forall x. Rep ChatPhoto x -> ChatPhoto) -> Generic ChatPhoto
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
$cfrom :: forall x. ChatPhoto -> Rep ChatPhoto x
from :: forall x. ChatPhoto -> Rep ChatPhoto x
$cto :: forall x. Rep ChatPhoto x -> ChatPhoto
to :: forall x. Rep ChatPhoto x -> ChatPhoto
Generic, Int -> ChatPhoto -> ShowS
[ChatPhoto] -> ShowS
ChatPhoto -> String
(Int -> ChatPhoto -> ShowS)
-> (ChatPhoto -> String)
-> ([ChatPhoto] -> ShowS)
-> Show ChatPhoto
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ChatPhoto -> ShowS
showsPrec :: Int -> ChatPhoto -> ShowS
$cshow :: ChatPhoto -> String
show :: ChatPhoto -> String
$cshowList :: [ChatPhoto] -> ShowS
showList :: [ChatPhoto] -> ShowS
Show)
instance ToJSON ChatPhoto where toJSON :: ChatPhoto -> Value
toJSON = ChatPhoto -> Value
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 = Value -> Parser ChatPhoto
forall a (d :: Meta) (f :: * -> *).
(Generic a, GFromJSON Zero (Rep a), Rep a ~ D1 d f, Datatype d) =>
Value -> Parser a
gparseJSON