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

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SageMaker.Types.ModelPackageGroupStatus

-- | Summary information about a model group.
--
-- /See:/ 'newModelPackageGroupSummary' smart constructor.
data ModelPackageGroupSummary = ModelPackageGroupSummary'
  { -- | A description of the model group.
    ModelPackageGroupSummary -> Maybe Text
modelPackageGroupDescription :: Prelude.Maybe Prelude.Text,
    -- | The name of the model group.
    ModelPackageGroupSummary -> Text
modelPackageGroupName :: Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the model group.
    ModelPackageGroupSummary -> Text
modelPackageGroupArn :: Prelude.Text,
    -- | The time that the model group was created.
    ModelPackageGroupSummary -> POSIX
creationTime :: Core.POSIX,
    -- | The status of the model group.
    ModelPackageGroupSummary -> ModelPackageGroupStatus
modelPackageGroupStatus :: ModelPackageGroupStatus
  }
  deriving (ModelPackageGroupSummary -> ModelPackageGroupSummary -> Bool
(ModelPackageGroupSummary -> ModelPackageGroupSummary -> Bool)
-> (ModelPackageGroupSummary -> ModelPackageGroupSummary -> Bool)
-> Eq ModelPackageGroupSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModelPackageGroupSummary -> ModelPackageGroupSummary -> Bool
$c/= :: ModelPackageGroupSummary -> ModelPackageGroupSummary -> Bool
== :: ModelPackageGroupSummary -> ModelPackageGroupSummary -> Bool
$c== :: ModelPackageGroupSummary -> ModelPackageGroupSummary -> Bool
Prelude.Eq, ReadPrec [ModelPackageGroupSummary]
ReadPrec ModelPackageGroupSummary
Int -> ReadS ModelPackageGroupSummary
ReadS [ModelPackageGroupSummary]
(Int -> ReadS ModelPackageGroupSummary)
-> ReadS [ModelPackageGroupSummary]
-> ReadPrec ModelPackageGroupSummary
-> ReadPrec [ModelPackageGroupSummary]
-> Read ModelPackageGroupSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ModelPackageGroupSummary]
$creadListPrec :: ReadPrec [ModelPackageGroupSummary]
readPrec :: ReadPrec ModelPackageGroupSummary
$creadPrec :: ReadPrec ModelPackageGroupSummary
readList :: ReadS [ModelPackageGroupSummary]
$creadList :: ReadS [ModelPackageGroupSummary]
readsPrec :: Int -> ReadS ModelPackageGroupSummary
$creadsPrec :: Int -> ReadS ModelPackageGroupSummary
Prelude.Read, Int -> ModelPackageGroupSummary -> ShowS
[ModelPackageGroupSummary] -> ShowS
ModelPackageGroupSummary -> String
(Int -> ModelPackageGroupSummary -> ShowS)
-> (ModelPackageGroupSummary -> String)
-> ([ModelPackageGroupSummary] -> ShowS)
-> Show ModelPackageGroupSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModelPackageGroupSummary] -> ShowS
$cshowList :: [ModelPackageGroupSummary] -> ShowS
show :: ModelPackageGroupSummary -> String
$cshow :: ModelPackageGroupSummary -> String
showsPrec :: Int -> ModelPackageGroupSummary -> ShowS
$cshowsPrec :: Int -> ModelPackageGroupSummary -> ShowS
Prelude.Show, (forall x.
 ModelPackageGroupSummary -> Rep ModelPackageGroupSummary x)
-> (forall x.
    Rep ModelPackageGroupSummary x -> ModelPackageGroupSummary)
-> Generic ModelPackageGroupSummary
forall x.
Rep ModelPackageGroupSummary x -> ModelPackageGroupSummary
forall x.
ModelPackageGroupSummary -> Rep ModelPackageGroupSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ModelPackageGroupSummary x -> ModelPackageGroupSummary
$cfrom :: forall x.
ModelPackageGroupSummary -> Rep ModelPackageGroupSummary x
Prelude.Generic)

-- |
-- Create a value of 'ModelPackageGroupSummary' 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:
--
-- 'modelPackageGroupDescription', 'modelPackageGroupSummary_modelPackageGroupDescription' - A description of the model group.
--
-- 'modelPackageGroupName', 'modelPackageGroupSummary_modelPackageGroupName' - The name of the model group.
--
-- 'modelPackageGroupArn', 'modelPackageGroupSummary_modelPackageGroupArn' - The Amazon Resource Name (ARN) of the model group.
--
-- 'creationTime', 'modelPackageGroupSummary_creationTime' - The time that the model group was created.
--
-- 'modelPackageGroupStatus', 'modelPackageGroupSummary_modelPackageGroupStatus' - The status of the model group.
newModelPackageGroupSummary ::
  -- | 'modelPackageGroupName'
  Prelude.Text ->
  -- | 'modelPackageGroupArn'
  Prelude.Text ->
  -- | 'creationTime'
  Prelude.UTCTime ->
  -- | 'modelPackageGroupStatus'
  ModelPackageGroupStatus ->
  ModelPackageGroupSummary
