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

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SageMaker.Types.TrialComponentSource
import Amazonka.SageMaker.Types.TrialComponentStatus
import Amazonka.SageMaker.Types.UserContext

-- | A summary of the properties of a trial component. To get all the
-- properties, call the DescribeTrialComponent API and provide the
-- @TrialComponentName@.
--
-- /See:/ 'newTrialComponentSummary' smart constructor.
data TrialComponentSummary = TrialComponentSummary'
  { -- | When the component was created.
    TrialComponentSummary -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
    -- | The status of the component. States include:
    --
    -- -   InProgress
    --
    -- -   Completed
    --
    -- -   Failed
    TrialComponentSummary -> Maybe TrialComponentStatus
status :: Prelude.Maybe TrialComponentStatus,
    -- | When the component started.
    TrialComponentSummary -> Maybe POSIX
startTime :: Prelude.Maybe Core.POSIX,
    -- | Who created the trial component.
    TrialComponentSummary -> Maybe UserContext
createdBy :: Prelude.Maybe UserContext,
    -- | When the component was last modified.
    TrialComponentSummary -> Maybe POSIX
lastModifiedTime :: Prelude.Maybe Core.POSIX,
    -- | When the component ended.
    TrialComponentSummary -> Maybe POSIX
endTime :: Prelude.Maybe Core.POSIX,
    -- | The name of the trial component.
    TrialComponentSummary -> Maybe Text
trialComponentName :: Prelude.Maybe Prelude.Text,
    -- | The name of the component as displayed. If @DisplayName@ isn\'t
    -- specified, @TrialComponentName@ is displayed.
    TrialComponentSummary -> Maybe Text
displayName :: Prelude.Maybe Prelude.Text,
    -- | Who last modified the component.
    TrialComponentSummary -> Maybe UserContext
lastModifiedBy :: Prelude.Maybe UserContext,
    -- | The ARN of the trial component.
    TrialComponentSummary -> Maybe Text
trialComponentArn :: Prelude.Maybe Prelude.Text,
    TrialComponentSummary -> Maybe TrialComponentSource
trialComponentSource :: Prelude.Maybe TrialComponentSource
  }
  deriving (TrialComponentSummary -> TrialComponentSummary -> Bool
(TrialComponentSummary -> TrialComponentSummary -> Bool)
-> (TrialComponentSummary -> TrialComponentSummary -> Bool)
-> Eq TrialComponentSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TrialComponentSummary -> TrialComponentSummary -> Bool
$c/= :: TrialComponentSummary -> TrialComponentSummary -> Bool
== :: TrialComponentSummary -> TrialComponentSummary -> Bool
$c== :: TrialComponentSummary -> TrialComponentSummary -> Bool
Prelude.Eq, ReadPrec [TrialComponentSummary]
ReadPrec TrialComponentSummary
Int -> ReadS TrialComponentSummary
ReadS [TrialComponentSummary]
(Int -> ReadS TrialComponentSummary)
-> ReadS [TrialComponentSummary]
-> ReadPrec TrialComponentSummary
-> ReadPrec [TrialComponentSummary]
-> Read TrialComponentSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TrialComponentSummary]
$creadListPrec :: ReadPrec [TrialComponentSummary]
readPrec :: ReadPrec TrialComponentSummary
$creadPrec :: ReadPrec TrialComponentSummary
readList :: ReadS [TrialComponentSummary]
$creadList :: ReadS [TrialComponentSummary]
readsPrec :: Int -> ReadS TrialComponentSummary
$creadsPrec :: Int -> ReadS TrialComponentSummary
Prelude.Read, Int -> TrialComponentSummary -> ShowS
[TrialComponentSummary] -> ShowS
TrialComponentSummary -> String
(Int -> TrialComponentSummary -> ShowS)
-> (TrialComponentSummary -> String)
-> ([TrialComponentSummary] -> ShowS)
-> Show TrialComponentSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TrialComponentSummary] -> ShowS
$cshowList :: [TrialComponentSummary] -> ShowS
show :: TrialComponentSummary -> String
$cshow :: TrialComponentSummary -> String
showsPrec :: Int -> TrialComponentSummary -> ShowS
$cshowsPrec :: Int -> TrialComponentSummary -> ShowS
Prelude.Show, (forall x. TrialComponentSummary -> Rep TrialComponentSummary x)
-> (forall x. Rep TrialComponentSummary x -> TrialComponentSummary)
-> Generic TrialComponentSummary
forall x. Rep TrialComponentSummary x -> TrialComponentSummary
forall x. TrialComponentSummary -> Rep TrialComponentSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TrialComponentSummary x -> TrialComponentSummary
$cfrom :: forall x. TrialComponentSummary -> Rep TrialComponentSummary x
Prelude.Generic)

