{-# 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.SageMaker.Types.AutoMLCandidate
-- 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.SageMaker.Types.AutoMLCandidate where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SageMaker.Types.AutoMLCandidateStep
import Amazonka.SageMaker.Types.AutoMLContainerDefinition
import Amazonka.SageMaker.Types.CandidateProperties
import Amazonka.SageMaker.Types.CandidateStatus
import Amazonka.SageMaker.Types.FinalAutoMLJobObjectiveMetric
import Amazonka.SageMaker.Types.ObjectiveStatus

-- | Information about a candidate produced by an AutoML training job,
-- including its status, steps, and other properties.
--
-- /See:/ 'newAutoMLCandidate' smart constructor.
data AutoMLCandidate = AutoMLCandidate'
  { -- | The failure reason.
    AutoMLCandidate -> Maybe Text
failureReason :: Prelude.Maybe Prelude.Text,
    -- | Information about the inference container definitions.
    AutoMLCandidate -> Maybe [AutoMLContainerDefinition]
inferenceContainers :: Prelude.Maybe [AutoMLContainerDefinition],
    -- | The properties of an AutoML candidate job.
    AutoMLCandidate -> Maybe CandidateProperties
candidateProperties :: Prelude.Maybe CandidateProperties,
    -- | The end time.
    AutoMLCandidate -> Maybe POSIX
endTime :: Prelude.Maybe Core.POSIX,
    AutoMLCandidate -> Maybe FinalAutoMLJobObjectiveMetric
finalAutoMLJobObjectiveMetric :: Prelude.Maybe FinalAutoMLJobObjectiveMetric,
    -- | The name of the candidate.
    AutoMLCandidate -> Text
candidateName :: Prelude.Text,
    -- | The objective\'s status.
    AutoMLCandidate -> ObjectiveStatus
objectiveStatus :: ObjectiveStatus,
    -- | Information about the candidate\'s steps.
    AutoMLCandidate -> [AutoMLCandidateStep]
candidateSteps :: [AutoMLCandidateStep],
    -- | The candidate\'s status.
    AutoMLCandidate -> CandidateStatus
candidateStatus :: CandidateStatus,
    -- | The creation time.
    AutoMLCandidate -> POSIX
creationTime :: Core.POSIX,
    -- | The last modified time.
    AutoMLCandidate -> POSIX
lastModifiedTime :: Core.POSIX
  }
  deriving (AutoMLCandidate -> AutoMLCandidate -> Bool
(AutoMLCandidate -> AutoMLCandidate -> Bool)
-> (AutoMLCandidate -> AutoMLCandidate -> Bool)
-> Eq AutoMLCandidate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AutoMLCandidate -> AutoMLCandidate -> Bool
$c/= :: AutoMLCandidate -> AutoMLCandidate -> Bool
== :: AutoMLCandidate -> AutoMLCandidate -> Bool
$c== :: AutoMLCandidate -> AutoMLCandidate -> Bool
Prelude.Eq, ReadPrec [AutoMLCandidate]
ReadPrec AutoMLCandidate
Int -> ReadS AutoMLCandidate
ReadS [AutoMLCandidate]
(Int -> ReadS AutoMLCandidate)
-> ReadS [AutoMLCandidate]
-> ReadPrec AutoMLCandidate
-> ReadPrec [AutoMLCandidate]
-> Read AutoMLCandidate
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AutoMLCandidate]
$creadListPrec :: ReadPrec [AutoMLCandidate]
readPrec :: ReadPrec AutoMLCandidate
$creadPrec :: ReadPrec AutoMLCandidate
readList :: ReadS [AutoMLCandidate]
$creadList :: ReadS [AutoMLCandidate]
readsPrec :: Int -> ReadS AutoMLCandidate
$creadsPrec :: Int -> ReadS AutoMLCandidate
Prelude.Read, Int -> AutoMLCandidate -> ShowS
[AutoMLCandidate] -> ShowS
AutoMLCandidate -> String
(Int -> AutoMLCandidate -> ShowS)
-> (AutoMLCandidate -> String)
-> ([AutoMLCandidate] -> ShowS)
-> Show AutoMLCandidate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AutoMLCandidate] -> ShowS
$cshowList :: [AutoMLCandidate] -> ShowS
show :: AutoMLCandidate -> String
$cshow :: AutoMLCandidate -> String
showsPrec :: Int -> AutoMLCandidate -> ShowS
$cshowsPrec :: Int -> AutoMLCandidate -> ShowS
Prelude.Show, (forall x. AutoMLCandidate -> Rep AutoMLCandidate x)
-> (forall x. Rep AutoMLCandidate x -> AutoMLCandidate)
-> Generic AutoMLCandidate
forall x. Rep AutoMLCandidate x -> AutoMLCandidate
forall x. AutoMLCandidate -> Rep AutoMLCandidate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AutoMLCandidate x -> AutoMLCandidate
$cfrom :: forall x. AutoMLCandidate -> Rep AutoMLCandidate x
Prelude.Generic)

