{-# 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.Rekognition.Types.ProjectVersionDescription
-- 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.Rekognition.Types.ProjectVersionDescription where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Rekognition.Types.EvaluationResult
import Amazonka.Rekognition.Types.GroundTruthManifest
import Amazonka.Rekognition.Types.OutputConfig
import Amazonka.Rekognition.Types.ProjectVersionStatus
import Amazonka.Rekognition.Types.TestingDataResult
import Amazonka.Rekognition.Types.TrainingDataResult

-- | The description of a version of a model.
--
-- /See:/ 'newProjectVersionDescription' smart constructor.
data ProjectVersionDescription = ProjectVersionDescription'
  { -- | The minimum number of inference units used by the model. For more
    -- information, see StartProjectVersion.
    ProjectVersionDescription -> Maybe Natural
minInferenceUnits :: Prelude.Maybe Prelude.Natural,
    -- | The current status of the model version.
    ProjectVersionDescription -> Maybe ProjectVersionStatus
status :: Prelude.Maybe ProjectVersionStatus,
    -- | The training results. @EvaluationResult@ is only returned if training is
    -- successful.
    ProjectVersionDescription -> Maybe EvaluationResult
evaluationResult :: Prelude.Maybe EvaluationResult,
    -- | The location of the summary manifest. The summary manifest provides
    -- aggregate data validation results for the training and test datasets.
    ProjectVersionDescription -> Maybe GroundTruthManifest
manifestSummary :: Prelude.Maybe GroundTruthManifest,
    -- | The identifer for the AWS Key Management Service (AWS KMS) customer
    -- master key that was used to encrypt the model during training.
    ProjectVersionDescription -> Maybe Text
kmsKeyId :: Prelude.Maybe Prelude.Text,
    -- | Contains information about the testing results.
    ProjectVersionDescription -> Maybe TestingDataResult
testingDataResult :: Prelude.Maybe TestingDataResult,
    -- | A descriptive message for an error or warning that occurred.
    ProjectVersionDescription -> Maybe Text
statusMessage :: Prelude.Maybe Prelude.Text,
    -- | The Unix datetime for the date and time that training started.
    ProjectVersionDescription -> Maybe POSIX
creationTimestamp :: Prelude.Maybe Core.POSIX,
    -- | The Amazon Resource Name (ARN) of the model version.
    ProjectVersionDescription -> Maybe Text
projectVersionArn :: Prelude.Maybe Prelude.Text,
    -- | The location where training results are saved.
    ProjectVersionDescription -> Maybe OutputConfig
outputConfig :: Prelude.Maybe OutputConfig,
    -- | The duration, in seconds, that the model version has been billed for
    -- training. This value is only returned if the model version has been
    -- successfully trained.
    ProjectVersionDescription -> Maybe Natural
billableTrainingTimeInSeconds :: Prelude.Maybe Prelude.Natural,
    -- | The Unix date and time that training of the model ended.
    ProjectVersionDescription -> Maybe POSIX
trainingEndTimestamp :: Prelude.Maybe Core.POSIX,
    -- | Contains information about the training results.
    ProjectVersionDescription -> Maybe TrainingDataResult
trainingDataResult :: Prelude.Maybe TrainingDataResult
  }
  deriving (ProjectVersionDescription -> ProjectVersionDescription -> Bool
(ProjectVersionDescription -> ProjectVersionDescription -> Bool)
-> (ProjectVersionDescription -> ProjectVersionDescription -> Bool)
-> Eq ProjectVersionDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProjectVersionDescription -> ProjectVersionDescription -> Bool
$c/= :: ProjectVersionDescription -> ProjectVersionDescription -> Bool
== :: ProjectVersionDescription -> ProjectVersionDescription -> Bool
$c== :: ProjectVersionDescription -> ProjectVersionDescription -> Bool
Prelude.Eq, ReadPrec [ProjectVersionDescription]
ReadPrec ProjectVersionDescription
Int -> ReadS ProjectVersionDescription
ReadS [ProjectVersionDescription]
(Int -> ReadS ProjectVersionDescription)
-> ReadS [ProjectVersionDescription]
-> ReadPrec ProjectVersionDescription
-> ReadPrec [ProjectVersionDescription]
-> Read ProjectVersionDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ProjectVersionDescription]
$creadListPrec :: ReadPrec [ProjectVersionDescription]
readPrec :: ReadPrec ProjectVersionDescription
$creadPrec :: ReadPrec ProjectVersionDescription
readList :: ReadS [ProjectVersionDescription]
$creadList :: ReadS [ProjectVersionDescription]
readsPrec :: Int -> ReadS ProjectVersionDescription
$creadsPrec :: Int -> ReadS ProjectVersionDescription
Prelude.Read, Int -> ProjectVersionDescription -> ShowS
[ProjectVersionDescription] -> ShowS
ProjectVersionDescription -> String
(Int -> ProjectVersionDescription -> ShowS)
-> (ProjectVersionDescription -> String)
-> ([ProjectVersionDescription] -> ShowS)
-> Show ProjectVersionDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ProjectVersionDescription] -> ShowS
$cshowList :: [ProjectVersionDescription] -> ShowS
show :: ProjectVersionDescription -> String
$cshow :: ProjectVersionDescription -> String
showsPrec :: Int -> ProjectVersionDescription -> ShowS
$cshowsPrec :: Int -> ProjectVersionDescription -> ShowS
Prelude.Show, (forall x.
 ProjectVersionDescription -> Rep ProjectVersionDescription x)
