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