module TD.Query.SetLogVerbosityLevel
(SetLogVerbosityLevel(..)
) where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as AT
import qualified TD.Lib.Internal as I
data SetLogVerbosityLevel
= SetLogVerbosityLevel
{ SetLogVerbosityLevel -> Maybe Int
new_verbosity_level :: Maybe Int
}
deriving (SetLogVerbosityLevel -> SetLogVerbosityLevel -> Bool
(SetLogVerbosityLevel -> SetLogVerbosityLevel -> Bool)
-> (SetLogVerbosityLevel -> SetLogVerbosityLevel -> Bool)
-> Eq SetLogVerbosityLevel
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SetLogVerbosityLevel -> SetLogVerbosityLevel -> Bool
== :: SetLogVerbosityLevel -> SetLogVerbosityLevel -> Bool
$c/= :: SetLogVerbosityLevel -> SetLogVerbosityLevel -> Bool
/= :: SetLogVerbosityLevel -> SetLogVerbosityLevel -> Bool
Eq, Int -> SetLogVerbosityLevel -> ShowS
[SetLogVerbosityLevel] -> ShowS
SetLogVerbosityLevel -> String
(Int -> SetLogVerbosityLevel -> ShowS)
-> (SetLogVerbosityLevel -> String)
-> ([SetLogVerbosityLevel] -> ShowS)
-> Show SetLogVerbosityLevel
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SetLogVerbosityLevel -> ShowS
showsPrec :: Int -> SetLogVerbosityLevel -> ShowS
$cshow :: SetLogVerbosityLevel -> String
show :: SetLogVerbosityLevel -> String
$cshowList :: [SetLogVerbosityLevel] -> ShowS
showList :: [SetLogVerbosityLevel] -> ShowS
Show)
instance I.ShortShow SetLogVerbosityLevel where
shortShow :: SetLogVerbosityLevel -> String
shortShow
SetLogVerbosityLevel
{ new_verbosity_level :: SetLogVerbosityLevel -> Maybe Int
new_verbosity_level = Maybe Int
new_verbosity_level_
}
= String
"SetLogVerbosityLevel"
String -> ShowS
forall a. [a] -> [a] -> [a]
++ [String] -> String
I.cc
[ String
"new_verbosity_level" String -> Maybe Int -> String
forall a. ShortShow a => String -> Maybe a -> String
`I.p` Maybe Int
new_verbosity_level_
]
instance AT.ToJSON SetLogVerbosityLevel where
toJSON :: SetLogVerbosityLevel -> Value
toJSON
SetLogVerbosityLevel
{ new_verbosity_level :: SetLogVerbosityLevel -> Maybe Int
new_verbosity_level = Maybe Int
new_verbosity_level_
}
= [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
"setLogVerbosityLevel"
, Key
"new_verbosity_level" Key -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> Pair
A..= Maybe Int
new_verbosity_level_
]