-- |
-- Create a value of 'TrialComponentSummary' 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', 'trialComponentSummary_creationTime' - When the component was created.
--
-- 'status', 'trialComponentSummary_status' - The status of the component. States include:
--
-- -   InProgress
--
-- -   Completed
--
-- -   Failed
--
-- 'startTime', 'trialComponentSummary_startTime' - When the component started.
--
-- 'createdBy', 'trialComponentSummary_createdBy' - Who created the trial component.
--
-- 'lastModifiedTime', 'trialComponentSummary_lastModifiedTime' - When the component was last modified.
--
-- 'endTime', 'trialComponentSummary_endTime' - When the component ended.
--
-- 'trialComponentName', 'trialComponentSummary_trialComponentName' - The name of the trial component.
--
-- 'displayName', 'trialComponentSummary_displayName' - The name of the component as displayed. If @DisplayName@ isn\'t
-- specified, @TrialComponentName@ is displayed.
--
-- 'lastModifiedBy', 'trialComponentSummary_lastModifiedBy' - Who last modified the component.
--
-- 'trialComponentArn', 'trialComponentSummary_trialComponentArn' - The ARN of the trial component.
--
-- 'trialComponentSource', 'trialComponentSummary_trialComponentSource' - Undocumented member.
newTrialComponentSummary ::
  TrialComponentSummary
newTrialComponentSummary :: TrialComponentSummary
newTrialComponentSummary =
  TrialComponentSummary' :: Maybe POSIX
-> Maybe TrialComponentStatus
-> Maybe POSIX
-> Maybe UserContext
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe UserContext
-> Maybe Text
-> Maybe TrialComponentSource
-> TrialComponentSummary
TrialComponentSummary'
    { $sel:creationTime:TrialComponentSummary' :: Maybe POSIX
creationTime =
        Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:status:TrialComponentSummary' :: Maybe TrialComponentStatus
status = Maybe TrialComponentStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:startTime:TrialComponentSummary' :: Maybe POSIX
startTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:createdBy:TrialComponentSummary' :: Maybe UserContext
createdBy = Maybe UserContext
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedTime:TrialComponentSummary' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:endTime:TrialComponentSummary' :: Maybe POSIX
endTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:trialComponentName:TrialComponentSummary' :: Maybe Text
trialComponentName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:displayName:TrialComponentSummary' :: Maybe Text
displayName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedBy:TrialComponentSummary' :: Maybe UserContext
lastModifiedBy = Maybe UserContext
forall a. Maybe a
Prelude.Nothing,
      $sel:trialComponentArn:TrialComponentSummary' :: Maybe Text
trialComponentArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:trialComponentSource:TrialComponentSummary' :: Maybe TrialComponentSource
trialComponentSource = Maybe TrialComponentSource
forall a. Maybe a
Prelude.Nothing
    }

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

-- | The status of the component. States include:
--
-- -   InProgress
--
-- -   Completed
--
-- -   Failed
trialComponentSummary_status :: Lens.Lens' TrialComponentSummary (Prelude.Maybe TrialComponentStatus)
trialComponentSummary_status :: (Maybe TrialComponentStatus -> f (Maybe TrialComponentStatus))
-> TrialComponentSummary -> f TrialComponentSummary
trialComponentSummary_status = (TrialComponentSummary -> Maybe TrialComponentStatus)
-> (TrialComponentSummary
    -> Maybe TrialComponentStatus -> TrialComponentSummary)
-> Lens
     TrialComponentSummary
     TrialComponentSummary
     (Maybe TrialComponentStatus)
     (Maybe TrialComponentStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrialComponentSummary' {Maybe TrialComponentStatus
status :: Maybe TrialComponentStatus
$sel:status:TrialComponentSummary' :: TrialComponentSummary -> Maybe TrialComponentStatus
status} -> Maybe TrialComponentStatus
status) (\s :: TrialComponentSummary
s@TrialComponentSummary' {} Maybe TrialComponentStatus
a -> TrialComponentSummary
s {$sel:status:TrialComponentSummary' :: Maybe TrialComponentStatus
status = Maybe TrialComponentStatus
a} :: TrialComponentSummary)