-- |
-- Create a value of 'AutoMLCandidate' 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', 'autoMLCandidate_failureReason' - The failure reason.
--
-- 'inferenceContainers', 'autoMLCandidate_inferenceContainers' - Information about the inference container definitions.
--
-- 'candidateProperties', 'autoMLCandidate_candidateProperties' - The properties of an AutoML candidate job.
--
-- 'endTime', 'autoMLCandidate_endTime' - The end time.
--
-- 'finalAutoMLJobObjectiveMetric', 'autoMLCandidate_finalAutoMLJobObjectiveMetric' - Undocumented member.
--
-- 'candidateName', 'autoMLCandidate_candidateName' - The name of the candidate.
--
-- 'objectiveStatus', 'autoMLCandidate_objectiveStatus' - The objective\'s status.
--
-- 'candidateSteps', 'autoMLCandidate_candidateSteps' - Information about the candidate\'s steps.
--
-- 'candidateStatus', 'autoMLCandidate_candidateStatus' - The candidate\'s status.
--
-- 'creationTime', 'autoMLCandidate_creationTime' - The creation time.
--
-- 'lastModifiedTime', 'autoMLCandidate_lastModifiedTime' - The last modified time.
newAutoMLCandidate ::
  -- | 'candidateName'
  Prelude.Text ->
  -- | 'objectiveStatus'
  ObjectiveStatus ->
  -- | 'candidateStatus'
  CandidateStatus ->
  -- | 'creationTime'
  Prelude.UTCTime ->
  -- | 'lastModifiedTime'
  Prelude.UTCTime ->
  AutoMLCandidate
newAutoMLCandidate :: Text
-> ObjectiveStatus
-> CandidateStatus
-> UTCTime
-> UTCTime
-> AutoMLCandidate
newAutoMLCandidate
  Text
pCandidateName_
  ObjectiveStatus
pObjectiveStatus_
  CandidateStatus
pCandidateStatus_
  UTCTime
pCreationTime_
  UTCTime
pLastModifiedTime_ =
    AutoMLCandidate' :: Maybe Text
