{-# 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.DescribeTrial
-- 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 a trial\'s properties.
module Amazonka.SageMaker.DescribeTrial
  ( -- * Creating a Request
    DescribeTrial (..),
    newDescribeTrial,

    -- * Request Lenses
    describeTrial_trialName,

    -- * Destructuring the Response
    DescribeTrialResponse (..),
    newDescribeTrialResponse,

    -- * Response Lenses
    describeTrialResponse_creationTime,
    describeTrialResponse_metadataProperties,
    describeTrialResponse_trialArn,
    describeTrialResponse_createdBy,
    describeTrialResponse_lastModifiedTime,
    describeTrialResponse_experimentName,
    describeTrialResponse_source,
    describeTrialResponse_displayName,
    describeTrialResponse_trialName,
    describeTrialResponse_lastModifiedBy,
    describeTrialResponse_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:/ 'newDescribeTrial' smart constructor.
data DescribeTrial = DescribeTrial'
  { -- | The name of the trial to describe.
    DescribeTrial -> Text
trialName :: Prelude.Text
  }
  deriving (DescribeTrial -> DescribeTrial -> Bool
(DescribeTrial -> DescribeTrial -> Bool)
-> (DescribeTrial -> DescribeTrial -> Bool) -> Eq DescribeTrial
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeTrial -> DescribeTrial -> Bool
$c/= :: DescribeTrial -> DescribeTrial -> Bool
== :: DescribeTrial -> DescribeTrial -> Bool
$c== :: DescribeTrial -> DescribeTrial -> Bool
Prelude.Eq, ReadPrec [DescribeTrial]
ReadPrec DescribeTrial
Int -> ReadS DescribeTrial
ReadS [DescribeTrial]
(Int -> ReadS DescribeTrial)
-> ReadS [DescribeTrial]
-> ReadPrec DescribeTrial
-> ReadPrec [DescribeTrial]
-> Read DescribeTrial
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeTrial]
$creadListPrec :: ReadPrec [DescribeTrial]
readPrec :: ReadPrec DescribeTrial
$creadPrec :: ReadPrec DescribeTrial
readList :: ReadS [DescribeTrial]
$creadList :: ReadS [DescribeTrial]
readsPrec :: Int -> ReadS DescribeTrial
$creadsPrec :: Int -> ReadS DescribeTrial
Prelude.Read, Int -> DescribeTrial -> ShowS
[DescribeTrial] -> ShowS
DescribeTrial -> String
(Int -> DescribeTrial -> ShowS)
-> (DescribeTrial -> String)
-> ([DescribeTrial] -> ShowS)
-> Show DescribeTrial
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeTrial] -> ShowS
$cshowList :: [DescribeTrial] -> ShowS
show :: DescribeTrial -> String
$cshow :: DescribeTrial -> String
showsPrec :: Int -> DescribeTrial -> ShowS
$cshowsPrec :: Int -> DescribeTrial -> ShowS
Prelude.Show, (forall x. DescribeTrial -> Rep DescribeTrial x)
-> (forall x. Rep DescribeTrial x -> DescribeTrial)
-> Generic DescribeTrial
forall x. Rep DescribeTrial x -> DescribeTrial
forall x. DescribeTrial -> Rep DescribeTrial x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeTrial x -> DescribeTrial
$cfrom :: forall x. DescribeTrial -> Rep DescribeTrial x
Prelude.Generic)

-- |
-- Create a value of 'DescribeTrial' 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:
--
-- 'trialName', 'describeTrial_trialName' - The name of the trial to describe.
newDescribeTrial ::
  -- | 'trialName'
  Prelude.Text ->
  DescribeTrial
newDescribeTrial :: Text -> DescribeTrial
newDescribeTrial Text
pTrialName_ =
  DescribeTrial' :: Text -> DescribeTrial
DescribeTrial' {$sel:trialName:DescribeTrial' :: Text
trialName = Text
pTrialName_}

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

instance Core.AWSRequest DescribeTrial where
  type
    AWSResponse DescribeTrial =
      DescribeTrialResponse
  request :: DescribeTrial -> Request DescribeTrial
