{-# 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 #-}
module Amazonka.SageMaker.Types.ModelDigests where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ModelDigests = ModelDigests'
{
ModelDigests -> Maybe Text
artifactDigest :: Prelude.Maybe Prelude.Text
}
deriving (ModelDigests -> ModelDigests -> Bool
(ModelDigests -> ModelDigests -> Bool)
-> (ModelDigests -> ModelDigests -> Bool) -> Eq ModelDigests
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModelDigests -> ModelDigests -> Bool
$c/= :: ModelDigests -> ModelDigests -> Bool
== :: ModelDigests -> ModelDigests -> Bool
$c== :: ModelDigests -> ModelDigests -> Bool
Prelude.Eq, ReadPrec [ModelDigests]
ReadPrec ModelDigests
Int -> ReadS ModelDigests
ReadS [ModelDigests]
(Int -> ReadS ModelDigests)
-> ReadS [ModelDigests]
-> ReadPrec ModelDigests
-> ReadPrec [ModelDigests]
-> Read ModelDigests
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ModelDigests]
$creadListPrec :: ReadPrec [ModelDigests]
readPrec :: ReadPrec ModelDigests
$creadPrec :: ReadPrec ModelDigests
readList :: ReadS [ModelDigests]
$creadList :: ReadS [ModelDigests]
readsPrec :: Int -> ReadS ModelDigests
$creadsPrec :: Int -> ReadS ModelDigests
Prelude.Read, Int -> ModelDigests -> ShowS
[ModelDigests] -> ShowS
ModelDigests -> String
(Int -> ModelDigests -> ShowS)
-> (ModelDigests -> String)
-> ([ModelDigests] -> ShowS)
-> Show ModelDigests
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModelDigests] -> ShowS
$cshowList :: [ModelDigests] -> ShowS
show :: ModelDigests -> String
$cshow :: ModelDigests -> String
showsPrec :: Int -> ModelDigests -> ShowS
$cshowsPrec :: Int -> ModelDigests -> ShowS
Prelude.Show, (forall x. ModelDigests -> Rep ModelDigests x)
-> (forall x. Rep ModelDigests x -> ModelDigests)
-> Generic ModelDigests
forall x. Rep ModelDigests x -> ModelDigests
forall x. ModelDigests -> Rep ModelDigests x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ModelDigests x -> ModelDigests
$cfrom :: forall x. ModelDigests -> Rep ModelDigests x
Prelude.Generic)
newModelDigests ::
ModelDigests
newModelDigests :: ModelDigests
newModelDigests =
ModelDigests' :: Maybe Text -> ModelDigests
ModelDigests' {$sel:artifactDigest:ModelDigests' :: Maybe Text
artifactDigest = Maybe Text
forall a. Maybe a
Prelude.Nothing}
modelDigests_artifactDigest :: Lens.Lens' ModelDigests (Prelude.Maybe Prelude.Text)
modelDigests_artifactDigest :: (Maybe Text -> f (Maybe Text)) -> ModelDigests -> f ModelDigests
modelDigests_artifactDigest = (ModelDigests -> Maybe Text)
-> (ModelDigests -> Maybe Text -> ModelDigests)
-> Lens ModelDigests ModelDigests (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelDigests' {Maybe Text
artifactDigest :: Maybe Text
$sel:artifactDigest:ModelDigests' :: ModelDigests -> Maybe Text
artifactDigest} -> Maybe Text
artifactDigest) (\s :: ModelDigests
s@ModelDigests' {} Maybe Text
a -> ModelDigests
s {$sel:artifactDigest:ModelDigests' :: Maybe Text
artifactDigest = Maybe Text
a} :: ModelDigests)
instance Core.FromJSON ModelDigests where
parseJSON :: Value -> Parser ModelDigests
parseJSON =
String
-> (Object -> Parser ModelDigests) -> Value -> Parser ModelDigests
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ModelDigests"
( \Object
x ->
Maybe Text -> ModelDigests
ModelDigests'
(Maybe Text -> ModelDigests)
-> Parser (Maybe Text) -> Parser ModelDigests
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
"ArtifactDigest")
)
instance Prelude.Hashable ModelDigests
instance Prelude.NFData ModelDigests