-> (forall x.
    Rep ProjectVersionDescription x -> ProjectVersionDescription)
-> Generic ProjectVersionDescription
forall x.
Rep ProjectVersionDescription x -> ProjectVersionDescription
forall x.
ProjectVersionDescription -> Rep ProjectVersionDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ProjectVersionDescription x -> ProjectVersionDescription
$cfrom :: forall x.
ProjectVersionDescription -> Rep ProjectVersionDescription x
Prelude.Generic)

-- |
-- Create a value of 'ProjectVersionDescription' 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:
--
-- 'minInferenceUnits', 'projectVersionDescription_minInferenceUnits' - The minimum number of inference units used by the model. For more
-- information, see StartProjectVersion.
--
-- 'status', 'projectVersionDescription_status' - The current status of the model version.
--
-- 'evaluationResult', 'projectVersionDescription_evaluationResult' - The training results. @EvaluationResult@ is only returned if training is
-- successful.
--
-- 'manifestSummary', 'projectVersionDescription_manifestSummary' - The location of the summary manifest. The summary manifest provides
-- aggregate data validation results for the training and test datasets.
--
-- 'kmsKeyId', 'projectVersionDescription_kmsKeyId' - The identifer for the AWS Key Management Service (AWS KMS) customer
-- master key that was used to encrypt the model during training.
--
-- 'testingDataResult', 'projectVersionDescription_testingDataResult' - Contains information about the testing results.
--
-- 'statusMessage', 'projectVersionDescription_statusMessage' - A descriptive message for an error or warning that occurred.
--
-- 'creationTimestamp', 'projectVersionDescription_creationTimestamp' - The Unix datetime for the date and time that training started.
--
-- 'projectVersionArn', 'projectVersionDescription_projectVersionArn' - The Amazon Resource Name (ARN) of the model version.
--
-- 'outputConfig', 'projectVersionDescription_outputConfig' - The location where training results are saved.
--
-- 'billableTrainingTimeInSeconds', 'projectVersionDescription_billableTrainingTimeInSeconds' - The duration, in seconds, that the model version has been billed for
-- training. This value is only returned if the model version has been
-- successfully trained.
--
-- 'trainingEndTimestamp', 'projectVersionDescription_trainingEndTimestamp' - The Unix date and time that training of the model ended.
--
-- 'trainingDataResult', 'projectVersionDescription_trainingDataResult' - Contains information about the training results.
newProjectVersionDescription ::
  ProjectVersionDescription
newProjectVersionDescription :: ProjectVersionDescription
newProjectVersionDescription =
  ProjectVersionDescription' :: Maybe Natural
