{-# LANGUAGE DeriveGeneric #-}
module Telegram.Bot.API.Types.BotShortDescription where
import Data.Aeson (FromJSON (..), ToJSON (..))
import Data.Text (Text)
import GHC.Generics (Generic)
import Telegram.Bot.API.Internal.Utils
newtype BotShortDescription = BotShortDescription
{ BotShortDescription -> Text
botShortDescriptionShortDescription :: Text
}
deriving ((forall x. BotShortDescription -> Rep BotShortDescription x)
-> (forall x. Rep BotShortDescription x -> BotShortDescription)
-> Generic BotShortDescription
forall x. Rep BotShortDescription x -> BotShortDescription
forall x. BotShortDescription -> Rep BotShortDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. BotShortDescription -> Rep BotShortDescription x
from :: forall x. BotShortDescription -> Rep BotShortDescription x
$cto :: forall x. Rep BotShortDescription x -> BotShortDescription
to :: forall x. Rep BotShortDescription x -> BotShortDescription
Generic, Int -> BotShortDescription -> ShowS
[BotShortDescription] -> ShowS
BotShortDescription -> String
(Int -> BotShortDescription -> ShowS)
-> (BotShortDescription -> String)
-> ([BotShortDescription] -> ShowS)
-> Show BotShortDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> BotShortDescription -> ShowS
showsPrec :: Int -> BotShortDescription -> ShowS
$cshow :: BotShortDescription -> String
show :: BotShortDescription -> String
$cshowList :: [BotShortDescription] -> ShowS
showList :: [BotShortDescription] -> ShowS
Show)
instance ToJSON BotShortDescription where toJSON :: BotShortDescription -> Value
toJSON = BotShortDescription -> Value
forall a (d :: Meta) (f :: * -> *).
(Generic a, GToJSON Zero (Rep a), Rep a ~ D1 d f, Datatype d) =>
a -> Value
gtoJSON
instance FromJSON BotShortDescription where parseJSON :: Value -> Parser BotShortDescription
parseJSON = Value -> Parser BotShortDescription
forall a (d :: Meta) (f :: * -> *).
(Generic a, GFromJSON Zero (Rep a), Rep a ~ D1 d f, Datatype d) =>
Value -> Parser a
gparseJSON