{-# 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.LineageGroupSummary
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.SageMaker.Types.LineageGroupSummary where

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

-- | Lists a summary of the properties of a lineage group. A lineage group
-- provides a group of shareable lineage entity resources.
--
-- /See:/ 'newLineageGroupSummary' smart constructor.
data LineageGroupSummary = LineageGroupSummary'
  { -- | The creation time of the lineage group summary.
    LineageGroupSummary -> Maybe POSIX
creationTime :: Prelude.Maybe Data.POSIX,
    -- | The display name of the lineage group summary.
    LineageGroupSummary -> Maybe Text
displayName :: Prelude.Maybe Prelude.Text,
    -- | The last modified time of the lineage group summary.
    LineageGroupSummary -> Maybe POSIX
lastModifiedTime :: Prelude.Maybe Data.POSIX,
    -- | The Amazon Resource Name (ARN) of the lineage group resource.
    LineageGroupSummary -> Maybe Text
lineageGroupArn :: Prelude.Maybe Prelude.Text,
    -- | The name or Amazon Resource Name (ARN) of the lineage group.
    LineageGroupSummary -> Maybe Text
lineageGroupName :: Prelude.Maybe Prelude.Text
  }
  deriving (LineageGroupSummary -> LineageGroupSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LineageGroupSummary -> LineageGroupSummary -> Bool
$c/= :: LineageGroupSummary -> LineageGroupSummary -> Bool
== :: LineageGroupSummary -> LineageGroupSummary -> Bool
$c== :: LineageGroupSummary -> LineageGroupSummary -> Bool
Prelude.Eq, ReadPrec [LineageGroupSummary]
ReadPrec LineageGroupSummary
Int -> ReadS LineageGroupSummary
ReadS [LineageGroupSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LineageGroupSummary]
$creadListPrec :: ReadPrec [LineageGroupSummary]
readPrec :: ReadPrec LineageGroupSummary
$creadPrec :: ReadPrec LineageGroupSummary
readList :: ReadS [LineageGroupSummary]
$creadList :: ReadS [LineageGroupSummary]
readsPrec :: Int -> ReadS LineageGroupSummary
$creadsPrec :: Int -> ReadS LineageGroupSummary
Prelude.Read, Int -> LineageGroupSummary -> ShowS
[LineageGroupSummary] -> ShowS
LineageGroupSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LineageGroupSummary] -> ShowS
$cshowList :: [LineageGroupSummary] -> ShowS
show :: LineageGroupSummary -> String
$cshow :: LineageGroupSummary -> String
showsPrec :: Int -> LineageGroupSummary -> ShowS
$cshowsPrec :: Int -> LineageGroupSummary -> ShowS
Prelude.Show, forall x. Rep LineageGroupSummary x -> LineageGroupSummary
forall x. LineageGroupSummary -> Rep LineageGroupSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LineageGroupSummary x -> LineageGroupSummary
$cfrom :: forall x. LineageGroupSummary -> Rep LineageGroupSummary x
Prelude.Generic)

-- |
-- Create a value of 'LineageGroupSummary' 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:
--
-- 'creationTime', 'lineageGroupSummary_creationTime' - The creation time of the lineage group summary.
--
-- 'displayName', 'lineageGroupSummary_displayName' - The display name of the lineage group summary.
--
-- 'lastModifiedTime', 'lineageGroupSummary_lastModifiedTime' - The last modified time of the lineage group summary.
--
-- 'lineageGroupArn', 'lineageGroupSummary_lineageGroupArn' - The Amazon Resource Name (ARN) of the lineage group resource.
--
-- 'lineageGroupName', 'lineageGroupSummary_lineageGroupName' - The name or Amazon Resource Name (ARN) of the lineage group.
newLineageGroupSummary ::
  LineageGroupSummary
newLineageGroupSummary :: LineageGroupSummary
newLineageGroupSummary =
  LineageGroupSummary'
    { $sel:creationTime:LineageGroupSummary' :: Maybe POSIX
creationTime =
        forall a. Maybe a
Prelude.Nothing,
      $sel:displayName:LineageGroupSummary' :: Maybe Text
displayName = forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedTime:LineageGroupSummary' :: Maybe POSIX
lastModifiedTime = forall a. Maybe a
Prelude.Nothing,
      $sel:lineageGroupArn:LineageGroupSummary' :: Maybe Text
lineageGroupArn = forall a. Maybe a
Prelude.Nothing,
      $sel:lineageGroupName:LineageGroupSummary' :: Maybe Text
lineageGroupName = forall a. Maybe a
Prelude.Nothing
    }

-- | The creation time of the lineage group summary.
lineageGroupSummary_creationTime :: Lens.Lens' LineageGroupSummary (Prelude.Maybe Prelude.UTCTime)
lineageGroupSummary_creationTime :: Lens' LineageGroupSummary (Maybe UTCTime)
lineageGroupSummary_creationTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LineageGroupSummary' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:LineageGroupSummary' :: LineageGroupSummary -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: LineageGroupSummary
s@LineageGroupSummary' {} Maybe POSIX
a -> LineageGroupSummary
s {$sel:creationTime:LineageGroupSummary' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: LineageGroupSummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The display name of the lineage group summary.
lineageGroupSummary_displayName :: Lens.Lens' LineageGroupSummary (Prelude.Maybe Prelude.Text)
lineageGroupSummary_displayName :: Lens' LineageGroupSummary (Maybe Text)
lineageGroupSummary_displayName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LineageGroupSummary' {Maybe Text
displayName :: Maybe Text
$sel:displayName:LineageGroupSummary' :: LineageGroupSummary -> Maybe Text
displayName} -> Maybe Text
displayName) (\s :: LineageGroupSummary
s@LineageGroupSummary' {} Maybe Text
a -> LineageGroupSummary
s {$sel:displayName:LineageGroupSummary' :: Maybe Text
displayName = Maybe Text
a} :: LineageGroupSummary)