-- | When the component started.
trialComponentSummary_startTime :: Lens.Lens' TrialComponentSummary (Prelude.Maybe Prelude.UTCTime)
trialComponentSummary_startTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> TrialComponentSummary -> f TrialComponentSummary
trialComponentSummary_startTime = (TrialComponentSummary -> Maybe POSIX)
-> (TrialComponentSummary -> Maybe POSIX -> TrialComponentSummary)
-> Lens
     TrialComponentSummary
     TrialComponentSummary
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrialComponentSummary' {Maybe POSIX
startTime :: Maybe POSIX
$sel:startTime:TrialComponentSummary' :: TrialComponentSummary -> Maybe POSIX
startTime} -> Maybe POSIX
startTime) (\s :: TrialComponentSummary
s@TrialComponentSummary' {} Maybe POSIX
a -> TrialComponentSummary
s {$sel:startTime:TrialComponentSummary' :: Maybe POSIX
startTime = Maybe POSIX
a} :: TrialComponentSummary) ((Maybe POSIX -> f (Maybe POSIX))
 -> TrialComponentSummary -> f TrialComponentSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> TrialComponentSummary
-> f TrialComponentSummary
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

-- | Who created the trial component.
trialComponentSummary_createdBy :: Lens.Lens' TrialComponentSummary (Prelude.Maybe UserContext)
trialComponentSummary_createdBy :: (Maybe UserContext -> f (Maybe UserContext))
-> TrialComponentSummary -> f TrialComponentSummary
trialComponentSummary_createdBy = (TrialComponentSummary -> Maybe UserContext)
-> (TrialComponentSummary
    -> Maybe UserContext -> TrialComponentSummary)
-> Lens
     TrialComponentSummary
     TrialComponentSummary
     (Maybe UserContext)
     (Maybe UserContext)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrialComponentSummary' {Maybe UserContext
createdBy :: Maybe UserContext
$sel:createdBy:TrialComponentSummary' :: TrialComponentSummary -> Maybe UserContext
createdBy} -> Maybe UserContext
createdBy) (\s :: TrialComponentSummary
s@TrialComponentSummary' {} Maybe UserContext
a -> TrialComponentSummary
s {$sel:createdBy:TrialComponentSummary' :: Maybe UserContext
createdBy = Maybe UserContext
a} :: TrialComponentSummary)

