{-# 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.LookoutVision.Types.ModelDescription
-- 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.LookoutVision.Types.ModelDescription where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.LookoutVision.Types.ModelPerformance
import Amazonka.LookoutVision.Types.ModelStatus
import Amazonka.LookoutVision.Types.OutputConfig
import Amazonka.LookoutVision.Types.OutputS3Object
import qualified Amazonka.Prelude as Prelude

-- | Describes an Amazon Lookout for Vision model.
--
-- /See:/ 'newModelDescription' smart constructor.
data ModelDescription = ModelDescription'
  { -- | The status of the model.
    ModelDescription -> Maybe ModelStatus
status :: Prelude.Maybe ModelStatus,
    -- | The S3 location where Amazon Lookout for Vision saves the performance
    -- metrics.
    ModelDescription -> Maybe OutputS3Object
evaluationResult :: Prelude.Maybe OutputS3Object,
    -- | The unix timestamp for the date and time that the evaluation ended.
    ModelDescription -> Maybe POSIX
evaluationEndTimestamp :: Prelude.Maybe Core.POSIX,
    -- | The Amazon Resource Name (ARN) of the model.
    ModelDescription -> Maybe Text
modelArn :: Prelude.Maybe Prelude.Text,
    -- | Performance metrics for the model. Created during training.
    ModelDescription -> Maybe ModelPerformance
performance :: Prelude.Maybe ModelPerformance,
    -- | The identifer for the AWS Key Management Service (AWS KMS) key that was
    -- used to encrypt the model during training.
    ModelDescription -> Maybe Text
kmsKeyId :: Prelude.Maybe Prelude.Text,
    -- | The status message for the model.
    ModelDescription -> Maybe Text
statusMessage :: Prelude.Maybe Prelude.Text,
    -- | The unix timestamp for the date and time that the model was created.
    ModelDescription -> Maybe POSIX
creationTimestamp :: Prelude.Maybe Core.POSIX,
    -- | The S3 location where Amazon Lookout for Vision saves model training
    -- files.
    ModelDescription -> Maybe OutputConfig
outputConfig :: Prelude.Maybe OutputConfig,
    -- | The version of the model
    ModelDescription -> Maybe Text
modelVersion :: Prelude.Maybe Prelude.Text,
    -- | The description for the model.
    ModelDescription -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The S3 location where Amazon Lookout for Vision saves the manifest file
    -- that was used to test the trained model and generate the performance
    -- scores.
    ModelDescription -> Maybe OutputS3Object
evaluationManifest :: Prelude.Maybe OutputS3Object
  }
  deriving (ModelDescription -> ModelDescription -> Bool
(ModelDescription -> ModelDescription -> Bool)
-> (ModelDescription -> ModelDescription -> Bool)
-> Eq ModelDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModelDescription -> ModelDescription -> Bool
$c/= :: ModelDescription -> ModelDescription -> Bool
== :: ModelDescription -> ModelDescription -> Bool
$c== :: ModelDescription -> ModelDescription -> Bool
Prelude.Eq, ReadPrec [ModelDescription]
ReadPrec ModelDescription
Int -> ReadS ModelDescription
ReadS [ModelDescription]
(Int -> ReadS ModelDescription)
-> ReadS [ModelDescription]
-> ReadPrec ModelDescription
-> ReadPrec [ModelDescription]
-> Read ModelDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ModelDescription]
$creadListPrec :: ReadPrec [ModelDescription]
readPrec :: ReadPrec ModelDescription
$creadPrec :: ReadPrec ModelDescription
readList :: ReadS [ModelDescription]
$creadList :: ReadS [ModelDescription]
readsPrec :: Int -> ReadS ModelDescription
$creadsPrec :: Int -> ReadS ModelDescription
Prelude.Read, Int -> ModelDescription -> ShowS
[ModelDescription] -> ShowS
ModelDescription -> String
(Int -> ModelDescription -> ShowS)
-> (ModelDescription -> String)
-> ([ModelDescription] -> ShowS)
-> Show ModelDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModelDescription] -> ShowS
$cshowList :: [ModelDescription] -> ShowS
show :: ModelDescription -> String
$cshow :: ModelDescription -> String
showsPrec :: Int -> ModelDescription -> ShowS
$cshowsPrec :: Int -> ModelDescription -> ShowS
Prelude.Show, (forall x. ModelDescription -> Rep ModelDescription x)
-> (forall x. Rep ModelDescription x -> ModelDescription)
-> Generic ModelDescription
forall x. Rep ModelDescription x -> ModelDescription
forall x. ModelDescription -> Rep ModelDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ModelDescription x -> ModelDescription
$cfrom :: forall x. ModelDescription -> Rep ModelDescription x
Prelude.Generic)

