{-# 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.
newtype VideoChatEnded = VideoChatEnded
  { VideoChatEnded -> Seconds
videoChatEndedDuration :: Seconds -- ^ Video chat duration in seconds.
  }
  deriving ((forall x. VideoChatEnded -> Rep VideoChatEnded x)
-> (forall x. Rep VideoChatEnded x -> VideoChatEnded)
-> Generic VideoChatEnded
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
$cfrom :: forall x. VideoChatEnded -> Rep VideoChatEnded x
from :: forall x. VideoChatEnded -> Rep VideoChatEnded x
$cto :: forall x. Rep VideoChatEnded x -> VideoChatEnded
to :: forall x. Rep VideoChatEnded x -> VideoChatEnded
Generic, Int -> VideoChatEnded -> ShowS
[VideoChatEnded] -> ShowS
VideoChatEnded -> String
(Int -> VideoChatEnded -> ShowS)
-> (VideoChatEnded -> String)
-> ([VideoChatEnded] -> ShowS)
-> Show VideoChatEnded
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> VideoChatEnded -> ShowS
showsPrec :: Int -> VideoChatEnded -> ShowS
$cshow :: VideoChatEnded -> String
show :: VideoChatEnded -> String
$cshowList :: [VideoChatEnded] -> ShowS
showList :: [VideoChatEnded] -> ShowS
Show)

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


-- ** 'VideoChatParticipantsInvited'

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

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