-- | The last modified time of the lineage group summary.
lineageGroupSummary_lastModifiedTime :: Lens.Lens' LineageGroupSummary (Prelude.Maybe Prelude.UTCTime)
lineageGroupSummary_lastModifiedTime :: Lens' LineageGroupSummary (Maybe UTCTime)
lineageGroupSummary_lastModifiedTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LineageGroupSummary' {Maybe POSIX
lastModifiedTime :: Maybe POSIX
$sel:lastModifiedTime:LineageGroupSummary' :: LineageGroupSummary -> Maybe POSIX
lastModifiedTime} -> Maybe POSIX
lastModifiedTime) (\s :: LineageGroupSummary
s@LineageGroupSummary' {} Maybe POSIX
a -> LineageGroupSummary
s {$sel:lastModifiedTime:LineageGroupSummary' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
a} :: LineageGroupSummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The Amazon Resource Name (ARN) of the lineage group resource.
lineageGroupSummary_lineageGroupArn :: Lens.Lens' LineageGroupSummary (Prelude.Maybe Prelude.Text)
lineageGroupSummary_lineageGroupArn :: Lens' LineageGroupSummary (Maybe Text)
lineageGroupSummary_lineageGroupArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LineageGroupSummary' {Maybe Text
lineageGroupArn :: Maybe Text
$sel:lineageGroupArn:LineageGroupSummary' :: LineageGroupSummary -> Maybe Text
lineageGroupArn} -> Maybe Text
lineageGroupArn) (\s :: LineageGroupSummary
s@LineageGroupSummary' {} Maybe Text
a -> LineageGroupSummary
s {$sel:lineageGroupArn:LineageGroupSummary' :: Maybe Text
lineageGroupArn = Maybe Text
a} :: LineageGroupSummary)

-- | The name or Amazon Resource Name (ARN) of the lineage group.
lineageGroupSummary_lineageGroupName :: Lens.Lens' LineageGroupSummary (Prelude.Maybe Prelude.Text)
lineageGroupSummary_lineageGroupName :: Lens' LineageGroupSummary (Maybe Text)
lineageGroupSummary_lineageGroupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LineageGroupSummary' {Maybe Text
lineageGroupName :: Maybe Text
$sel:lineageGroupName:LineageGroupSummary' :: LineageGroupSummary -> Maybe Text
lineageGroupName} -> Maybe Text
lineageGroupName) (\s :: LineageGroupSummary
s@LineageGroupSummary' {} Maybe Text
a -> LineageGroupSummary
s {$sel:lineageGroupName:LineageGroupSummary' :: Maybe Text
lineageGroupName = Maybe Text
a} :: LineageGroupSummary)

instance Data.FromJSON LineageGroupSummary where
  parseJSON :: Value -> Parser LineageGroupSummary
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"LineageGroupSummary"
      ( \Object
x ->
          Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> LineageGroupSummary
LineageGroupSummary'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CreationTime")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"DisplayName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"LastModifiedTime")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"LineageGroupArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"LineageGroupName")
      )

instance Prelude.Hashable LineageGroupSummary where
  hashWithSalt :: Int -> LineageGroupSummary -> Int
hashWithSalt Int
_salt LineageGroupSummary' {Maybe Text
Maybe POSIX
lineageGroupName :: Maybe Text
lineageGroupArn :: Maybe Text
lastModifiedTime :: Maybe POSIX
displayName :: Maybe Text
creationTime :: Maybe POSIX
$sel:lineageGroupName:LineageGroupSummary' :: LineageGroupSummary -> Maybe Text
$sel:lineageGroupArn:LineageGroupSummary' :: LineageGroupSummary -> Maybe Text
$sel:lastModifiedTime:LineageGroupSummary' :: LineageGroupSummary -> Maybe POSIX
$sel:displayName:LineageGroupSummary' :: LineageGroupSummary -> Maybe Text
$sel:creationTime:LineageGroupSummary' :: LineageGroupSummary -> Maybe POSIX
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
creationTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
displayName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastModifiedTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
lineageGroupArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
lineageGroupName

instance Prelude.NFData LineageGroupSummary where
  rnf :: LineageGroupSummary -> ()
rnf LineageGroupSummary' {Maybe Text
Maybe POSIX
lineageGroupName :: Maybe Text
lineageGroupArn :: Maybe Text
lastModifiedTime :: Maybe POSIX
displayName :: Maybe Text
creationTime :: Maybe POSIX
$sel:lineageGroupName:LineageGroupSummary' :: LineageGroupSummary -> Maybe Text
$sel:lineageGroupArn:LineageGroupSummary' :: LineageGroupSummary -> Maybe Text
$sel:lastModifiedTime:LineageGroupSummary' :: LineageGroupSummary -> Maybe POSIX
$sel:displayName:LineageGroupSummary' :: LineageGroupSummary -> Maybe Text
$sel:creationTime:LineageGroupSummary' :: LineageGroupSummary -> Maybe POSIX
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
creationTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
displayName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastModifiedTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
lineageGroupArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
lineageGroupName