{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Transcribe.Types.LanguageModel
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
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

-- | The structure used to describe a custom language model.
--
-- /See:/ 'newLanguageModel' smart constructor.
data LanguageModel = LanguageModel'
  { -- | The reason why the custom language model couldn\'t be created.
    LanguageModel -> Maybe Text
failureReason :: Prelude.Maybe Prelude.Text,
    -- | The language code you used to create your custom language model.
    LanguageModel -> Maybe CLMLanguageCode
languageCode :: Prelude.Maybe CLMLanguageCode,
    -- | The name of the custom language model.
    LanguageModel -> Maybe Text
modelName :: Prelude.Maybe Prelude.Text,
    -- | The most recent time the custom language model was modified.
    LanguageModel -> Maybe POSIX
lastModifiedTime :: Prelude.Maybe Core.POSIX,
    -- | Whether the base model used for the custom language model is up to date.
    -- If this field is @true@ then you are running the most up-to-date version
    -- of the base model in your custom language model.
    LanguageModel -> Maybe Bool
upgradeAvailability :: Prelude.Maybe Prelude.Bool,
    -- | The data access role and Amazon S3 prefixes for the input files used to
    -- train the custom language model.
    LanguageModel -> Maybe InputDataConfig
inputDataConfig :: Prelude.Maybe InputDataConfig,
    -- | The Amazon Transcribe standard language model, or base model used to
    -- create the custom language model.
    LanguageModel -> Maybe BaseModelName
baseModelName :: Prelude.Maybe BaseModelName,
    -- | The creation status of a custom language model. When the status is
    -- @COMPLETED@ the model is ready for use.
    LanguageModel -> Maybe ModelStatus
modelStatus :: Prelude.Maybe ModelStatus,
    -- | The time the custom language model was created.
    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)

-- |
-- Create a value of 'LanguageModel' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'failureReason', 'languageModel_failureReason' - The reason why the custom language model couldn\'t be created.
--
-- 'languageCode', 'languageModel_languageCode' - The language code you used to create your custom language model.
--
-- 'modelName', 'languageModel_modelName' - The name of the custom language model.
--
-- 'lastModifiedTime', 'languageModel_lastModifiedTime' - The most recent time the custom language model was modified.
--
-- 'upgradeAvailability', 'languageModel_upgradeAvailability' - Whether the base model used for the custom language model is up to date.
-- If this field is @true@ then you are running the most up-to-date version
-- of the base model in your custom language model.
--
-- 'inputDataConfig', 'languageModel_inputDataConfig' - The data access role and Amazon S3 prefixes for the input files used to
-- train the custom language model.
--
-- 'baseModelName', 'languageModel_baseModelName' - The Amazon Transcribe standard language model, or base model used to
-- create the custom language model.
--
-- 'modelStatus', 'languageModel_modelStatus' - The creation status of a custom language model. When the status is
-- @COMPLETED@ the model is ready for use.
--
-- 'createTime', 'languageModel_createTime' - The time the custom language model was created.
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
    }

-- | The reason why the custom language model couldn\'t be created.
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)

-- | The language code you used to create your custom language model.
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)

-- | The name of the custom language model.
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)

-- | The most recent time the custom language model was modified.
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

-- | Whether the base model used for the custom language model is up to date.
-- If this field is @true@ then you are running the most up-to-date version
-- of the base model in your custom language model.
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)

-- | The data access role and Amazon S3 prefixes for the input files used to
-- train the custom language model.
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)

-- | The Amazon Transcribe standard language model, or base model used to
-- create the custom language model.
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)

-- | The creation status of a custom language model. When the status is
-- @COMPLETED@ the model is ready for use.
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)

-- | The time the custom language model was created.
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