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

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

-- | Metadata for Model steps.
--
-- /See:/ 'newModelStepMetadata' smart constructor.
data ModelStepMetadata = ModelStepMetadata'
  { -- | The Amazon Resource Name (ARN) of the created model.
    ModelStepMetadata -> Maybe Text
arn :: Prelude.Maybe Prelude.Text
  }
  deriving (ModelStepMetadata -> ModelStepMetadata -> Bool
(ModelStepMetadata -> ModelStepMetadata -> Bool)
-> (ModelStepMetadata -> ModelStepMetadata -> Bool)
-> Eq ModelStepMetadata
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModelStepMetadata -> ModelStepMetadata -> Bool
$c/= :: ModelStepMetadata -> ModelStepMetadata -> Bool
== :: ModelStepMetadata -> ModelStepMetadata -> Bool
$c== :: ModelStepMetadata -> ModelStepMetadata -> Bool
Prelude.Eq, ReadPrec [ModelStepMetadata]
ReadPrec ModelStepMetadata
Int -> ReadS ModelStepMetadata
ReadS [ModelStepMetadata]
(Int -> ReadS ModelStepMetadata)
-> ReadS [ModelStepMetadata]
-> ReadPrec ModelStepMetadata
-> ReadPrec [ModelStepMetadata]
-> Read ModelStepMetadata
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ModelStepMetadata]
$creadListPrec :: ReadPrec [ModelStepMetadata]
readPrec :: ReadPrec ModelStepMetadata
$creadPrec :: ReadPrec ModelStepMetadata
readList :: ReadS [ModelStepMetadata]
$creadList :: ReadS [ModelStepMetadata]
readsPrec :: Int -> ReadS ModelStepMetadata
$creadsPrec :: Int -> ReadS ModelStepMetadata
Prelude.Read, Int -> ModelStepMetadata -> ShowS
[ModelStepMetadata] -> ShowS
ModelStepMetadata -> String
(Int -> ModelStepMetadata -> ShowS)
-> (ModelStepMetadata -> String)
-> ([ModelStepMetadata] -> ShowS)
-> Show ModelStepMetadata
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModelStepMetadata] -> ShowS
$cshowList :: [ModelStepMetadata] -> ShowS
show :: ModelStepMetadata -> String
$cshow :: ModelStepMetadata -> String
showsPrec :: Int -> ModelStepMetadata -> ShowS
$cshowsPrec :: Int -> ModelStepMetadata -> ShowS
Prelude.Show, (forall x. ModelStepMetadata -> Rep ModelStepMetadata x)
-> (forall x. Rep ModelStepMetadata x -> ModelStepMetadata)
-> Generic ModelStepMetadata
forall x. Rep ModelStepMetadata x -> ModelStepMetadata
forall x. ModelStepMetadata -> Rep ModelStepMetadata x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ModelStepMetadata x -> ModelStepMetadata
$cfrom :: forall x. ModelStepMetadata -> Rep ModelStepMetadata x
Prelude.Generic)

-- |
-- Create a value of 'ModelStepMetadata' 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', 'modelStepMetadata_arn' - The Amazon Resource Name (ARN) of the created model.
newModelStepMetadata ::
  ModelStepMetadata
newModelStepMetadata :: ModelStepMetadata
newModelStepMetadata =
  ModelStepMetadata' :: Maybe Text -> ModelStepMetadata
ModelStepMetadata' {$sel:arn:ModelStepMetadata' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing}

-- | The Amazon Resource Name (ARN) of the created model.
modelStepMetadata_arn :: Lens.Lens' ModelStepMetadata (Prelude.Maybe Prelude.Text)
modelStepMetadata_arn :: (Maybe Text -> f (Maybe Text))
-> ModelStepMetadata -> f ModelStepMetadata
modelStepMetadata_arn = (ModelStepMetadata -> Maybe Text)
-> (ModelStepMetadata -> Maybe Text -> ModelStepMetadata)
-> Lens
     ModelStepMetadata ModelStepMetadata (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelStepMetadata' {Maybe Text
arn :: Maybe Text
$sel:arn:ModelStepMetadata' :: ModelStepMetadata -> Maybe Text
arn} -> Maybe Text
arn) (\s :: ModelStepMetadata
s@ModelStepMetadata' {} Maybe Text
a -> ModelStepMetadata
s {$sel:arn:ModelStepMetadata' :: Maybe Text
arn = Maybe Text
a} :: ModelStepMetadata)

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

instance Prelude.NFData ModelStepMetadata