{-# 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. 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
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 = 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 = forall a (d :: Meta) (f :: * -> *).
(Generic a, GFromJSON Zero (Rep a), Rep a ~ D1 d f, Datatype d) =>
Value -> Parser a
gparseJSON