request = Service -> DescribeTrial -> Request DescribeTrial
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeTrial
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeTrial)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeTrial))
-> Logger
-> Service
-> Proxy DescribeTrial
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeTrial)))
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 MetadataProperties
-> Maybe Text
-> Maybe UserContext
-> Maybe POSIX
-> Maybe Text
-> Maybe TrialSource
-> Maybe Text
-> Maybe Text
-> Maybe UserContext
-> Int
-> DescribeTrialResponse
DescribeTrialResponse'
            (Maybe POSIX
 -> Maybe MetadataProperties
 -> Maybe Text
 -> Maybe UserContext
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe TrialSource
 -> Maybe Text
 -> Maybe Text
 -> Maybe UserContext
 -> Int
 -> DescribeTrialResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe MetadataProperties
      -> Maybe Text
      -> Maybe UserContext
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe TrialSource
      -> Maybe Text
      -> Maybe Text
      -> Maybe UserContext
      -> Int
      -> DescribeTrialResponse)
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 MetadataProperties
   -> Maybe Text
   -> Maybe UserContext
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe TrialSource
   -> Maybe Text
   -> Maybe Text
   -> Maybe UserContext
   -> Int
   -> DescribeTrialResponse)
-> Either String (Maybe MetadataProperties)
-> Either
     String
     (Maybe Text
      -> Maybe UserContext
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe TrialSource
      -> Maybe Text
      -> Maybe Text
      -> Maybe UserContext
      -> Int
      -> DescribeTrialResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe MetadataProperties)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"MetadataProperties")
            Either
  String
  (Maybe Text
   -> Maybe UserContext
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe TrialSource
   -> Maybe Text
   -> Maybe Text
   -> Maybe UserContext
   -> Int
   -> DescribeTrialResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe UserContext
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe TrialSource
      -> Maybe Text
      -> Maybe Text
      -> Maybe UserContext
      -> Int
      -> DescribeTrialResponse)
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
"TrialArn")
            Either
  String
  (Maybe UserContext
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe TrialSource
   -> Maybe Text
   -> Maybe Text
   -> Maybe UserContext
   -> Int
   -> DescribeTrialResponse)
-> Either String (Maybe UserContext)
-> Either
     String
     (Maybe POSIX
      -> Maybe Text
      -> Maybe TrialSource
      -> Maybe Text
      -> Maybe Text
      -> Maybe UserContext
      -> Int
      -> DescribeTrialResponse)
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 TrialSource
   -> Maybe Text
   -> Maybe Text
   -> Maybe UserContext
   -> Int
   -> DescribeTrialResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe TrialSource
      -> Maybe Text
      -> Maybe Text
      -> Maybe UserContext
      -> Int
      -> DescribeTrialResponse)
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 TrialSource
   -> Maybe Text
   -> Maybe Text
   -> Maybe UserContext
   -> Int
   -> DescribeTrialResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe TrialSource
      -> Maybe Text
      -> Maybe Text
      -> Maybe UserContext
      -> Int
      -> DescribeTrialResponse)
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 TrialSource
   -> Maybe Text
   -> Maybe Text
   -> Maybe UserContext
   -> Int
   -> DescribeTrialResponse)
-> Either String (Maybe TrialSource)
-> Either
     String
     (Maybe Text
      -> Maybe Text -> Maybe UserContext -> Int -> DescribeTrialResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe TrialSource)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Source")
            Either
  String
  (Maybe Text
   -> Maybe Text -> Maybe UserContext -> Int -> DescribeTrialResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text -> Maybe UserContext -> Int -> DescribeTrialResponse)
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 Text -> Maybe UserContext -> Int -> DescribeTrialResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe UserContext -> Int -> DescribeTrialResponse)
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
"TrialName")
            Either String (Maybe UserContext -> Int -> DescribeTrialResponse)
-> Either String (Maybe UserContext)
-> Either String (Int -> DescribeTrialResponse)
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 (Int -> DescribeTrialResponse)
-> Either String Int -> Either String DescribeTrialResponse
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 DescribeTrial

instance Prelude.NFData DescribeTrial

instance Core.ToHeaders DescribeTrial where
  toHeaders :: DescribeTrial -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeTrial -> 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.DescribeTrial" :: 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 DescribeTrial where
  toJSON :: DescribeTrial -> Value
