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