{-# 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.TrialComponentSimpleSummary
-- 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.TrialComponentSimpleSummary 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
import Amazonka.SageMaker.Types.TrialComponentSource
import Amazonka.SageMaker.Types.UserContext

-- | A short summary of a trial component.
--
-- /See:/ 'newTrialComponentSimpleSummary' smart constructor.
data TrialComponentSimpleSummary = TrialComponentSimpleSummary'
  { TrialComponentSimpleSummary -> Maybe UserContext
createdBy :: Prelude.Maybe UserContext,
    -- | When the component was created.
    TrialComponentSimpleSummary -> Maybe POSIX
creationTime :: Prelude.Maybe Data.POSIX,
    -- | The Amazon Resource Name (ARN) of the trial component.
    TrialComponentSimpleSummary -> Maybe Text
trialComponentArn :: Prelude.Maybe Prelude.Text,
    -- | The name of the trial component.
    TrialComponentSimpleSummary -> Maybe Text
trialComponentName :: Prelude.Maybe Prelude.Text,
    TrialComponentSimpleSummary -> Maybe TrialComponentSource
trialComponentSource :: Prelude.Maybe TrialComponentSource
  }
  deriving (TrialComponentSimpleSummary -> TrialComponentSimpleSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TrialComponentSimpleSummary -> TrialComponentSimpleSummary -> Bool
$c/= :: TrialComponentSimpleSummary -> TrialComponentSimpleSummary -> Bool
== :: TrialComponentSimpleSummary -> TrialComponentSimpleSummary -> Bool
$c== :: TrialComponentSimpleSummary -> TrialComponentSimpleSummary -> Bool
Prelude.Eq, ReadPrec [TrialComponentSimpleSummary]
ReadPrec TrialComponentSimpleSummary
Int -> ReadS TrialComponentSimpleSummary
ReadS [TrialComponentSimpleSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TrialComponentSimpleSummary]
$creadListPrec :: ReadPrec [TrialComponentSimpleSummary]
readPrec :: ReadPrec TrialComponentSimpleSummary
$creadPrec :: ReadPrec TrialComponentSimpleSummary
readList :: ReadS [TrialComponentSimpleSummary]
$creadList :: ReadS [TrialComponentSimpleSummary]
readsPrec :: Int -> ReadS TrialComponentSimpleSummary
$creadsPrec :: Int -> ReadS TrialComponentSimpleSummary
Prelude.Read, Int -> TrialComponentSimpleSummary -> ShowS
[TrialComponentSimpleSummary] -> ShowS
TrialComponentSimpleSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TrialComponentSimpleSummary] -> ShowS
$cshowList :: [TrialComponentSimpleSummary] -> ShowS
show :: TrialComponentSimpleSummary -> String
$cshow :: TrialComponentSimpleSummary -> String
showsPrec :: Int -> TrialComponentSimpleSummary -> ShowS
$cshowsPrec :: Int -> TrialComponentSimpleSummary -> ShowS
Prelude.Show, forall x.
Rep TrialComponentSimpleSummary x -> TrialComponentSimpleSummary
forall x.
TrialComponentSimpleSummary -> Rep TrialComponentSimpleSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep TrialComponentSimpleSummary x -> TrialComponentSimpleSummary
$cfrom :: forall x.
TrialComponentSimpleSummary -> Rep TrialComponentSimpleSummary x
Prelude.Generic)

-- |
-- Create a value of 'TrialComponentSimpleSummary' 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:
--
-- 'createdBy', 'trialComponentSimpleSummary_createdBy' - Undocumented member.
--
-- 'creationTime', 'trialComponentSimpleSummary_creationTime' - When the component was created.
--
-- 'trialComponentArn', 'trialComponentSimpleSummary_trialComponentArn' - The Amazon Resource Name (ARN) of the trial component.
--
-- 'trialComponentName', 'trialComponentSimpleSummary_trialComponentName' - The name of the trial component.
--
-- 'trialComponentSource', 'trialComponentSimpleSummary_trialComponentSource' - Undocumented member.
newTrialComponentSimpleSummary ::
  TrialComponentSimpleSummary