-> Maybe ProjectVersionStatus
-> Maybe EvaluationResult
-> Maybe GroundTruthManifest
-> Maybe Text
-> Maybe TestingDataResult
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe OutputConfig
-> Maybe Natural
-> Maybe POSIX
-> Maybe TrainingDataResult
-> ProjectVersionDescription
ProjectVersionDescription'
    { $sel:minInferenceUnits:ProjectVersionDescription' :: Maybe Natural
minInferenceUnits =
        Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:status:ProjectVersionDescription' :: Maybe ProjectVersionStatus
status = Maybe ProjectVersionStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:evaluationResult:ProjectVersionDescription' :: Maybe EvaluationResult
evaluationResult = Maybe EvaluationResult
forall a. Maybe a
Prelude.Nothing,
      $sel:manifestSummary:ProjectVersionDescription' :: Maybe GroundTruthManifest
manifestSummary = Maybe GroundTruthManifest
forall a. Maybe a
Prelude.Nothing,
      $sel:kmsKeyId:ProjectVersionDescription' :: Maybe Text
kmsKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:testingDataResult:ProjectVersionDescription' :: Maybe TestingDataResult
testingDataResult = Maybe TestingDataResult
forall a. Maybe a
Prelude.Nothing,
      $sel:statusMessage:ProjectVersionDescription' :: Maybe Text
statusMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:creationTimestamp:ProjectVersionDescription' :: Maybe POSIX
creationTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:projectVersionArn:ProjectVersionDescription' :: Maybe Text
projectVersionArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:outputConfig:ProjectVersionDescription' :: Maybe OutputConfig
outputConfig = Maybe OutputConfig
forall a. Maybe a
Prelude.Nothing,
      $sel:billableTrainingTimeInSeconds:ProjectVersionDescription' :: Maybe Natural
billableTrainingTimeInSeconds = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:trainingEndTimestamp:ProjectVersionDescription' :: Maybe POSIX
trainingEndTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:trainingDataResult:ProjectVersionDescription' :: Maybe TrainingDataResult
trainingDataResult = Maybe TrainingDataResult
forall a. Maybe a
Prelude.Nothing
    }

-- | The minimum number of inference units used by the model. For more
-- information, see StartProjectVersion.
projectVersionDescription_minInferenceUnits :: Lens.Lens' ProjectVersionDescription (Prelude.Maybe Prelude.Natural)
projectVersionDescription_minInferenceUnits :: (Maybe Natural -> f (Maybe Natural))
-> ProjectVersionDescription -> f ProjectVersionDescription
projectVersionDescription_minInferenceUnits = (ProjectVersionDescription -> Maybe Natural)
-> (ProjectVersionDescription
    -> Maybe Natural -> ProjectVersionDescription)
-> Lens
     ProjectVersionDescription
     ProjectVersionDescription
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProjectVersionDescription' {Maybe Natural
minInferenceUnits :: Maybe Natural
$sel:minInferenceUnits:ProjectVersionDescription' :: ProjectVersionDescription -> Maybe Natural
minInferenceUnits} -> Maybe Natural
minInferenceUnits) (\s :: ProjectVersionDescription
s@ProjectVersionDescription' {} Maybe Natural
a -> ProjectVersionDescription
s {$sel:minInferenceUnits:ProjectVersionDescription' :: Maybe Natural
minInferenceUnits = Maybe Natural
a} :: ProjectVersionDescription)

-- | The current status of the model version.
projectVersionDescription_status :: Lens.Lens' ProjectVersionDescription (Prelude.Maybe ProjectVersionStatus)
projectVersionDescription_status :: (Maybe ProjectVersionStatus -> f (Maybe ProjectVersionStatus))
-> ProjectVersionDescription -> f ProjectVersionDescription
projectVersionDescription_status = (ProjectVersionDescription -> Maybe ProjectVersionStatus)
-> (ProjectVersionDescription
    -> Maybe ProjectVersionStatus -> ProjectVersionDescription)
