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

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SageMaker.Types.MetadataProperties
import Amazonka.SageMaker.Types.Tag
import Amazonka.SageMaker.Types.TrialComponentSimpleSummary
import Amazonka.SageMaker.Types.TrialSource
import Amazonka.SageMaker.Types.UserContext

-- | The properties of a trial as returned by the Search API.
--
-- /See:/ 'newTrial' smart constructor.
data Trial = Trial'
  { -- | When the trial was created.
    Trial -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
    Trial -> Maybe MetadataProperties
metadataProperties :: Prelude.Maybe MetadataProperties,
    -- | A list of the components associated with the trial. For each component,
    -- a summary of the component\'s properties is included.
    Trial -> Maybe [TrialComponentSimpleSummary]
trialComponentSummaries :: Prelude.Maybe [TrialComponentSimpleSummary],
    -- | The Amazon Resource Name (ARN) of the trial.
    Trial -> Maybe Text
trialArn :: Prelude.Maybe Prelude.Text,
    -- | Who created the trial.
    Trial -> Maybe UserContext
createdBy :: Prelude.Maybe UserContext,
    -- | Who last modified the trial.
    Trial -> Maybe POSIX
lastModifiedTime :: Prelude.Maybe Core.POSIX,
    -- | The name of the experiment the trial is part of.
    Trial -> Maybe Text
experimentName :: Prelude.Maybe Prelude.Text,
    Trial -> Maybe TrialSource
source :: Prelude.Maybe TrialSource,
    -- | The name of the trial as displayed. If @DisplayName@ isn\'t specified,
    -- @TrialName@ is displayed.
    Trial -> Maybe Text
displayName :: Prelude.Maybe Prelude.Text,
    -- | The name of the trial.
    Trial -> Maybe Text
trialName :: Prelude.Maybe Prelude.Text,
    Trial -> Maybe UserContext
lastModifiedBy :: Prelude.Maybe UserContext,
    -- | The list of tags that are associated with the trial. You can use Search
    -- API to search on the tags.
    Trial -> Maybe [Tag]
tags :: Prelude.Maybe [Tag]
  }
  deriving (Trial -> Trial -> Bool
(Trial -> Trial -> Bool) -> (Trial -> Trial -> Bool) -> Eq Trial
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Trial -> Trial -> Bool
$c/= :: Trial -> Trial -> Bool
== :: Trial -> Trial -> Bool
$c== :: Trial -> Trial -> Bool
Prelude.Eq, ReadPrec [Trial]
ReadPrec Trial
Int -> ReadS Trial
ReadS [Trial]
(Int -> ReadS Trial)
-> ReadS [Trial]
-> ReadPrec Trial
-> ReadPrec [Trial]
-> Read Trial
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Trial]
$creadListPrec :: ReadPrec [Trial]
readPrec :: ReadPrec Trial
$creadPrec :: ReadPrec Trial
readList :: ReadS [Trial]
$creadList :: ReadS [Trial]
readsPrec :: Int -> ReadS Trial
$creadsPrec :: Int -> ReadS Trial
Prelude.Read, Int -> Trial -> ShowS
[Trial] -> ShowS
Trial -> String
(Int -> Trial -> ShowS)
-> (Trial -> String) -> ([Trial] -> ShowS) -> Show Trial
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Trial] -> ShowS
$cshowList :: [Trial] -> ShowS
show :: Trial -> String
$cshow :: Trial -> String
showsPrec :: Int -> Trial -> ShowS
$cshowsPrec :: Int -> Trial -> ShowS
Prelude.Show, (forall x. Trial -> Rep Trial x)
-> (forall x. Rep Trial x -> Trial) -> Generic Trial
forall x. Rep Trial x -> Trial
forall x. Trial -> Rep Trial x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Trial x -> Trial
$cfrom :: forall x. Trial -> Rep Trial x
Prelude.Generic)

