module TD.Query.GetInactiveSupergroupChats
  (GetInactiveSupergroupChats(..)
  ) 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 recently inactive supergroups and channels. Can be used when user reaches limit on the number of joined supergroups and channels and receives CHANNELS_TOO_MUCH error. Also, the limit can be increased with Telegram Premium. Returns 'TD.Data.Chats.Chats'
data GetInactiveSupergroupChats
  = GetInactiveSupergroupChats
  deriving (GetInactiveSupergroupChats -> GetInactiveSupergroupChats -> Bool
(GetInactiveSupergroupChats -> GetInactiveSupergroupChats -> Bool)
-> (GetInactiveSupergroupChats
    -> GetInactiveSupergroupChats -> Bool)
-> Eq GetInactiveSupergroupChats
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GetInactiveSupergroupChats -> GetInactiveSupergroupChats -> Bool
== :: GetInactiveSupergroupChats -> GetInactiveSupergroupChats -> Bool
$c/= :: GetInactiveSupergroupChats -> GetInactiveSupergroupChats -> Bool
/= :: GetInactiveSupergroupChats -> GetInactiveSupergroupChats -> Bool
Eq, Int -> GetInactiveSupergroupChats -> ShowS
[GetInactiveSupergroupChats] -> ShowS
GetInactiveSupergroupChats -> String
(Int -> GetInactiveSupergroupChats -> ShowS)
-> (GetInactiveSupergroupChats -> String)
-> ([GetInactiveSupergroupChats] -> ShowS)
-> Show GetInactiveSupergroupChats
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GetInactiveSupergroupChats -> ShowS
showsPrec :: Int -> GetInactiveSupergroupChats -> ShowS
$cshow :: GetInactiveSupergroupChats -> String
show :: GetInactiveSupergroupChats -> String
$cshowList :: [GetInactiveSupergroupChats] -> ShowS
showList :: [GetInactiveSupergroupChats] -> ShowS
Show)

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

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