{-# 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.SageMakerA2IRuntime.DescribeHumanLoop
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns information about the specified human loop. If the human loop
-- was deleted, this operation will return a @ResourceNotFoundException@
-- error.
module Amazonka.SageMakerA2IRuntime.DescribeHumanLoop
  ( -- * Creating a Request
    DescribeHumanLoop (..),
    newDescribeHumanLoop,

    -- * Request Lenses
    describeHumanLoop_humanLoopName,

    -- * Destructuring the Response
    DescribeHumanLoopResponse (..),
    newDescribeHumanLoopResponse,

    -- * Response Lenses
    describeHumanLoopResponse_failureCode,
    describeHumanLoopResponse_failureReason,
    describeHumanLoopResponse_humanLoopOutput,
    describeHumanLoopResponse_httpStatus,
    describeHumanLoopResponse_creationTime,
    describeHumanLoopResponse_humanLoopStatus,
    describeHumanLoopResponse_humanLoopName,
    describeHumanLoopResponse_humanLoopArn,
    describeHumanLoopResponse_flowDefinitionArn,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SageMakerA2IRuntime.Types

-- | /See:/ 'newDescribeHumanLoop' smart constructor.
data DescribeHumanLoop = DescribeHumanLoop'
  { -- | The name of the human loop that you want information about.
    DescribeHumanLoop -> Text
humanLoopName :: Prelude.Text
  }
  deriving (DescribeHumanLoop -> DescribeHumanLoop -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeHumanLoop -> DescribeHumanLoop -> Bool
$c/= :: DescribeHumanLoop -> DescribeHumanLoop -> Bool
== :: DescribeHumanLoop -> DescribeHumanLoop -> Bool
$c== :: DescribeHumanLoop -> DescribeHumanLoop -> Bool
Prelude.Eq, ReadPrec [DescribeHumanLoop]
ReadPrec DescribeHumanLoop
Int -> ReadS DescribeHumanLoop
ReadS [DescribeHumanLoop]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeHumanLoop]
$creadListPrec :: ReadPrec [DescribeHumanLoop]
readPrec :: ReadPrec DescribeHumanLoop
$creadPrec :: ReadPrec DescribeHumanLoop
readList :: ReadS [DescribeHumanLoop]
$creadList :: ReadS [DescribeHumanLoop]
readsPrec :: Int -> ReadS DescribeHumanLoop
$creadsPrec :: Int -> ReadS DescribeHumanLoop
Prelude.Read, Int -> DescribeHumanLoop -> ShowS
[DescribeHumanLoop] -> ShowS
DescribeHumanLoop -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeHumanLoop] -> ShowS
$cshowList :: [DescribeHumanLoop] -> ShowS
show :: DescribeHumanLoop -> String
$cshow :: DescribeHumanLoop -> String
showsPrec :: Int -> DescribeHumanLoop -> ShowS
$cshowsPrec :: Int -> DescribeHumanLoop -> ShowS
Prelude.Show, forall x. Rep DescribeHumanLoop x -> DescribeHumanLoop
forall x. DescribeHumanLoop -> Rep DescribeHumanLoop x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeHumanLoop x -> DescribeHumanLoop
$cfrom :: forall x. DescribeHumanLoop -> Rep DescribeHumanLoop x
Prelude.Generic)

-- |
-- Create a value of 'DescribeHumanLoop' 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:
--
-- 'humanLoopName', 'describeHumanLoop_humanLoopName' - The name of the human loop that you want information about.
newDescribeHumanLoop ::
  -- | 'humanLoopName'
  Prelude.Text ->
  DescribeHumanLoop
newDescribeHumanLoop :: Text -> DescribeHumanLoop
newDescribeHumanLoop Text
pHumanLoopName_ =
  DescribeHumanLoop' {$sel:humanLoopName:DescribeHumanLoop' :: Text
humanLoopName = Text
pHumanLoopName_}