-- | When the component was last modified.
trialComponentSummary_lastModifiedTime :: Lens.Lens' TrialComponentSummary (Prelude.Maybe Prelude.UTCTime)
trialComponentSummary_lastModifiedTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> TrialComponentSummary -> f TrialComponentSummary
trialComponentSummary_lastModifiedTime = (TrialComponentSummary -> Maybe POSIX)
-> (TrialComponentSummary -> Maybe POSIX -> TrialComponentSummary)
-> Lens
     TrialComponentSummary
     TrialComponentSummary
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrialComponentSummary' {Maybe POSIX
lastModifiedTime :: Maybe POSIX
$sel:lastModifiedTime:TrialComponentSummary' :: TrialComponentSummary -> Maybe POSIX
lastModifiedTime} -> Maybe POSIX
lastModifiedTime) (\s :: TrialComponentSummary
s@TrialComponentSummary' {} Maybe POSIX
a -> TrialComponentSummary
s {$sel:lastModifiedTime:TrialComponentSummary' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
a} :: TrialComponentSummary) ((Maybe POSIX -> f (Maybe POSIX))
 -> TrialComponentSummary -> f TrialComponentSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> TrialComponentSummary
-> f TrialComponentSummary
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

-- | When the component ended.
trialComponentSummary_endTime :: Lens.Lens' TrialComponentSummary (Prelude.Maybe Prelude.UTCTime)
trialComponentSummary_endTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> TrialComponentSummary -> f TrialComponentSummary
trialComponentSummary_endTime = (TrialComponentSummary -> Maybe POSIX)
-> (TrialComponentSummary -> Maybe POSIX -> TrialComponentSummary)
-> Lens
     TrialComponentSummary
     TrialComponentSummary
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrialComponentSummary' {Maybe POSIX
endTime :: Maybe POSIX
$sel:endTime:TrialComponentSummary' :: TrialComponentSummary -> Maybe POSIX
endTime} -> Maybe POSIX
endTime) (\s :: TrialComponentSummary
s@TrialComponentSummary' {} Maybe POSIX
a -> TrialComponentSummary
s {$sel:endTime:TrialComponentSummary' :: Maybe POSIX
endTime = Maybe POSIX
a} :: TrialComponentSummary) ((Maybe POSIX -> f (Maybe POSIX))
 -> TrialComponentSummary -> f TrialComponentSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> TrialComponentSummary
-> f TrialComponentSummary
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

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

-- | The name of the component as displayed. If @DisplayName@ isn\'t
-- specified, @TrialComponentName@ is displayed.
trialComponentSummary_displayName :: Lens.Lens' TrialComponentSummary (Prelude.Maybe Prelude.Text)
trialComponentSummary_displayName :: (Maybe Text -> f (Maybe Text))
-> TrialComponentSummary -> f TrialComponentSummary
trialComponentSummary_displayName = (TrialComponentSummary -> Maybe Text)
-> (TrialComponentSummary -> Maybe Text -> TrialComponentSummary)
-> Lens
     TrialComponentSummary
     TrialComponentSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrialComponentSummary' {Maybe Text
displayName :: Maybe Text
$sel:displayName:TrialComponentSummary' :: TrialComponentSummary -> Maybe Text
displayName} -> Maybe Text
displayName) (\s :: TrialComponentSummary
s@TrialComponentSummary' {} Maybe Text
a -> TrialComponentSummary
s {$sel:displayName:TrialComponentSummary' :: Maybe Text
displayName = Maybe Text
a} :: TrialComponentSummary)

-- | Who last modified the component.
trialComponentSummary_lastModifiedBy :: Lens.Lens' TrialComponentSummary (Prelude.Maybe UserContext)
trialComponentSummary_lastModifiedBy :: (Maybe UserContext -> f (Maybe UserContext))
-> TrialComponentSummary -> f TrialComponentSummary
trialComponentSummary_lastModifiedBy = (TrialComponentSummary -> Maybe UserContext)
-> (TrialComponentSummary
    -> Maybe UserContext -> TrialComponentSummary)
-> Lens
     TrialComponentSummary
     TrialComponentSummary
     (Maybe UserContext)
     (Maybe UserContext)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrialComponentSummary' {Maybe UserContext
lastModifiedBy :: Maybe UserContext
$sel:lastModifiedBy:TrialComponentSummary' :: TrialComponentSummary -> Maybe UserContext
lastModifiedBy} -> Maybe UserContext
lastModifiedBy) (\s :: TrialComponentSummary
s@TrialComponentSummary' {} Maybe UserContext
a -> TrialComponentSummary
s {$sel:lastModifiedBy:TrialComponentSummary' :: Maybe UserContext
lastModifiedBy = Maybe UserContext
a} :: TrialComponentSummary)

-- | The ARN of the trial component.
trialComponentSummary_trialComponentArn :: Lens.Lens' TrialComponentSummary (Prelude.Maybe Prelude.Text)
trialComponentSummary_trialComponentArn :: (Maybe Text -> f (Maybe Text))
-> TrialComponentSummary -> f TrialComponentSummary
trialComponentSummary_trialComponentArn = (TrialComponentSummary -> Maybe Text)
-> (TrialComponentSummary -> Maybe Text -> TrialComponentSummary)
-> Lens
     TrialComponentSummary
     TrialComponentSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrialComponentSummary' {Maybe Text
trialComponentArn :: Maybe Text
$sel:trialComponentArn:TrialComponentSummary' :: TrialComponentSummary -> Maybe Text
trialComponentArn} -> Maybe Text
trialComponentArn) (\s :: TrialComponentSummary
s@TrialComponentSummary' {} Maybe Text
a -> TrialComponentSummary
s {$sel:trialComponentArn:TrialComponentSummary' :: Maybe Text
trialComponentArn = Maybe Text
a} :: TrialComponentSummary)

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

