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