-- |
-- Create a value of 'Trial' 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', 'trial_creationTime' - When the trial was created.
--
-- 'metadataProperties', 'trial_metadataProperties' - Undocumented member.
--
-- 'trialComponentSummaries', 'trial_trialComponentSummaries' - A list of the components associated with the trial. For each component,
-- a summary of the component\'s properties is included.
--
-- 'trialArn', 'trial_trialArn' - The Amazon Resource Name (ARN) of the trial.
--
-- 'createdBy', 'trial_createdBy' - Who created the trial.
--
-- 'lastModifiedTime', 'trial_lastModifiedTime' - Who last modified the trial.
--
-- 'experimentName', 'trial_experimentName' - The name of the experiment the trial is part of.
--
-- 'source', 'trial_source' - Undocumented member.
--
-- 'displayName', 'trial_displayName' - The name of the trial as displayed. If @DisplayName@ isn\'t specified,
-- @TrialName@ is displayed.
--
-- 'trialName', 'trial_trialName' - The name of the trial.
--
-- 'lastModifiedBy', 'trial_lastModifiedBy' - Undocumented member.
--
-- 'tags', 'trial_tags' - The list of tags that are associated with the trial. You can use Search
-- API to search on the tags.
newTrial ::
  Trial
newTrial :: Trial
newTrial =
  Trial' :: Maybe POSIX
-> Maybe MetadataProperties
-> Maybe [TrialComponentSimpleSummary]
-> Maybe Text
-> Maybe UserContext
-> Maybe POSIX
-> Maybe Text
-> Maybe TrialSource
-> Maybe Text
-> Maybe Text
-> Maybe UserContext
-> Maybe [Tag]
-> Trial
Trial'
    { $sel:creationTime:Trial' :: Maybe POSIX
creationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:metadataProperties:Trial' :: Maybe MetadataProperties
metadataProperties = Maybe MetadataProperties
forall a. Maybe a
Prelude.Nothing,
      $sel:trialComponentSummaries:Trial' :: Maybe [TrialComponentSimpleSummary]
trialComponentSummaries = Maybe [TrialComponentSimpleSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:trialArn:Trial' :: Maybe Text
trialArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdBy:Trial' :: Maybe UserContext
createdBy = Maybe UserContext
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedTime:Trial' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:experimentName:Trial' :: Maybe Text
experimentName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:source:Trial' :: Maybe TrialSource
source = Maybe TrialSource
forall a. Maybe a
Prelude.Nothing,
      $sel:displayName:Trial' :: Maybe Text
displayName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:trialName:Trial' :: Maybe Text
trialName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedBy:Trial' :: Maybe UserContext
lastModifiedBy = Maybe UserContext
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:Trial' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing
    }

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

-- | Undocumented member.
trial_metadataProperties :: Lens.Lens' Trial (Prelude.Maybe MetadataProperties)
trial_metadataProperties :: (Maybe MetadataProperties -> f (Maybe MetadataProperties))
-> Trial -> f Trial
trial_metadataProperties = (Trial -> Maybe MetadataProperties)
-> (Trial -> Maybe MetadataProperties -> Trial)
-> Lens
     Trial Trial (Maybe MetadataProperties) (Maybe MetadataProperties)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Trial' {Maybe MetadataProperties
metadataProperties :: Maybe MetadataProperties
$sel:metadataProperties:Trial' :: Trial -> Maybe MetadataProperties
metadataProperties} -> Maybe MetadataProperties
metadataProperties) (\s :: Trial
s@Trial' {} Maybe MetadataProperties
a -> Trial
s {$sel:metadataProperties:Trial' :: Maybe MetadataProperties
metadataProperties = Maybe MetadataProperties
a} :: Trial)

-- | A list of the components associated with the trial. For each component,
-- a summary of the component\'s properties is included.
trial_trialComponentSummaries :: Lens.Lens' Trial (Prelude.Maybe [TrialComponentSimpleSummary])
trial_trialComponentSummaries :: (Maybe [TrialComponentSimpleSummary]
 -> f (Maybe [TrialComponentSimpleSummary]))
