{-# 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.ModelPackageGroup where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SageMaker.Types.ModelPackageGroupStatus
import Amazonka.SageMaker.Types.Tag
import Amazonka.SageMaker.Types.UserContext
data ModelPackageGroup = ModelPackageGroup'
{
ModelPackageGroup -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
ModelPackageGroup -> Maybe Text
modelPackageGroupDescription :: Prelude.Maybe Prelude.Text,
ModelPackageGroup -> Maybe Text
modelPackageGroupArn :: Prelude.Maybe Prelude.Text,
ModelPackageGroup -> Maybe UserContext
createdBy :: Prelude.Maybe UserContext,
ModelPackageGroup -> Maybe Text
modelPackageGroupName :: Prelude.Maybe Prelude.Text,
ModelPackageGroup -> Maybe ModelPackageGroupStatus
modelPackageGroupStatus :: Prelude.Maybe ModelPackageGroupStatus,
ModelPackageGroup -> Maybe [Tag]
tags :: Prelude.Maybe [Tag]
}
deriving (ModelPackageGroup -> ModelPackageGroup -> Bool
(ModelPackageGroup -> ModelPackageGroup -> Bool)
-> (ModelPackageGroup -> ModelPackageGroup -> Bool)
-> Eq ModelPackageGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModelPackageGroup -> ModelPackageGroup -> Bool
$c/= :: ModelPackageGroup -> ModelPackageGroup -> Bool
== :: ModelPackageGroup -> ModelPackageGroup -> Bool
$c== :: ModelPackageGroup -> ModelPackageGroup -> Bool
Prelude.Eq, ReadPrec [ModelPackageGroup]
ReadPrec ModelPackageGroup
Int -> ReadS ModelPackageGroup
ReadS [ModelPackageGroup]
(Int -> ReadS ModelPackageGroup)
-> ReadS [ModelPackageGroup]
-> ReadPrec ModelPackageGroup
-> ReadPrec [ModelPackageGroup]
-> Read ModelPackageGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ModelPackageGroup]
$creadListPrec :: ReadPrec [ModelPackageGroup]
readPrec :: ReadPrec ModelPackageGroup
$creadPrec :: ReadPrec ModelPackageGroup
readList :: ReadS [ModelPackageGroup]
$creadList :: ReadS [ModelPackageGroup]
readsPrec :: Int -> ReadS ModelPackageGroup
$creadsPrec :: Int -> ReadS ModelPackageGroup
Prelude.Read, Int -> ModelPackageGroup -> ShowS
[ModelPackageGroup] -> ShowS
ModelPackageGroup -> String
(Int -> ModelPackageGroup -> ShowS)
-> (ModelPackageGroup -> String)
-> ([ModelPackageGroup] -> ShowS)
-> Show ModelPackageGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModelPackageGroup] -> ShowS
$cshowList :: [ModelPackageGroup] -> ShowS
show :: ModelPackageGroup -> String
$cshow :: ModelPackageGroup -> String
showsPrec :: Int -> ModelPackageGroup -> ShowS
$cshowsPrec :: Int -> ModelPackageGroup -> ShowS
Prelude.Show, (forall x. ModelPackageGroup -> Rep ModelPackageGroup x)
-> (forall x. Rep ModelPackageGroup x -> ModelPackageGroup)
-> Generic ModelPackageGroup
forall x. Rep ModelPackageGroup x -> ModelPackageGroup
forall x. ModelPackageGroup -> Rep ModelPackageGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ModelPackageGroup x -> ModelPackageGroup
$cfrom :: forall x. ModelPackageGroup -> Rep ModelPackageGroup x
Prelude.Generic)
newModelPackageGroup ::
ModelPackageGroup
newModelPackageGroup :: ModelPackageGroup
newModelPackageGroup =
ModelPackageGroup' :: Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe UserContext
-> Maybe Text
-> Maybe ModelPackageGroupStatus
-> Maybe [Tag]
-> ModelPackageGroup
ModelPackageGroup'
{ $sel:creationTime:ModelPackageGroup' :: Maybe POSIX
creationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:modelPackageGroupDescription:ModelPackageGroup' :: Maybe Text
modelPackageGroupDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:modelPackageGroupArn:ModelPackageGroup' :: Maybe Text
modelPackageGroupArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:createdBy:ModelPackageGroup' :: Maybe UserContext
createdBy = Maybe UserContext
forall a. Maybe a
Prelude.Nothing,
$sel:modelPackageGroupName:ModelPackageGroup' :: Maybe Text
modelPackageGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:modelPackageGroupStatus:ModelPackageGroup' :: Maybe ModelPackageGroupStatus
modelPackageGroupStatus = Maybe ModelPackageGroupStatus
forall a. Maybe a
Prelude.Nothing,
$sel:tags:ModelPackageGroup' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing
}
modelPackageGroup_creationTime :: Lens.Lens' ModelPackageGroup (Prelude.Maybe Prelude.UTCTime)
modelPackageGroup_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ModelPackageGroup -> f ModelPackageGroup
modelPackageGroup_creationTime = (ModelPackageGroup -> Maybe POSIX)
-> (ModelPackageGroup -> Maybe POSIX -> ModelPackageGroup)
-> Lens
ModelPackageGroup ModelPackageGroup (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelPackageGroup' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:ModelPackageGroup' :: ModelPackageGroup -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: ModelPackageGroup
s@ModelPackageGroup' {} Maybe POSIX
a -> ModelPackageGroup
s {$sel:creationTime:ModelPackageGroup' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: ModelPackageGroup) ((Maybe POSIX -> f (Maybe POSIX))
-> ModelPackageGroup -> f ModelPackageGroup)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ModelPackageGroup
-> f ModelPackageGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
modelPackageGroup_modelPackageGroupDescription :: Lens.Lens' ModelPackageGroup (Prelude.Maybe Prelude.Text)
modelPackageGroup_modelPackageGroupDescription :: (Maybe Text -> f (Maybe Text))
-> ModelPackageGroup -> f ModelPackageGroup
modelPackageGroup_modelPackageGroupDescription = (ModelPackageGroup -> Maybe Text)
-> (ModelPackageGroup -> Maybe Text -> ModelPackageGroup)
-> Lens
ModelPackageGroup ModelPackageGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelPackageGroup' {Maybe Text
modelPackageGroupDescription :: Maybe Text
$sel:modelPackageGroupDescription:ModelPackageGroup' :: ModelPackageGroup -> Maybe Text
modelPackageGroupDescription} -> Maybe Text
modelPackageGroupDescription) (\s :: ModelPackageGroup
s@ModelPackageGroup' {} Maybe Text
a -> ModelPackageGroup
s {$sel:modelPackageGroupDescription:ModelPackageGroup' :: Maybe Text
modelPackageGroupDescription = Maybe Text
a} :: ModelPackageGroup)
modelPackageGroup_modelPackageGroupArn :: Lens.Lens' ModelPackageGroup (Prelude.Maybe Prelude.Text)
modelPackageGroup_modelPackageGroupArn :: (Maybe Text -> f (Maybe Text))
-> ModelPackageGroup -> f ModelPackageGroup
modelPackageGroup_modelPackageGroupArn = (ModelPackageGroup -> Maybe Text)
-> (ModelPackageGroup -> Maybe Text -> ModelPackageGroup)
-> Lens
ModelPackageGroup ModelPackageGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelPackageGroup' {Maybe Text
modelPackageGroupArn :: Maybe Text
$sel:modelPackageGroupArn:ModelPackageGroup' :: ModelPackageGroup -> Maybe Text
modelPackageGroupArn} -> Maybe Text
modelPackageGroupArn) (\s :: ModelPackageGroup
s@ModelPackageGroup' {} Maybe Text
a -> ModelPackageGroup
s {$sel:modelPackageGroupArn:ModelPackageGroup' :: Maybe Text
modelPackageGroupArn = Maybe Text
a} :: ModelPackageGroup)
modelPackageGroup_createdBy :: Lens.Lens' ModelPackageGroup (Prelude.Maybe UserContext)
modelPackageGroup_createdBy :: (Maybe UserContext -> f (Maybe UserContext))
-> ModelPackageGroup -> f ModelPackageGroup
modelPackageGroup_createdBy = (ModelPackageGroup -> Maybe UserContext)
-> (ModelPackageGroup -> Maybe UserContext -> ModelPackageGroup)
-> Lens
ModelPackageGroup
ModelPackageGroup
(Maybe UserContext)
(Maybe UserContext)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelPackageGroup' {Maybe UserContext
createdBy :: Maybe UserContext
$sel:createdBy:ModelPackageGroup' :: ModelPackageGroup -> Maybe UserContext
createdBy} -> Maybe UserContext
createdBy) (\s :: ModelPackageGroup
s@ModelPackageGroup' {} Maybe UserContext
a -> ModelPackageGroup
s {$sel:createdBy:ModelPackageGroup' :: Maybe UserContext
createdBy = Maybe UserContext
a} :: ModelPackageGroup)
modelPackageGroup_modelPackageGroupName :: Lens.Lens' ModelPackageGroup (Prelude.Maybe Prelude.Text)
modelPackageGroup_modelPackageGroupName :: (Maybe Text -> f (Maybe Text))
-> ModelPackageGroup -> f ModelPackageGroup
modelPackageGroup_modelPackageGroupName = (ModelPackageGroup -> Maybe Text)
-> (ModelPackageGroup -> Maybe Text -> ModelPackageGroup)
-> Lens
ModelPackageGroup ModelPackageGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelPackageGroup' {Maybe Text
modelPackageGroupName :: Maybe Text
$sel:modelPackageGroupName:ModelPackageGroup' :: ModelPackageGroup -> Maybe Text
modelPackageGroupName} -> Maybe Text
modelPackageGroupName) (\s :: ModelPackageGroup
s@ModelPackageGroup' {} Maybe Text
a -> ModelPackageGroup
s {$sel:modelPackageGroupName:ModelPackageGroup' :: Maybe Text
modelPackageGroupName = Maybe Text
a} :: ModelPackageGroup)
modelPackageGroup_modelPackageGroupStatus :: Lens.Lens' ModelPackageGroup (Prelude.Maybe ModelPackageGroupStatus)
modelPackageGroup_modelPackageGroupStatus :: (Maybe ModelPackageGroupStatus
-> f (Maybe ModelPackageGroupStatus))
-> ModelPackageGroup -> f ModelPackageGroup
modelPackageGroup_modelPackageGroupStatus = (ModelPackageGroup -> Maybe ModelPackageGroupStatus)
-> (ModelPackageGroup
-> Maybe ModelPackageGroupStatus -> ModelPackageGroup)
-> Lens
ModelPackageGroup
ModelPackageGroup
(Maybe ModelPackageGroupStatus)
(Maybe ModelPackageGroupStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelPackageGroup' {Maybe ModelPackageGroupStatus
modelPackageGroupStatus :: Maybe ModelPackageGroupStatus
$sel:modelPackageGroupStatus:ModelPackageGroup' :: ModelPackageGroup -> Maybe ModelPackageGroupStatus
modelPackageGroupStatus} -> Maybe ModelPackageGroupStatus
modelPackageGroupStatus) (\s :: ModelPackageGroup
s@ModelPackageGroup' {} Maybe ModelPackageGroupStatus
a -> ModelPackageGroup
s {$sel:modelPackageGroupStatus:ModelPackageGroup' :: Maybe ModelPackageGroupStatus
modelPackageGroupStatus = Maybe ModelPackageGroupStatus
a} :: ModelPackageGroup)
modelPackageGroup_tags :: Lens.Lens' ModelPackageGroup (Prelude.Maybe [Tag])
modelPackageGroup_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> ModelPackageGroup -> f ModelPackageGroup
modelPackageGroup_tags = (ModelPackageGroup -> Maybe [Tag])
-> (ModelPackageGroup -> Maybe [Tag] -> ModelPackageGroup)
-> Lens
ModelPackageGroup ModelPackageGroup (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelPackageGroup' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:ModelPackageGroup' :: ModelPackageGroup -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: ModelPackageGroup
s@ModelPackageGroup' {} Maybe [Tag]
a -> ModelPackageGroup
s {$sel:tags:ModelPackageGroup' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: ModelPackageGroup) ((Maybe [Tag] -> f (Maybe [Tag]))
-> ModelPackageGroup -> f ModelPackageGroup)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> ModelPackageGroup
-> f ModelPackageGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.FromJSON ModelPackageGroup where
parseJSON :: Value -> Parser ModelPackageGroup
parseJSON =
String
-> (Object -> Parser ModelPackageGroup)
-> Value
-> Parser ModelPackageGroup
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ModelPackageGroup"
( \Object
x ->
Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe UserContext
-> Maybe Text
-> Maybe ModelPackageGroupStatus
-> Maybe [Tag]
-> ModelPackageGroup
ModelPackageGroup'
(Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe UserContext
-> Maybe Text
-> Maybe ModelPackageGroupStatus
-> Maybe [Tag]
-> ModelPackageGroup)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe UserContext
-> Maybe Text
-> Maybe ModelPackageGroupStatus
-> Maybe [Tag]
-> ModelPackageGroup)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreationTime")
Parser
(Maybe Text
-> Maybe Text
-> Maybe UserContext
-> Maybe Text
-> Maybe ModelPackageGroupStatus
-> Maybe [Tag]
-> ModelPackageGroup)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe UserContext
-> Maybe Text
-> Maybe ModelPackageGroupStatus
-> Maybe [Tag]
-> ModelPackageGroup)
forall (f :: * -> *) a b. Applicative f => 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
"ModelPackageGroupDescription")
Parser
(Maybe Text
-> Maybe UserContext
-> Maybe Text
-> Maybe ModelPackageGroupStatus
-> Maybe [Tag]
-> ModelPackageGroup)
-> Parser (Maybe Text)
-> Parser
(Maybe UserContext
-> Maybe Text
-> Maybe ModelPackageGroupStatus
-> Maybe [Tag]
-> ModelPackageGroup)
forall (f :: * -> *) a b. Applicative f => 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
"ModelPackageGroupArn")
Parser
(Maybe UserContext
-> Maybe Text
-> Maybe ModelPackageGroupStatus
-> Maybe [Tag]
-> ModelPackageGroup)
-> Parser (Maybe UserContext)
-> Parser
(Maybe Text
-> Maybe ModelPackageGroupStatus
-> Maybe [Tag]
-> ModelPackageGroup)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe UserContext)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreatedBy")
Parser
(Maybe Text
-> Maybe ModelPackageGroupStatus
-> Maybe [Tag]
-> ModelPackageGroup)
-> Parser (Maybe Text)
-> Parser
(Maybe ModelPackageGroupStatus -> Maybe [Tag] -> ModelPackageGroup)
forall (f :: * -> *) a b. Applicative f => 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
"ModelPackageGroupName")
Parser
(Maybe ModelPackageGroupStatus -> Maybe [Tag] -> ModelPackageGroup)
-> Parser (Maybe ModelPackageGroupStatus)
-> Parser (Maybe [Tag] -> ModelPackageGroup)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ModelPackageGroupStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ModelPackageGroupStatus")
Parser (Maybe [Tag] -> ModelPackageGroup)
-> Parser (Maybe [Tag]) -> Parser ModelPackageGroup
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Tag]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Tags" Parser (Maybe (Maybe [Tag])) -> Maybe [Tag] -> Parser (Maybe [Tag])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Tag]
forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable ModelPackageGroup
instance Prelude.NFData ModelPackageGroup