{-# 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.ModelPackageStatusItem where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SageMaker.Types.DetailedModelPackageStatus
data ModelPackageStatusItem = ModelPackageStatusItem'
{
ModelPackageStatusItem -> Maybe Text
failureReason :: Prelude.Maybe Prelude.Text,
ModelPackageStatusItem -> Text
name :: Prelude.Text,
ModelPackageStatusItem -> DetailedModelPackageStatus
status :: DetailedModelPackageStatus
}
deriving (ModelPackageStatusItem -> ModelPackageStatusItem -> Bool
(ModelPackageStatusItem -> ModelPackageStatusItem -> Bool)
-> (ModelPackageStatusItem -> ModelPackageStatusItem -> Bool)
-> Eq ModelPackageStatusItem
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModelPackageStatusItem -> ModelPackageStatusItem -> Bool
$c/= :: ModelPackageStatusItem -> ModelPackageStatusItem -> Bool
== :: ModelPackageStatusItem -> ModelPackageStatusItem -> Bool
$c== :: ModelPackageStatusItem -> ModelPackageStatusItem -> Bool
Prelude.Eq, ReadPrec [ModelPackageStatusItem]
ReadPrec ModelPackageStatusItem
Int -> ReadS ModelPackageStatusItem
ReadS [ModelPackageStatusItem]
(Int -> ReadS ModelPackageStatusItem)
-> ReadS [ModelPackageStatusItem]
-> ReadPrec ModelPackageStatusItem
-> ReadPrec [ModelPackageStatusItem]
-> Read ModelPackageStatusItem
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ModelPackageStatusItem]
$creadListPrec :: ReadPrec [ModelPackageStatusItem]
readPrec :: ReadPrec ModelPackageStatusItem
$creadPrec :: ReadPrec ModelPackageStatusItem
readList :: ReadS [ModelPackageStatusItem]
$creadList :: ReadS [ModelPackageStatusItem]
readsPrec :: Int -> ReadS ModelPackageStatusItem
$creadsPrec :: Int -> ReadS ModelPackageStatusItem
Prelude.Read, Int -> ModelPackageStatusItem -> ShowS
[ModelPackageStatusItem] -> ShowS
ModelPackageStatusItem -> String
(Int -> ModelPackageStatusItem -> ShowS)
-> (ModelPackageStatusItem -> String)
-> ([ModelPackageStatusItem] -> ShowS)
-> Show ModelPackageStatusItem
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModelPackageStatusItem] -> ShowS
$cshowList :: [ModelPackageStatusItem] -> ShowS
show :: ModelPackageStatusItem -> String
$cshow :: ModelPackageStatusItem -> String
showsPrec :: Int -> ModelPackageStatusItem -> ShowS
$cshowsPrec :: Int -> ModelPackageStatusItem -> ShowS
Prelude.Show, (forall x. ModelPackageStatusItem -> Rep ModelPackageStatusItem x)
-> (forall x.
Rep ModelPackageStatusItem x -> ModelPackageStatusItem)
-> Generic ModelPackageStatusItem
forall x. Rep ModelPackageStatusItem x -> ModelPackageStatusItem
forall x. ModelPackageStatusItem -> Rep ModelPackageStatusItem x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ModelPackageStatusItem x -> ModelPackageStatusItem
$cfrom :: forall x. ModelPackageStatusItem -> Rep ModelPackageStatusItem x
Prelude.Generic)
newModelPackageStatusItem ::
Prelude.Text ->
DetailedModelPackageStatus ->
ModelPackageStatusItem
newModelPackageStatusItem :: Text -> DetailedModelPackageStatus -> ModelPackageStatusItem
newModelPackageStatusItem Text
pName_ DetailedModelPackageStatus
pStatus_ =
ModelPackageStatusItem' :: Maybe Text
-> Text -> DetailedModelPackageStatus -> ModelPackageStatusItem
ModelPackageStatusItem'
{ $sel:failureReason:ModelPackageStatusItem' :: Maybe Text
failureReason =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:ModelPackageStatusItem' :: Text
name = Text
pName_,
$sel:status:ModelPackageStatusItem' :: DetailedModelPackageStatus
status = DetailedModelPackageStatus
pStatus_
}
modelPackageStatusItem_failureReason :: Lens.Lens' ModelPackageStatusItem (Prelude.Maybe Prelude.Text)
modelPackageStatusItem_failureReason :: (Maybe Text -> f (Maybe Text))
-> ModelPackageStatusItem -> f ModelPackageStatusItem
modelPackageStatusItem_failureReason = (ModelPackageStatusItem -> Maybe Text)
-> (ModelPackageStatusItem -> Maybe Text -> ModelPackageStatusItem)
-> Lens
ModelPackageStatusItem
ModelPackageStatusItem
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelPackageStatusItem' {Maybe Text
failureReason :: Maybe Text
$sel:failureReason:ModelPackageStatusItem' :: ModelPackageStatusItem -> Maybe Text
failureReason} -> Maybe Text
failureReason) (\s :: ModelPackageStatusItem
s@ModelPackageStatusItem' {} Maybe Text
a -> ModelPackageStatusItem
s {$sel:failureReason:ModelPackageStatusItem' :: Maybe Text
failureReason = Maybe Text
a} :: ModelPackageStatusItem)
modelPackageStatusItem_name :: Lens.Lens' ModelPackageStatusItem Prelude.Text
modelPackageStatusItem_name :: (Text -> f Text)
-> ModelPackageStatusItem -> f ModelPackageStatusItem
modelPackageStatusItem_name = (ModelPackageStatusItem -> Text)
-> (ModelPackageStatusItem -> Text -> ModelPackageStatusItem)
-> Lens ModelPackageStatusItem ModelPackageStatusItem Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelPackageStatusItem' {Text
name :: Text
$sel:name:ModelPackageStatusItem' :: ModelPackageStatusItem -> Text
name} -> Text
name) (\s :: ModelPackageStatusItem
s@ModelPackageStatusItem' {} Text
a -> ModelPackageStatusItem
s {$sel:name:ModelPackageStatusItem' :: Text
name = Text
a} :: ModelPackageStatusItem)
modelPackageStatusItem_status :: Lens.Lens' ModelPackageStatusItem DetailedModelPackageStatus
modelPackageStatusItem_status :: (DetailedModelPackageStatus -> f DetailedModelPackageStatus)
-> ModelPackageStatusItem -> f ModelPackageStatusItem
modelPackageStatusItem_status = (ModelPackageStatusItem -> DetailedModelPackageStatus)
-> (ModelPackageStatusItem
-> DetailedModelPackageStatus -> ModelPackageStatusItem)
-> Lens
ModelPackageStatusItem
ModelPackageStatusItem
DetailedModelPackageStatus
DetailedModelPackageStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelPackageStatusItem' {DetailedModelPackageStatus
status :: DetailedModelPackageStatus
$sel:status:ModelPackageStatusItem' :: ModelPackageStatusItem -> DetailedModelPackageStatus
status} -> DetailedModelPackageStatus
status) (\s :: ModelPackageStatusItem
s@ModelPackageStatusItem' {} DetailedModelPackageStatus
a -> ModelPackageStatusItem
s {$sel:status:ModelPackageStatusItem' :: DetailedModelPackageStatus
status = DetailedModelPackageStatus
a} :: ModelPackageStatusItem)
instance Core.FromJSON ModelPackageStatusItem where
parseJSON :: Value -> Parser ModelPackageStatusItem
parseJSON =
String
-> (Object -> Parser ModelPackageStatusItem)
-> Value
-> Parser ModelPackageStatusItem
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ModelPackageStatusItem"
( \Object
x ->
Maybe Text
-> Text -> DetailedModelPackageStatus -> ModelPackageStatusItem
ModelPackageStatusItem'
(Maybe Text
-> Text -> DetailedModelPackageStatus -> ModelPackageStatusItem)
-> Parser (Maybe Text)
-> Parser
(Text -> DetailedModelPackageStatus -> ModelPackageStatusItem)
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
"FailureReason")
Parser
(Text -> DetailedModelPackageStatus -> ModelPackageStatusItem)
-> Parser Text
-> Parser (DetailedModelPackageStatus -> ModelPackageStatusItem)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Name")
Parser (DetailedModelPackageStatus -> ModelPackageStatusItem)
-> Parser DetailedModelPackageStatus
-> Parser ModelPackageStatusItem
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser DetailedModelPackageStatus
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Status")
)
instance Prelude.Hashable ModelPackageStatusItem
instance Prelude.NFData ModelPackageStatusItem