newTrialComponentSimpleSummary :: TrialComponentSimpleSummary
newTrialComponentSimpleSummary =
  TrialComponentSimpleSummary'
    { $sel:createdBy:TrialComponentSimpleSummary' :: Maybe UserContext
createdBy =
        forall a. Maybe a
Prelude.Nothing,
      $sel:creationTime:TrialComponentSimpleSummary' :: Maybe POSIX
creationTime = forall a. Maybe a
Prelude.Nothing,
      $sel:trialComponentArn:TrialComponentSimpleSummary' :: Maybe Text
trialComponentArn = forall a. Maybe a
Prelude.Nothing,
      $sel:trialComponentName:TrialComponentSimpleSummary' :: Maybe Text
trialComponentName = forall a. Maybe a
Prelude.Nothing,
      $sel:trialComponentSource:TrialComponentSimpleSummary' :: Maybe TrialComponentSource
trialComponentSource = forall a. Maybe a
Prelude.Nothing
    }

-- | Undocumented member.
trialComponentSimpleSummary_createdBy :: Lens.Lens' TrialComponentSimpleSummary (Prelude.Maybe UserContext)
trialComponentSimpleSummary_createdBy :: Lens' TrialComponentSimpleSummary (Maybe UserContext)
trialComponentSimpleSummary_createdBy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrialComponentSimpleSummary' {Maybe UserContext
createdBy :: Maybe UserContext
$sel:createdBy:TrialComponentSimpleSummary' :: TrialComponentSimpleSummary -> Maybe UserContext
createdBy} -> Maybe UserContext
createdBy) (\s :: TrialComponentSimpleSummary
s@TrialComponentSimpleSummary' {} Maybe UserContext
a -> TrialComponentSimpleSummary
s {$sel:createdBy:TrialComponentSimpleSummary' :: Maybe UserContext
createdBy = Maybe UserContext
a} :: TrialComponentSimpleSummary)

-- | When the component was created.
trialComponentSimpleSummary_creationTime :: Lens.Lens' TrialComponentSimpleSummary (Prelude.Maybe Prelude.UTCTime)
trialComponentSimpleSummary_creationTime :: Lens' TrialComponentSimpleSummary (Maybe UTCTime)
trialComponentSimpleSummary_creationTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrialComponentSimpleSummary' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:TrialComponentSimpleSummary' :: TrialComponentSimpleSummary -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: TrialComponentSimpleSummary
s@TrialComponentSimpleSummary' {} Maybe POSIX
a -> TrialComponentSimpleSummary
s {$sel:creationTime:TrialComponentSimpleSummary' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: TrialComponentSimpleSummary) 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 trial component.
trialComponentSimpleSummary_trialComponentArn :: Lens.Lens' TrialComponentSimpleSummary (Prelude.Maybe Prelude.Text)
trialComponentSimpleSummary_trialComponentArn :: Lens' TrialComponentSimpleSummary (Maybe Text)
trialComponentSimpleSummary_trialComponentArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrialComponentSimpleSummary' {Maybe Text
trialComponentArn :: Maybe Text
$sel:trialComponentArn:TrialComponentSimpleSummary' :: TrialComponentSimpleSummary -> Maybe Text
trialComponentArn} -> Maybe Text
trialComponentArn) (\s :: TrialComponentSimpleSummary
s@TrialComponentSimpleSummary' {} Maybe Text
a -> TrialComponentSimpleSummary
s {$sel:trialComponentArn:TrialComponentSimpleSummary' :: Maybe Text
trialComponentArn = Maybe Text
a} :: TrialComponentSimpleSummary)

-- | The name of the trial component.
trialComponentSimpleSummary_trialComponentName :: Lens.Lens' TrialComponentSimpleSummary (Prelude.Maybe Prelude.Text)
trialComponentSimpleSummary_trialComponentName :: Lens' TrialComponentSimpleSummary (Maybe Text)
trialComponentSimpleSummary_trialComponentName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrialComponentSimpleSummary' {Maybe Text
trialComponentName :: Maybe Text
$sel:trialComponentName:TrialComponentSimpleSummary' :: TrialComponentSimpleSummary -> Maybe Text
trialComponentName} -> Maybe Text
trialComponentName) (\s :: TrialComponentSimpleSummary
s@TrialComponentSimpleSummary' {} Maybe Text
a -> TrialComponentSimpleSummary
s {$sel:trialComponentName:TrialComponentSimpleSummary' :: Maybe Text
trialComponentName = Maybe Text
a} :: TrialComponentSimpleSummary)