-> Lens
     ProjectVersionDescription
     ProjectVersionDescription
     (Maybe ProjectVersionStatus)
     (Maybe ProjectVersionStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProjectVersionDescription' {Maybe ProjectVersionStatus
status :: Maybe ProjectVersionStatus
$sel:status:ProjectVersionDescription' :: ProjectVersionDescription -> Maybe ProjectVersionStatus
status} -> Maybe ProjectVersionStatus
status) (\s :: ProjectVersionDescription
s@ProjectVersionDescription' {} Maybe ProjectVersionStatus
a -> ProjectVersionDescription
s {$sel:status:ProjectVersionDescription' :: Maybe ProjectVersionStatus
status = Maybe ProjectVersionStatus
a} :: ProjectVersionDescription)

-- | The training results. @EvaluationResult@ is only returned if training is
-- successful.
projectVersionDescription_evaluationResult :: Lens.Lens' ProjectVersionDescription (Prelude.Maybe EvaluationResult)
projectVersionDescription_evaluationResult :: (Maybe EvaluationResult -> f (Maybe EvaluationResult))
-> ProjectVersionDescription -> f ProjectVersionDescription
projectVersionDescription_evaluationResult = (ProjectVersionDescription -> Maybe EvaluationResult)
-> (ProjectVersionDescription
    -> Maybe EvaluationResult -> ProjectVersionDescription)
-> Lens
     ProjectVersionDescription
     ProjectVersionDescription
     (Maybe EvaluationResult)
     (Maybe EvaluationResult)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProjectVersionDescription' {Maybe EvaluationResult
evaluationResult :: Maybe EvaluationResult
$sel:evaluationResult:ProjectVersionDescription' :: ProjectVersionDescription -> Maybe EvaluationResult
evaluationResult} -> Maybe EvaluationResult
evaluationResult) (\s :: ProjectVersionDescription
s@ProjectVersionDescription' {} Maybe EvaluationResult
a -> ProjectVersionDescription
s {$sel:evaluationResult:ProjectVersionDescription' :: Maybe EvaluationResult
evaluationResult = Maybe EvaluationResult
a} :: ProjectVersionDescription)

-- | The location of the summary manifest. The summary manifest provides
-- aggregate data validation results for the training and test datasets.
projectVersionDescription_manifestSummary :: Lens.Lens' ProjectVersionDescription (Prelude.Maybe GroundTruthManifest)
projectVersionDescription_manifestSummary :: (Maybe GroundTruthManifest -> f (Maybe GroundTruthManifest))
-> ProjectVersionDescription -> f ProjectVersionDescription
projectVersionDescription_manifestSummary = (ProjectVersionDescription -> Maybe GroundTruthManifest)
-> (ProjectVersionDescription
    -> Maybe GroundTruthManifest -> ProjectVersionDescription)
-> Lens
     ProjectVersionDescription
     ProjectVersionDescription
     (Maybe GroundTruthManifest)
     (Maybe GroundTruthManifest)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProjectVersionDescription' {Maybe GroundTruthManifest
manifestSummary :: Maybe GroundTruthManifest
$sel:manifestSummary:ProjectVersionDescription' :: ProjectVersionDescription -> Maybe GroundTruthManifest
manifestSummary} -> Maybe GroundTruthManifest
manifestSummary) (\s :: ProjectVersionDescription
s@ProjectVersionDescription' {} Maybe GroundTruthManifest
a -> ProjectVersionDescription
s {$sel:manifestSummary:ProjectVersionDescription' :: Maybe GroundTruthManifest
manifestSummary = Maybe GroundTruthManifest
a} :: ProjectVersionDescription)

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

-- | Contains information about the testing results.
projectVersionDescription_testingDataResult :: Lens.Lens' ProjectVersionDescription (Prelude.Maybe TestingDataResult)
projectVersionDescription_testingDataResult :: (Maybe TestingDataResult -> f (Maybe TestingDataResult))
-> ProjectVersionDescription -> f ProjectVersionDescription
projectVersionDescription_testingDataResult = (ProjectVersionDescription -> Maybe TestingDataResult)
-> (ProjectVersionDescription
    -> Maybe TestingDataResult -> ProjectVersionDescription)
-> Lens
     ProjectVersionDescription
     ProjectVersionDescription
     (Maybe TestingDataResult)
     (Maybe TestingDataResult)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProjectVersionDescription' {Maybe TestingDataResult
