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

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

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

-- ** 'VideoChatEnded'

-- | This object represents a service message about a video chat ended in the chat.
data VideoChatEnded = VideoChatEnded
  { VideoChatEnded -> Seconds
videoChatEndedDuration :: Seconds -- ^ Video chat duration in seconds.
  }
  deriving (forall x. Rep VideoChatEnded x -> VideoChatEnded
forall x. VideoChatEnded -> Rep VideoChatEnded x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep VideoChatEnded x -> VideoChatEnded
$cfrom :: forall x. VideoChatEnded -> Rep VideoChatEnded x
Generic, Int -> VideoChatEnded -> ShowS
[VideoChatEnded] -> ShowS
VideoChatEnded -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VideoChatEnded] -> ShowS
$cshowList :: [VideoChatEnded] -> ShowS
show :: VideoChatEnded -> String
$cshow :: VideoChatEnded -> String
showsPrec :: Int -> VideoChatEnded -> ShowS
$cshowsPrec :: Int -> VideoChatEnded -> ShowS
Show)

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


-- ** 'VideoChatParticipantsInvited'

data VideoChatParticipantsInvited = VideoChatParticipantsInvited
  { VideoChatParticipantsInvited -> Maybe [User]
videoChatParticipantsInvitedUsers :: Maybe [User] -- ^ New members that were invited to the video chat.
  }
  deriving (forall x.
Rep VideoChatParticipantsInvited x -> VideoChatParticipantsInvited
forall x.
VideoChatParticipantsInvited -> Rep VideoChatParticipantsInvited x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep VideoChatParticipantsInvited x -> VideoChatParticipantsInvited
$cfrom :: forall x.
VideoChatParticipantsInvited -> Rep VideoChatParticipantsInvited x
Generic, Int -> VideoChatParticipantsInvited -> ShowS
[VideoChatParticipantsInvited] -> ShowS
VideoChatParticipantsInvited -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VideoChatParticipantsInvited] -> ShowS
$cshowList :: [VideoChatParticipantsInvited] -> ShowS
show :: VideoChatParticipantsInvited -> String
$cshow :: VideoChatParticipantsInvited -> String
showsPrec :: Int -> VideoChatParticipantsInvited -> ShowS
$cshowsPrec :: Int -> VideoChatParticipantsInvited -> ShowS
Show)

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