-> Trial -> f Trial
trial_trialComponentSummaries = (Trial -> Maybe [TrialComponentSimpleSummary])
-> (Trial -> Maybe [TrialComponentSimpleSummary] -> Trial)
-> Lens
     Trial
     Trial
     (Maybe [TrialComponentSimpleSummary])
     (Maybe [TrialComponentSimpleSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Trial' {Maybe [TrialComponentSimpleSummary]
trialComponentSummaries :: Maybe [TrialComponentSimpleSummary]
$sel:trialComponentSummaries:Trial' :: Trial -> Maybe [TrialComponentSimpleSummary]
trialComponentSummaries} -> Maybe [TrialComponentSimpleSummary]
trialComponentSummaries) (\s :: Trial
s@Trial' {} Maybe [TrialComponentSimpleSummary]
a -> Trial
s {$sel:trialComponentSummaries:Trial' :: Maybe [TrialComponentSimpleSummary]
trialComponentSummaries = Maybe [TrialComponentSimpleSummary]
a} :: Trial) ((Maybe [TrialComponentSimpleSummary]
  -> f (Maybe [TrialComponentSimpleSummary]))
 -> Trial -> f Trial)
-> ((Maybe [TrialComponentSimpleSummary]
     -> f (Maybe [TrialComponentSimpleSummary]))
    -> Maybe [TrialComponentSimpleSummary]
    -> f (Maybe [TrialComponentSimpleSummary]))
-> (Maybe [TrialComponentSimpleSummary]
    -> f (Maybe [TrialComponentSimpleSummary]))
-> Trial
-> f Trial
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [TrialComponentSimpleSummary]
  [TrialComponentSimpleSummary]
  [TrialComponentSimpleSummary]
  [TrialComponentSimpleSummary]
-> Iso
     (Maybe [TrialComponentSimpleSummary])
     (Maybe [TrialComponentSimpleSummary])
     (Maybe [TrialComponentSimpleSummary])
     (Maybe [TrialComponentSimpleSummary])
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
  [TrialComponentSimpleSummary]
  [TrialComponentSimpleSummary]
  [TrialComponentSimpleSummary]
  [TrialComponentSimpleSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The Amazon Resource Name (ARN) of the trial.
trial_trialArn :: Lens.Lens' Trial (Prelude.Maybe Prelude.Text)
trial_trialArn :: (Maybe Text -> f (Maybe Text)) -> Trial -> f Trial
trial_trialArn = (Trial -> Maybe Text)
-> (Trial -> Maybe Text -> Trial)
-> Lens Trial Trial (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Trial' {Maybe Text
trialArn :: Maybe Text
$sel:trialArn:Trial' :: Trial -> Maybe Text
trialArn} -> Maybe Text
trialArn) (\s :: Trial
s@Trial' {} Maybe Text
a -> Trial
s {$sel:trialArn:Trial' :: Maybe Text
trialArn = Maybe Text
a} :: Trial)

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

-- | Who last modified the trial.
trial_lastModifiedTime :: Lens.Lens' Trial (Prelude.Maybe Prelude.UTCTime)
trial_lastModifiedTime :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Trial -> f Trial
trial_lastModifiedTime = (Trial -> Maybe POSIX)
-> (Trial -> Maybe POSIX -> Trial)
-> Lens Trial Trial (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Trial' {Maybe POSIX
lastModifiedTime :: Maybe POSIX
$sel:lastModifiedTime:Trial' :: Trial -> Maybe POSIX
lastModifiedTime} -> Maybe POSIX
lastModifiedTime) (\s :: Trial
s@Trial' {} Maybe POSIX
a -> Trial
s {$sel:lastModifiedTime:Trial' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
a} :: Trial) ((Maybe POSIX -> f (Maybe POSIX)) -> Trial -> f Trial)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Trial
-> f Trial
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 experiment the trial is part of.
trial_experimentName :: Lens.Lens' Trial (Prelude.Maybe Prelude.Text)
trial_experimentName :: (Maybe Text -> f (Maybe Text)) -> Trial -> f Trial
trial_experimentName = (Trial -> Maybe Text)
-> (Trial -> Maybe Text -> Trial)
-> Lens Trial Trial (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Trial' {Maybe Text
experimentName :: Maybe Text
$sel:experimentName:Trial' :: Trial -> Maybe Text
experimentName} -> Maybe Text
experimentName) (\s :: Trial
s@Trial' {} Maybe Text
a -> Trial
s {$sel:experimentName:Trial' :: Maybe Text
experimentName = Maybe Text
a} :: Trial)