-> Maybe [AutoMLContainerDefinition]
-> Maybe CandidateProperties
-> Maybe POSIX
-> Maybe FinalAutoMLJobObjectiveMetric
-> Text
-> ObjectiveStatus
-> [AutoMLCandidateStep]
-> CandidateStatus
-> POSIX
-> POSIX
-> AutoMLCandidate
AutoMLCandidate'
      { $sel:failureReason:AutoMLCandidate' :: Maybe Text
failureReason = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:inferenceContainers:AutoMLCandidate' :: Maybe [AutoMLContainerDefinition]
inferenceContainers = Maybe [AutoMLContainerDefinition]
forall a. Maybe a
Prelude.Nothing,
        $sel:candidateProperties:AutoMLCandidate' :: Maybe CandidateProperties
candidateProperties = Maybe CandidateProperties
forall a. Maybe a
Prelude.Nothing,
        $sel:endTime:AutoMLCandidate' :: Maybe POSIX
endTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
        $sel:finalAutoMLJobObjectiveMetric:AutoMLCandidate' :: Maybe FinalAutoMLJobObjectiveMetric
finalAutoMLJobObjectiveMetric = Maybe FinalAutoMLJobObjectiveMetric
forall a. Maybe a
Prelude.Nothing,
        $sel:candidateName:AutoMLCandidate' :: Text
candidateName = Text
pCandidateName_,
        $sel:objectiveStatus:AutoMLCandidate' :: ObjectiveStatus
objectiveStatus = ObjectiveStatus
pObjectiveStatus_,
        $sel:candidateSteps:AutoMLCandidate' :: [AutoMLCandidateStep]
candidateSteps = [AutoMLCandidateStep]
forall a. Monoid a => a
Prelude.mempty,
        $sel:candidateStatus:AutoMLCandidate' :: CandidateStatus
candidateStatus = CandidateStatus
pCandidateStatus_,
        $sel:creationTime:AutoMLCandidate' :: POSIX
creationTime = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
 -> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreationTime_,
        $sel:lastModifiedTime:AutoMLCandidate' :: POSIX
lastModifiedTime =
          Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
 -> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pLastModifiedTime_
      }

-- | The failure reason.
autoMLCandidate_failureReason :: Lens.Lens' AutoMLCandidate (Prelude.Maybe Prelude.Text)
autoMLCandidate_failureReason :: (Maybe Text -> f (Maybe Text))
-> AutoMLCandidate -> f AutoMLCandidate
autoMLCandidate_failureReason = (AutoMLCandidate -> Maybe Text)
-> (AutoMLCandidate -> Maybe Text -> AutoMLCandidate)
-> Lens AutoMLCandidate AutoMLCandidate (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoMLCandidate' {Maybe Text
failureReason :: Maybe Text
$sel:failureReason:AutoMLCandidate' :: AutoMLCandidate -> Maybe Text
failureReason} -> Maybe Text
failureReason) (\s :: AutoMLCandidate
s@AutoMLCandidate' {} Maybe Text
a -> AutoMLCandidate
s {$sel:failureReason:AutoMLCandidate' :: Maybe Text
failureReason = Maybe Text
a} :: AutoMLCandidate)

-- | Information about the inference container definitions.
autoMLCandidate_inferenceContainers :: Lens.Lens' AutoMLCandidate (Prelude.Maybe [AutoMLContainerDefinition])
autoMLCandidate_inferenceContainers :: (Maybe [AutoMLContainerDefinition]
 -> f (Maybe [AutoMLContainerDefinition]))
-> AutoMLCandidate -> f AutoMLCandidate
autoMLCandidate_inferenceContainers = (AutoMLCandidate -> Maybe [AutoMLContainerDefinition])
-> (AutoMLCandidate
    -> Maybe [AutoMLContainerDefinition] -> AutoMLCandidate)
-> Lens
     AutoMLCandidate
     AutoMLCandidate
     (Maybe [AutoMLContainerDefinition])
     (Maybe [AutoMLContainerDefinition])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoMLCandidate' {Maybe [AutoMLContainerDefinition]
inferenceContainers :: Maybe [AutoMLContainerDefinition]
$sel:inferenceContainers:AutoMLCandidate' :: AutoMLCandidate -> Maybe [AutoMLContainerDefinition]
inferenceContainers} -> Maybe [AutoMLContainerDefinition]
inferenceContainers) (\s :: AutoMLCandidate
s@AutoMLCandidate' {} Maybe [AutoMLContainerDefinition]
a -> AutoMLCandidate
s {$sel:inferenceContainers:AutoMLCandidate' :: Maybe [AutoMLContainerDefinition]
inferenceContainers = Maybe [AutoMLContainerDefinition]
a} :: AutoMLCandidate) ((Maybe [AutoMLContainerDefinition]
  -> f (Maybe [AutoMLContainerDefinition]))
 -> AutoMLCandidate -> f AutoMLCandidate)