-- | The name of the human loop that you want information about.
describeHumanLoop_humanLoopName :: Lens.Lens' DescribeHumanLoop Prelude.Text
describeHumanLoop_humanLoopName :: Lens' DescribeHumanLoop Text
describeHumanLoop_humanLoopName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHumanLoop' {Text
humanLoopName :: Text
$sel:humanLoopName:DescribeHumanLoop' :: DescribeHumanLoop -> Text
humanLoopName} -> Text
humanLoopName) (\s :: DescribeHumanLoop
s@DescribeHumanLoop' {} Text
a -> DescribeHumanLoop
s {$sel:humanLoopName:DescribeHumanLoop' :: Text
humanLoopName = Text
a} :: DescribeHumanLoop)

instance Core.AWSRequest DescribeHumanLoop where
  type
    AWSResponse DescribeHumanLoop =
      DescribeHumanLoopResponse
  request :: (Service -> Service)
-> DescribeHumanLoop -> Request DescribeHumanLoop
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DescribeHumanLoop
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeHumanLoop)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe HumanLoopOutput
-> Int
-> ISO8601
-> HumanLoopStatus
-> Text
-> Text
-> Text
-> DescribeHumanLoopResponse
DescribeHumanLoopResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"FailureCode")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"FailureReason")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"HumanLoopOutput")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"CreationTime")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"HumanLoopStatus")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"HumanLoopName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"HumanLoopArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"FlowDefinitionArn")
      )

instance Prelude.Hashable DescribeHumanLoop where
  hashWithSalt :: Int -> DescribeHumanLoop -> Int
hashWithSalt Int
_salt DescribeHumanLoop' {Text
humanLoopName :: Text
$sel:humanLoopName:DescribeHumanLoop' :: DescribeHumanLoop -> Text
..} =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
humanLoopName

instance Prelude.NFData DescribeHumanLoop where
  rnf :: DescribeHumanLoop -> ()
rnf DescribeHumanLoop' {Text
humanLoopName :: Text
$sel:humanLoopName:DescribeHumanLoop' :: DescribeHumanLoop -> Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Text
humanLoopName

instance Data.ToHeaders DescribeHumanLoop where
  toHeaders :: DescribeHumanLoop -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

instance Data.ToPath DescribeHumanLoop where
  toPath :: DescribeHumanLoop -> ByteString
toPath DescribeHumanLoop' {Text
humanLoopName :: Text
$sel:humanLoopName:DescribeHumanLoop' :: DescribeHumanLoop -> Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/human-loops/", forall a. ToByteString a => a -> ByteString
Data.toBS Text
humanLoopName]

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

