module TD.Query.GetChatsToPostStories
  (GetChatsToPostStories(..)
  ) where

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

-- | Returns supergroup and channel chats in which the current user has the right to post stories. The chats must be rechecked with canPostStory before actually trying to post a story there. Returns 'TD.Data.Chats.Chats'
data GetChatsToPostStories
  = GetChatsToPostStories
  deriving (GetChatsToPostStories -> GetChatsToPostStories -> Bool
(GetChatsToPostStories -> GetChatsToPostStories -> Bool)
-> (GetChatsToPostStories -> GetChatsToPostStories -> Bool)
-> Eq GetChatsToPostStories
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GetChatsToPostStories -> GetChatsToPostStories -> Bool
== :: GetChatsToPostStories -> GetChatsToPostStories -> Bool
$c/= :: GetChatsToPostStories -> GetChatsToPostStories -> Bool
/= :: GetChatsToPostStories -> GetChatsToPostStories -> Bool
Eq, Int -> GetChatsToPostStories -> ShowS
[GetChatsToPostStories] -> ShowS
GetChatsToPostStories -> String
(Int -> GetChatsToPostStories -> ShowS)
-> (GetChatsToPostStories -> String)
-> ([GetChatsToPostStories] -> ShowS)
-> Show GetChatsToPostStories
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GetChatsToPostStories -> ShowS
showsPrec :: Int -> GetChatsToPostStories -> ShowS
$cshow :: GetChatsToPostStories -> String
show :: GetChatsToPostStories -> String
$cshowList :: [GetChatsToPostStories] -> ShowS
showList :: [GetChatsToPostStories] -> ShowS
Show)

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

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