-- |
-- Create a value of 'ModelDescription' 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:
--
-- 'status', 'modelDescription_status' - The status of the model.
--
-- 'evaluationResult', 'modelDescription_evaluationResult' - The S3 location where Amazon Lookout for Vision saves the performance
-- metrics.
--
-- 'evaluationEndTimestamp', 'modelDescription_evaluationEndTimestamp' - The unix timestamp for the date and time that the evaluation ended.
--
-- 'modelArn', 'modelDescription_modelArn' - The Amazon Resource Name (ARN) of the model.
--
-- 'performance', 'modelDescription_performance' - Performance metrics for the model. Created during training.
--
-- 'kmsKeyId', 'modelDescription_kmsKeyId' - The identifer for the AWS Key Management Service (AWS KMS) key that was
-- used to encrypt the model during training.
--
-- 'statusMessage', 'modelDescription_statusMessage' - The status message for the model.
--
-- 'creationTimestamp', 'modelDescription_creationTimestamp' - The unix timestamp for the date and time that the model was created.
--
-- 'outputConfig', 'modelDescription_outputConfig' - The S3 location where Amazon Lookout for Vision saves model training
-- files.
--
-- 'modelVersion', 'modelDescription_modelVersion' - The version of the model
--
-- 'description', 'modelDescription_description' - The description for the model.
--
-- 'evaluationManifest', 'modelDescription_evaluationManifest' - The S3 location where Amazon Lookout for Vision saves the manifest file
-- that was used to test the trained model and generate the performance
-- scores.
newModelDescription ::
  ModelDescription
newModelDescription :: ModelDescription
newModelDescription =
  ModelDescription' :: Maybe ModelStatus
-> Maybe OutputS3Object
-> Maybe POSIX
-> Maybe Text
-> Maybe ModelPerformance
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe OutputConfig
-> Maybe Text
-> Maybe Text
-> Maybe OutputS3Object
-> ModelDescription
ModelDescription'
    { $sel:status:ModelDescription' :: Maybe ModelStatus
status = Maybe ModelStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:evaluationResult:ModelDescription' :: Maybe OutputS3Object
evaluationResult = Maybe OutputS3Object
forall a. Maybe a
Prelude.Nothing,
      $sel:evaluationEndTimestamp:ModelDescription' :: Maybe POSIX
evaluationEndTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:modelArn:ModelDescription' :: Maybe Text
modelArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:performance:ModelDescription' :: Maybe ModelPerformance
performance = Maybe ModelPerformance
forall a. Maybe a
Prelude.Nothing,
      $sel:kmsKeyId:ModelDescription' :: Maybe Text
kmsKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:statusMessage:ModelDescription' :: Maybe Text
statusMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:creationTimestamp:ModelDescription' :: Maybe POSIX
creationTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:outputConfig:ModelDescription' :: Maybe OutputConfig
outputConfig = Maybe OutputConfig
forall a. Maybe a
Prelude.Nothing,
      $sel:modelVersion:ModelDescription' :: Maybe Text
modelVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:description:ModelDescription' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:evaluationManifest:ModelDescription' :: Maybe OutputS3Object
evaluationManifest = Maybe OutputS3Object
forall a. Maybe a
Prelude.Nothing
    }

