module TD.Query.GetLogStream
  (GetLogStream(..)
  ) where

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

-- | Returns information about currently used log stream for internal logging of TDLib. Can be called synchronously. Returns 'TD.Data.LogStream.LogStream'
data GetLogStream
  = GetLogStream
  deriving (GetLogStream -> GetLogStream -> Bool
(GetLogStream -> GetLogStream -> Bool)
-> (GetLogStream -> GetLogStream -> Bool) -> Eq GetLogStream
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GetLogStream -> GetLogStream -> Bool
== :: GetLogStream -> GetLogStream -> Bool
$c/= :: GetLogStream -> GetLogStream -> Bool
/= :: GetLogStream -> GetLogStream -> Bool
Eq, Int -> GetLogStream -> ShowS
[GetLogStream] -> ShowS
GetLogStream -> String
(Int -> GetLogStream -> ShowS)
-> (GetLogStream -> String)
-> ([GetLogStream] -> ShowS)
-> Show GetLogStream
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GetLogStream -> ShowS
showsPrec :: Int -> GetLogStream -> ShowS
$cshow :: GetLogStream -> String
show :: GetLogStream -> String
$cshowList :: [GetLogStream] -> ShowS
showList :: [GetLogStream] -> ShowS
Show)

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

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