testingDataResult :: Maybe TestingDataResult
$sel:testingDataResult:ProjectVersionDescription' :: ProjectVersionDescription -> Maybe TestingDataResult
testingDataResult} -> Maybe TestingDataResult
testingDataResult) (\s :: ProjectVersionDescription
s@ProjectVersionDescription' {} Maybe TestingDataResult
a -> ProjectVersionDescription
s {$sel:testingDataResult:ProjectVersionDescription' :: Maybe TestingDataResult
testingDataResult = Maybe TestingDataResult
a} :: ProjectVersionDescription)

-- | A descriptive message for an error or warning that occurred.
projectVersionDescription_statusMessage :: Lens.Lens' ProjectVersionDescription (Prelude.Maybe Prelude.Text)
projectVersionDescription_statusMessage :: (Maybe Text -> f (Maybe Text))
-> ProjectVersionDescription -> f ProjectVersionDescription
projectVersionDescription_statusMessage = (ProjectVersionDescription -> Maybe Text)
-> (ProjectVersionDescription
    -> Maybe Text -> ProjectVersionDescription)
-> Lens
     ProjectVersionDescription
     ProjectVersionDescription
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProjectVersionDescription' {Maybe Text
statusMessage :: Maybe Text
$sel:statusMessage:ProjectVersionDescription' :: ProjectVersionDescription -> Maybe Text
statusMessage} -> Maybe Text
statusMessage) (\s :: ProjectVersionDescription
s@ProjectVersionDescription' {} Maybe Text
a -> ProjectVersionDescription
s {$sel:statusMessage:ProjectVersionDescription' :: Maybe Text
statusMessage = Maybe Text
a} :: ProjectVersionDescription)

-- | The Unix datetime for the date and time that training started.
projectVersionDescription_creationTimestamp :: Lens.Lens' ProjectVersionDescription (Prelude.Maybe Prelude.UTCTime)
projectVersionDescription_creationTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ProjectVersionDescription -> f ProjectVersionDescription
projectVersionDescription_creationTimestamp = (ProjectVersionDescription -> Maybe POSIX)
-> (ProjectVersionDescription
    -> Maybe POSIX -> ProjectVersionDescription)
-> Lens
     ProjectVersionDescription
     ProjectVersionDescription
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProjectVersionDescription' {Maybe POSIX
creationTimestamp :: Maybe POSIX
$sel:creationTimestamp:ProjectVersionDescription' :: ProjectVersionDescription -> Maybe POSIX
creationTimestamp} -> Maybe POSIX
creationTimestamp) (\s :: ProjectVersionDescription
s@ProjectVersionDescription' {} Maybe POSIX
a -> ProjectVersionDescription
s {$sel:creationTimestamp:ProjectVersionDescription' :: Maybe POSIX
creationTimestamp = Maybe POSIX
a} :: ProjectVersionDescription) ((Maybe POSIX -> f (Maybe POSIX))
 -> ProjectVersionDescription -> f ProjectVersionDescription)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ProjectVersionDescription
-> f ProjectVersionDescription
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 version.
projectVersionDescription_projectVersionArn :: Lens.Lens' ProjectVersionDescription (Prelude.Maybe Prelude.Text)
projectVersionDescription_projectVersionArn :: (Maybe Text -> f (Maybe Text))
-> ProjectVersionDescription -> f ProjectVersionDescription
projectVersionDescription_projectVersionArn = (ProjectVersionDescription -> Maybe Text)
-> (ProjectVersionDescription
    -> Maybe Text -> ProjectVersionDescription)
-> Lens
     ProjectVersionDescription
     ProjectVersionDescription
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProjectVersionDescription' {Maybe Text
projectVersionArn :: Maybe Text
$sel:projectVersionArn:ProjectVersionDescription' :: ProjectVersionDescription -> Maybe Text
projectVersionArn} -> Maybe Text
projectVersionArn) (\s :: ProjectVersionDescription
s@ProjectVersionDescription' {} Maybe Text
a -> ProjectVersionDescription
s {$sel:projectVersionArn:ProjectVersionDescription' :: Maybe Text
projectVersionArn = Maybe Text
a} :: ProjectVersionDescription)