-> ((Maybe [AutoMLContainerDefinition]
     -> f (Maybe [AutoMLContainerDefinition]))
    -> Maybe [AutoMLContainerDefinition]
    -> f (Maybe [AutoMLContainerDefinition]))
-> (Maybe [AutoMLContainerDefinition]
    -> f (Maybe [AutoMLContainerDefinition]))
-> AutoMLCandidate
-> f AutoMLCandidate
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [AutoMLContainerDefinition]
  [AutoMLContainerDefinition]
  [AutoMLContainerDefinition]
  [AutoMLContainerDefinition]
-> Iso
     (Maybe [AutoMLContainerDefinition])
     (Maybe [AutoMLContainerDefinition])
     (Maybe [AutoMLContainerDefinition])
     (Maybe [AutoMLContainerDefinition])
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
  [AutoMLContainerDefinition]
  [AutoMLContainerDefinition]
  [AutoMLContainerDefinition]
  [AutoMLContainerDefinition]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The properties of an AutoML candidate job.
autoMLCandidate_candidateProperties :: Lens.Lens' AutoMLCandidate (Prelude.Maybe CandidateProperties)
autoMLCandidate_candidateProperties :: (Maybe CandidateProperties -> f (Maybe CandidateProperties))
-> AutoMLCandidate -> f AutoMLCandidate
autoMLCandidate_candidateProperties = (AutoMLCandidate -> Maybe CandidateProperties)
-> (AutoMLCandidate
    -> Maybe CandidateProperties -> AutoMLCandidate)
-> Lens
     AutoMLCandidate
     AutoMLCandidate
     (Maybe CandidateProperties)
     (Maybe CandidateProperties)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoMLCandidate' {Maybe CandidateProperties
candidateProperties :: Maybe CandidateProperties
$sel:candidateProperties:AutoMLCandidate' :: AutoMLCandidate -> Maybe CandidateProperties
candidateProperties} -> Maybe CandidateProperties
candidateProperties) (\s :: AutoMLCandidate
s@AutoMLCandidate' {} Maybe CandidateProperties
a -> AutoMLCandidate
s {$sel:candidateProperties:AutoMLCandidate' :: Maybe CandidateProperties
candidateProperties = Maybe CandidateProperties
a} :: AutoMLCandidate)

-- | The end time.
autoMLCandidate_endTime :: Lens.Lens' AutoMLCandidate (Prelude.Maybe Prelude.UTCTime)
autoMLCandidate_endTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> AutoMLCandidate -> f AutoMLCandidate
autoMLCandidate_endTime = (AutoMLCandidate -> Maybe POSIX)
-> (AutoMLCandidate -> Maybe POSIX -> AutoMLCandidate)
-> Lens AutoMLCandidate AutoMLCandidate (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoMLCandidate' {Maybe POSIX
endTime :: Maybe POSIX
$sel:endTime:AutoMLCandidate' :: AutoMLCandidate -> Maybe POSIX
endTime} -> Maybe POSIX
endTime) (\s :: AutoMLCandidate
s@AutoMLCandidate' {} Maybe POSIX
a -> AutoMLCandidate
s {$sel:endTime:AutoMLCandidate' :: Maybe POSIX
endTime = Maybe POSIX
a} :: AutoMLCandidate) ((Maybe POSIX -> f (Maybe POSIX))
 -> AutoMLCandidate -> f AutoMLCandidate)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> AutoMLCandidate
-> f AutoMLCandidate
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

-- | Undocumented member.
autoMLCandidate_finalAutoMLJobObjectiveMetric :: Lens.Lens' AutoMLCandidate (Prelude.Maybe FinalAutoMLJobObjectiveMetric)
autoMLCandidate_finalAutoMLJobObjectiveMetric :: (Maybe FinalAutoMLJobObjectiveMetric
 -> f (Maybe FinalAutoMLJobObjectiveMetric))
