{-# 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. ForumTopicEdited -> Rep ForumTopicEdited x)
-> (forall x. Rep ForumTopicEdited x -> ForumTopicEdited)
-> Generic ForumTopicEdited
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
$cfrom :: forall x. ForumTopicEdited -> Rep ForumTopicEdited x
from :: forall x. ForumTopicEdited -> Rep ForumTopicEdited x
$cto :: forall x. Rep ForumTopicEdited x -> ForumTopicEdited
to :: forall x. Rep ForumTopicEdited x -> ForumTopicEdited
Generic, Int -> ForumTopicEdited -> ShowS
[ForumTopicEdited] -> ShowS
ForumTopicEdited -> String
(Int -> ForumTopicEdited -> ShowS)
-> (ForumTopicEdited -> String)
-> ([ForumTopicEdited] -> ShowS)
-> Show ForumTopicEdited
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ForumTopicEdited -> ShowS
showsPrec :: Int -> ForumTopicEdited -> ShowS
$cshow :: ForumTopicEdited -> String
show :: ForumTopicEdited -> String
$cshowList :: [ForumTopicEdited] -> ShowS
showList :: [ForumTopicEdited] -> ShowS
Show)

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