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

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Metadata for a tuning step.
--
-- /See:/ 'newTuningJobStepMetaData' smart constructor.
data TuningJobStepMetaData = TuningJobStepMetaData'
  { -- | The Amazon Resource Name (ARN) of the tuning job that was run by this
    -- step execution.
    TuningJobStepMetaData -> Maybe Text
arn :: Prelude.Maybe Prelude.Text
  }
  deriving (TuningJobStepMetaData -> TuningJobStepMetaData -> Bool
(TuningJobStepMetaData -> TuningJobStepMetaData -> Bool)
-> (TuningJobStepMetaData -> TuningJobStepMetaData -> Bool)
-> Eq TuningJobStepMetaData
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TuningJobStepMetaData -> TuningJobStepMetaData -> Bool
$c/= :: TuningJobStepMetaData -> TuningJobStepMetaData -> Bool
== :: TuningJobStepMetaData -> TuningJobStepMetaData -> Bool
$c== :: TuningJobStepMetaData -> TuningJobStepMetaData -> Bool
Prelude.Eq, ReadPrec [TuningJobStepMetaData]
ReadPrec TuningJobStepMetaData
Int -> ReadS TuningJobStepMetaData
ReadS [TuningJobStepMetaData]
(Int -> ReadS TuningJobStepMetaData)
-> ReadS [TuningJobStepMetaData]
-> ReadPrec TuningJobStepMetaData
-> ReadPrec [TuningJobStepMetaData]
-> Read TuningJobStepMetaData
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TuningJobStepMetaData]
$creadListPrec :: ReadPrec [TuningJobStepMetaData]
readPrec :: ReadPrec TuningJobStepMetaData
$creadPrec :: ReadPrec TuningJobStepMetaData
readList :: ReadS [TuningJobStepMetaData]
$creadList :: ReadS [TuningJobStepMetaData]
readsPrec :: Int -> ReadS TuningJobStepMetaData
$creadsPrec :: Int -> ReadS TuningJobStepMetaData
Prelude.Read, Int -> TuningJobStepMetaData -> ShowS
[TuningJobStepMetaData] -> ShowS
TuningJobStepMetaData -> String
(Int -> TuningJobStepMetaData -> ShowS)
-> (TuningJobStepMetaData -> String)
-> ([TuningJobStepMetaData] -> ShowS)
-> Show TuningJobStepMetaData
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TuningJobStepMetaData] -> ShowS
$cshowList :: [TuningJobStepMetaData] -> ShowS
show :: TuningJobStepMetaData -> String
$cshow :: TuningJobStepMetaData -> String
showsPrec :: Int -> TuningJobStepMetaData -> ShowS
$cshowsPrec :: Int -> TuningJobStepMetaData -> ShowS
Prelude.Show, (forall x. TuningJobStepMetaData -> Rep TuningJobStepMetaData x)
-> (forall x. Rep TuningJobStepMetaData x -> TuningJobStepMetaData)
-> Generic TuningJobStepMetaData
forall x. Rep TuningJobStepMetaData x -> TuningJobStepMetaData
forall x. TuningJobStepMetaData -> Rep TuningJobStepMetaData x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TuningJobStepMetaData x -> TuningJobStepMetaData
$cfrom :: forall x. TuningJobStepMetaData -> Rep TuningJobStepMetaData x
Prelude.Generic)

-- |
-- Create a value of 'TuningJobStepMetaData' 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:
--
-- 'arn', 'tuningJobStepMetaData_arn' - The Amazon Resource Name (ARN) of the tuning job that was run by this
-- step execution.
newTuningJobStepMetaData ::
  TuningJobStepMetaData
newTuningJobStepMetaData :: TuningJobStepMetaData
newTuningJobStepMetaData =
  TuningJobStepMetaData' :: Maybe Text -> TuningJobStepMetaData
TuningJobStepMetaData' {$sel:arn:TuningJobStepMetaData' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing}

-- | The Amazon Resource Name (ARN) of the tuning job that was run by this
-- step execution.
tuningJobStepMetaData_arn :: Lens.Lens' TuningJobStepMetaData (Prelude.Maybe Prelude.Text)
tuningJobStepMetaData_arn :: (Maybe Text -> f (Maybe Text))
-> TuningJobStepMetaData -> f TuningJobStepMetaData
tuningJobStepMetaData_arn = (TuningJobStepMetaData -> Maybe Text)
-> (TuningJobStepMetaData -> Maybe Text -> TuningJobStepMetaData)
-> Lens
     TuningJobStepMetaData
     TuningJobStepMetaData
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TuningJobStepMetaData' {Maybe Text
arn :: Maybe Text
$sel:arn:TuningJobStepMetaData' :: TuningJobStepMetaData -> Maybe Text
arn} -> Maybe Text
arn) (\s :: TuningJobStepMetaData
s@TuningJobStepMetaData' {} Maybe Text
a -> TuningJobStepMetaData
s {$sel:arn:TuningJobStepMetaData' :: Maybe Text
arn = Maybe Text
a} :: TuningJobStepMetaData)

instance Core.FromJSON TuningJobStepMetaData where
  parseJSON :: Value -> Parser TuningJobStepMetaData
parseJSON =
    String
-> (Object -> Parser TuningJobStepMetaData)
-> Value
-> Parser TuningJobStepMetaData
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"TuningJobStepMetaData"
      ( \Object
x ->
          Maybe Text -> TuningJobStepMetaData
TuningJobStepMetaData'
            (Maybe Text -> TuningJobStepMetaData)
-> Parser (Maybe Text) -> Parser TuningJobStepMetaData
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
"Arn")
      )

instance Prelude.Hashable TuningJobStepMetaData

instance Prelude.NFData TuningJobStepMetaData