newModelPackageGroupSummary :: Text
-> Text
-> UTCTime
-> ModelPackageGroupStatus
-> ModelPackageGroupSummary
newModelPackageGroupSummary
  Text
pModelPackageGroupName_
  Text
pModelPackageGroupArn_
  UTCTime
pCreationTime_
  ModelPackageGroupStatus
pModelPackageGroupStatus_ =
    ModelPackageGroupSummary' :: Maybe Text
-> Text
-> Text
-> POSIX
-> ModelPackageGroupStatus
-> ModelPackageGroupSummary
ModelPackageGroupSummary'
      { $sel:modelPackageGroupDescription:ModelPackageGroupSummary' :: Maybe Text
modelPackageGroupDescription =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:modelPackageGroupName:ModelPackageGroupSummary' :: Text
modelPackageGroupName = Text
pModelPackageGroupName_,
        $sel:modelPackageGroupArn:ModelPackageGroupSummary' :: Text
modelPackageGroupArn = Text
pModelPackageGroupArn_,
        $sel:creationTime:ModelPackageGroupSummary' :: POSIX
creationTime = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
 -> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreationTime_,
        $sel:modelPackageGroupStatus:ModelPackageGroupSummary' :: ModelPackageGroupStatus
modelPackageGroupStatus =
          ModelPackageGroupStatus
pModelPackageGroupStatus_
      }

-- | A description of the model group.
modelPackageGroupSummary_modelPackageGroupDescription :: Lens.Lens' ModelPackageGroupSummary (Prelude.Maybe Prelude.Text)
modelPackageGroupSummary_modelPackageGroupDescription :: (Maybe Text -> f (Maybe Text))
-> ModelPackageGroupSummary -> f ModelPackageGroupSummary
modelPackageGroupSummary_modelPackageGroupDescription = (ModelPackageGroupSummary -> Maybe Text)
-> (ModelPackageGroupSummary
    -> Maybe Text -> ModelPackageGroupSummary)
-> Lens
     ModelPackageGroupSummary
     ModelPackageGroupSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelPackageGroupSummary' {Maybe Text
modelPackageGroupDescription :: Maybe Text
$sel:modelPackageGroupDescription:ModelPackageGroupSummary' :: ModelPackageGroupSummary -> Maybe Text
modelPackageGroupDescription} -> Maybe Text
modelPackageGroupDescription) (\s :: ModelPackageGroupSummary
s@ModelPackageGroupSummary' {} Maybe Text
a -> ModelPackageGroupSummary
s {$sel:modelPackageGroupDescription:ModelPackageGroupSummary' :: Maybe Text
modelPackageGroupDescription = Maybe Text
a} :: ModelPackageGroupSummary)

-- | The name of the model group.
modelPackageGroupSummary_modelPackageGroupName :: Lens.Lens' ModelPackageGroupSummary Prelude.Text
modelPackageGroupSummary_modelPackageGroupName :: (Text -> f Text)
-> ModelPackageGroupSummary -> f ModelPackageGroupSummary
modelPackageGroupSummary_modelPackageGroupName = (ModelPackageGroupSummary -> Text)
-> (ModelPackageGroupSummary -> Text -> ModelPackageGroupSummary)
-> Lens ModelPackageGroupSummary ModelPackageGroupSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelPackageGroupSummary' {Text
modelPackageGroupName :: Text
$sel:modelPackageGroupName:ModelPackageGroupSummary' :: ModelPackageGroupSummary -> Text
modelPackageGroupName} -> Text
modelPackageGroupName) (\s :: ModelPackageGroupSummary
s@ModelPackageGroupSummary' {} Text
a -> ModelPackageGroupSummary
s {$sel:modelPackageGroupName:ModelPackageGroupSummary' :: Text
modelPackageGroupName = Text
a} :: ModelPackageGroupSummary)

-- | The Amazon Resource Name (ARN) of the model group.
modelPackageGroupSummary_modelPackageGroupArn :: Lens.Lens' ModelPackageGroupSummary Prelude.Text
modelPackageGroupSummary_modelPackageGroupArn :: (Text -> f Text)
-> ModelPackageGroupSummary -> f ModelPackageGroupSummary
modelPackageGroupSummary_modelPackageGroupArn = (ModelPackageGroupSummary -> Text)
-> (ModelPackageGroupSummary -> Text -> ModelPackageGroupSummary)
-> Lens ModelPackageGroupSummary ModelPackageGroupSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelPackageGroupSummary' {Text
modelPackageGroupArn :: Text
$sel:modelPackageGroupArn:ModelPackageGroupSummary' :: ModelPackageGroupSummary -> Text
modelPackageGroupArn} -> Text
modelPackageGroupArn) (\s :: ModelPackageGroupSummary
s@ModelPackageGroupSummary' {} Text
a -> ModelPackageGroupSummary
s {$sel:modelPackageGroupArn:ModelPackageGroupSummary' :: Text
modelPackageGroupArn = Text
a} :: ModelPackageGroupSummary)