-- | Undocumented member.
trial_source :: Lens.Lens' Trial (Prelude.Maybe TrialSource)
trial_source :: (Maybe TrialSource -> f (Maybe TrialSource)) -> Trial -> f Trial
trial_source = (Trial -> Maybe TrialSource)
-> (Trial -> Maybe TrialSource -> Trial)
-> Lens Trial Trial (Maybe TrialSource) (Maybe TrialSource)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Trial' {Maybe TrialSource
source :: Maybe TrialSource
$sel:source:Trial' :: Trial -> Maybe TrialSource
source} -> Maybe TrialSource
source) (\s :: Trial
s@Trial' {} Maybe TrialSource
a -> Trial
s {$sel:source:Trial' :: Maybe TrialSource
source = Maybe TrialSource
a} :: Trial)

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

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

-- | Undocumented member.
trial_lastModifiedBy :: Lens.Lens' Trial (Prelude.Maybe UserContext)
trial_lastModifiedBy :: (Maybe UserContext -> f (Maybe UserContext)) -> Trial -> f Trial
trial_lastModifiedBy = (Trial -> Maybe UserContext)
-> (Trial -> Maybe UserContext -> Trial)
-> Lens Trial Trial (Maybe UserContext) (Maybe UserContext)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Trial' {Maybe UserContext
lastModifiedBy :: Maybe UserContext
$sel:lastModifiedBy:Trial' :: Trial -> Maybe UserContext
lastModifiedBy} -> Maybe UserContext
lastModifiedBy) (\s :: Trial
s@Trial' {} Maybe UserContext
a -> Trial
s {$sel:lastModifiedBy:Trial' :: Maybe UserContext
lastModifiedBy = Maybe UserContext
a} :: Trial)

-- | The list of tags that are associated with the trial. You can use Search
-- API to search on the tags.
trial_tags :: Lens.Lens' Trial (Prelude.Maybe [Tag])
trial_tags :: (Maybe [Tag] -> f (Maybe [Tag])) -> Trial -> f Trial
trial_tags = (Trial -> Maybe [Tag])
-> (Trial -> Maybe [Tag] -> Trial)
-> Lens Trial Trial (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Trial' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:Trial' :: Trial -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: Trial
s@Trial' {} Maybe [Tag]
a -> Trial
s {$sel:tags:Trial' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: Trial) ((Maybe [Tag] -> f (Maybe [Tag])) -> Trial -> f Trial)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> Trial
-> f Trial
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 Trial where
  parseJSON :: Value -> Parser Trial
parseJSON =
    String -> (Object -> Parser Trial) -> Value -> Parser Trial
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Trial"
      ( \Object
x ->
          Maybe POSIX
-> Maybe MetadataProperties
-> Maybe [TrialComponentSimpleSummary]
-> Maybe Text
-> Maybe UserContext
-> Maybe POSIX
-> Maybe Text
-> Maybe TrialSource
-> Maybe Text
-> Maybe Text
-> Maybe UserContext
-> Maybe [Tag]
-> Trial
Trial'
            (Maybe POSIX
 -> Maybe MetadataProperties
 -> Maybe [TrialComponentSimpleSummary]
 -> Maybe Text
 -> Maybe UserContext
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe TrialSource
 -> Maybe Text
 -> Maybe Text
 -> Maybe UserContext
 -> Maybe [Tag]
 -> Trial)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe MetadataProperties
      -> Maybe [TrialComponentSimpleSummary]
      -> Maybe Text
      -> Maybe UserContext
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe TrialSource
      -> Maybe Text
      -> Maybe Text
      -> Maybe UserContext
      -> Maybe [Tag]
      -> Trial)
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 MetadataProperties
   -> Maybe [TrialComponentSimpleSummary]
   -> Maybe Text
   -> Maybe UserContext
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe TrialSource
   -> Maybe Text
   -> Maybe Text
   -> Maybe UserContext
   -> Maybe [Tag]
   -> Trial)
-> Parser (Maybe MetadataProperties)
-> Parser
     (Maybe [TrialComponentSimpleSummary]
      -> Maybe Text
      -> Maybe UserContext
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe TrialSource
      -> Maybe Text
      -> Maybe Text
      -> Maybe UserContext
      -> Maybe [Tag]
      -> Trial)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe MetadataProperties)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MetadataProperties")
            Parser
  (Maybe [TrialComponentSimpleSummary]
   -> Maybe Text
   -> Maybe UserContext
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe TrialSource
   -> Maybe Text
   -> Maybe Text
   -> Maybe UserContext
   -> Maybe [Tag]
   -> Trial)
