{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# 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.DescribeExperiment
-- 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)
--
-- Provides a list of an experiment\'s properties.
module Amazonka.SageMaker.DescribeExperiment
  ( -- * Creating a Request
    DescribeExperiment (..),
    newDescribeExperiment,

    -- * Request Lenses
    describeExperiment_experimentName,

    -- * Destructuring the Response
    DescribeExperimentResponse (..),
    newDescribeExperimentResponse,

    -- * Response Lenses
    describeExperimentResponse_creationTime,
    describeExperimentResponse_createdBy,
    describeExperimentResponse_lastModifiedTime,
    describeExperimentResponse_experimentName,
    describeExperimentResponse_experimentArn,
    describeExperimentResponse_source,
    describeExperimentResponse_displayName,
    describeExperimentResponse_lastModifiedBy,
    describeExperimentResponse_description,
    describeExperimentResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SageMaker.Types

-- | /See:/ 'newDescribeExperiment' smart constructor.
data DescribeExperiment = DescribeExperiment'
  { -- | The name of the experiment to describe.
    DescribeExperiment -> Text
experimentName :: Prelude.Text
  }
  deriving (DescribeExperiment -> DescribeExperiment -> Bool
(DescribeExperiment -> DescribeExperiment -> Bool)
-> (DescribeExperiment -> DescribeExperiment -> Bool)
-> Eq DescribeExperiment
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeExperiment -> DescribeExperiment -> Bool
$c/= :: DescribeExperiment -> DescribeExperiment -> Bool
== :: DescribeExperiment -> DescribeExperiment -> Bool
$c== :: DescribeExperiment -> DescribeExperiment -> Bool
Prelude.Eq, ReadPrec [DescribeExperiment]
ReadPrec DescribeExperiment
Int -> ReadS DescribeExperiment
ReadS [DescribeExperiment]
(Int -> ReadS DescribeExperiment)
-> ReadS [DescribeExperiment]
-> ReadPrec DescribeExperiment
-> ReadPrec [DescribeExperiment]
-> Read DescribeExperiment
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeExperiment]
$creadListPrec :: ReadPrec [DescribeExperiment]
readPrec :: ReadPrec DescribeExperiment
$creadPrec :: ReadPrec DescribeExperiment
readList :: ReadS [DescribeExperiment]
$creadList :: ReadS [DescribeExperiment]
readsPrec :: Int -> ReadS DescribeExperiment
$creadsPrec :: Int -> ReadS DescribeExperiment
Prelude.Read, Int -> DescribeExperiment -> ShowS
[DescribeExperiment] -> ShowS
DescribeExperiment -> String
(Int -> DescribeExperiment -> ShowS)
-> (DescribeExperiment -> String)
-> ([DescribeExperiment] -> ShowS)
-> Show DescribeExperiment
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeExperiment] -> ShowS
$cshowList :: [DescribeExperiment] -> ShowS
show :: DescribeExperiment -> String
$cshow :: DescribeExperiment -> String
showsPrec :: Int -> DescribeExperiment -> ShowS
$cshowsPrec :: Int -> DescribeExperiment -> ShowS
Prelude.Show, (forall x. DescribeExperiment -> Rep DescribeExperiment x)
-> (forall x. Rep DescribeExperiment x -> DescribeExperiment)
-> Generic DescribeExperiment
forall x. Rep DescribeExperiment x -> DescribeExperiment
forall x. DescribeExperiment -> Rep DescribeExperiment x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeExperiment x -> DescribeExperiment
$cfrom :: forall x. DescribeExperiment -> Rep DescribeExperiment x
Prelude.Generic)

-- |
-- Create a value of 'DescribeExperiment' 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:
--
-- 'experimentName', 'describeExperiment_experimentName' - The name of the experiment to describe.
newDescribeExperiment ::
  -- | 'experimentName'
  Prelude.Text ->
  DescribeExperiment
newDescribeExperiment :: Text -> DescribeExperiment
newDescribeExperiment Text
pExperimentName_ =
  DescribeExperiment' :: Text -> DescribeExperiment
DescribeExperiment'
    { $sel:experimentName:DescribeExperiment' :: Text
experimentName =
        Text
pExperimentName_
    }