-> AutoMLCandidate -> f AutoMLCandidate
autoMLCandidate_finalAutoMLJobObjectiveMetric = (AutoMLCandidate -> Maybe FinalAutoMLJobObjectiveMetric)
-> (AutoMLCandidate
    -> Maybe FinalAutoMLJobObjectiveMetric -> AutoMLCandidate)
-> Lens
     AutoMLCandidate
     AutoMLCandidate
     (Maybe FinalAutoMLJobObjectiveMetric)
     (Maybe FinalAutoMLJobObjectiveMetric)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoMLCandidate' {Maybe FinalAutoMLJobObjectiveMetric
finalAutoMLJobObjectiveMetric :: Maybe FinalAutoMLJobObjectiveMetric
$sel:finalAutoMLJobObjectiveMetric:AutoMLCandidate' :: AutoMLCandidate -> Maybe FinalAutoMLJobObjectiveMetric
finalAutoMLJobObjectiveMetric} -> Maybe FinalAutoMLJobObjectiveMetric
finalAutoMLJobObjectiveMetric) (\s :: AutoMLCandidate
s@AutoMLCandidate' {} Maybe FinalAutoMLJobObjectiveMetric
a -> AutoMLCandidate
s {$sel:finalAutoMLJobObjectiveMetric:AutoMLCandidate' :: Maybe FinalAutoMLJobObjectiveMetric
finalAutoMLJobObjectiveMetric = Maybe FinalAutoMLJobObjectiveMetric
a} :: AutoMLCandidate)

-- | The name of the candidate.
autoMLCandidate_candidateName :: Lens.Lens' AutoMLCandidate Prelude.Text
autoMLCandidate_candidateName :: (Text -> f Text) -> AutoMLCandidate -> f AutoMLCandidate
autoMLCandidate_candidateName = (AutoMLCandidate -> Text)
-> (AutoMLCandidate -> Text -> AutoMLCandidate)
-> Lens AutoMLCandidate AutoMLCandidate Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoMLCandidate' {Text
candidateName :: Text
$sel:candidateName:AutoMLCandidate' :: AutoMLCandidate -> Text
candidateName} -> Text
candidateName) (\s :: AutoMLCandidate
s@AutoMLCandidate' {} Text
a -> AutoMLCandidate
s {$sel:candidateName:AutoMLCandidate' :: Text
candidateName = Text
a} :: AutoMLCandidate)

-- | The objective\'s status.
autoMLCandidate_objectiveStatus :: Lens.Lens' AutoMLCandidate ObjectiveStatus
autoMLCandidate_objectiveStatus :: (ObjectiveStatus -> f ObjectiveStatus)
-> AutoMLCandidate -> f AutoMLCandidate
autoMLCandidate_objectiveStatus = (AutoMLCandidate -> ObjectiveStatus)
-> (AutoMLCandidate -> ObjectiveStatus -> AutoMLCandidate)
-> Lens
     AutoMLCandidate AutoMLCandidate ObjectiveStatus ObjectiveStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoMLCandidate' {ObjectiveStatus
objectiveStatus :: ObjectiveStatus
$sel:objectiveStatus:AutoMLCandidate' :: AutoMLCandidate -> ObjectiveStatus
objectiveStatus} -> ObjectiveStatus
objectiveStatus) (\s :: AutoMLCandidate
s@AutoMLCandidate' {} ObjectiveStatus
a -> AutoMLCandidate
s {$sel:objectiveStatus:AutoMLCandidate' :: ObjectiveStatus
objectiveStatus = ObjectiveStatus
a} :: AutoMLCandidate)

