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

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SageMaker.Types.ExperimentSource
import Amazonka.SageMaker.Types.Tag
import Amazonka.SageMaker.Types.UserContext

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

-- |
-- Create a value of 'Experiment' 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', 'experiment_creationTime' - When the experiment was created.
--
-- 'createdBy', 'experiment_createdBy' - Who created the experiment.
--
-- 'lastModifiedTime', 'experiment_lastModifiedTime' - When the experiment was last modified.
--
-- 'experimentName', 'experiment_experimentName' - The name of the experiment.
--
-- 'experimentArn', 'experiment_experimentArn' - The Amazon Resource Name (ARN) of the experiment.
--
-- 'source', 'experiment_source' - Undocumented member.
--
-- 'displayName', 'experiment_displayName' - The name of the experiment as displayed. If @DisplayName@ isn\'t
-- specified, @ExperimentName@ is displayed.
--
-- 'lastModifiedBy', 'experiment_lastModifiedBy' - Undocumented member.
--
-- 'description', 'experiment_description' - The description of the experiment.
--
-- 'tags', 'experiment_tags' - The list of tags that are associated with the experiment. You can use
-- Search API to search on the tags.
newExperiment ::
  Experiment
newExperiment :: Experiment
newExperiment =
  Experiment' :: Maybe POSIX
-> Maybe UserContext
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe ExperimentSource
-> Maybe Text
-> Maybe UserContext
-> Maybe Text
-> Maybe [Tag]
-> Experiment
Experiment'
    { $sel:creationTime:Experiment' :: Maybe POSIX
creationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:createdBy:Experiment' :: Maybe UserContext
createdBy = Maybe UserContext
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedTime:Experiment' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:experimentName:Experiment' :: Maybe Text
experimentName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:experimentArn:Experiment' :: Maybe Text
experimentArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:source:Experiment' :: Maybe ExperimentSource
source = Maybe ExperimentSource
forall a. Maybe a
Prelude.Nothing,
      $sel:displayName:Experiment' :: Maybe Text
displayName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedBy:Experiment' :: Maybe UserContext
lastModifiedBy = Maybe UserContext
forall a. Maybe a
Prelude.Nothing,
      $sel:description:Experiment' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:Experiment' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing
    }

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

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

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

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

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

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

-- | The description of the experiment.
experiment_description :: Lens.Lens' Experiment (Prelude.Maybe Prelude.Text)
experiment_description :: (Maybe Text -> f (Maybe Text)) -> Experiment -> f Experiment
experiment_description = (Experiment -> Maybe Text)
-> (Experiment -> Maybe Text -> Experiment)
-> Lens Experiment Experiment (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Experiment' {Maybe Text
description :: Maybe Text
$sel:description:Experiment' :: Experiment -> Maybe Text
description} -> Maybe Text
description) (\s :: Experiment
s@Experiment' {} Maybe Text
a -> Experiment
s {$sel:description:Experiment' :: Maybe Text
description = Maybe Text
a} :: Experiment)

-- | The list of tags that are associated with the experiment. You can use
-- Search API to search on the tags.
experiment_tags :: Lens.Lens' Experiment (Prelude.Maybe [Tag])
experiment_tags :: (Maybe [Tag] -> f (Maybe [Tag])) -> Experiment -> f Experiment
experiment_tags = (Experiment -> Maybe [Tag])
-> (Experiment -> Maybe [Tag] -> Experiment)
-> Lens Experiment Experiment (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Experiment' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:Experiment' :: Experiment -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: Experiment
s@Experiment' {} Maybe [Tag]
a -> Experiment
s {$sel:tags:Experiment' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: Experiment) ((Maybe [Tag] -> f (Maybe [Tag])) -> Experiment -> f Experiment)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> Experiment
-> f Experiment
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 Experiment where
  parseJSON :: Value -> Parser Experiment
parseJSON =
    String
-> (Object -> Parser Experiment) -> Value -> Parser Experiment
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Experiment"
      ( \Object
x ->
          Maybe POSIX
-> Maybe UserContext
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe ExperimentSource
-> Maybe Text
-> Maybe UserContext
-> Maybe Text
-> Maybe [Tag]
-> Experiment
Experiment'
            (Maybe POSIX
 -> Maybe UserContext
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe ExperimentSource
 -> Maybe Text
 -> Maybe UserContext
 -> Maybe Text
 -> Maybe [Tag]
 -> Experiment)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe UserContext
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe ExperimentSource
      -> Maybe Text
      -> Maybe UserContext
      -> Maybe Text
      -> Maybe [Tag]
      -> Experiment)
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 UserContext
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe ExperimentSource
   -> Maybe Text
   -> Maybe UserContext
   -> Maybe Text
   -> Maybe [Tag]
   -> Experiment)
-> Parser (Maybe UserContext)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe ExperimentSource
      -> Maybe Text
      -> Maybe UserContext
      -> Maybe Text
      -> Maybe [Tag]
      -> Experiment)
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 Text
   -> Maybe ExperimentSource
   -> Maybe Text
   -> Maybe UserContext
   -> Maybe Text
   -> Maybe [Tag]
   -> Experiment)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe ExperimentSource
      -> Maybe Text
      -> Maybe UserContext
      -> Maybe Text
      -> Maybe [Tag]
      -> Experiment)
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 Text
   -> Maybe ExperimentSource
   -> Maybe Text
   -> Maybe UserContext
   -> Maybe Text
   -> Maybe [Tag]
   -> Experiment)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe ExperimentSource
      -> Maybe Text
      -> Maybe UserContext
      -> Maybe Text
      -> Maybe [Tag]
      -> Experiment)
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 Text
   -> Maybe ExperimentSource
   -> Maybe Text
   -> Maybe UserContext
   -> Maybe Text
   -> Maybe [Tag]
   -> Experiment)
-> Parser (Maybe Text)
-> Parser
     (Maybe ExperimentSource
      -> Maybe Text
      -> Maybe UserContext
      -> Maybe Text
      -> Maybe [Tag]
      -> Experiment)
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
"ExperimentArn")
            Parser
  (Maybe ExperimentSource
   -> Maybe Text
   -> Maybe UserContext
   -> Maybe Text
   -> Maybe [Tag]
   -> Experiment)
-> Parser (Maybe ExperimentSource)
-> Parser
     (Maybe Text
      -> Maybe UserContext -> Maybe Text -> Maybe [Tag] -> Experiment)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ExperimentSource)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Source")
            Parser
  (Maybe Text
   -> Maybe UserContext -> Maybe Text -> Maybe [Tag] -> Experiment)
-> Parser (Maybe Text)
-> Parser
     (Maybe UserContext -> Maybe Text -> Maybe [Tag] -> Experiment)
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 [Tag] -> Experiment)
-> Parser (Maybe UserContext)
-> Parser (Maybe Text -> Maybe [Tag] -> Experiment)
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 [Tag] -> Experiment)
-> Parser (Maybe Text) -> Parser (Maybe [Tag] -> Experiment)
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
"Description")
            Parser (Maybe [Tag] -> Experiment)
-> Parser (Maybe [Tag]) -> Parser Experiment
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 Experiment

instance Prelude.NFData Experiment