-- | The name of the experiment to describe.
describeExperiment_experimentName :: Lens.Lens' DescribeExperiment Prelude.Text
describeExperiment_experimentName :: (Text -> f Text) -> DescribeExperiment -> f DescribeExperiment
describeExperiment_experimentName = (DescribeExperiment -> Text)
-> (DescribeExperiment -> Text -> DescribeExperiment)
-> Lens DescribeExperiment DescribeExperiment Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeExperiment' {Text
experimentName :: Text
$sel:experimentName:DescribeExperiment' :: DescribeExperiment -> Text
experimentName} -> Text
experimentName) (\s :: DescribeExperiment
s@DescribeExperiment' {} Text
a -> DescribeExperiment
s {$sel:experimentName:DescribeExperiment' :: Text
experimentName = Text
a} :: DescribeExperiment)

instance Core.AWSRequest DescribeExperiment where
  type
    AWSResponse DescribeExperiment =
      DescribeExperimentResponse
  request :: DescribeExperiment -> Request DescribeExperiment
request = Service -> DescribeExperiment -> Request DescribeExperiment
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeExperiment
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeExperiment)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeExperiment))
-> Logger
-> Service
-> Proxy DescribeExperiment
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeExperiment)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe POSIX
-> Maybe UserContext
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe ExperimentSource
-> Maybe Text
-> Maybe UserContext
-> Maybe Text
-> Int
-> DescribeExperimentResponse
DescribeExperimentResponse'
            (Maybe POSIX
 -> Maybe UserContext
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe ExperimentSource
 -> Maybe Text
 -> Maybe UserContext
 -> Maybe Text
 -> Int
 -> DescribeExperimentResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe UserContext
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe ExperimentSource
      -> Maybe Text
      -> Maybe UserContext
      -> Maybe Text
      -> Int
      -> DescribeExperimentResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CreationTime")
            Either
  String
  (Maybe UserContext
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe ExperimentSource
   -> Maybe Text
   -> Maybe UserContext
   -> Maybe Text
   -> Int
   -> DescribeExperimentResponse)
-> Either String (Maybe UserContext)
-> Either
     String
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe ExperimentSource
      -> Maybe Text
      -> Maybe UserContext
      -> Maybe Text
      -> Int
      -> DescribeExperimentResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe UserContext)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CreatedBy")
            Either
  String
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe ExperimentSource
   -> Maybe Text
   -> Maybe UserContext
   -> Maybe Text
   -> Int
   -> DescribeExperimentResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe ExperimentSource
      -> Maybe Text
      -> Maybe UserContext
      -> Maybe Text
      -> Int
      -> DescribeExperimentResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"LastModifiedTime")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe ExperimentSource
   -> Maybe Text
   -> Maybe UserContext
   -> Maybe Text
   -> Int
   -> DescribeExperimentResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe ExperimentSource
      -> Maybe Text
      -> Maybe UserContext
      -> Maybe Text
      -> Int
      -> DescribeExperimentResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ExperimentName")
            Either
  String
  (Maybe Text
   -> Maybe ExperimentSource
   -> Maybe Text
   -> Maybe UserContext
   -> Maybe Text
   -> Int
   -> DescribeExperimentResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe ExperimentSource
      -> Maybe Text
      -> Maybe UserContext
      -> Maybe Text
      -> Int
      -> DescribeExperimentResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ExperimentArn")
            Either
  String
  (Maybe ExperimentSource
   -> Maybe Text
   -> Maybe UserContext
   -> Maybe Text
   -> Int
   -> DescribeExperimentResponse)
-> Either String (Maybe ExperimentSource)
-> Either
     String
     (Maybe Text
      -> Maybe UserContext
      -> Maybe Text
      -> Int
      -> DescribeExperimentResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe ExperimentSource)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Source")
            Either
  String
  (Maybe Text
   -> Maybe UserContext
   -> Maybe Text
   -> Int
   -> DescribeExperimentResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe UserContext
      -> Maybe Text -> Int -> DescribeExperimentResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"DisplayName")
            Either
  String
  (Maybe UserContext
   -> Maybe Text -> Int -> DescribeExperimentResponse)
-> Either String (Maybe UserContext)
-> Either String (Maybe Text -> Int -> DescribeExperimentResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe UserContext)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"LastModifiedBy")
            Either String (Maybe Text -> Int -> DescribeExperimentResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeExperimentResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Description")
            Either String (Int -> DescribeExperimentResponse)
-> Either String Int -> Either String DescribeExperimentResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable DescribeExperiment

instance Prelude.NFData DescribeExperiment

instance Core.ToHeaders DescribeExperiment where
  toHeaders :: DescribeExperiment -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeExperiment -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"SageMaker.DescribeExperiment" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON DescribeExperiment where
  toJSON :: DescribeExperiment -> Value
toJSON DescribeExperiment' {Text
experimentName :: Text
$sel:experimentName:DescribeExperiment' :: DescribeExperiment -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"ExperimentName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
experimentName)
          ]
      )

