{-# LANGUAGE DeriveGeneric #-}
module Telegram.Bot.API.Types.Animation where
import Data.Aeson (FromJSON (..), ToJSON (..))
import Data.Text (Text)
import GHC.Generics (Generic)
import Telegram.Bot.API.Types.Common
import Telegram.Bot.API.Types.PhotoSize
import Telegram.Bot.API.Internal.Utils
data Animation = Animation
{ Animation -> FileId
animationFileId :: FileId
, Animation -> FileId
animationFileUniqueId :: FileId
, Animation -> Int
animationWidth :: Int
, Animation -> Int
animationHeight :: Int
, Animation -> Seconds
animationDuration :: Seconds
, Animation -> Maybe PhotoSize
animationThumb :: Maybe PhotoSize
, Animation -> Maybe Text
animationFileName :: Maybe Text
, Animation -> Maybe Text
animationMimeType :: Maybe Text
, Animation -> Maybe Integer
animationFileSize :: Maybe Integer
}
deriving (forall x. Rep Animation x -> Animation
forall x. Animation -> Rep Animation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Animation x -> Animation
$cfrom :: forall x. Animation -> Rep Animation x
Generic, Int -> Animation -> ShowS
[Animation] -> ShowS
Animation -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Animation] -> ShowS
$cshowList :: [Animation] -> ShowS
show :: Animation -> String
$cshow :: Animation -> String
showsPrec :: Int -> Animation -> ShowS
$cshowsPrec :: Int -> Animation -> ShowS
Show)
instance ToJSON Animation where toJSON :: Animation -> 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 Animation where parseJSON :: Value -> Parser Animation
parseJSON = forall a (d :: Meta) (f :: * -> *).
(Generic a, GFromJSON Zero (Rep a), Rep a ~ D1 d f, Datatype d) =>
Value -> Parser a
gparseJSON