-- | The time that the model group was created.
modelPackageGroupSummary_creationTime :: Lens.Lens' ModelPackageGroupSummary Prelude.UTCTime
modelPackageGroupSummary_creationTime :: (UTCTime -> f UTCTime)
-> ModelPackageGroupSummary -> f ModelPackageGroupSummary
modelPackageGroupSummary_creationTime = (ModelPackageGroupSummary -> POSIX)
-> (ModelPackageGroupSummary -> POSIX -> ModelPackageGroupSummary)
-> Lens
     ModelPackageGroupSummary ModelPackageGroupSummary POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelPackageGroupSummary' {POSIX
creationTime :: POSIX
$sel:creationTime:ModelPackageGroupSummary' :: ModelPackageGroupSummary -> POSIX
creationTime} -> POSIX
creationTime) (\s :: ModelPackageGroupSummary
s@ModelPackageGroupSummary' {} POSIX
a -> ModelPackageGroupSummary
s {$sel:creationTime:ModelPackageGroupSummary' :: POSIX
creationTime = POSIX
a} :: ModelPackageGroupSummary) ((POSIX -> f POSIX)
 -> ModelPackageGroupSummary -> f ModelPackageGroupSummary)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> ModelPackageGroupSummary
-> f ModelPackageGroupSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The status of the model group.
modelPackageGroupSummary_modelPackageGroupStatus :: Lens.Lens' ModelPackageGroupSummary ModelPackageGroupStatus
modelPackageGroupSummary_modelPackageGroupStatus :: (ModelPackageGroupStatus -> f ModelPackageGroupStatus)
-> ModelPackageGroupSummary -> f ModelPackageGroupSummary
modelPackageGroupSummary_modelPackageGroupStatus = (ModelPackageGroupSummary -> ModelPackageGroupStatus)
-> (ModelPackageGroupSummary
    -> ModelPackageGroupStatus -> ModelPackageGroupSummary)
-> Lens
     ModelPackageGroupSummary
     ModelPackageGroupSummary
     ModelPackageGroupStatus
     ModelPackageGroupStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelPackageGroupSummary' {ModelPackageGroupStatus
modelPackageGroupStatus :: ModelPackageGroupStatus
$sel:modelPackageGroupStatus:ModelPackageGroupSummary' :: ModelPackageGroupSummary -> ModelPackageGroupStatus
modelPackageGroupStatus} -> ModelPackageGroupStatus
modelPackageGroupStatus) (\s :: ModelPackageGroupSummary
s@ModelPackageGroupSummary' {} ModelPackageGroupStatus
a -> ModelPackageGroupSummary
s {$sel:modelPackageGroupStatus:ModelPackageGroupSummary' :: ModelPackageGroupStatus
modelPackageGroupStatus = ModelPackageGroupStatus
a} :: ModelPackageGroupSummary)

instance Core.FromJSON ModelPackageGroupSummary where
  parseJSON :: Value -> Parser ModelPackageGroupSummary
parseJSON =
    String
-> (Object -> Parser ModelPackageGroupSummary)
-> Value
-> Parser ModelPackageGroupSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ModelPackageGroupSummary"
      ( \Object
x ->
          Maybe Text
-> Text
-> Text
-> POSIX
-> ModelPackageGroupStatus
-> ModelPackageGroupSummary
ModelPackageGroupSummary'
            (Maybe Text
 -> Text
 -> Text
 -> POSIX
 -> ModelPackageGroupStatus
 -> ModelPackageGroupSummary)
-> Parser (Maybe Text)
-> Parser
     (Text
      -> Text
      -> POSIX
      -> ModelPackageGroupStatus
      -> ModelPackageGroupSummary)
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
"ModelPackageGroupDescription")
            Parser
  (Text
   -> Text
   -> POSIX
   -> ModelPackageGroupStatus
   -> ModelPackageGroupSummary)
-> Parser Text
-> Parser
     (Text
      -> POSIX -> ModelPackageGroupStatus -> ModelPackageGroupSummary)
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
"ModelPackageGroupName")
            Parser
  (Text
   -> POSIX -> ModelPackageGroupStatus -> ModelPackageGroupSummary)
-> Parser Text
-> Parser
     (POSIX -> ModelPackageGroupStatus -> ModelPackageGroupSummary)
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
"ModelPackageGroupArn")
            Parser
  (POSIX -> ModelPackageGroupStatus -> ModelPackageGroupSummary)
-> Parser POSIX
-> Parser (ModelPackageGroupStatus -> ModelPackageGroupSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"CreationTime")
            Parser (ModelPackageGroupStatus -> ModelPackageGroupSummary)
-> Parser ModelPackageGroupStatus
-> Parser ModelPackageGroupSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser ModelPackageGroupStatus
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"ModelPackageGroupStatus")
      )

instance Prelude.Hashable ModelPackageGroupSummary

instance Prelude.NFData ModelPackageGroupSummary