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

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

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

-- ** 'MessageAutoDeleteTimerChanged'

-- | This object represents a service message about a change in auto-delete timer settings.
data MessageAutoDeleteTimerChanged = MessageAutoDeleteTimerChanged
  { MessageAutoDeleteTimerChanged -> Seconds
messageAutoDeleteTimerChangedMessageAutoDeleteTime :: Seconds -- ^ New auto-delete time for messages in the chat; in seconds
  }
  deriving (forall x.
Rep MessageAutoDeleteTimerChanged x
-> MessageAutoDeleteTimerChanged
forall x.
MessageAutoDeleteTimerChanged
-> Rep MessageAutoDeleteTimerChanged x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep MessageAutoDeleteTimerChanged x
-> MessageAutoDeleteTimerChanged
$cfrom :: forall x.
MessageAutoDeleteTimerChanged
-> Rep MessageAutoDeleteTimerChanged x
Generic, Int -> MessageAutoDeleteTimerChanged -> ShowS
[MessageAutoDeleteTimerChanged] -> ShowS
MessageAutoDeleteTimerChanged -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MessageAutoDeleteTimerChanged] -> ShowS
$cshowList :: [MessageAutoDeleteTimerChanged] -> ShowS
show :: MessageAutoDeleteTimerChanged -> String
$cshow :: MessageAutoDeleteTimerChanged -> String
showsPrec :: Int -> MessageAutoDeleteTimerChanged -> ShowS
$cshowsPrec :: Int -> MessageAutoDeleteTimerChanged -> ShowS
Show)

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