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

import Data.Aeson (FromJSON (..), ToJSON (..))
import Data.Time.Clock.POSIX (POSIXTime)
import GHC.Generics (Generic)

import Telegram.Bot.API.Internal.Utils

-- ** 'VideoChatScheduled'

-- | This object represents a service message about a video chat scheduled in the chat.
data VideoChatScheduled = VideoChatScheduled
  { VideoChatScheduled -> POSIXTime
videoChatScheduledStartDate :: POSIXTime -- ^ Point in time (Unix timestamp) when the video chat is supposed to be started by a chat administrator.
  }
  deriving ((forall x. VideoChatScheduled -> Rep VideoChatScheduled x)
-> (forall x. Rep VideoChatScheduled x -> VideoChatScheduled)
-> Generic VideoChatScheduled
forall x. Rep VideoChatScheduled x -> VideoChatScheduled
forall x. VideoChatScheduled -> Rep VideoChatScheduled x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. VideoChatScheduled -> Rep VideoChatScheduled x
from :: forall x. VideoChatScheduled -> Rep VideoChatScheduled x
$cto :: forall x. Rep VideoChatScheduled x -> VideoChatScheduled
to :: forall x. Rep VideoChatScheduled x -> VideoChatScheduled
Generic, Int -> VideoChatScheduled -> ShowS
[VideoChatScheduled] -> ShowS
VideoChatScheduled -> String
(Int -> VideoChatScheduled -> ShowS)
-> (VideoChatScheduled -> String)
-> ([VideoChatScheduled] -> ShowS)
-> Show VideoChatScheduled
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> VideoChatScheduled -> ShowS
showsPrec :: Int -> VideoChatScheduled -> ShowS
$cshow :: VideoChatScheduled -> String
show :: VideoChatScheduled -> String
$cshowList :: [VideoChatScheduled] -> ShowS
showList :: [VideoChatScheduled] -> ShowS
Show)

instance ToJSON   VideoChatScheduled where toJSON :: VideoChatScheduled -> Value
toJSON = VideoChatScheduled -> Value
forall a (d :: Meta) (f :: * -> *).
(Generic a, GToJSON Zero (Rep a), Rep a ~ D1 d f, Datatype d) =>
a -> Value
gtoJSON
instance FromJSON VideoChatScheduled where parseJSON :: Value -> Parser VideoChatScheduled
parseJSON = Value -> Parser VideoChatScheduled
forall a (d :: Meta) (f :: * -> *).
(Generic a, GFromJSON Zero (Rep a), Rep a ~ D1 d f, Datatype d) =>
Value -> Parser a
gparseJSON