module TD.Query.GetLogTags
  (GetLogTags(..)
  ) where

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

-- | Returns the list of available TDLib internal log tags, for example, ["actor", "binlog", "connections", "notifications", "proxy"]. Can be called synchronously. Returns 'TD.Data.LogTags.LogTags'
data GetLogTags
  = GetLogTags
  deriving (GetLogTags -> GetLogTags -> Bool
(GetLogTags -> GetLogTags -> Bool)
-> (GetLogTags -> GetLogTags -> Bool) -> Eq GetLogTags
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GetLogTags -> GetLogTags -> Bool
== :: GetLogTags -> GetLogTags -> Bool
$c/= :: GetLogTags -> GetLogTags -> Bool
/= :: GetLogTags -> GetLogTags -> Bool
Eq, Int -> GetLogTags -> ShowS
[GetLogTags] -> ShowS
GetLogTags -> String
(Int -> GetLogTags -> ShowS)
-> (GetLogTags -> String)
-> ([GetLogTags] -> ShowS)
-> Show GetLogTags
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GetLogTags -> ShowS
showsPrec :: Int -> GetLogTags -> ShowS
$cshow :: GetLogTags -> String
show :: GetLogTags -> String
$cshowList :: [GetLogTags] -> ShowS
showList :: [GetLogTags] -> ShowS
Show)

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

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