-- | /See:/ 'newDescribeHumanLoopResponse' smart constructor.
data DescribeHumanLoopResponse = DescribeHumanLoopResponse'
  { -- | A failure code that identifies the type of failure.
    --
    -- Possible values: @ValidationError@, @Expired@, @InternalError@
    DescribeHumanLoopResponse -> Maybe Text
failureCode :: Prelude.Maybe Prelude.Text,
    -- | The reason why a human loop failed. The failure reason is returned when
    -- the status of the human loop is @Failed@.
    DescribeHumanLoopResponse -> Maybe Text
failureReason :: Prelude.Maybe Prelude.Text,
    -- | An object that contains information about the output of the human loop.
    DescribeHumanLoopResponse -> Maybe HumanLoopOutput
humanLoopOutput :: Prelude.Maybe HumanLoopOutput,
    -- | The response's http status code.
    DescribeHumanLoopResponse -> Int
httpStatus :: Prelude.Int,
    -- | The creation time when Amazon Augmented AI created the human loop.
    DescribeHumanLoopResponse -> ISO8601
creationTime :: Data.ISO8601,
    -- | The status of the human loop.
    DescribeHumanLoopResponse -> HumanLoopStatus
humanLoopStatus :: HumanLoopStatus,
    -- | The name of the human loop. The name must be lowercase, unique within
    -- the Region in your account, and can have up to 63 characters. Valid
    -- characters: a-z, 0-9, and - (hyphen).
    DescribeHumanLoopResponse -> Text
humanLoopName :: Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the human loop.
    DescribeHumanLoopResponse -> Text
humanLoopArn :: Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the flow definition.
    DescribeHumanLoopResponse -> Text
flowDefinitionArn :: Prelude.Text
  }
  deriving (DescribeHumanLoopResponse -> DescribeHumanLoopResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeHumanLoopResponse -> DescribeHumanLoopResponse -> Bool
$c/= :: DescribeHumanLoopResponse -> DescribeHumanLoopResponse -> Bool
== :: DescribeHumanLoopResponse -> DescribeHumanLoopResponse -> Bool
$c== :: DescribeHumanLoopResponse -> DescribeHumanLoopResponse -> Bool
Prelude.Eq, ReadPrec [DescribeHumanLoopResponse]
ReadPrec DescribeHumanLoopResponse
Int -> ReadS DescribeHumanLoopResponse
ReadS [DescribeHumanLoopResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeHumanLoopResponse]
$creadListPrec :: ReadPrec [DescribeHumanLoopResponse]
readPrec :: ReadPrec DescribeHumanLoopResponse
$creadPrec :: ReadPrec DescribeHumanLoopResponse
readList :: ReadS [DescribeHumanLoopResponse]
$creadList :: ReadS [DescribeHumanLoopResponse]
readsPrec :: Int -> ReadS DescribeHumanLoopResponse
$creadsPrec :: Int -> ReadS DescribeHumanLoopResponse
Prelude.Read, Int -> DescribeHumanLoopResponse -> ShowS
[DescribeHumanLoopResponse] -> ShowS
DescribeHumanLoopResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeHumanLoopResponse] -> ShowS
$cshowList :: [DescribeHumanLoopResponse] -> ShowS
show :: DescribeHumanLoopResponse -> String
$cshow :: DescribeHumanLoopResponse -> String
showsPrec :: Int -> DescribeHumanLoopResponse -> ShowS
$cshowsPrec :: Int -> DescribeHumanLoopResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeHumanLoopResponse x -> DescribeHumanLoopResponse
forall x.
DescribeHumanLoopResponse -> Rep DescribeHumanLoopResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeHumanLoopResponse x -> DescribeHumanLoopResponse
$cfrom :: forall x.
DescribeHumanLoopResponse -> Rep DescribeHumanLoopResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeHumanLoopResponse' 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:
--
-- 'failureCode', 'describeHumanLoopResponse_failureCode' - A failure code that identifies the type of failure.
--
-- Possible values: @ValidationError@, @Expired@, @InternalError@
--
-- 'failureReason', 'describeHumanLoopResponse_failureReason' - The reason why a human loop failed. The failure reason is returned when
-- the status of the human loop is @Failed@.
--
-- 'humanLoopOutput', 'describeHumanLoopResponse_humanLoopOutput' - An object that contains information about the output of the human loop.
--
-- 'httpStatus', 'describeHumanLoopResponse_httpStatus' - The response's http status code.
--
-- 'creationTime', 'describeHumanLoopResponse_creationTime' - The creation time when Amazon Augmented AI created the human loop.
--
-- 'humanLoopStatus', 'describeHumanLoopResponse_humanLoopStatus' - The status of the human loop.
--
-- 'humanLoopName', 'describeHumanLoopResponse_humanLoopName' - The name of the human loop. The name must be lowercase, unique within
-- the Region in your account, and can have up to 63 characters. Valid
-- characters: a-z, 0-9, and - (hyphen).
--
-- 'humanLoopArn', 'describeHumanLoopResponse_humanLoopArn' - The Amazon Resource Name (ARN) of the human loop.
--
-- 'flowDefinitionArn', 'describeHumanLoopResponse_flowDefinitionArn' - The Amazon Resource Name (ARN) of the flow definition.
newDescribeHumanLoopResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'creationTime'
  Prelude.UTCTime ->
  -- | 'humanLoopStatus'
  HumanLoopStatus ->
  -- | 'humanLoopName'
  Prelude.Text ->
  -- | 'humanLoopArn'
  Prelude.Text ->
  -- | 'flowDefinitionArn'
  Prelude.Text ->
  DescribeHumanLoopResponse
