module TD.Query.GetChatInviteLinkMembers
(GetChatInviteLinkMembers(..)
, defaultGetChatInviteLinkMembers
) 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
import qualified TD.Data.ChatInviteLinkMember as ChatInviteLinkMember
data GetChatInviteLinkMembers
= GetChatInviteLinkMembers
{ GetChatInviteLinkMembers -> Maybe Int
chat_id :: Maybe Int
, GetChatInviteLinkMembers -> Maybe Text
invite_link :: Maybe T.Text
, GetChatInviteLinkMembers -> Maybe Bool
only_with_expired_subscription :: Maybe Bool
, GetChatInviteLinkMembers -> Maybe ChatInviteLinkMember
offset_member :: Maybe ChatInviteLinkMember.ChatInviteLinkMember
, GetChatInviteLinkMembers -> Maybe Int
limit :: Maybe Int
}
deriving (GetChatInviteLinkMembers -> GetChatInviteLinkMembers -> Bool
(GetChatInviteLinkMembers -> GetChatInviteLinkMembers -> Bool)
-> (GetChatInviteLinkMembers -> GetChatInviteLinkMembers -> Bool)
-> Eq GetChatInviteLinkMembers
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GetChatInviteLinkMembers -> GetChatInviteLinkMembers -> Bool
== :: GetChatInviteLinkMembers -> GetChatInviteLinkMembers -> Bool
$c/= :: GetChatInviteLinkMembers -> GetChatInviteLinkMembers -> Bool
/= :: GetChatInviteLinkMembers -> GetChatInviteLinkMembers -> Bool
Eq, Int -> GetChatInviteLinkMembers -> ShowS
[GetChatInviteLinkMembers] -> ShowS
GetChatInviteLinkMembers -> String
(Int -> GetChatInviteLinkMembers -> ShowS)
-> (GetChatInviteLinkMembers -> String)
-> ([GetChatInviteLinkMembers] -> ShowS)
-> Show GetChatInviteLinkMembers
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GetChatInviteLinkMembers -> ShowS
showsPrec :: Int -> GetChatInviteLinkMembers -> ShowS
$cshow :: GetChatInviteLinkMembers -> String
show :: GetChatInviteLinkMembers -> String
$cshowList :: [GetChatInviteLinkMembers] -> ShowS
showList :: [GetChatInviteLinkMembers] -> ShowS
Show)
instance I.ShortShow GetChatInviteLinkMembers where
shortShow :: GetChatInviteLinkMembers -> String
shortShow
GetChatInviteLinkMembers
{ chat_id :: GetChatInviteLinkMembers -> Maybe Int
chat_id = Maybe Int
chat_id_
, invite_link :: GetChatInviteLinkMembers -> Maybe Text
invite_link = Maybe Text
invite_link_
, only_with_expired_subscription :: GetChatInviteLinkMembers -> Maybe Bool
only_with_expired_subscription = Maybe Bool
only_with_expired_subscription_
, offset_member :: GetChatInviteLinkMembers -> Maybe ChatInviteLinkMember
offset_member = Maybe ChatInviteLinkMember
offset_member_
, limit :: GetChatInviteLinkMembers -> Maybe Int
limit = Maybe Int
limit_
}
= String
"GetChatInviteLinkMembers"
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_
, String
"invite_link" String -> Maybe Text -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Text
invite_link_
, String
"only_with_expired_subscription" String -> Maybe Bool -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Bool
only_with_expired_subscription_
, String
"offset_member" String -> Maybe ChatInviteLinkMember -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe ChatInviteLinkMember
offset_member_
, String
"limit" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
limit_
]
instance AT.ToJSON GetChatInviteLinkMembers where
toJSON :: GetChatInviteLinkMembers -> Value
toJSON
GetChatInviteLinkMembers
{ chat_id :: GetChatInviteLinkMembers -> Maybe Int
chat_id = Maybe Int
chat_id_
, invite_link :: GetChatInviteLinkMembers -> Maybe Text
invite_link = Maybe Text
invite_link_
, only_with_expired_subscription :: GetChatInviteLinkMembers -> Maybe Bool
only_with_expired_subscription = Maybe Bool
only_with_expired_subscription_
, offset_member :: GetChatInviteLinkMembers -> Maybe ChatInviteLinkMember
offset_member = Maybe ChatInviteLinkMember
offset_member_
, limit :: GetChatInviteLinkMembers -> Maybe Int
limit = Maybe Int
limit_
}
= [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
"getChatInviteLinkMembers"
, 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_
, 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_
, Key
"only_with_expired_subscription" Key -> Maybe Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Bool
only_with_expired_subscription_
, Key
"offset_member" Key -> Maybe ChatInviteLinkMember -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe ChatInviteLinkMember
offset_member_
, Key
"limit" Key -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Int
limit_
]
defaultGetChatInviteLinkMembers :: GetChatInviteLinkMembers
defaultGetChatInviteLinkMembers :: GetChatInviteLinkMembers
defaultGetChatInviteLinkMembers =
GetChatInviteLinkMembers
{ chat_id :: Maybe Int
chat_id = Maybe Int
forall a. Maybe a
Nothing
, invite_link :: Maybe Text
invite_link = Maybe Text
forall a. Maybe a
Nothing
, only_with_expired_subscription :: Maybe Bool
only_with_expired_subscription = Maybe Bool
forall a. Maybe a
Nothing
, offset_member :: Maybe ChatInviteLinkMember
offset_member = Maybe ChatInviteLinkMember
forall a. Maybe a
Nothing
, limit :: Maybe Int
limit = Maybe Int
forall a. Maybe a
Nothing
}