{-# LANGUAGE DeriveGeneric #-}
module Telegram.Bot.API.Types.Video 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 Video = Video
{ Video -> FileId
videoFileId :: FileId
, Video -> FileId
videoFileUniqueId :: FileId
, Video -> Int
videoWidth :: Int
, Video -> Int
videoHeight :: Int
, Video -> Seconds
videoDuration :: Seconds
, Video -> Maybe PhotoSize
videoThumb :: Maybe PhotoSize
, Video -> Maybe Text
videoFileName :: Maybe Text
, Video -> Maybe Text
videoMimeType :: Maybe Text
, Video -> Maybe Integer
videoFileSize :: Maybe Integer
}
deriving ((forall x. Video -> Rep Video x)
-> (forall x. Rep Video x -> Video) -> Generic Video
forall x. Rep Video x -> Video
forall x. Video -> Rep Video x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Video x -> Video
$cfrom :: forall x. Video -> Rep Video x
Generic, Int -> Video -> ShowS
[Video] -> ShowS
Video -> String
(Int -> Video -> ShowS)
-> (Video -> String) -> ([Video] -> ShowS) -> Show Video
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Video] -> ShowS
$cshowList :: [Video] -> ShowS
show :: Video -> String
$cshow :: Video -> String
showsPrec :: Int -> Video -> ShowS
$cshowsPrec :: Int -> Video -> ShowS
Show)
instance ToJSON Video where toJSON :: Video -> Value
toJSON = Video -> Value
forall a (d :: Meta) (f :: * -> *).
(Generic a, GToJSON Zero (Rep a), Rep a ~ D1 d f, Datatype d) =>
a -> Value
gtoJSON
instance FromJSON Video where parseJSON :: Value -> Parser Video
parseJSON = Value -> Parser Video
forall a (d :: Meta) (f :: * -> *).
(Generic a, GFromJSON Zero (Rep a), Rep a ~ D1 d f, Datatype d) =>
Value -> Parser a
gparseJSON