-- | The status of the model.
modelDescription_status :: Lens.Lens' ModelDescription (Prelude.Maybe ModelStatus)
modelDescription_status :: (Maybe ModelStatus -> f (Maybe ModelStatus))
-> ModelDescription -> f ModelDescription
modelDescription_status = (ModelDescription -> Maybe ModelStatus)
-> (ModelDescription -> Maybe ModelStatus -> ModelDescription)
-> Lens
     ModelDescription
     ModelDescription
     (Maybe ModelStatus)
     (Maybe ModelStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelDescription' {Maybe ModelStatus
status :: Maybe ModelStatus
$sel:status:ModelDescription' :: ModelDescription -> Maybe ModelStatus
status} -> Maybe ModelStatus
status) (\s :: ModelDescription
s@ModelDescription' {} Maybe ModelStatus
a -> ModelDescription
s {$sel:status:ModelDescription' :: Maybe ModelStatus
status = Maybe ModelStatus
a} :: ModelDescription)

-- | The S3 location where Amazon Lookout for Vision saves the performance
-- metrics.
modelDescription_evaluationResult :: Lens.Lens' ModelDescription (Prelude.Maybe OutputS3Object)
modelDescription_evaluationResult :: (Maybe OutputS3Object -> f (Maybe OutputS3Object))
-> ModelDescription -> f ModelDescription
modelDescription_evaluationResult = (ModelDescription -> Maybe OutputS3Object)
-> (ModelDescription -> Maybe OutputS3Object -> ModelDescription)
-> Lens
     ModelDescription
     ModelDescription
     (Maybe OutputS3Object)
     (Maybe OutputS3Object)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelDescription' {Maybe OutputS3Object
evaluationResult :: Maybe OutputS3Object
$sel:evaluationResult:ModelDescription' :: ModelDescription -> Maybe OutputS3Object
evaluationResult} -> Maybe OutputS3Object
evaluationResult) (\s :: ModelDescription
s@ModelDescription' {} Maybe OutputS3Object
a -> ModelDescription
s {$sel:evaluationResult:ModelDescription' :: Maybe OutputS3Object
evaluationResult = Maybe OutputS3Object
a} :: ModelDescription)

-- | The unix timestamp for the date and time that the evaluation ended.
modelDescription_evaluationEndTimestamp :: Lens.Lens' ModelDescription (Prelude.Maybe Prelude.UTCTime)
modelDescription_evaluationEndTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ModelDescription -> f ModelDescription
modelDescription_evaluationEndTimestamp = (ModelDescription -> Maybe POSIX)
-> (ModelDescription -> Maybe POSIX -> ModelDescription)
-> Lens
     ModelDescription ModelDescription (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelDescription' {Maybe POSIX
evaluationEndTimestamp :: Maybe POSIX
$sel:evaluationEndTimestamp:ModelDescription' :: ModelDescription -> Maybe POSIX
evaluationEndTimestamp} -> Maybe POSIX
evaluationEndTimestamp) (\s :: ModelDescription
s@ModelDescription' {} Maybe POSIX
a -> ModelDescription
s {$sel:evaluationEndTimestamp:ModelDescription' :: Maybe POSIX
evaluationEndTimestamp = Maybe POSIX
a} :: ModelDescription) ((Maybe POSIX -> f (Maybe POSIX))
 -> ModelDescription -> f ModelDescription)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ModelDescription
-> f ModelDescription
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

-- | The Amazon Resource Name (ARN) of the model.
modelDescription_modelArn :: Lens.Lens' ModelDescription (Prelude.Maybe Prelude.Text)
modelDescription_modelArn :: (Maybe Text -> f (Maybe Text))
-> ModelDescription -> f ModelDescription
modelDescription_modelArn = (ModelDescription -> Maybe Text)
-> (ModelDescription -> Maybe Text -> ModelDescription)
-> Lens ModelDescription ModelDescription (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelDescription' {Maybe Text
modelArn :: Maybe Text
$sel:modelArn:ModelDescription' :: ModelDescription -> Maybe Text
modelArn} -> Maybe Text
modelArn) (\s :: ModelDescription
s@ModelDescription' {} Maybe Text
a -> ModelDescription
s {$sel:modelArn:ModelDescription' :: Maybe Text
modelArn = Maybe Text
a} :: ModelDescription)