-- | The location where training results are saved.
projectVersionDescription_outputConfig :: Lens.Lens' ProjectVersionDescription (Prelude.Maybe OutputConfig)
projectVersionDescription_outputConfig :: (Maybe OutputConfig -> f (Maybe OutputConfig))
-> ProjectVersionDescription -> f ProjectVersionDescription
projectVersionDescription_outputConfig = (ProjectVersionDescription -> Maybe OutputConfig)
-> (ProjectVersionDescription
    -> Maybe OutputConfig -> ProjectVersionDescription)
-> Lens
     ProjectVersionDescription
     ProjectVersionDescription
     (Maybe OutputConfig)
     (Maybe OutputConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProjectVersionDescription' {Maybe OutputConfig
outputConfig :: Maybe OutputConfig
$sel:outputConfig:ProjectVersionDescription' :: ProjectVersionDescription -> Maybe OutputConfig
outputConfig} -> Maybe OutputConfig
outputConfig) (\s :: ProjectVersionDescription
s@ProjectVersionDescription' {} Maybe OutputConfig
a -> ProjectVersionDescription
s {$sel:outputConfig:ProjectVersionDescription' :: Maybe OutputConfig
outputConfig = Maybe OutputConfig
a} :: ProjectVersionDescription)

-- | The duration, in seconds, that the model version has been billed for
-- training. This value is only returned if the model version has been
-- successfully trained.
projectVersionDescription_billableTrainingTimeInSeconds :: Lens.Lens' ProjectVersionDescription (Prelude.Maybe Prelude.Natural)
projectVersionDescription_billableTrainingTimeInSeconds :: (Maybe Natural -> f (Maybe Natural))
-> ProjectVersionDescription -> f ProjectVersionDescription
projectVersionDescription_billableTrainingTimeInSeconds = (ProjectVersionDescription -> Maybe Natural)
-> (ProjectVersionDescription
    -> Maybe Natural -> ProjectVersionDescription)
-> Lens
     ProjectVersionDescription
     ProjectVersionDescription
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProjectVersionDescription' {Maybe Natural
billableTrainingTimeInSeconds :: Maybe Natural
$sel:billableTrainingTimeInSeconds:ProjectVersionDescription' :: ProjectVersionDescription -> Maybe Natural
billableTrainingTimeInSeconds} -> Maybe Natural
billableTrainingTimeInSeconds) (\s :: ProjectVersionDescription
s@ProjectVersionDescription' {} Maybe Natural
a -> ProjectVersionDescription
s {$sel:billableTrainingTimeInSeconds:ProjectVersionDescription' :: Maybe Natural
billableTrainingTimeInSeconds = Maybe Natural
a} :: ProjectVersionDescription)

-- | The Unix date and time that training of the model ended.
projectVersionDescription_trainingEndTimestamp :: Lens.Lens' ProjectVersionDescription (Prelude.Maybe Prelude.UTCTime)
projectVersionDescription_trainingEndTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ProjectVersionDescription -> f ProjectVersionDescription
projectVersionDescription_trainingEndTimestamp = (ProjectVersionDescription -> Maybe POSIX)
-> (ProjectVersionDescription
    -> Maybe POSIX -> ProjectVersionDescription)
-> Lens
     ProjectVersionDescription
     ProjectVersionDescription
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProjectVersionDescription' {Maybe POSIX
trainingEndTimestamp :: Maybe POSIX
$sel:trainingEndTimestamp:ProjectVersionDescription' :: ProjectVersionDescription -> Maybe POSIX
trainingEndTimestamp} -> Maybe POSIX
trainingEndTimestamp) (\s :: ProjectVersionDescription
s@ProjectVersionDescription' {} Maybe POSIX
a -> ProjectVersionDescription
s {$sel:trainingEndTimestamp:ProjectVersionDescription' :: Maybe POSIX
trainingEndTimestamp = Maybe POSIX
a} :: ProjectVersionDescription) ((Maybe POSIX -> f (Maybe POSIX))
 -> ProjectVersionDescription -> f ProjectVersionDescription)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ProjectVersionDescription
