{-# LANGUAGE DeriveGeneric #-}
module Telegram.Bot.API.Types.Audio 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 Audio = Audio
{ Audio -> FileId
audioFileId :: FileId
, Audio -> FileId
audioFileUniqueId :: FileId
, Audio -> Seconds
audioDuration :: Seconds
, Audio -> Maybe Text
audioPerformer :: Maybe Text
, Audio -> Maybe Text
audioTitle :: Maybe Text
, Audio -> Maybe Text
audioFileName :: Maybe Text
, Audio -> Maybe Text
audioMimeType :: Maybe Text
, Audio -> Maybe Integer
audioFileSize :: Maybe Integer
, Audio -> Maybe PhotoSize
audioThumb :: Maybe PhotoSize
}
deriving (forall x. Rep Audio x -> Audio
forall x. Audio -> Rep Audio x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Audio x -> Audio
$cfrom :: forall x. Audio -> Rep Audio x
Generic, Int -> Audio -> ShowS
[Audio] -> ShowS
Audio -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Audio] -> ShowS
$cshowList :: [Audio] -> ShowS
show :: Audio -> String
$cshow :: Audio -> String
showsPrec :: Int -> Audio -> ShowS
$cshowsPrec :: Int -> Audio -> ShowS
Show)
instance ToJSON Audio where toJSON :: Audio -> 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 Audio where parseJSON :: Value -> Parser Audio
parseJSON = forall a (d :: Meta) (f :: * -> *).
(Generic a, GFromJSON Zero (Rep a), Rep a ~ D1 d f, Datatype d) =>
Value -> Parser a
gparseJSON