-- | Performance metrics for the model. Created during training.
modelDescription_performance :: Lens.Lens' ModelDescription (Prelude.Maybe ModelPerformance)
modelDescription_performance :: (Maybe ModelPerformance -> f (Maybe ModelPerformance))
-> ModelDescription -> f ModelDescription
modelDescription_performance = (ModelDescription -> Maybe ModelPerformance)
-> (ModelDescription -> Maybe ModelPerformance -> ModelDescription)
-> Lens
     ModelDescription
     ModelDescription
     (Maybe ModelPerformance)
     (Maybe ModelPerformance)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelDescription' {Maybe ModelPerformance
performance :: Maybe ModelPerformance
$sel:performance:ModelDescription' :: ModelDescription -> Maybe ModelPerformance
performance} -> Maybe ModelPerformance
performance) (\s :: ModelDescription
s@ModelDescription' {} Maybe ModelPerformance
a -> ModelDescription
s {$sel:performance:ModelDescription' :: Maybe ModelPerformance
performance = Maybe ModelPerformance
a} :: ModelDescription)

-- | The identifer for the AWS Key Management Service (AWS KMS) key that was
-- used to encrypt the model during training.
modelDescription_kmsKeyId :: Lens.Lens' ModelDescription (Prelude.Maybe Prelude.Text)
modelDescription_kmsKeyId :: (Maybe Text -> f (Maybe Text))
-> ModelDescription -> f ModelDescription
modelDescription_kmsKeyId = (ModelDescription -> Maybe Text)
-> (ModelDescription -> Maybe Text -> ModelDescription)
-> Lens ModelDescription ModelDescription (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelDescription' {Maybe Text
kmsKeyId :: Maybe Text
$sel:kmsKeyId:ModelDescription' :: ModelDescription -> Maybe Text
kmsKeyId} -> Maybe Text
kmsKeyId) (\s :: ModelDescription
s@ModelDescription' {} Maybe Text
a -> ModelDescription
s {$sel:kmsKeyId:ModelDescription' :: Maybe Text
kmsKeyId = Maybe Text
a} :: ModelDescription)

-- | The status message for the model.
modelDescription_statusMessage :: Lens.Lens' ModelDescription (Prelude.Maybe Prelude.Text)
modelDescription_statusMessage :: (Maybe Text -> f (Maybe Text))
-> ModelDescription -> f ModelDescription
modelDescription_statusMessage = (ModelDescription -> Maybe Text)
-> (ModelDescription -> Maybe Text -> ModelDescription)
-> Lens ModelDescription ModelDescription (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelDescription' {Maybe Text
statusMessage :: Maybe Text
$sel:statusMessage:ModelDescription' :: ModelDescription -> Maybe Text
statusMessage} -> Maybe Text
statusMessage) (\s :: ModelDescription
s@ModelDescription' {} Maybe Text
a -> ModelDescription
s {$sel:statusMessage:ModelDescription' :: Maybe Text
statusMessage = Maybe Text
a} :: ModelDescription)

-- | The unix timestamp for the date and time that the model was created.
modelDescription_creationTimestamp :: Lens.Lens' ModelDescription (Prelude.Maybe Prelude.UTCTime)
modelDescription_creationTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ModelDescription -> f ModelDescription
modelDescription_creationTimestamp = (ModelDescription -> Maybe POSIX)
-> (ModelDescription -> Maybe POSIX -> ModelDescription)
-> Lens
     ModelDescription ModelDescription (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelDescription' {Maybe POSIX
creationTimestamp :: Maybe POSIX
$sel:creationTimestamp:ModelDescription' :: ModelDescription -> Maybe POSIX
creationTimestamp} -> Maybe POSIX
creationTimestamp) (\s :: ModelDescription
s@ModelDescription' {} Maybe POSIX
a -> ModelDescription
s {$sel:creationTimestamp:ModelDescription' :: Maybe POSIX
creationTimestamp = Maybe POSIX
a} :: ModelDescription) ((Maybe POSIX -> f (Maybe POSIX))
 -> ModelDescription -> f ModelDescription)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ModelDescription