-> Parser (Maybe [TrialComponentSimpleSummary])
-> Parser
     (Maybe Text
      -> Maybe UserContext
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe TrialSource
      -> Maybe Text
      -> Maybe Text
      -> Maybe UserContext
      -> Maybe [Tag]
      -> Trial)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Parser (Maybe (Maybe [TrialComponentSimpleSummary]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TrialComponentSummaries"
                            Parser (Maybe (Maybe [TrialComponentSimpleSummary]))
-> Maybe [TrialComponentSimpleSummary]
-> Parser (Maybe [TrialComponentSimpleSummary])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [TrialComponentSimpleSummary]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe Text
   -> Maybe UserContext
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe TrialSource
   -> Maybe Text
   -> Maybe Text
   -> Maybe UserContext
   -> Maybe [Tag]
   -> Trial)
-> Parser (Maybe Text)
-> Parser
     (Maybe UserContext
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe TrialSource
      -> Maybe Text
      -> Maybe Text
      -> Maybe UserContext
      -> Maybe [Tag]
      -> Trial)
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
"TrialArn")
            Parser
  (Maybe UserContext
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe TrialSource
   -> Maybe Text
   -> Maybe Text
   -> Maybe UserContext
   -> Maybe [Tag]
   -> Trial)
-> Parser (Maybe UserContext)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe TrialSource
      -> Maybe Text
      -> Maybe Text
      -> Maybe UserContext
      -> Maybe [Tag]
      -> Trial)
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 Text
   -> Maybe TrialSource
   -> Maybe Text
   -> Maybe Text
   -> Maybe UserContext
   -> Maybe [Tag]
   -> Trial)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe TrialSource
      -> Maybe Text
      -> Maybe Text
      -> Maybe UserContext
      -> Maybe [Tag]
      -> Trial)
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 Text
   -> Maybe TrialSource
   -> Maybe Text
   -> Maybe Text
   -> Maybe UserContext
   -> Maybe [Tag]
   -> Trial)
-> Parser (Maybe Text)
-> Parser
     (Maybe TrialSource
      -> Maybe Text
      -> Maybe Text
      -> Maybe UserContext
      -> Maybe [Tag]
      -> Trial)
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
"ExperimentName")
            Parser
  (Maybe TrialSource
   -> Maybe Text
   -> Maybe Text
   -> Maybe UserContext
   -> Maybe [Tag]
   -> Trial)
-> Parser (Maybe TrialSource)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe UserContext -> Maybe [Tag] -> Trial)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe TrialSource)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Source")
            Parser
  (Maybe Text
   -> Maybe Text -> Maybe UserContext -> Maybe [Tag] -> Trial)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe UserContext -> Maybe [Tag] -> Trial)
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 Text -> Maybe UserContext -> Maybe [Tag] -> Trial)
-> Parser (Maybe Text)
-> Parser (Maybe UserContext -> Maybe [Tag] -> Trial)
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
"TrialName")
            Parser (Maybe UserContext -> Maybe [Tag] -> Trial)
-> Parser (Maybe UserContext) -> Parser (Maybe [Tag] -> Trial)
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 [Tag] -> Trial)
-> Parser (Maybe [Tag]) -> Parser Trial
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 Trial

instance Prelude.NFData Trial