instance Core.ToPath DescribeExperiment where
  toPath :: DescribeExperiment -> ByteString
toPath = ByteString -> DescribeExperiment -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery DescribeExperiment where
  toQuery :: DescribeExperiment -> QueryString
toQuery = QueryString -> DescribeExperiment -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newDescribeExperimentResponse' smart constructor.
data DescribeExperimentResponse = DescribeExperimentResponse'
  { -- | When the experiment was created.
    DescribeExperimentResponse -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
    -- | Who created the experiment.
    DescribeExperimentResponse -> Maybe UserContext
createdBy :: Prelude.Maybe UserContext,
    -- | When the experiment was last modified.
    DescribeExperimentResponse -> Maybe POSIX
lastModifiedTime :: Prelude.Maybe Core.POSIX,
    -- | The name of the experiment.
    DescribeExperimentResponse -> Maybe Text
experimentName :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the experiment.
    DescribeExperimentResponse -> Maybe Text
experimentArn :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the source and, optionally, the type.
    DescribeExperimentResponse -> Maybe ExperimentSource
source :: Prelude.Maybe ExperimentSource,
    -- | The name of the experiment as displayed. If @DisplayName@ isn\'t
    -- specified, @ExperimentName@ is displayed.
    DescribeExperimentResponse -> Maybe Text
displayName :: Prelude.Maybe Prelude.Text,
    -- | Who last modified the experiment.
    DescribeExperimentResponse -> Maybe UserContext
lastModifiedBy :: Prelude.Maybe UserContext,
    -- | The description of the experiment.
    DescribeExperimentResponse -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeExperimentResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeExperimentResponse -> DescribeExperimentResponse -> Bool
(DescribeExperimentResponse -> DescribeExperimentResponse -> Bool)
-> (DescribeExperimentResponse
    -> DescribeExperimentResponse -> Bool)
-> Eq DescribeExperimentResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeExperimentResponse -> DescribeExperimentResponse -> Bool
$c/= :: DescribeExperimentResponse -> DescribeExperimentResponse -> Bool
== :: DescribeExperimentResponse -> DescribeExperimentResponse -> Bool
$c== :: DescribeExperimentResponse -> DescribeExperimentResponse -> Bool
Prelude.Eq, ReadPrec [DescribeExperimentResponse]
ReadPrec DescribeExperimentResponse
Int -> ReadS DescribeExperimentResponse
ReadS [DescribeExperimentResponse]
(Int -> ReadS DescribeExperimentResponse)
-> ReadS [DescribeExperimentResponse]
-> ReadPrec DescribeExperimentResponse
-> ReadPrec [DescribeExperimentResponse]
-> Read DescribeExperimentResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeExperimentResponse]
$creadListPrec :: ReadPrec [DescribeExperimentResponse]
readPrec :: ReadPrec DescribeExperimentResponse
$creadPrec :: ReadPrec DescribeExperimentResponse
readList :: ReadS [DescribeExperimentResponse]
$creadList :: ReadS [DescribeExperimentResponse]
readsPrec :: Int -> ReadS DescribeExperimentResponse
$creadsPrec :: Int -> ReadS DescribeExperimentResponse
Prelude.Read, Int -> DescribeExperimentResponse -> ShowS
[DescribeExperimentResponse] -> ShowS
DescribeExperimentResponse -> String
(Int -> DescribeExperimentResponse -> ShowS)
-> (DescribeExperimentResponse -> String)
-> ([DescribeExperimentResponse] -> ShowS)
-> Show DescribeExperimentResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeExperimentResponse] -> ShowS
$cshowList :: [DescribeExperimentResponse] -> ShowS
show :: DescribeExperimentResponse -> String
$cshow :: DescribeExperimentResponse -> String
showsPrec :: Int -> DescribeExperimentResponse -> ShowS
$cshowsPrec :: Int -> DescribeExperimentResponse -> ShowS
Prelude.Show, (forall x.
 DescribeExperimentResponse -> Rep DescribeExperimentResponse x)
-> (forall x.
    Rep DescribeExperimentResponse x -> DescribeExperimentResponse)