-- | Information about the candidate\'s steps.
autoMLCandidate_candidateSteps :: Lens.Lens' AutoMLCandidate [AutoMLCandidateStep]
autoMLCandidate_candidateSteps :: ([AutoMLCandidateStep] -> f [AutoMLCandidateStep])
-> AutoMLCandidate -> f AutoMLCandidate
autoMLCandidate_candidateSteps = (AutoMLCandidate -> [AutoMLCandidateStep])
-> (AutoMLCandidate -> [AutoMLCandidateStep] -> AutoMLCandidate)
-> Lens
     AutoMLCandidate
     AutoMLCandidate
     [AutoMLCandidateStep]
     [AutoMLCandidateStep]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoMLCandidate' {[AutoMLCandidateStep]
candidateSteps :: [AutoMLCandidateStep]
$sel:candidateSteps:AutoMLCandidate' :: AutoMLCandidate -> [AutoMLCandidateStep]
candidateSteps} -> [AutoMLCandidateStep]
candidateSteps) (\s :: AutoMLCandidate
s@AutoMLCandidate' {} [AutoMLCandidateStep]
a -> AutoMLCandidate
s {$sel:candidateSteps:AutoMLCandidate' :: [AutoMLCandidateStep]
candidateSteps = [AutoMLCandidateStep]
a} :: AutoMLCandidate) (([AutoMLCandidateStep] -> f [AutoMLCandidateStep])
 -> AutoMLCandidate -> f AutoMLCandidate)
-> (([AutoMLCandidateStep] -> f [AutoMLCandidateStep])
    -> [AutoMLCandidateStep] -> f [AutoMLCandidateStep])
-> ([AutoMLCandidateStep] -> f [AutoMLCandidateStep])
-> AutoMLCandidate
-> f AutoMLCandidate
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([AutoMLCandidateStep] -> f [AutoMLCandidateStep])
-> [AutoMLCandidateStep] -> f [AutoMLCandidateStep]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The candidate\'s status.
autoMLCandidate_candidateStatus :: Lens.Lens' AutoMLCandidate CandidateStatus
autoMLCandidate_candidateStatus :: (CandidateStatus -> f CandidateStatus)
-> AutoMLCandidate -> f AutoMLCandidate
autoMLCandidate_candidateStatus = (AutoMLCandidate -> CandidateStatus)
-> (AutoMLCandidate -> CandidateStatus -> AutoMLCandidate)
-> Lens
     AutoMLCandidate AutoMLCandidate CandidateStatus CandidateStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoMLCandidate' {CandidateStatus
candidateStatus :: CandidateStatus
$sel:candidateStatus:AutoMLCandidate' :: AutoMLCandidate -> CandidateStatus
candidateStatus} -> CandidateStatus
candidateStatus) (\s :: AutoMLCandidate
s@AutoMLCandidate' {} CandidateStatus
a -> AutoMLCandidate
s {$sel:candidateStatus:AutoMLCandidate' :: CandidateStatus
candidateStatus = CandidateStatus
a} :: AutoMLCandidate)

