module TD.Query.ToggleVideoChatEnabledStartNotification
(ToggleVideoChatEnabledStartNotification(..)
, defaultToggleVideoChatEnabledStartNotification
) where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as AT
import qualified TD.Lib.Internal as I
data ToggleVideoChatEnabledStartNotification
= ToggleVideoChatEnabledStartNotification
{ ToggleVideoChatEnabledStartNotification -> Maybe Int
group_call_id :: Maybe Int
, ToggleVideoChatEnabledStartNotification -> Maybe Bool
enabled_start_notification :: Maybe Bool
}
deriving (ToggleVideoChatEnabledStartNotification
-> ToggleVideoChatEnabledStartNotification -> Bool
(ToggleVideoChatEnabledStartNotification
-> ToggleVideoChatEnabledStartNotification -> Bool)
-> (ToggleVideoChatEnabledStartNotification
-> ToggleVideoChatEnabledStartNotification -> Bool)
-> Eq ToggleVideoChatEnabledStartNotification
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ToggleVideoChatEnabledStartNotification
-> ToggleVideoChatEnabledStartNotification -> Bool
== :: ToggleVideoChatEnabledStartNotification
-> ToggleVideoChatEnabledStartNotification -> Bool
$c/= :: ToggleVideoChatEnabledStartNotification
-> ToggleVideoChatEnabledStartNotification -> Bool
/= :: ToggleVideoChatEnabledStartNotification
-> ToggleVideoChatEnabledStartNotification -> Bool
Eq, Int -> ToggleVideoChatEnabledStartNotification -> ShowS
[ToggleVideoChatEnabledStartNotification] -> ShowS
ToggleVideoChatEnabledStartNotification -> String
(Int -> ToggleVideoChatEnabledStartNotification -> ShowS)
-> (ToggleVideoChatEnabledStartNotification -> String)
-> ([ToggleVideoChatEnabledStartNotification] -> ShowS)
-> Show ToggleVideoChatEnabledStartNotification
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ToggleVideoChatEnabledStartNotification -> ShowS
showsPrec :: Int -> ToggleVideoChatEnabledStartNotification -> ShowS
$cshow :: ToggleVideoChatEnabledStartNotification -> String
show :: ToggleVideoChatEnabledStartNotification -> String
$cshowList :: [ToggleVideoChatEnabledStartNotification] -> ShowS
showList :: [ToggleVideoChatEnabledStartNotification] -> ShowS
Show)
instance I.ShortShow ToggleVideoChatEnabledStartNotification where
shortShow :: ToggleVideoChatEnabledStartNotification -> String
shortShow
ToggleVideoChatEnabledStartNotification
{ group_call_id :: ToggleVideoChatEnabledStartNotification -> Maybe Int
group_call_id = Maybe Int
group_call_id_
, enabled_start_notification :: ToggleVideoChatEnabledStartNotification -> Maybe Bool
enabled_start_notification = Maybe Bool
enabled_start_notification_
}
= String
"ToggleVideoChatEnabledStartNotification"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"group_call_id" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
group_call_id_
, String
"enabled_start_notification" String -> Maybe Bool -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Bool
enabled_start_notification_
]
instance AT.ToJSON ToggleVideoChatEnabledStartNotification where
toJSON :: ToggleVideoChatEnabledStartNotification -> Value
toJSON
ToggleVideoChatEnabledStartNotification
{ group_call_id :: ToggleVideoChatEnabledStartNotification -> Maybe Int
group_call_id = Maybe Int
group_call_id_
, enabled_start_notification :: ToggleVideoChatEnabledStartNotification -> Maybe Bool
enabled_start_notification = Maybe Bool
enabled_start_notification_
}
= [Pair] -> Value
A.object
[ Key
"@type" Key -> Value -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Text -> Value
AT.String Text
"toggleVideoChatEnabledStartNotification"
, Key
"group_call_id" Key -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Int
group_call_id_
, Key
"enabled_start_notification" Key -> Maybe Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Bool
enabled_start_notification_
]
defaultToggleVideoChatEnabledStartNotification :: ToggleVideoChatEnabledStartNotification
defaultToggleVideoChatEnabledStartNotification :: ToggleVideoChatEnabledStartNotification
defaultToggleVideoChatEnabledStartNotification =
ToggleVideoChatEnabledStartNotification
{ group_call_id :: Maybe Int
group_call_id = Maybe Int
forall a. Maybe a
Nothing
, enabled_start_notification :: Maybe Bool
enabled_start_notification = Maybe Bool
forall a. Maybe a
Nothing
}