module TD.Query.ReplaceVideoChatRtmpUrl
(ReplaceVideoChatRtmpUrl(..)
) where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as AT
import qualified TD.Lib.Internal as I
data ReplaceVideoChatRtmpUrl
= ReplaceVideoChatRtmpUrl
{ ReplaceVideoChatRtmpUrl -> Maybe Int
chat_id :: Maybe Int
}
deriving (ReplaceVideoChatRtmpUrl -> ReplaceVideoChatRtmpUrl -> Bool
(ReplaceVideoChatRtmpUrl -> ReplaceVideoChatRtmpUrl -> Bool)
-> (ReplaceVideoChatRtmpUrl -> ReplaceVideoChatRtmpUrl -> Bool)
-> Eq ReplaceVideoChatRtmpUrl
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ReplaceVideoChatRtmpUrl -> ReplaceVideoChatRtmpUrl -> Bool
== :: ReplaceVideoChatRtmpUrl -> ReplaceVideoChatRtmpUrl -> Bool
$c/= :: ReplaceVideoChatRtmpUrl -> ReplaceVideoChatRtmpUrl -> Bool
/= :: ReplaceVideoChatRtmpUrl -> ReplaceVideoChatRtmpUrl -> Bool
Eq, Int -> ReplaceVideoChatRtmpUrl -> ShowS
[ReplaceVideoChatRtmpUrl] -> ShowS
ReplaceVideoChatRtmpUrl -> String
(Int -> ReplaceVideoChatRtmpUrl -> ShowS)
-> (ReplaceVideoChatRtmpUrl -> String)
-> ([ReplaceVideoChatRtmpUrl] -> ShowS)
-> Show ReplaceVideoChatRtmpUrl
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ReplaceVideoChatRtmpUrl -> ShowS
showsPrec :: Int -> ReplaceVideoChatRtmpUrl -> ShowS
$cshow :: ReplaceVideoChatRtmpUrl -> String
show :: ReplaceVideoChatRtmpUrl -> String
$cshowList :: [ReplaceVideoChatRtmpUrl] -> ShowS
showList :: [ReplaceVideoChatRtmpUrl] -> ShowS
Show)
instance I.ShortShow ReplaceVideoChatRtmpUrl where
shortShow :: ReplaceVideoChatRtmpUrl -> String
shortShow
ReplaceVideoChatRtmpUrl
{ chat_id :: ReplaceVideoChatRtmpUrl -> Maybe Int
chat_id = Maybe Int
chat_id_
}
= String
"ReplaceVideoChatRtmpUrl"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"chat_id" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
chat_id_
]
instance AT.ToJSON ReplaceVideoChatRtmpUrl where
toJSON :: ReplaceVideoChatRtmpUrl -> Value
toJSON
ReplaceVideoChatRtmpUrl
{ chat_id :: ReplaceVideoChatRtmpUrl -> Maybe Int
chat_id = Maybe Int
chat_id_
}
= [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
"replaceVideoChatRtmpUrl"
, Key
"chat_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
chat_id_
]