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

import Data.Aeson (FromJSON (..), ToJSON (..))
import Data.Text (Text)
import GHC.Generics (Generic)

import Telegram.Bot.API.Internal.Utils

-- ** 'ForumTopicEdited'

-- | This object represents a service message about an edited forum topic.
data ForumTopicEdited = ForumTopicEdited
  { ForumTopicEdited -> Maybe Text
forumTopicEditedName              :: Maybe Text -- ^ New name of the topic, if it was edited.
  , ForumTopicEdited -> Maybe Text
forumTopicEditedIconCustomEmojiId :: Maybe Text -- ^ New identifier of the custom emoji shown as the topic icon, if it was edited; an empty string if the icon was removed.
  }
  deriving (forall x. Rep ForumTopicEdited x -> ForumTopicEdited
forall x. ForumTopicEdited -> Rep ForumTopicEdited x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ForumTopicEdited x -> ForumTopicEdited
$cfrom :: forall x. ForumTopicEdited -> Rep ForumTopicEdited x
Generic, Int -> ForumTopicEdited -> ShowS
[ForumTopicEdited] -> ShowS
ForumTopicEdited -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ForumTopicEdited] -> ShowS
$cshowList :: [ForumTopicEdited] -> ShowS
show :: ForumTopicEdited -> String
$cshow :: ForumTopicEdited -> String
showsPrec :: Int -> ForumTopicEdited -> ShowS
$cshowsPrec :: Int -> ForumTopicEdited -> ShowS
Show)

instance ToJSON   ForumTopicEdited where toJSON :: ForumTopicEdited -> 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 ForumTopicEdited where parseJSON :: Value -> Parser ForumTopicEdited
parseJSON = forall a (d :: Meta) (f :: * -> *).
(Generic a, GFromJSON Zero (Rep a), Rep a ~ D1 d f, Datatype d) =>
Value -> Parser a
gparseJSON