newDescribeHumanLoopResponse :: Int
-> UTCTime
-> HumanLoopStatus
-> Text
-> Text
-> Text
-> DescribeHumanLoopResponse
newDescribeHumanLoopResponse
  Int
pHttpStatus_
  UTCTime
pCreationTime_
  HumanLoopStatus
pHumanLoopStatus_
  Text
pHumanLoopName_
  Text
pHumanLoopArn_
  Text
pFlowDefinitionArn_ =
    DescribeHumanLoopResponse'
      { $sel:failureCode:DescribeHumanLoopResponse' :: Maybe Text
failureCode =
          forall a. Maybe a
Prelude.Nothing,
        $sel:failureReason:DescribeHumanLoopResponse' :: Maybe Text
failureReason = forall a. Maybe a
Prelude.Nothing,
        $sel:humanLoopOutput:DescribeHumanLoopResponse' :: Maybe HumanLoopOutput
humanLoopOutput = forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DescribeHumanLoopResponse' :: Int
httpStatus = Int
pHttpStatus_,
        $sel:creationTime:DescribeHumanLoopResponse' :: ISO8601
creationTime = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreationTime_,
        $sel:humanLoopStatus:DescribeHumanLoopResponse' :: HumanLoopStatus
humanLoopStatus = HumanLoopStatus
pHumanLoopStatus_,
        $sel:humanLoopName:DescribeHumanLoopResponse' :: Text
humanLoopName = Text
pHumanLoopName_,
        $sel:humanLoopArn:DescribeHumanLoopResponse' :: Text
humanLoopArn = Text
pHumanLoopArn_,
        $sel:flowDefinitionArn:DescribeHumanLoopResponse' :: Text
flowDefinitionArn = Text
pFlowDefinitionArn_
      }

-- | A failure code that identifies the type of failure.
--
-- Possible values: @ValidationError@, @Expired@, @InternalError@
describeHumanLoopResponse_failureCode :: Lens.Lens' DescribeHumanLoopResponse (Prelude.Maybe Prelude.Text)
describeHumanLoopResponse_failureCode :: Lens' DescribeHumanLoopResponse (Maybe Text)
describeHumanLoopResponse_failureCode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHumanLoopResponse' {Maybe Text
failureCode :: Maybe Text
$sel:failureCode:DescribeHumanLoopResponse' :: DescribeHumanLoopResponse -> Maybe Text
failureCode} -> Maybe Text
failureCode) (\s :: DescribeHumanLoopResponse
s@DescribeHumanLoopResponse' {} Maybe Text
a -> DescribeHumanLoopResponse
s {$sel:failureCode:DescribeHumanLoopResponse' :: Maybe Text
failureCode = Maybe Text
a} :: DescribeHumanLoopResponse)

-- | The reason why a human loop failed. The failure reason is returned when
-- the status of the human loop is @Failed@.
describeHumanLoopResponse_failureReason :: Lens.Lens' DescribeHumanLoopResponse (Prelude.Maybe Prelude.Text)
describeHumanLoopResponse_failureReason :: Lens' DescribeHumanLoopResponse (Maybe Text)
describeHumanLoopResponse_failureReason = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHumanLoopResponse' {Maybe Text
failureReason :: Maybe Text
$sel:failureReason:DescribeHumanLoopResponse' :: DescribeHumanLoopResponse -> Maybe Text
failureReason} -> Maybe Text
failureReason) (\s :: DescribeHumanLoopResponse
s@DescribeHumanLoopResponse' {} Maybe Text
a -> DescribeHumanLoopResponse
s {$sel:failureReason:DescribeHumanLoopResponse' :: Maybe Text
failureReason = Maybe Text
a} :: DescribeHumanLoopResponse)