toJSON DescribeTrial' {Text
trialName :: Text
$sel:trialName:DescribeTrial' :: DescribeTrial -> 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
"TrialName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
trialName)]
      )

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

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

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

-- |
-- Create a value of 'DescribeTrialResponse' 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', 'describeTrialResponse_creationTime' - When the trial was created.
--
-- 'metadataProperties', 'describeTrialResponse_metadataProperties' - Undocumented member.
--
-- 'trialArn', 'describeTrialResponse_trialArn' - The Amazon Resource Name (ARN) of the trial.
--
-- 'createdBy', 'describeTrialResponse_createdBy' - Who created the trial.
--
-- 'lastModifiedTime', 'describeTrialResponse_lastModifiedTime' - When the trial was last modified.
--
-- 'experimentName', 'describeTrialResponse_experimentName' - The name of the experiment the trial is part of.
--
-- 'source', 'describeTrialResponse_source' - The Amazon Resource Name (ARN) of the source and, optionally, the job
-- type.
--
-- 'displayName', 'describeTrialResponse_displayName' - The name of the trial as displayed. If @DisplayName@ isn\'t specified,
-- @TrialName@ is displayed.
--
-- 'trialName', 'describeTrialResponse_trialName' - The name of the trial.
--
-- 'lastModifiedBy', 'describeTrialResponse_lastModifiedBy' - Who last modified the trial.
--
-- 'httpStatus', 'describeTrialResponse_httpStatus' - The response's http status code.
newDescribeTrialResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeTrialResponse
newDescribeTrialResponse :: Int -> DescribeTrialResponse
newDescribeTrialResponse Int
pHttpStatus_ =
  DescribeTrialResponse' :: Maybe POSIX
-> Maybe MetadataProperties
-> Maybe Text
-> Maybe UserContext
-> Maybe POSIX
-> Maybe Text
-> Maybe TrialSource
-> Maybe Text
-> Maybe Text
-> Maybe UserContext
-> Int
-> DescribeTrialResponse
DescribeTrialResponse'
    { $sel:creationTime:DescribeTrialResponse' :: Maybe POSIX
creationTime =
        Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:metadataProperties:DescribeTrialResponse' :: Maybe MetadataProperties
metadataProperties = Maybe MetadataProperties
forall a. Maybe a
Prelude.Nothing,
      $sel:trialArn:DescribeTrialResponse' :: Maybe Text
trialArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdBy:DescribeTrialResponse' :: Maybe UserContext
createdBy = Maybe UserContext
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedTime:DescribeTrialResponse' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:experimentName:DescribeTrialResponse' :: Maybe Text
experimentName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:source:DescribeTrialResponse' :: Maybe TrialSource
source = Maybe TrialSource
forall a. Maybe a
Prelude.Nothing,
      $sel:displayName:DescribeTrialResponse' :: Maybe Text
displayName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:trialName:DescribeTrialResponse' :: Maybe Text
trialName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedBy:DescribeTrialResponse' :: Maybe UserContext
lastModifiedBy = Maybe UserContext
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeTrialResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

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

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

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

-- | The Amazon Resource Name (ARN) of the source and, optionally, the job
-- type.
describeTrialResponse_source :: Lens.Lens' DescribeTrialResponse (Prelude.Maybe TrialSource)
describeTrialResponse_source :: (Maybe TrialSource -> f (Maybe TrialSource))
-> DescribeTrialResponse -> f DescribeTrialResponse
describeTrialResponse_source = (DescribeTrialResponse -> Maybe TrialSource)
-> (DescribeTrialResponse
    -> Maybe TrialSource -> DescribeTrialResponse)
-> Lens
     DescribeTrialResponse
     DescribeTrialResponse
     (Maybe TrialSource)
     (Maybe TrialSource)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTrialResponse' {Maybe TrialSource
source :: Maybe TrialSource
$sel:source:DescribeTrialResponse' :: DescribeTrialResponse -> Maybe TrialSource
source} -> Maybe TrialSource
source) (\s :: DescribeTrialResponse
s@DescribeTrialResponse' {} Maybe TrialSource
a -> DescribeTrialResponse
s {$sel:source:DescribeTrialResponse' :: Maybe TrialSource
source = Maybe TrialSource
a} :: DescribeTrialResponse)

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

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

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

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

instance Prelude.NFData DescribeTrialResponse