-> f ProjectVersionDescription
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

-- | Contains information about the training results.
projectVersionDescription_trainingDataResult :: Lens.Lens' ProjectVersionDescription (Prelude.Maybe TrainingDataResult)
projectVersionDescription_trainingDataResult :: (Maybe TrainingDataResult -> f (Maybe TrainingDataResult))
-> ProjectVersionDescription -> f ProjectVersionDescription
projectVersionDescription_trainingDataResult = (ProjectVersionDescription -> Maybe TrainingDataResult)
-> (ProjectVersionDescription
    -> Maybe TrainingDataResult -> ProjectVersionDescription)
-> Lens
     ProjectVersionDescription
     ProjectVersionDescription
     (Maybe TrainingDataResult)
     (Maybe TrainingDataResult)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProjectVersionDescription' {Maybe TrainingDataResult
trainingDataResult :: Maybe TrainingDataResult
$sel:trainingDataResult:ProjectVersionDescription' :: ProjectVersionDescription -> Maybe TrainingDataResult
trainingDataResult} -> Maybe TrainingDataResult
trainingDataResult) (\s :: ProjectVersionDescription
s@ProjectVersionDescription' {} Maybe TrainingDataResult
a -> ProjectVersionDescription
s {$sel:trainingDataResult:ProjectVersionDescription' :: Maybe TrainingDataResult
trainingDataResult = Maybe TrainingDataResult
a} :: ProjectVersionDescription)

instance Core.FromJSON ProjectVersionDescription where
  parseJSON :: Value -> Parser ProjectVersionDescription
parseJSON =
    String
