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

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