-> Generic DescribeExperimentResponse
forall x.
Rep DescribeExperimentResponse x -> DescribeExperimentResponse
forall x.
DescribeExperimentResponse -> Rep DescribeExperimentResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeExperimentResponse x -> DescribeExperimentResponse
$cfrom :: forall x.
DescribeExperimentResponse -> Rep DescribeExperimentResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeExperimentResponse' 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', 'describeExperimentResponse_creationTime' - When the experiment was created.
--
-- 'createdBy', 'describeExperimentResponse_createdBy' - Who created the experiment.
--
-- 'lastModifiedTime', 'describeExperimentResponse_lastModifiedTime' - When the experiment was last modified.
--
-- 'experimentName', 'describeExperimentResponse_experimentName' - The name of the experiment.
--
-- 'experimentArn', 'describeExperimentResponse_experimentArn' - The Amazon Resource Name (ARN) of the experiment.
--
-- 'source', 'describeExperimentResponse_source' - The ARN of the source and, optionally, the type.
--
-- 'displayName', 'describeExperimentResponse_displayName' - The name of the experiment as displayed. If @DisplayName@ isn\'t
-- specified, @ExperimentName@ is displayed.
--
-- 'lastModifiedBy', 'describeExperimentResponse_lastModifiedBy' - Who last modified the experiment.
--
-- 'description', 'describeExperimentResponse_description' - The description of the experiment.
--
-- 'httpStatus', 'describeExperimentResponse_httpStatus' - The response's http status code.
newDescribeExperimentResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeExperimentResponse
newDescribeExperimentResponse :: Int -> DescribeExperimentResponse
newDescribeExperimentResponse Int
pHttpStatus_ =
  DescribeExperimentResponse' :: Maybe POSIX
-> Maybe UserContext
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe ExperimentSource
-> Maybe Text
-> Maybe UserContext
-> Maybe Text
-> Int
-> DescribeExperimentResponse
DescribeExperimentResponse'
    { $sel:creationTime:DescribeExperimentResponse' :: Maybe POSIX
creationTime =
        Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:createdBy:DescribeExperimentResponse' :: Maybe UserContext
createdBy = Maybe UserContext
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedTime:DescribeExperimentResponse' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:experimentName:DescribeExperimentResponse' :: Maybe Text
experimentName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:experimentArn:DescribeExperimentResponse' :: Maybe Text
experimentArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:source:DescribeExperimentResponse' :: Maybe ExperimentSource
source = Maybe ExperimentSource
forall a. Maybe a
Prelude.Nothing,
      $sel:displayName:DescribeExperimentResponse' :: Maybe Text
displayName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedBy:DescribeExperimentResponse' :: Maybe UserContext
lastModifiedBy = Maybe UserContext
forall a. Maybe a
Prelude.Nothing,
      $sel:description:DescribeExperimentResponse' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeExperimentResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

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

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

-- | The ARN of the source and, optionally, the type.
describeExperimentResponse_source :: Lens.Lens' DescribeExperimentResponse (Prelude.Maybe ExperimentSource)
describeExperimentResponse_source :: (Maybe ExperimentSource -> f (Maybe ExperimentSource))
-> DescribeExperimentResponse -> f DescribeExperimentResponse
describeExperimentResponse_source = (DescribeExperimentResponse -> Maybe ExperimentSource)
-> (DescribeExperimentResponse
    -> Maybe ExperimentSource -> DescribeExperimentResponse)
-> Lens
     DescribeExperimentResponse
     DescribeExperimentResponse
     (Maybe ExperimentSource)
     (Maybe ExperimentSource)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeExperimentResponse' {Maybe ExperimentSource
source :: Maybe ExperimentSource
$sel:source:DescribeExperimentResponse' :: DescribeExperimentResponse -> Maybe ExperimentSource
source} -> Maybe ExperimentSource
source) (\s :: DescribeExperimentResponse
s@DescribeExperimentResponse' {} Maybe ExperimentSource
a -> DescribeExperimentResponse
s {$sel:source:DescribeExperimentResponse' :: Maybe ExperimentSource
source = Maybe ExperimentSource
a} :: DescribeExperimentResponse)

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

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

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

-- | The response's http status code.
describeExperimentResponse_httpStatus :: Lens.Lens' DescribeExperimentResponse Prelude.Int
describeExperimentResponse_httpStatus :: (Int -> f Int)
-> DescribeExperimentResponse -> f DescribeExperimentResponse
describeExperimentResponse_httpStatus = (DescribeExperimentResponse -> Int)
-> (DescribeExperimentResponse
    -> Int -> DescribeExperimentResponse)
-> Lens
     DescribeExperimentResponse DescribeExperimentResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeExperimentResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeExperimentResponse' :: DescribeExperimentResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeExperimentResponse
s@DescribeExperimentResponse' {} Int
a -> DescribeExperimentResponse
s {$sel:httpStatus:DescribeExperimentResponse' :: Int
httpStatus = Int
a} :: DescribeExperimentResponse)

instance Prelude.NFData DescribeExperimentResponse