-- | The creation time.
autoMLCandidate_creationTime :: Lens.Lens' AutoMLCandidate Prelude.UTCTime
autoMLCandidate_creationTime :: (UTCTime -> f UTCTime) -> AutoMLCandidate -> f AutoMLCandidate
autoMLCandidate_creationTime = (AutoMLCandidate -> POSIX)
-> (AutoMLCandidate -> POSIX -> AutoMLCandidate)
-> Lens AutoMLCandidate AutoMLCandidate POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoMLCandidate' {POSIX
creationTime :: POSIX
$sel:creationTime:AutoMLCandidate' :: AutoMLCandidate -> POSIX
creationTime} -> POSIX
creationTime) (\s :: AutoMLCandidate
s@AutoMLCandidate' {} POSIX
a -> AutoMLCandidate
s {$sel:creationTime:AutoMLCandidate' :: POSIX
creationTime = POSIX
a} :: AutoMLCandidate) ((POSIX -> f POSIX) -> AutoMLCandidate -> f AutoMLCandidate)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> AutoMLCandidate
-> f AutoMLCandidate
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The last modified time.
autoMLCandidate_lastModifiedTime :: Lens.Lens' AutoMLCandidate Prelude.UTCTime
autoMLCandidate_lastModifiedTime :: (UTCTime -> f UTCTime) -> AutoMLCandidate -> f AutoMLCandidate
autoMLCandidate_lastModifiedTime = (AutoMLCandidate -> POSIX)
-> (AutoMLCandidate -> POSIX -> AutoMLCandidate)
-> Lens AutoMLCandidate AutoMLCandidate POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoMLCandidate' {POSIX
lastModifiedTime :: POSIX
$sel:lastModifiedTime:AutoMLCandidate' :: AutoMLCandidate -> POSIX
lastModifiedTime} -> POSIX
lastModifiedTime) (\s :: AutoMLCandidate
s@AutoMLCandidate' {} POSIX
a -> AutoMLCandidate
s {$sel:lastModifiedTime:AutoMLCandidate' :: POSIX
lastModifiedTime = POSIX
a} :: AutoMLCandidate) ((POSIX -> f POSIX) -> AutoMLCandidate -> f AutoMLCandidate)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> AutoMLCandidate
-> f AutoMLCandidate
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

instance Core.FromJSON AutoMLCandidate where
  parseJSON :: Value -> Parser AutoMLCandidate
parseJSON =
    String
-> (Object -> Parser AutoMLCandidate)
-> Value
-> Parser AutoMLCandidate
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"AutoMLCandidate"
      ( \Object
x ->
          Maybe Text
-> Maybe [AutoMLContainerDefinition]
-> Maybe CandidateProperties
-> Maybe POSIX
-> Maybe FinalAutoMLJobObjectiveMetric
-> Text
-> ObjectiveStatus
-> [AutoMLCandidateStep]
-> CandidateStatus
-> POSIX
-> POSIX
-> AutoMLCandidate
AutoMLCandidate'
            (Maybe Text
 -> Maybe [AutoMLContainerDefinition]
 -> Maybe CandidateProperties
 -> Maybe POSIX
 -> Maybe FinalAutoMLJobObjectiveMetric
 -> Text
 -> ObjectiveStatus
 -> [AutoMLCandidateStep]
 -> CandidateStatus
 -> POSIX
 -> POSIX
 -> AutoMLCandidate)
-> Parser (Maybe Text)
-> Parser
     (Maybe [AutoMLContainerDefinition]
      -> Maybe CandidateProperties
      -> Maybe POSIX
      -> Maybe FinalAutoMLJobObjectiveMetric
      -> Text
      -> ObjectiveStatus
      -> [AutoMLCandidateStep]
      -> CandidateStatus
      -> POSIX
      -> POSIX
      -> AutoMLCandidate)
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 [AutoMLContainerDefinition]
   -> Maybe CandidateProperties
   -> Maybe POSIX
   -> Maybe FinalAutoMLJobObjectiveMetric
   -> Text
   -> ObjectiveStatus
   -> [AutoMLCandidateStep]
   -> CandidateStatus
   -> POSIX
   -> POSIX
   -> AutoMLCandidate)