-> (Object -> Parser ProjectVersionDescription)
-> Value
-> Parser ProjectVersionDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ProjectVersionDescription"
      ( \Object
x ->
          Maybe Natural
-> Maybe ProjectVersionStatus
-> Maybe EvaluationResult
-> Maybe GroundTruthManifest
-> Maybe Text
-> Maybe TestingDataResult
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe OutputConfig
-> Maybe Natural
-> Maybe POSIX
-> Maybe TrainingDataResult
-> ProjectVersionDescription
ProjectVersionDescription'
            (Maybe Natural
 -> Maybe ProjectVersionStatus
 -> Maybe EvaluationResult
 -> Maybe GroundTruthManifest
 -> Maybe Text
 -> Maybe TestingDataResult
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe OutputConfig
 -> Maybe Natural
 -> Maybe POSIX
 -> Maybe TrainingDataResult
 -> ProjectVersionDescription)
-> Parser (Maybe Natural)
-> Parser
     (Maybe ProjectVersionStatus
      -> Maybe EvaluationResult
      -> Maybe GroundTruthManifest
      -> Maybe Text
      -> Maybe TestingDataResult
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe OutputConfig
      -> Maybe Natural
      -> Maybe POSIX
      -> Maybe TrainingDataResult
      -> ProjectVersionDescription)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MinInferenceUnits")
            Parser
  (Maybe ProjectVersionStatus
   -> Maybe EvaluationResult
   -> Maybe GroundTruthManifest
   -> Maybe Text
   -> Maybe TestingDataResult
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe OutputConfig
   -> Maybe Natural
   -> Maybe POSIX
   -> Maybe TrainingDataResult
   -> ProjectVersionDescription)
-> Parser (Maybe ProjectVersionStatus)
-> Parser
     (Maybe EvaluationResult
      -> Maybe GroundTruthManifest
      -> Maybe Text
      -> Maybe TestingDataResult
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe OutputConfig
      -> Maybe Natural
      -> Maybe POSIX
      -> Maybe TrainingDataResult
      -> ProjectVersionDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ProjectVersionStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
            Parser
  (Maybe EvaluationResult
   -> Maybe GroundTruthManifest
   -> Maybe Text
   -> Maybe TestingDataResult
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe OutputConfig
   -> Maybe Natural
   -> Maybe POSIX
   -> Maybe TrainingDataResult
   -> ProjectVersionDescription)
-> Parser (Maybe EvaluationResult)
-> Parser
     (Maybe GroundTruthManifest
      -> Maybe Text
      -> Maybe TestingDataResult
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe OutputConfig
      -> Maybe Natural
      -> Maybe POSIX
      -> Maybe TrainingDataResult
      -> ProjectVersionDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe EvaluationResult)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EvaluationResult")
            Parser
  (Maybe GroundTruthManifest
   -> Maybe Text
   -> Maybe TestingDataResult
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe OutputConfig
   -> Maybe Natural
   -> Maybe POSIX
   -> Maybe TrainingDataResult
   -> ProjectVersionDescription)
-> Parser (Maybe GroundTruthManifest)
-> Parser
     (Maybe Text
      -> Maybe TestingDataResult
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe OutputConfig
      -> Maybe Natural
      -> Maybe POSIX
      -> Maybe TrainingDataResult
      -> ProjectVersionDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe GroundTruthManifest)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ManifestSummary")
            Parser
  (Maybe Text
   -> Maybe TestingDataResult
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe OutputConfig
   -> Maybe Natural
   -> Maybe POSIX
   -> Maybe TrainingDataResult
   -> ProjectVersionDescription)
-> Parser (Maybe Text)
-> Parser
     (Maybe TestingDataResult
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe OutputConfig
      -> Maybe Natural
      -> Maybe POSIX
      -> Maybe TrainingDataResult
      -> ProjectVersionDescription)
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 TestingDataResult
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe OutputConfig
   -> Maybe Natural
   -> Maybe POSIX
   -> Maybe TrainingDataResult
   -> ProjectVersionDescription)
-> Parser (Maybe TestingDataResult)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe OutputConfig
      -> Maybe Natural
      -> Maybe POSIX
      -> Maybe TrainingDataResult
      -> ProjectVersionDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe TestingDataResult)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TestingDataResult")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe OutputConfig
   -> Maybe Natural
   -> Maybe POSIX
   -> Maybe TrainingDataResult
   -> ProjectVersionDescription)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe OutputConfig
      -> Maybe Natural
      -> Maybe POSIX
      -> Maybe TrainingDataResult
      -> ProjectVersionDescription)
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 Text
   -> Maybe OutputConfig
   -> Maybe Natural
   -> Maybe POSIX
   -> Maybe TrainingDataResult
   -> ProjectVersionDescription)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe OutputConfig
      -> Maybe Natural
      -> Maybe POSIX
      -> Maybe TrainingDataResult
      -> ProjectVersionDescription)
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 Text
   -> Maybe OutputConfig
   -> Maybe Natural
   -> Maybe POSIX
   -> Maybe TrainingDataResult
   -> ProjectVersionDescription)
-> Parser (Maybe Text)
-> Parser
     (Maybe OutputConfig
      -> Maybe Natural
      -> Maybe POSIX
      -> Maybe TrainingDataResult
      -> ProjectVersionDescription)
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
"ProjectVersionArn")
            Parser
  (Maybe OutputConfig
   -> Maybe Natural
   -> Maybe POSIX
   -> Maybe TrainingDataResult
   -> ProjectVersionDescription)
-> Parser (Maybe OutputConfig)
-> Parser
     (Maybe Natural
      -> Maybe POSIX
      -> Maybe TrainingDataResult
      -> ProjectVersionDescription)
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 Natural
   -> Maybe POSIX
   -> Maybe TrainingDataResult
   -> ProjectVersionDescription)
-> Parser (Maybe Natural)
-> Parser
     (Maybe POSIX
      -> Maybe TrainingDataResult -> ProjectVersionDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"BillableTrainingTimeInSeconds")
            Parser
  (Maybe POSIX
   -> Maybe TrainingDataResult -> ProjectVersionDescription)
-> Parser (Maybe POSIX)
-> Parser (Maybe TrainingDataResult -> ProjectVersionDescription)
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
"TrainingEndTimestamp")
            Parser (Maybe TrainingDataResult -> ProjectVersionDescription)
-> Parser (Maybe TrainingDataResult)
-> Parser ProjectVersionDescription
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe TrainingDataResult)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TrainingDataResult")
      )

instance Prelude.Hashable ProjectVersionDescription

instance Prelude.NFData ProjectVersionDescription