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

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

import Telegram.Bot.API.Types.Common
import Telegram.Bot.API.Internal.Utils

-- ** 'CopyMessageId'

-- | This object represents result of copyMessage request.
data CopyMessageId = CopyMessageId
  { CopyMessageId -> MessageId
copyMessageIdMessageId :: MessageId -- ^ the MessageId of the sent message.
  }
  deriving (forall x. Rep CopyMessageId x -> CopyMessageId
forall x. CopyMessageId -> Rep CopyMessageId x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CopyMessageId x -> CopyMessageId
$cfrom :: forall x. CopyMessageId -> Rep CopyMessageId x
Generic, Int -> CopyMessageId -> ShowS
[CopyMessageId] -> ShowS
CopyMessageId -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CopyMessageId] -> ShowS
$cshowList :: [CopyMessageId] -> ShowS
show :: CopyMessageId -> String
$cshow :: CopyMessageId -> String
showsPrec :: Int -> CopyMessageId -> ShowS
$cshowsPrec :: Int -> CopyMessageId -> ShowS
Show)

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