-> Parser (Maybe [AutoMLContainerDefinition])
-> Parser
     (Maybe CandidateProperties
      -> Maybe POSIX
      -> Maybe FinalAutoMLJobObjectiveMetric
      -> Text
      -> ObjectiveStatus
      -> [AutoMLCandidateStep]
      -> CandidateStatus
      -> POSIX
      -> POSIX
      -> AutoMLCandidate)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Parser (Maybe (Maybe [AutoMLContainerDefinition]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"InferenceContainers"
                            Parser (Maybe (Maybe [AutoMLContainerDefinition]))
-> Maybe [AutoMLContainerDefinition]
-> Parser (Maybe [AutoMLContainerDefinition])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [AutoMLContainerDefinition]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe CandidateProperties
   -> Maybe POSIX
   -> Maybe FinalAutoMLJobObjectiveMetric
   -> Text
   -> ObjectiveStatus
   -> [AutoMLCandidateStep]
   -> CandidateStatus
   -> POSIX
   -> POSIX
   -> AutoMLCandidate)
-> Parser (Maybe CandidateProperties)
-> Parser
     (Maybe POSIX
      -> Maybe FinalAutoMLJobObjectiveMetric
      -> Text
      -> ObjectiveStatus
      -> [AutoMLCandidateStep]
      -> CandidateStatus
      -> POSIX
      -> POSIX
      -> AutoMLCandidate)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe CandidateProperties)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CandidateProperties")
            Parser
  (Maybe POSIX
   -> Maybe FinalAutoMLJobObjectiveMetric
   -> Text
   -> ObjectiveStatus
   -> [AutoMLCandidateStep]
   -> CandidateStatus
   -> POSIX
   -> POSIX
   -> AutoMLCandidate)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe FinalAutoMLJobObjectiveMetric
      -> Text
      -> ObjectiveStatus
      -> [AutoMLCandidateStep]
      -> CandidateStatus
      -> POSIX
      -> POSIX
      -> AutoMLCandidate)
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
"EndTime")
            Parser
  (Maybe FinalAutoMLJobObjectiveMetric
   -> Text
   -> ObjectiveStatus
   -> [AutoMLCandidateStep]
   -> CandidateStatus
   -> POSIX
   -> POSIX
   -> AutoMLCandidate)
-> Parser (Maybe FinalAutoMLJobObjectiveMetric)
-> Parser
     (Text
      -> ObjectiveStatus
      -> [AutoMLCandidateStep]
      -> CandidateStatus
      -> POSIX
      -> POSIX
      -> AutoMLCandidate)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe FinalAutoMLJobObjectiveMetric)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"FinalAutoMLJobObjectiveMetric")
            Parser
  (Text
   -> ObjectiveStatus
   -> [AutoMLCandidateStep]
   -> CandidateStatus
   -> POSIX
   -> POSIX
   -> AutoMLCandidate)
-> Parser Text
-> Parser
     (ObjectiveStatus
      -> [AutoMLCandidateStep]
      -> CandidateStatus
      -> POSIX
      -> POSIX
      -> AutoMLCandidate)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"CandidateName")
            Parser
  (ObjectiveStatus
   -> [AutoMLCandidateStep]
   -> CandidateStatus
   -> POSIX
   -> POSIX
   -> AutoMLCandidate)
-> Parser ObjectiveStatus
-> Parser
     ([AutoMLCandidateStep]
      -> CandidateStatus -> POSIX -> POSIX -> AutoMLCandidate)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser ObjectiveStatus
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"ObjectiveStatus")
            Parser
  ([AutoMLCandidateStep]
   -> CandidateStatus -> POSIX -> POSIX -> AutoMLCandidate)
-> Parser [AutoMLCandidateStep]
-> Parser (CandidateStatus -> POSIX -> POSIX -> AutoMLCandidate)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe [AutoMLCandidateStep])
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CandidateSteps" Parser (Maybe [AutoMLCandidateStep])
-> [AutoMLCandidateStep] -> Parser [AutoMLCandidateStep]
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= [AutoMLCandidateStep]
forall a. Monoid a => a
Prelude.mempty)
            Parser (CandidateStatus -> POSIX -> POSIX -> AutoMLCandidate)
-> Parser CandidateStatus
-> Parser (POSIX -> POSIX -> AutoMLCandidate)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser CandidateStatus
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"CandidateStatus")
            Parser (POSIX -> POSIX -> AutoMLCandidate)
-> Parser POSIX -> Parser (POSIX -> AutoMLCandidate)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"CreationTime")
            Parser (POSIX -> AutoMLCandidate)
-> Parser POSIX -> Parser AutoMLCandidate
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"LastModifiedTime")
      )

instance Prelude.Hashable AutoMLCandidate

instance Prelude.NFData AutoMLCandidate