{-# 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.AutoMLCandidateStep
-- 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.AutoMLCandidateStep where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SageMaker.Types.CandidateStepType

-- | Information about the steps for a candidate and what step it is working
-- on.
--
-- /See:/ 'newAutoMLCandidateStep' smart constructor.
data AutoMLCandidateStep = AutoMLCandidateStep'
  { -- | Whether the candidate is at the transform, training, or processing step.
    AutoMLCandidateStep -> CandidateStepType
candidateStepType :: CandidateStepType,
    -- | The ARN for the candidate\'s step.
    AutoMLCandidateStep -> Text
candidateStepArn :: Prelude.Text,
    -- | The name for the candidate\'s step.
    AutoMLCandidateStep -> Text
candidateStepName :: Prelude.Text
  }
  deriving (AutoMLCandidateStep -> AutoMLCandidateStep -> Bool
(AutoMLCandidateStep -> AutoMLCandidateStep -> Bool)
-> (AutoMLCandidateStep -> AutoMLCandidateStep -> Bool)
-> Eq AutoMLCandidateStep
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AutoMLCandidateStep -> AutoMLCandidateStep -> Bool
$c/= :: AutoMLCandidateStep -> AutoMLCandidateStep -> Bool
== :: AutoMLCandidateStep -> AutoMLCandidateStep -> Bool
$c== :: AutoMLCandidateStep -> AutoMLCandidateStep -> Bool
Prelude.Eq, ReadPrec [AutoMLCandidateStep]
ReadPrec AutoMLCandidateStep
Int -> ReadS AutoMLCandidateStep
ReadS [AutoMLCandidateStep]
(Int -> ReadS AutoMLCandidateStep)
-> ReadS [AutoMLCandidateStep]
-> ReadPrec AutoMLCandidateStep
-> ReadPrec [AutoMLCandidateStep]
-> Read AutoMLCandidateStep
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AutoMLCandidateStep]
$creadListPrec :: ReadPrec [AutoMLCandidateStep]
readPrec :: ReadPrec AutoMLCandidateStep
$creadPrec :: ReadPrec AutoMLCandidateStep
readList :: ReadS [AutoMLCandidateStep]
$creadList :: ReadS [AutoMLCandidateStep]
readsPrec :: Int -> ReadS AutoMLCandidateStep
$creadsPrec :: Int -> ReadS AutoMLCandidateStep
Prelude.Read, Int -> AutoMLCandidateStep -> ShowS
[AutoMLCandidateStep] -> ShowS
AutoMLCandidateStep -> String
(Int -> AutoMLCandidateStep -> ShowS)
-> (AutoMLCandidateStep -> String)
-> ([AutoMLCandidateStep] -> ShowS)
-> Show AutoMLCandidateStep
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AutoMLCandidateStep] -> ShowS
$cshowList :: [AutoMLCandidateStep] -> ShowS
show :: AutoMLCandidateStep -> String
$cshow :: AutoMLCandidateStep -> String
showsPrec :: Int -> AutoMLCandidateStep -> ShowS
$cshowsPrec :: Int -> AutoMLCandidateStep -> ShowS
Prelude.Show, (forall x. AutoMLCandidateStep -> Rep AutoMLCandidateStep x)
-> (forall x. Rep AutoMLCandidateStep x -> AutoMLCandidateStep)
-> Generic AutoMLCandidateStep
forall x. Rep AutoMLCandidateStep x -> AutoMLCandidateStep
forall x. AutoMLCandidateStep -> Rep AutoMLCandidateStep x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AutoMLCandidateStep x -> AutoMLCandidateStep
$cfrom :: forall x. AutoMLCandidateStep -> Rep AutoMLCandidateStep x
Prelude.Generic)

-- |
-- Create a value of 'AutoMLCandidateStep' 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:
--
-- 'candidateStepType', 'autoMLCandidateStep_candidateStepType' - Whether the candidate is at the transform, training, or processing step.
--
-- 'candidateStepArn', 'autoMLCandidateStep_candidateStepArn' - The ARN for the candidate\'s step.
--
-- 'candidateStepName', 'autoMLCandidateStep_candidateStepName' - The name for the candidate\'s step.
newAutoMLCandidateStep ::
  -- | 'candidateStepType'
  CandidateStepType ->
  -- | 'candidateStepArn'
  Prelude.Text ->
  -- | 'candidateStepName'
  Prelude.Text ->
  AutoMLCandidateStep
newAutoMLCandidateStep :: CandidateStepType -> Text -> Text -> AutoMLCandidateStep
newAutoMLCandidateStep
  CandidateStepType
pCandidateStepType_
  Text
pCandidateStepArn_
  Text
pCandidateStepName_ =
    AutoMLCandidateStep' :: CandidateStepType -> Text -> Text -> AutoMLCandidateStep