-> f ModelDescription
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

-- | The S3 location where Amazon Lookout for Vision saves model training
-- files.
modelDescription_outputConfig :: Lens.Lens' ModelDescription (Prelude.Maybe OutputConfig)
modelDescription_outputConfig :: (Maybe OutputConfig -> f (Maybe OutputConfig))
-> ModelDescription -> f ModelDescription
modelDescription_outputConfig = (ModelDescription -> Maybe OutputConfig)
-> (ModelDescription -> Maybe OutputConfig -> ModelDescription)
-> Lens
     ModelDescription
     ModelDescription
     (Maybe OutputConfig)
     (Maybe OutputConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelDescription' {Maybe OutputConfig
outputConfig :: Maybe OutputConfig
$sel:outputConfig:ModelDescription' :: ModelDescription -> Maybe OutputConfig
outputConfig} -> Maybe OutputConfig
outputConfig) (\s :: ModelDescription
s@ModelDescription' {} Maybe OutputConfig
a -> ModelDescription
s {$sel:outputConfig:ModelDescription' :: Maybe OutputConfig
outputConfig = Maybe OutputConfig
a} :: ModelDescription)

-- | The version of the model
modelDescription_modelVersion :: Lens.Lens' ModelDescription (Prelude.Maybe Prelude.Text)
modelDescription_modelVersion :: (Maybe Text -> f (Maybe Text))
-> ModelDescription -> f ModelDescription
modelDescription_modelVersion = (ModelDescription -> Maybe Text)
-> (ModelDescription -> Maybe Text -> ModelDescription)
-> Lens ModelDescription ModelDescription (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelDescription' {Maybe Text
modelVersion :: Maybe Text
$sel:modelVersion:ModelDescription' :: ModelDescription -> Maybe Text
modelVersion} -> Maybe Text
modelVersion) (\s :: ModelDescription
s@ModelDescription' {} Maybe Text
a -> ModelDescription
s {$sel:modelVersion:ModelDescription' :: Maybe Text
modelVersion = Maybe Text
a} :: ModelDescription)

-- | The description for the model.
modelDescription_description :: Lens.Lens' ModelDescription (Prelude.Maybe Prelude.Text)
modelDescription_description :: (Maybe Text -> f (Maybe Text))
-> ModelDescription -> f ModelDescription
modelDescription_description = (ModelDescription -> Maybe Text)
-> (ModelDescription -> Maybe Text -> ModelDescription)
-> Lens ModelDescription ModelDescription (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelDescription' {Maybe Text
description :: Maybe Text
$sel:description:ModelDescription' :: ModelDescription -> Maybe Text
description} -> Maybe Text
description) (\s :: ModelDescription
s@ModelDescription' {} Maybe Text
a -> ModelDescription
s {$sel:description:ModelDescription' :: Maybe Text
description = Maybe Text
a} :: ModelDescription)

-- | The S3 location where Amazon Lookout for Vision saves the manifest file
-- that was used to test the trained model and generate the performance
-- scores.
modelDescription_evaluationManifest :: Lens.Lens' ModelDescription (Prelude.Maybe OutputS3Object)
modelDescription_evaluationManifest :: (Maybe OutputS3Object -> f (Maybe OutputS3Object))
-> ModelDescription -> f ModelDescription
modelDescription_evaluationManifest = (ModelDescription -> Maybe OutputS3Object)
-> (ModelDescription -> Maybe OutputS3Object -> ModelDescription)
-> Lens
     ModelDescription
     ModelDescription
     (Maybe OutputS3Object)
     (Maybe OutputS3Object)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelDescription' {Maybe OutputS3Object
