{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Transcribe.Types.LanguageModel where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Transcribe.Types.BaseModelName
import Amazonka.Transcribe.Types.CLMLanguageCode
import Amazonka.Transcribe.Types.InputDataConfig
import Amazonka.Transcribe.Types.ModelStatus
data LanguageModel = LanguageModel'
{
LanguageModel -> Maybe Text
failureReason :: Prelude.Maybe Prelude.Text,
LanguageModel -> Maybe CLMLanguageCode
languageCode :: Prelude.Maybe CLMLanguageCode,
LanguageModel -> Maybe Text
modelName :: Prelude.Maybe Prelude.Text,
LanguageModel -> Maybe POSIX
lastModifiedTime :: Prelude.Maybe Core.POSIX,
LanguageModel -> Maybe Bool
upgradeAvailability :: Prelude.Maybe Prelude.Bool,
LanguageModel -> Maybe InputDataConfig
inputDataConfig :: Prelude.Maybe InputDataConfig,
LanguageModel -> Maybe BaseModelName
baseModelName :: Prelude.Maybe BaseModelName,
LanguageModel -> Maybe ModelStatus
modelStatus :: Prelude.Maybe ModelStatus,
LanguageModel -> Maybe POSIX
createTime :: Prelude.Maybe Core.POSIX
}
deriving (LanguageModel -> LanguageModel -> Bool
(LanguageModel -> LanguageModel -> Bool)
-> (LanguageModel -> LanguageModel -> Bool) -> Eq LanguageModel
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LanguageModel -> LanguageModel -> Bool
$c/= :: LanguageModel -> LanguageModel -> Bool
== :: LanguageModel -> LanguageModel -> Bool
$c== :: LanguageModel -> LanguageModel -> Bool
Prelude.Eq, ReadPrec [LanguageModel]
ReadPrec LanguageModel
Int -> ReadS LanguageModel
ReadS [LanguageModel]
(Int -> ReadS LanguageModel)
-> ReadS [LanguageModel]
-> ReadPrec LanguageModel
-> ReadPrec [LanguageModel]
-> Read LanguageModel
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LanguageModel]
$creadListPrec :: ReadPrec [LanguageModel]
readPrec :: ReadPrec LanguageModel
$creadPrec :: ReadPrec LanguageModel
readList :: ReadS [LanguageModel]
$creadList :: ReadS [LanguageModel]
readsPrec :: Int -> ReadS LanguageModel
$creadsPrec :: Int -> ReadS LanguageModel
Prelude.Read, Int -> LanguageModel -> ShowS
[LanguageModel] -> ShowS
LanguageModel -> String
(Int -> LanguageModel -> ShowS)
-> (LanguageModel -> String)
-> ([LanguageModel] -> ShowS)
-> Show LanguageModel
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LanguageModel] -> ShowS
$cshowList :: [LanguageModel] -> ShowS
show :: LanguageModel -> String
$cshow :: LanguageModel -> String
showsPrec :: Int -> LanguageModel -> ShowS
$cshowsPrec :: Int -> LanguageModel -> ShowS
Prelude.Show, (forall x. LanguageModel -> Rep LanguageModel x)
-> (forall x. Rep LanguageModel x -> LanguageModel)
-> Generic LanguageModel
forall x. Rep LanguageModel x -> LanguageModel
forall x. LanguageModel -> Rep LanguageModel x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LanguageModel x -> LanguageModel
$cfrom :: forall x. LanguageModel -> Rep LanguageModel x
Prelude.Generic)
newLanguageModel ::
LanguageModel
newLanguageModel :: LanguageModel
newLanguageModel =
LanguageModel' :: Maybe Text
-> Maybe CLMLanguageCode
-> Maybe Text
-> Maybe POSIX
-> Maybe Bool
-> Maybe InputDataConfig
-> Maybe BaseModelName
-> Maybe ModelStatus
-> Maybe POSIX
-> LanguageModel
LanguageModel'
{ $sel:failureReason:LanguageModel' :: Maybe Text
failureReason = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:languageCode:LanguageModel' :: Maybe CLMLanguageCode
languageCode = Maybe CLMLanguageCode
forall a. Maybe a
Prelude.Nothing,
$sel:modelName:LanguageModel' :: Maybe Text
modelName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lastModifiedTime:LanguageModel' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:upgradeAvailability:LanguageModel' :: Maybe Bool
upgradeAvailability = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:inputDataConfig:LanguageModel' :: Maybe InputDataConfig
inputDataConfig = Maybe InputDataConfig
forall a. Maybe a
Prelude.Nothing,
$sel:baseModelName:LanguageModel' :: Maybe BaseModelName
baseModelName = Maybe BaseModelName
forall a. Maybe a
Prelude.Nothing,
$sel:modelStatus:LanguageModel' :: Maybe ModelStatus
modelStatus = Maybe ModelStatus
forall a. Maybe a
Prelude.Nothing,
$sel:createTime:LanguageModel' :: Maybe POSIX
createTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
}
languageModel_failureReason :: Lens.Lens' LanguageModel (Prelude.Maybe Prelude.Text)
languageModel_failureReason :: (Maybe Text -> f (Maybe Text)) -> LanguageModel -> f LanguageModel
languageModel_failureReason = (LanguageModel -> Maybe Text)
-> (LanguageModel -> Maybe Text -> LanguageModel)
-> Lens LanguageModel LanguageModel (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LanguageModel' {Maybe Text
failureReason :: Maybe Text
$sel:failureReason:LanguageModel' :: LanguageModel -> Maybe Text
failureReason} -> Maybe Text
failureReason) (\s :: LanguageModel
s@LanguageModel' {} Maybe Text
a -> LanguageModel
s {$sel:failureReason:LanguageModel' :: Maybe Text
failureReason = Maybe Text
a} :: LanguageModel)
languageModel_languageCode :: Lens.Lens' LanguageModel (Prelude.Maybe CLMLanguageCode)
languageModel_languageCode :: (Maybe CLMLanguageCode -> f (Maybe CLMLanguageCode))
-> LanguageModel -> f LanguageModel
languageModel_languageCode = (LanguageModel -> Maybe CLMLanguageCode)
-> (LanguageModel -> Maybe CLMLanguageCode -> LanguageModel)
-> Lens
LanguageModel
LanguageModel
(Maybe CLMLanguageCode)
(Maybe CLMLanguageCode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LanguageModel' {Maybe CLMLanguageCode
languageCode :: Maybe CLMLanguageCode
$sel:languageCode:LanguageModel' :: LanguageModel -> Maybe CLMLanguageCode
languageCode} -> Maybe CLMLanguageCode
languageCode) (\s :: LanguageModel
s@LanguageModel' {} Maybe CLMLanguageCode
a -> LanguageModel
s {$sel:languageCode:LanguageModel' :: Maybe CLMLanguageCode
languageCode = Maybe CLMLanguageCode
a} :: LanguageModel)
languageModel_modelName :: Lens.Lens' LanguageModel (Prelude.Maybe Prelude.Text)
languageModel_modelName :: (Maybe Text -> f (Maybe Text)) -> LanguageModel -> f LanguageModel
languageModel_modelName = (LanguageModel -> Maybe Text)
-> (LanguageModel -> Maybe Text -> LanguageModel)
-> Lens LanguageModel LanguageModel (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LanguageModel' {Maybe Text
modelName :: Maybe Text
$sel:modelName:LanguageModel' :: LanguageModel -> Maybe Text
modelName} -> Maybe Text
modelName) (\s :: LanguageModel
s@LanguageModel' {} Maybe Text
a -> LanguageModel
s {$sel:modelName:LanguageModel' :: Maybe Text
modelName = Maybe Text
a} :: LanguageModel)
languageModel_lastModifiedTime :: Lens.Lens' LanguageModel (Prelude.Maybe Prelude.UTCTime)
languageModel_lastModifiedTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> LanguageModel -> f LanguageModel
languageModel_lastModifiedTime = (LanguageModel -> Maybe POSIX)
-> (LanguageModel -> Maybe POSIX -> LanguageModel)
-> Lens LanguageModel LanguageModel (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LanguageModel' {Maybe POSIX
lastModifiedTime :: Maybe POSIX
$sel:lastModifiedTime:LanguageModel' :: LanguageModel -> Maybe POSIX
lastModifiedTime} -> Maybe POSIX
lastModifiedTime) (\s :: LanguageModel
s@LanguageModel' {} Maybe POSIX
a -> LanguageModel
s {$sel:lastModifiedTime:LanguageModel' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
a} :: LanguageModel) ((Maybe POSIX -> f (Maybe POSIX))
-> LanguageModel -> f LanguageModel)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> LanguageModel
-> f LanguageModel
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
languageModel_upgradeAvailability :: Lens.Lens' LanguageModel (Prelude.Maybe Prelude.Bool)
languageModel_upgradeAvailability :: (Maybe Bool -> f (Maybe Bool)) -> LanguageModel -> f LanguageModel
languageModel_upgradeAvailability = (LanguageModel -> Maybe Bool)
-> (LanguageModel -> Maybe Bool -> LanguageModel)
-> Lens LanguageModel LanguageModel (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LanguageModel' {Maybe Bool
upgradeAvailability :: Maybe Bool
$sel:upgradeAvailability:LanguageModel' :: LanguageModel -> Maybe Bool
upgradeAvailability} -> Maybe Bool
upgradeAvailability) (\s :: LanguageModel
s@LanguageModel' {} Maybe Bool
a -> LanguageModel
s {$sel:upgradeAvailability:LanguageModel' :: Maybe Bool
upgradeAvailability = Maybe Bool
a} :: LanguageModel)
languageModel_inputDataConfig :: Lens.Lens' LanguageModel (Prelude.Maybe InputDataConfig)
languageModel_inputDataConfig :: (Maybe InputDataConfig -> f (Maybe InputDataConfig))
-> LanguageModel -> f LanguageModel
languageModel_inputDataConfig = (LanguageModel -> Maybe InputDataConfig)
-> (LanguageModel -> Maybe InputDataConfig -> LanguageModel)
-> Lens
LanguageModel
LanguageModel
(Maybe InputDataConfig)
(Maybe InputDataConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LanguageModel' {Maybe InputDataConfig
inputDataConfig :: Maybe InputDataConfig
$sel:inputDataConfig:LanguageModel' :: LanguageModel -> Maybe InputDataConfig
inputDataConfig} -> Maybe InputDataConfig
inputDataConfig) (\s :: LanguageModel
s@LanguageModel' {} Maybe InputDataConfig
a -> LanguageModel
s {$sel:inputDataConfig:LanguageModel' :: Maybe InputDataConfig
inputDataConfig = Maybe InputDataConfig
a} :: LanguageModel)
languageModel_baseModelName :: Lens.Lens' LanguageModel (Prelude.Maybe BaseModelName)
languageModel_baseModelName :: (Maybe BaseModelName -> f (Maybe BaseModelName))
-> LanguageModel -> f LanguageModel
languageModel_baseModelName = (LanguageModel -> Maybe BaseModelName)
-> (LanguageModel -> Maybe BaseModelName -> LanguageModel)
-> Lens
LanguageModel
LanguageModel
(Maybe BaseModelName)
(Maybe BaseModelName)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LanguageModel' {Maybe BaseModelName
baseModelName :: Maybe BaseModelName
$sel:baseModelName:LanguageModel' :: LanguageModel -> Maybe BaseModelName
baseModelName} -> Maybe BaseModelName
baseModelName) (\s :: LanguageModel
s@LanguageModel' {} Maybe BaseModelName
a -> LanguageModel
s {$sel:baseModelName:LanguageModel' :: Maybe BaseModelName
baseModelName = Maybe BaseModelName
a} :: LanguageModel)
languageModel_modelStatus :: Lens.Lens' LanguageModel (Prelude.Maybe ModelStatus)
languageModel_modelStatus :: (Maybe ModelStatus -> f (Maybe ModelStatus))
-> LanguageModel -> f LanguageModel
languageModel_modelStatus = (LanguageModel -> Maybe ModelStatus)
-> (LanguageModel -> Maybe ModelStatus -> LanguageModel)
-> Lens
LanguageModel LanguageModel (Maybe ModelStatus) (Maybe ModelStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LanguageModel' {Maybe ModelStatus
modelStatus :: Maybe ModelStatus
$sel:modelStatus:LanguageModel' :: LanguageModel -> Maybe ModelStatus
modelStatus} -> Maybe ModelStatus
modelStatus) (\s :: LanguageModel
s@LanguageModel' {} Maybe ModelStatus
a -> LanguageModel
s {$sel:modelStatus:LanguageModel' :: Maybe ModelStatus
modelStatus = Maybe ModelStatus
a} :: LanguageModel)
languageModel_createTime :: Lens.Lens' LanguageModel (Prelude.Maybe Prelude.UTCTime)
languageModel_createTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> LanguageModel -> f LanguageModel
languageModel_createTime = (LanguageModel -> Maybe POSIX)
-> (LanguageModel -> Maybe POSIX -> LanguageModel)
-> Lens LanguageModel LanguageModel (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LanguageModel' {Maybe POSIX
createTime :: Maybe POSIX
$sel:createTime:LanguageModel' :: LanguageModel -> Maybe POSIX
createTime} -> Maybe POSIX
createTime) (\s :: LanguageModel
s@LanguageModel' {} Maybe POSIX
a -> LanguageModel
s {$sel:createTime:LanguageModel' :: Maybe POSIX
createTime = Maybe POSIX
a} :: LanguageModel) ((Maybe POSIX -> f (Maybe POSIX))
-> LanguageModel -> f LanguageModel)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> LanguageModel
-> f LanguageModel
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
instance Core.FromJSON LanguageModel where
parseJSON :: Value -> Parser LanguageModel
parseJSON =
String
-> (Object -> Parser LanguageModel)
-> Value
-> Parser LanguageModel
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"LanguageModel"
( \Object
x ->
Maybe Text
-> Maybe CLMLanguageCode
-> Maybe Text
-> Maybe POSIX
-> Maybe Bool
-> Maybe InputDataConfig
-> Maybe BaseModelName
-> Maybe ModelStatus
-> Maybe POSIX
-> LanguageModel
LanguageModel'
(Maybe Text
-> Maybe CLMLanguageCode
-> Maybe Text
-> Maybe POSIX
-> Maybe Bool
-> Maybe InputDataConfig
-> Maybe BaseModelName
-> Maybe ModelStatus
-> Maybe POSIX
-> LanguageModel)
-> Parser (Maybe Text)
-> Parser
(Maybe CLMLanguageCode
-> Maybe Text
-> Maybe POSIX
-> Maybe Bool
-> Maybe InputDataConfig
-> Maybe BaseModelName
-> Maybe ModelStatus
-> Maybe POSIX
-> LanguageModel)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"FailureReason")
Parser
(Maybe CLMLanguageCode
-> Maybe Text
-> Maybe POSIX
-> Maybe Bool
-> Maybe InputDataConfig
-> Maybe BaseModelName
-> Maybe ModelStatus
-> Maybe POSIX
-> LanguageModel)
-> Parser (Maybe CLMLanguageCode)
-> Parser
(Maybe Text
-> Maybe POSIX
-> Maybe Bool
-> Maybe InputDataConfig
-> Maybe BaseModelName
-> Maybe ModelStatus
-> Maybe POSIX
-> LanguageModel)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe CLMLanguageCode)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LanguageCode")
Parser
(Maybe Text
-> Maybe POSIX
-> Maybe Bool
-> Maybe InputDataConfig
-> Maybe BaseModelName
-> Maybe ModelStatus
-> Maybe POSIX
-> LanguageModel)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe Bool
-> Maybe InputDataConfig
-> Maybe BaseModelName
-> Maybe ModelStatus
-> Maybe POSIX
-> LanguageModel)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ModelName")
Parser
(Maybe POSIX
-> Maybe Bool
-> Maybe InputDataConfig
-> Maybe BaseModelName
-> Maybe ModelStatus
-> Maybe POSIX
-> LanguageModel)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Bool
-> Maybe InputDataConfig
-> Maybe BaseModelName
-> Maybe ModelStatus
-> Maybe POSIX
-> LanguageModel)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LastModifiedTime")
Parser
(Maybe Bool
-> Maybe InputDataConfig
-> Maybe BaseModelName
-> Maybe ModelStatus
-> Maybe POSIX
-> LanguageModel)
-> Parser (Maybe Bool)
-> Parser
(Maybe InputDataConfig
-> Maybe BaseModelName
-> Maybe ModelStatus
-> Maybe POSIX
-> LanguageModel)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"UpgradeAvailability")
Parser
(Maybe InputDataConfig
-> Maybe BaseModelName
-> Maybe ModelStatus
-> Maybe POSIX
-> LanguageModel)
-> Parser (Maybe InputDataConfig)
-> Parser
(Maybe BaseModelName
-> Maybe ModelStatus -> Maybe POSIX -> LanguageModel)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe InputDataConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"InputDataConfig")
Parser
(Maybe BaseModelName
-> Maybe ModelStatus -> Maybe POSIX -> LanguageModel)
-> Parser (Maybe BaseModelName)
-> Parser (Maybe ModelStatus -> Maybe POSIX -> LanguageModel)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe BaseModelName)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"BaseModelName")
Parser (Maybe ModelStatus -> Maybe POSIX -> LanguageModel)
-> Parser (Maybe ModelStatus)
-> Parser (Maybe POSIX -> LanguageModel)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ModelStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ModelStatus")
Parser (Maybe POSIX -> LanguageModel)
-> Parser (Maybe POSIX) -> Parser LanguageModel
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreateTime")
)
instance Prelude.Hashable LanguageModel
instance Prelude.NFData LanguageModel