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

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

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

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

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

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

instance Prelude.NFData TransformJobStepMetadata