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

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

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

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

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

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

instance Prelude.NFData RegisterModelStepMetadata