-- | An object that contains information about the output of the human loop.
describeHumanLoopResponse_humanLoopOutput :: Lens.Lens' DescribeHumanLoopResponse (Prelude.Maybe HumanLoopOutput)
describeHumanLoopResponse_humanLoopOutput :: Lens' DescribeHumanLoopResponse (Maybe HumanLoopOutput)
describeHumanLoopResponse_humanLoopOutput = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHumanLoopResponse' {Maybe HumanLoopOutput
humanLoopOutput :: Maybe HumanLoopOutput
$sel:humanLoopOutput:DescribeHumanLoopResponse' :: DescribeHumanLoopResponse -> Maybe HumanLoopOutput
humanLoopOutput} -> Maybe HumanLoopOutput
humanLoopOutput) (\s :: DescribeHumanLoopResponse
s@DescribeHumanLoopResponse' {} Maybe HumanLoopOutput
a -> DescribeHumanLoopResponse
s {$sel:humanLoopOutput:DescribeHumanLoopResponse' :: Maybe HumanLoopOutput
humanLoopOutput = Maybe HumanLoopOutput
a} :: DescribeHumanLoopResponse)

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

-- | The creation time when Amazon Augmented AI created the human loop.
describeHumanLoopResponse_creationTime :: Lens.Lens' DescribeHumanLoopResponse Prelude.UTCTime
describeHumanLoopResponse_creationTime :: Lens' DescribeHumanLoopResponse UTCTime
describeHumanLoopResponse_creationTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHumanLoopResponse' {ISO8601
creationTime :: ISO8601
$sel:creationTime:DescribeHumanLoopResponse' :: DescribeHumanLoopResponse -> ISO8601
creationTime} -> ISO8601
creationTime) (\s :: DescribeHumanLoopResponse
s@DescribeHumanLoopResponse' {} ISO8601
a -> DescribeHumanLoopResponse
s {$sel:creationTime:DescribeHumanLoopResponse' :: ISO8601
creationTime = ISO8601
a} :: DescribeHumanLoopResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The status of the human loop.
describeHumanLoopResponse_humanLoopStatus :: Lens.Lens' DescribeHumanLoopResponse HumanLoopStatus
describeHumanLoopResponse_humanLoopStatus :: Lens' DescribeHumanLoopResponse HumanLoopStatus
describeHumanLoopResponse_humanLoopStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHumanLoopResponse' {HumanLoopStatus
humanLoopStatus :: HumanLoopStatus
$sel:humanLoopStatus:DescribeHumanLoopResponse' :: DescribeHumanLoopResponse -> HumanLoopStatus
humanLoopStatus} -> HumanLoopStatus
humanLoopStatus) (\s :: DescribeHumanLoopResponse
s@DescribeHumanLoopResponse' {} HumanLoopStatus
a -> DescribeHumanLoopResponse
s {$sel:humanLoopStatus:DescribeHumanLoopResponse' :: HumanLoopStatus
humanLoopStatus = HumanLoopStatus
a} :: DescribeHumanLoopResponse)

-- | The name of the human loop. The name must be lowercase, unique within
-- the Region in your account, and can have up to 63 characters. Valid
-- characters: a-z, 0-9, and - (hyphen).
describeHumanLoopResponse_humanLoopName :: Lens.Lens' DescribeHumanLoopResponse Prelude.Text
describeHumanLoopResponse_humanLoopName :: Lens' DescribeHumanLoopResponse Text
describeHumanLoopResponse_humanLoopName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHumanLoopResponse' {Text
humanLoopName :: Text
$sel:humanLoopName:DescribeHumanLoopResponse' :: DescribeHumanLoopResponse -> Text
humanLoopName} -> Text
humanLoopName) (\s :: DescribeHumanLoopResponse
s@DescribeHumanLoopResponse' {} Text
a -> DescribeHumanLoopResponse
s {$sel:humanLoopName:DescribeHumanLoopResponse' :: Text
humanLoopName = Text
a} :: DescribeHumanLoopResponse)

