module TD.Query.GetSuitableCommunityChats
  (GetSuitableCommunityChats(..)
  ) where

import qualified Data.Aeson as A
import qualified Data.Aeson.Types as AT
import qualified TD.Lib.Internal as I

-- | Returns a list of supergroup and channel chats owned by the current user, which can be added to a community. Returns 'TD.Data.Chats.Chats'
data GetSuitableCommunityChats
  = GetSuitableCommunityChats
  deriving (GetSuitableCommunityChats -> GetSuitableCommunityChats -> Bool
(GetSuitableCommunityChats -> GetSuitableCommunityChats -> Bool)
-> (GetSuitableCommunityChats -> GetSuitableCommunityChats -> Bool)
-> Eq GetSuitableCommunityChats
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GetSuitableCommunityChats -> GetSuitableCommunityChats -> Bool
== :: GetSuitableCommunityChats -> GetSuitableCommunityChats -> Bool
$c/= :: GetSuitableCommunityChats -> GetSuitableCommunityChats -> Bool
/= :: GetSuitableCommunityChats -> GetSuitableCommunityChats -> Bool
Eq, Int -> GetSuitableCommunityChats -> ShowS
[GetSuitableCommunityChats] -> ShowS
GetSuitableCommunityChats -> String
(Int -> GetSuitableCommunityChats -> ShowS)
-> (GetSuitableCommunityChats -> String)
-> ([GetSuitableCommunityChats] -> ShowS)
-> Show GetSuitableCommunityChats
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GetSuitableCommunityChats -> ShowS
showsPrec :: Int -> GetSuitableCommunityChats -> ShowS
$cshow :: GetSuitableCommunityChats -> String
show :: GetSuitableCommunityChats -> String
$cshowList :: [GetSuitableCommunityChats] -> ShowS
showList :: [GetSuitableCommunityChats] -> ShowS
Show)

instance I.ShortShow GetSuitableCommunityChats where
  shortShow :: GetSuitableCommunityChats -> String
shortShow
    GetSuitableCommunityChats
GetSuitableCommunityChats
        = String
"GetSuitableCommunityChats"

instance AT.ToJSON GetSuitableCommunityChats where
  toJSON :: GetSuitableCommunityChats -> Value
toJSON
    GetSuitableCommunityChats
GetSuitableCommunityChats
        = [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
"getSuitableCommunityChats"
          ]