{-# LANGUAGE DeriveGeneric #-}
module Telegram.Bot.API.Types.BotDescription where

import Data.Aeson (FromJSON (..), ToJSON (..))
import Data.Text (Text)
import GHC.Generics (Generic)
import Telegram.Bot.API.Internal.Utils

-- ** 'BotDescription'

-- | This object represents the bot's description.
newtype BotDescription = BotDescription
  { BotDescription -> Text
botDescriptionDescription :: Text -- ^ The bot's description.
  }
  deriving ((forall x. BotDescription -> Rep BotDescription x)
-> (forall x. Rep BotDescription x -> BotDescription)
-> Generic BotDescription
forall x. Rep BotDescription x -> BotDescription
forall x. BotDescription -> Rep BotDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. BotDescription -> Rep BotDescription x
from :: forall x. BotDescription -> Rep BotDescription x
$cto :: forall x. Rep BotDescription x -> BotDescription
to :: forall x. Rep BotDescription x -> BotDescription
Generic, Int -> BotDescription -> ShowS
[BotDescription] -> ShowS
BotDescription -> String
(Int -> BotDescription -> ShowS)
-> (BotDescription -> String)
-> ([BotDescription] -> ShowS)
-> Show BotDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> BotDescription -> ShowS
showsPrec :: Int -> BotDescription -> ShowS
$cshow :: BotDescription -> String
show :: BotDescription -> String
$cshowList :: [BotDescription] -> ShowS
showList :: [BotDescription] -> ShowS
Show)

instance ToJSON   BotDescription where toJSON :: BotDescription -> Value
toJSON = BotDescription -> Value
forall a (d :: Meta) (f :: * -> *).
(Generic a, GToJSON Zero (Rep a), Rep a ~ D1 d f, Datatype d) =>
a -> Value
gtoJSON
instance FromJSON BotDescription where parseJSON :: Value -> Parser BotDescription
parseJSON = Value -> Parser BotDescription
forall a (d :: Meta) (f :: * -> *).
(Generic a, GFromJSON Zero (Rep a), Rep a ~ D1 d f, Datatype d) =>
Value -> Parser a
gparseJSON