-- | Undocumented member.
trialComponentSimpleSummary_trialComponentSource :: Lens.Lens' TrialComponentSimpleSummary (Prelude.Maybe TrialComponentSource)
trialComponentSimpleSummary_trialComponentSource :: Lens' TrialComponentSimpleSummary (Maybe TrialComponentSource)
trialComponentSimpleSummary_trialComponentSource = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrialComponentSimpleSummary' {Maybe TrialComponentSource
trialComponentSource :: Maybe TrialComponentSource
$sel:trialComponentSource:TrialComponentSimpleSummary' :: TrialComponentSimpleSummary -> Maybe TrialComponentSource
trialComponentSource} -> Maybe TrialComponentSource
trialComponentSource) (\s :: TrialComponentSimpleSummary
s@TrialComponentSimpleSummary' {} Maybe TrialComponentSource
a -> TrialComponentSimpleSummary
s {$sel:trialComponentSource:TrialComponentSimpleSummary' :: Maybe TrialComponentSource
trialComponentSource = Maybe TrialComponentSource
a} :: TrialComponentSimpleSummary)

instance Data.FromJSON TrialComponentSimpleSummary where
  parseJSON :: Value -> Parser TrialComponentSimpleSummary
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"TrialComponentSimpleSummary"
      ( \Object
x ->
          Maybe UserContext
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe TrialComponentSource
-> TrialComponentSimpleSummary
TrialComponentSimpleSummary'
            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
"CreatedBy")
            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
"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
"TrialComponentArn")
            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
"TrialComponentName")
            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
"TrialComponentSource")
      )

instance Prelude.Hashable TrialComponentSimpleSummary where
  hashWithSalt :: Int -> TrialComponentSimpleSummary -> Int
hashWithSalt Int
_salt TrialComponentSimpleSummary' {Maybe Text
Maybe POSIX
Maybe TrialComponentSource
Maybe UserContext
trialComponentSource :: Maybe TrialComponentSource
trialComponentName :: Maybe Text
trialComponentArn :: Maybe Text
creationTime :: Maybe POSIX
createdBy :: Maybe UserContext
$sel:trialComponentSource:TrialComponentSimpleSummary' :: TrialComponentSimpleSummary -> Maybe TrialComponentSource
$sel:trialComponentName:TrialComponentSimpleSummary' :: TrialComponentSimpleSummary -> Maybe Text
$sel:trialComponentArn:TrialComponentSimpleSummary' :: TrialComponentSimpleSummary -> Maybe Text
$sel:creationTime:TrialComponentSimpleSummary' :: TrialComponentSimpleSummary -> Maybe POSIX
$sel:createdBy:TrialComponentSimpleSummary' :: TrialComponentSimpleSummary -> Maybe UserContext
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe UserContext
createdBy
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
creationTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
trialComponentArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
trialComponentName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TrialComponentSource
trialComponentSource

instance Prelude.NFData TrialComponentSimpleSummary where
  rnf :: TrialComponentSimpleSummary -> ()
rnf TrialComponentSimpleSummary' {Maybe Text
Maybe POSIX
Maybe TrialComponentSource
Maybe UserContext
trialComponentSource :: Maybe TrialComponentSource
trialComponentName :: Maybe Text
trialComponentArn :: Maybe Text
creationTime :: Maybe POSIX
createdBy :: Maybe UserContext
$sel:trialComponentSource:TrialComponentSimpleSummary' :: TrialComponentSimpleSummary -> Maybe TrialComponentSource
$sel:trialComponentName:TrialComponentSimpleSummary' :: TrialComponentSimpleSummary -> Maybe Text
$sel:trialComponentArn:TrialComponentSimpleSummary' :: TrialComponentSimpleSummary -> Maybe Text
$sel:creationTime:TrialComponentSimpleSummary' :: TrialComponentSimpleSummary -> Maybe POSIX
$sel:createdBy:TrialComponentSimpleSummary' :: TrialComponentSimpleSummary -> Maybe UserContext
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe UserContext
createdBy
      seq :: forall a b. a -> b -> b
`Prelude.seq` 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
trialComponentArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
trialComponentName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe TrialComponentSource
trialComponentSource