instance Core.FromJSON TrialComponentSummary where
  parseJSON :: Value -> Parser TrialComponentSummary
parseJSON =
    String
-> (Object -> Parser TrialComponentSummary)
-> Value
-> Parser TrialComponentSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"TrialComponentSummary"
      ( \Object
x ->
          Maybe POSIX
-> Maybe TrialComponentStatus
-> Maybe POSIX
-> Maybe UserContext
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe UserContext
-> Maybe Text
-> Maybe TrialComponentSource
-> TrialComponentSummary
TrialComponentSummary'
            (Maybe POSIX
 -> Maybe TrialComponentStatus
 -> Maybe POSIX
 -> Maybe UserContext
 -> Maybe POSIX
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe UserContext
 -> Maybe Text
 -> Maybe TrialComponentSource
 -> TrialComponentSummary)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe TrialComponentStatus
      -> Maybe POSIX
      -> Maybe UserContext
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe UserContext
      -> Maybe Text
      -> Maybe TrialComponentSource
      -> TrialComponentSummary)
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 TrialComponentStatus
   -> Maybe POSIX
   -> Maybe UserContext
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe UserContext
   -> Maybe Text
   -> Maybe TrialComponentSource
   -> TrialComponentSummary)
-> Parser (Maybe TrialComponentStatus)
-> Parser
     (Maybe POSIX
      -> Maybe UserContext
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe UserContext
      -> Maybe Text
      -> Maybe TrialComponentSource
      -> TrialComponentSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe TrialComponentStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
            Parser
  (Maybe POSIX
   -> Maybe UserContext
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe UserContext
   -> Maybe Text
   -> Maybe TrialComponentSource
   -> TrialComponentSummary)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe UserContext
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe UserContext
      -> Maybe Text
      -> Maybe TrialComponentSource
      -> TrialComponentSummary)
forall (f :: * -> *) a b. Applicative f => 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
"StartTime")
            Parser
  (Maybe UserContext
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe UserContext
   -> Maybe Text
   -> Maybe TrialComponentSource
   -> TrialComponentSummary)
-> Parser (Maybe UserContext)
-> Parser
     (Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe UserContext
      -> Maybe Text
      -> Maybe TrialComponentSource
      -> TrialComponentSummary)
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 POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe UserContext
   -> Maybe Text
   -> Maybe TrialComponentSource
   -> TrialComponentSummary)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe UserContext
      -> Maybe Text
      -> Maybe TrialComponentSource
      -> TrialComponentSummary)
forall (f :: * -> *) a b. Applicative f => 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
"LastModifiedTime")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe UserContext
   -> Maybe Text
   -> Maybe TrialComponentSource
   -> TrialComponentSummary)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe UserContext
      -> Maybe Text
      -> Maybe TrialComponentSource
      -> TrialComponentSummary)
forall (f :: * -> *) a b. Applicative f => 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
"EndTime")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe UserContext
   -> Maybe Text
   -> Maybe TrialComponentSource
   -> TrialComponentSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe UserContext
      -> Maybe Text
      -> Maybe TrialComponentSource
      -> TrialComponentSummary)
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
"TrialComponentName")
            Parser
  (Maybe Text
   -> Maybe UserContext
   -> Maybe Text
   -> Maybe TrialComponentSource
   -> TrialComponentSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe UserContext
      -> Maybe Text
      -> Maybe TrialComponentSource
      -> TrialComponentSummary)
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
"DisplayName")
            Parser
  (Maybe UserContext
   -> Maybe Text
   -> Maybe TrialComponentSource
   -> TrialComponentSummary)
-> Parser (Maybe UserContext)
-> Parser
     (Maybe Text -> Maybe TrialComponentSource -> TrialComponentSummary)
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
"LastModifiedBy")
            Parser
  (Maybe Text -> Maybe TrialComponentSource -> TrialComponentSummary)
-> Parser (Maybe Text)
-> Parser (Maybe TrialComponentSource -> TrialComponentSummary)
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
"TrialComponentArn")
            Parser (Maybe TrialComponentSource -> TrialComponentSummary)
-> Parser (Maybe TrialComponentSource)
-> Parser TrialComponentSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe TrialComponentSource)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TrialComponentSource")
      )

instance Prelude.Hashable TrialComponentSummary

instance Prelude.NFData TrialComponentSummary