AutoMLCandidateStep'
      { $sel:candidateStepType:AutoMLCandidateStep' :: CandidateStepType
candidateStepType =
          CandidateStepType
pCandidateStepType_,
        $sel:candidateStepArn:AutoMLCandidateStep' :: Text
candidateStepArn = Text
pCandidateStepArn_,
        $sel:candidateStepName:AutoMLCandidateStep' :: Text
candidateStepName = Text
pCandidateStepName_
      }

-- | Whether the candidate is at the transform, training, or processing step.
autoMLCandidateStep_candidateStepType :: Lens.Lens' AutoMLCandidateStep CandidateStepType
autoMLCandidateStep_candidateStepType :: (CandidateStepType -> f CandidateStepType)
-> AutoMLCandidateStep -> f AutoMLCandidateStep
autoMLCandidateStep_candidateStepType = (AutoMLCandidateStep -> CandidateStepType)
-> (AutoMLCandidateStep
    -> CandidateStepType -> AutoMLCandidateStep)
-> Lens
     AutoMLCandidateStep
     AutoMLCandidateStep
     CandidateStepType
     CandidateStepType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoMLCandidateStep' {CandidateStepType
candidateStepType :: CandidateStepType
$sel:candidateStepType:AutoMLCandidateStep' :: AutoMLCandidateStep -> CandidateStepType
candidateStepType} -> CandidateStepType
candidateStepType) (\s :: AutoMLCandidateStep
s@AutoMLCandidateStep' {} CandidateStepType
a -> AutoMLCandidateStep
s {$sel:candidateStepType:AutoMLCandidateStep' :: CandidateStepType
candidateStepType = CandidateStepType
a} :: AutoMLCandidateStep)

-- | The ARN for the candidate\'s step.
autoMLCandidateStep_candidateStepArn :: Lens.Lens' AutoMLCandidateStep Prelude.Text
autoMLCandidateStep_candidateStepArn :: (Text -> f Text) -> AutoMLCandidateStep -> f AutoMLCandidateStep
autoMLCandidateStep_candidateStepArn = (AutoMLCandidateStep -> Text)
-> (AutoMLCandidateStep -> Text -> AutoMLCandidateStep)
-> Lens AutoMLCandidateStep AutoMLCandidateStep Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoMLCandidateStep' {Text
candidateStepArn :: Text
$sel:candidateStepArn:AutoMLCandidateStep' :: AutoMLCandidateStep -> Text
candidateStepArn} -> Text
candidateStepArn) (\s :: AutoMLCandidateStep
s@AutoMLCandidateStep' {} Text
a -> AutoMLCandidateStep
s {$sel:candidateStepArn:AutoMLCandidateStep' :: Text
candidateStepArn = Text
a} :: AutoMLCandidateStep)

-- | The name for the candidate\'s step.
autoMLCandidateStep_candidateStepName :: Lens.Lens' AutoMLCandidateStep Prelude.Text
autoMLCandidateStep_candidateStepName :: (Text -> f Text) -> AutoMLCandidateStep -> f AutoMLCandidateStep
autoMLCandidateStep_candidateStepName = (AutoMLCandidateStep -> Text)
-> (AutoMLCandidateStep -> Text -> AutoMLCandidateStep)
-> Lens AutoMLCandidateStep AutoMLCandidateStep Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoMLCandidateStep' {Text
candidateStepName :: Text
$sel:candidateStepName:AutoMLCandidateStep' :: AutoMLCandidateStep -> Text
candidateStepName} -> Text
candidateStepName) (\s :: AutoMLCandidateStep
s@AutoMLCandidateStep' {} Text
a -> AutoMLCandidateStep
s {$sel:candidateStepName:AutoMLCandidateStep' :: Text
candidateStepName = Text
a} :: AutoMLCandidateStep)

instance Core.FromJSON AutoMLCandidateStep where
  parseJSON :: Value -> Parser AutoMLCandidateStep
parseJSON =
    String
-> (Object -> Parser AutoMLCandidateStep)
-> Value
-> Parser AutoMLCandidateStep
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"AutoMLCandidateStep"
      ( \Object
x ->
          CandidateStepType -> Text -> Text -> AutoMLCandidateStep
AutoMLCandidateStep'
            (CandidateStepType -> Text -> Text -> AutoMLCandidateStep)
-> Parser CandidateStepType
-> Parser (Text -> Text -> AutoMLCandidateStep)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser CandidateStepType
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"CandidateStepType")
            Parser (Text -> Text -> AutoMLCandidateStep)
-> Parser Text -> Parser (Text -> AutoMLCandidateStep)
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
"CandidateStepArn")
            Parser (Text -> AutoMLCandidateStep)
-> Parser Text -> Parser AutoMLCandidateStep
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
"CandidateStepName")
      )

instance Prelude.Hashable AutoMLCandidateStep

instance Prelude.NFData AutoMLCandidateStep