module TD.Query.DeleteChatFolderInviteLink
(DeleteChatFolderInviteLink(..)
, defaultDeleteChatFolderInviteLink
) where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as AT
import qualified TD.Lib.Internal as I
import qualified Data.Text as T
data DeleteChatFolderInviteLink
= DeleteChatFolderInviteLink
{ DeleteChatFolderInviteLink -> Maybe Int
chat_folder_id :: Maybe Int
, DeleteChatFolderInviteLink -> Maybe Text
invite_link :: Maybe T.Text
}
deriving (DeleteChatFolderInviteLink -> DeleteChatFolderInviteLink -> Bool
(DeleteChatFolderInviteLink -> DeleteChatFolderInviteLink -> Bool)
-> (DeleteChatFolderInviteLink
-> DeleteChatFolderInviteLink -> Bool)
-> Eq DeleteChatFolderInviteLink
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DeleteChatFolderInviteLink -> DeleteChatFolderInviteLink -> Bool
== :: DeleteChatFolderInviteLink -> DeleteChatFolderInviteLink -> Bool
$c/= :: DeleteChatFolderInviteLink -> DeleteChatFolderInviteLink -> Bool
/= :: DeleteChatFolderInviteLink -> DeleteChatFolderInviteLink -> Bool
Eq, Int -> DeleteChatFolderInviteLink -> ShowS
[DeleteChatFolderInviteLink] -> ShowS
DeleteChatFolderInviteLink -> String
(Int -> DeleteChatFolderInviteLink -> ShowS)
-> (DeleteChatFolderInviteLink -> String)
-> ([DeleteChatFolderInviteLink] -> ShowS)
-> Show DeleteChatFolderInviteLink
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DeleteChatFolderInviteLink -> ShowS
showsPrec :: Int -> DeleteChatFolderInviteLink -> ShowS
$cshow :: DeleteChatFolderInviteLink -> String
show :: DeleteChatFolderInviteLink -> String
$cshowList :: [DeleteChatFolderInviteLink] -> ShowS
showList :: [DeleteChatFolderInviteLink] -> ShowS
Show)
instance I.ShortShow DeleteChatFolderInviteLink where
shortShow :: DeleteChatFolderInviteLink -> String
shortShow
DeleteChatFolderInviteLink
{ chat_folder_id :: DeleteChatFolderInviteLink -> Maybe Int
chat_folder_id = Maybe Int
chat_folder_id_
, invite_link :: DeleteChatFolderInviteLink -> Maybe Text
invite_link = Maybe Text
invite_link_
}
= String
"DeleteChatFolderInviteLink"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"chat_folder_id" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
chat_folder_id_
, String
"invite_link" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
invite_link_
]
instance AT.ToJSON DeleteChatFolderInviteLink where
toJSON :: DeleteChatFolderInviteLink -> Value
toJSON
DeleteChatFolderInviteLink
{ chat_folder_id :: DeleteChatFolderInviteLink -> Maybe Int
chat_folder_id = Maybe Int
chat_folder_id_
, invite_link :: DeleteChatFolderInviteLink -> Maybe Text
invite_link = Maybe Text
invite_link_
}
= [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
"deleteChatFolderInviteLink"
, Key
"chat_folder_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_folder_id_
, Key
"invite_link" Key -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Text
invite_link_
]
defaultDeleteChatFolderInviteLink :: DeleteChatFolderInviteLink
defaultDeleteChatFolderInviteLink :: DeleteChatFolderInviteLink
defaultDeleteChatFolderInviteLink =
DeleteChatFolderInviteLink
{ chat_folder_id :: Maybe Int
chat_folder_id = Maybe Int
forall a. Maybe a
Nothing
, invite_link :: Maybe Text
invite_link = Maybe Text
forall a. Maybe a
Nothing
}