evaluationManifest :: Maybe OutputS3Object
$sel:evaluationManifest:ModelDescription' :: ModelDescription -> Maybe OutputS3Object
evaluationManifest} -> Maybe OutputS3Object
evaluationManifest) (\s :: ModelDescription
s@ModelDescription' {} Maybe OutputS3Object
a -> ModelDescription
s {$sel:evaluationManifest:ModelDescription' :: Maybe OutputS3Object
evaluationManifest = Maybe OutputS3Object
a} :: ModelDescription)

instance Core.FromJSON ModelDescription where
  parseJSON :: Value -> Parser ModelDescription
parseJSON =
    String
-> (Object -> Parser ModelDescription)
-> Value
-> Parser ModelDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ModelDescription"
      ( \Object
x ->
          Maybe ModelStatus
-> Maybe OutputS3Object
-> Maybe POSIX
-> Maybe Text
-> Maybe ModelPerformance
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe OutputConfig
-> Maybe Text
-> Maybe Text
-> Maybe OutputS3Object
-> ModelDescription
ModelDescription'
            (Maybe ModelStatus
 -> Maybe OutputS3Object
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe ModelPerformance
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe OutputConfig
 -> Maybe Text
 -> Maybe Text
 -> Maybe OutputS3Object
 -> ModelDescription)
-> Parser (Maybe ModelStatus)
-> Parser
     (Maybe OutputS3Object
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe ModelPerformance
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe OutputConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe OutputS3Object
      -> ModelDescription)
forall (f :: * -> *) a b. Functor 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
"Status")
            Parser
  (Maybe OutputS3Object
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe ModelPerformance
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe OutputConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe OutputS3Object
   -> ModelDescription)
-> Parser (Maybe OutputS3Object)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe ModelPerformance
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe OutputConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe OutputS3Object
      -> ModelDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe OutputS3Object)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EvaluationResult")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe ModelPerformance
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe OutputConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe OutputS3Object
   -> ModelDescription)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe ModelPerformance
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe OutputConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe OutputS3Object
      -> ModelDescription)
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
"EvaluationEndTimestamp")
            Parser
  (Maybe Text
   -> Maybe ModelPerformance
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe OutputConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe OutputS3Object
   -> ModelDescription)
-> Parser (Maybe Text)
-> Parser
     (Maybe ModelPerformance
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe OutputConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe OutputS3Object
      -> ModelDescription)
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
"ModelArn")
            Parser
  (Maybe ModelPerformance
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe OutputConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe OutputS3Object
   -> ModelDescription)
-> Parser (Maybe ModelPerformance)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe OutputConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe OutputS3Object
      -> ModelDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ModelPerformance)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Performance")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe OutputConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe OutputS3Object
   -> ModelDescription)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe OutputConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe OutputS3Object
      -> ModelDescription)
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
"KmsKeyId")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe OutputConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe OutputS3Object
   -> ModelDescription)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe OutputConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe OutputS3Object
      -> ModelDescription)
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
"StatusMessage")
            Parser
  (Maybe POSIX
   -> Maybe OutputConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe OutputS3Object
   -> ModelDescription)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe OutputConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe OutputS3Object
      -> ModelDescription)
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
"CreationTimestamp")
            Parser
  (Maybe OutputConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe OutputS3Object
   -> ModelDescription)
-> Parser (Maybe OutputConfig)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe OutputS3Object -> ModelDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe OutputConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"OutputConfig")
            Parser
  (Maybe Text
   -> Maybe Text -> Maybe OutputS3Object -> ModelDescription)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe OutputS3Object -> ModelDescription)
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
"ModelVersion")
            Parser (Maybe Text -> Maybe OutputS3Object -> ModelDescription)
-> Parser (Maybe Text)
-> Parser (Maybe OutputS3Object -> ModelDescription)
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
"Description")
            Parser (Maybe OutputS3Object -> ModelDescription)
-> Parser (Maybe OutputS3Object) -> Parser ModelDescription
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe OutputS3Object)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EvaluationManifest")
      )

instance Prelude.Hashable ModelDescription

instance Prelude.NFData ModelDescription