-- | The Amazon Resource Name (ARN) of the human loop.
describeHumanLoopResponse_humanLoopArn :: Lens.Lens' DescribeHumanLoopResponse Prelude.Text
describeHumanLoopResponse_humanLoopArn :: Lens' DescribeHumanLoopResponse Text
describeHumanLoopResponse_humanLoopArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHumanLoopResponse' {Text
humanLoopArn :: Text
$sel:humanLoopArn:DescribeHumanLoopResponse' :: DescribeHumanLoopResponse -> Text
humanLoopArn} -> Text
humanLoopArn) (\s :: DescribeHumanLoopResponse
s@DescribeHumanLoopResponse' {} Text
a -> DescribeHumanLoopResponse
s {$sel:humanLoopArn:DescribeHumanLoopResponse' :: Text
humanLoopArn = Text
a} :: DescribeHumanLoopResponse)

-- | The Amazon Resource Name (ARN) of the flow definition.
describeHumanLoopResponse_flowDefinitionArn :: Lens.Lens' DescribeHumanLoopResponse Prelude.Text
describeHumanLoopResponse_flowDefinitionArn :: Lens' DescribeHumanLoopResponse Text
describeHumanLoopResponse_flowDefinitionArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeHumanLoopResponse' {Text
flowDefinitionArn :: Text
$sel:flowDefinitionArn:DescribeHumanLoopResponse' :: DescribeHumanLoopResponse -> Text
flowDefinitionArn} -> Text
flowDefinitionArn) (\s :: DescribeHumanLoopResponse
s@DescribeHumanLoopResponse' {} Text
a -> DescribeHumanLoopResponse
s {$sel:flowDefinitionArn:DescribeHumanLoopResponse' :: Text
flowDefinitionArn = Text
a} :: DescribeHumanLoopResponse)

instance Prelude.NFData DescribeHumanLoopResponse where
  rnf :: DescribeHumanLoopResponse -> ()
rnf DescribeHumanLoopResponse' {Int
Maybe Text
Maybe HumanLoopOutput
Text
ISO8601
HumanLoopStatus
flowDefinitionArn :: Text
humanLoopArn :: Text
humanLoopName :: Text
humanLoopStatus :: HumanLoopStatus
creationTime :: ISO8601
httpStatus :: Int
humanLoopOutput :: Maybe HumanLoopOutput
failureReason :: Maybe Text
failureCode :: Maybe Text
$sel:flowDefinitionArn:DescribeHumanLoopResponse' :: DescribeHumanLoopResponse -> Text
$sel:humanLoopArn:DescribeHumanLoopResponse' :: DescribeHumanLoopResponse -> Text
$sel:humanLoopName:DescribeHumanLoopResponse' :: DescribeHumanLoopResponse -> Text
$sel:humanLoopStatus:DescribeHumanLoopResponse' :: DescribeHumanLoopResponse -> HumanLoopStatus
$sel:creationTime:DescribeHumanLoopResponse' :: DescribeHumanLoopResponse -> ISO8601
$sel:httpStatus:DescribeHumanLoopResponse' :: DescribeHumanLoopResponse -> Int
$sel:humanLoopOutput:DescribeHumanLoopResponse' :: DescribeHumanLoopResponse -> Maybe HumanLoopOutput
$sel:failureReason:DescribeHumanLoopResponse' :: DescribeHumanLoopResponse -> Maybe Text
$sel:failureCode:DescribeHumanLoopResponse' :: DescribeHumanLoopResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
failureCode
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
failureReason
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe HumanLoopOutput
humanLoopOutput
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ISO8601
creationTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf HumanLoopStatus
humanLoopStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
humanLoopName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
humanLoopArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
flowDefinitionArn