{-# 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.ListHumanTaskUis
-- 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 human task user interfaces in your
-- account.
--
-- This operation returns paginated results.
module Amazonka.SageMaker.ListHumanTaskUis
  ( -- * Creating a Request
    ListHumanTaskUis (..),
    newListHumanTaskUis,

    -- * Request Lenses
    listHumanTaskUis_creationTimeAfter,
    listHumanTaskUis_creationTimeBefore,
    listHumanTaskUis_maxResults,
    listHumanTaskUis_nextToken,
    listHumanTaskUis_sortOrder,

    -- * Destructuring the Response
    ListHumanTaskUisResponse (..),
    newListHumanTaskUisResponse,

    -- * Response Lenses
    listHumanTaskUisResponse_nextToken,
    listHumanTaskUisResponse_httpStatus,
    listHumanTaskUisResponse_humanTaskUiSummaries,
  )
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.SageMaker.Types

-- | /See:/ 'newListHumanTaskUis' smart constructor.
data ListHumanTaskUis = ListHumanTaskUis'
  { -- | A filter that returns only human task user interfaces with a creation
    -- time greater than or equal to the specified timestamp.
    ListHumanTaskUis -> Maybe POSIX
creationTimeAfter :: Prelude.Maybe Data.POSIX,
    -- | A filter that returns only human task user interfaces that were created
    -- before the specified timestamp.
    ListHumanTaskUis -> Maybe POSIX
creationTimeBefore :: Prelude.Maybe Data.POSIX,
    -- | The total number of items to return. If the total number of available
    -- items is more than the value specified in @MaxResults@, then a
    -- @NextToken@ will be provided in the output that you can use to resume
    -- pagination.
    ListHumanTaskUis -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | A token to resume pagination.
    ListHumanTaskUis -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | An optional value that specifies whether you want the results sorted in
    -- @Ascending@ or @Descending@ order.
    ListHumanTaskUis -> Maybe SortOrder
sortOrder :: Prelude.Maybe SortOrder
  }
  deriving (ListHumanTaskUis -> ListHumanTaskUis -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListHumanTaskUis -> ListHumanTaskUis -> Bool
$c/= :: ListHumanTaskUis -> ListHumanTaskUis -> Bool
== :: ListHumanTaskUis -> ListHumanTaskUis -> Bool
$c== :: ListHumanTaskUis -> ListHumanTaskUis -> Bool
Prelude.Eq, ReadPrec [ListHumanTaskUis]
ReadPrec ListHumanTaskUis
Int -> ReadS ListHumanTaskUis
ReadS [ListHumanTaskUis]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListHumanTaskUis]
$creadListPrec :: ReadPrec [ListHumanTaskUis]
readPrec :: ReadPrec ListHumanTaskUis
$creadPrec :: ReadPrec ListHumanTaskUis
readList :: ReadS [ListHumanTaskUis]
$creadList :: ReadS [ListHumanTaskUis]
readsPrec :: Int -> ReadS ListHumanTaskUis
$creadsPrec :: Int -> ReadS ListHumanTaskUis
Prelude.Read, Int -> ListHumanTaskUis -> ShowS
[ListHumanTaskUis] -> ShowS
ListHumanTaskUis -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListHumanTaskUis] -> ShowS
$cshowList :: [ListHumanTaskUis] -> ShowS
show :: ListHumanTaskUis -> String
$cshow :: ListHumanTaskUis -> String
showsPrec :: Int -> ListHumanTaskUis -> ShowS
$cshowsPrec :: Int -> ListHumanTaskUis -> ShowS
Prelude.Show, forall x. Rep ListHumanTaskUis x -> ListHumanTaskUis
forall x. ListHumanTaskUis -> Rep ListHumanTaskUis x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListHumanTaskUis x -> ListHumanTaskUis
$cfrom :: forall x. ListHumanTaskUis -> Rep ListHumanTaskUis x
Prelude.Generic)

-- |
-- Create a value of 'ListHumanTaskUis' 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:
--
-- 'creationTimeAfter', 'listHumanTaskUis_creationTimeAfter' - A filter that returns only human task user interfaces with a creation
-- time greater than or equal to the specified timestamp.
--
-- 'creationTimeBefore', 'listHumanTaskUis_creationTimeBefore' - A filter that returns only human task user interfaces that were created
-- before the specified timestamp.
--
-- 'maxResults', 'listHumanTaskUis_maxResults' - The total number of items to return. If the total number of available
-- items is more than the value specified in @MaxResults@, then a
-- @NextToken@ will be provided in the output that you can use to resume
-- pagination.
--
-- 'nextToken', 'listHumanTaskUis_nextToken' - A token to resume pagination.
--
-- 'sortOrder', 'listHumanTaskUis_sortOrder' - An optional value that specifies whether you want the results sorted in
-- @Ascending@ or @Descending@ order.
newListHumanTaskUis ::
  ListHumanTaskUis
newListHumanTaskUis :: ListHumanTaskUis
newListHumanTaskUis =
  ListHumanTaskUis'
    { $sel:creationTimeAfter:ListHumanTaskUis' :: Maybe POSIX
creationTimeAfter =
        forall a. Maybe a
Prelude.Nothing,
      $sel:creationTimeBefore:ListHumanTaskUis' :: Maybe POSIX
creationTimeBefore = forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListHumanTaskUis' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListHumanTaskUis' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:sortOrder:ListHumanTaskUis' :: Maybe SortOrder
sortOrder = forall a. Maybe a
Prelude.Nothing
    }

-- | A filter that returns only human task user interfaces with a creation
-- time greater than or equal to the specified timestamp.
listHumanTaskUis_creationTimeAfter :: Lens.Lens' ListHumanTaskUis (Prelude.Maybe Prelude.UTCTime)
listHumanTaskUis_creationTimeAfter :: Lens' ListHumanTaskUis (Maybe UTCTime)
listHumanTaskUis_creationTimeAfter = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListHumanTaskUis' {Maybe POSIX
creationTimeAfter :: Maybe POSIX
$sel:creationTimeAfter:ListHumanTaskUis' :: ListHumanTaskUis -> Maybe POSIX
creationTimeAfter} -> Maybe POSIX
creationTimeAfter) (\s :: ListHumanTaskUis
s@ListHumanTaskUis' {} Maybe POSIX
a -> ListHumanTaskUis
s {$sel:creationTimeAfter:ListHumanTaskUis' :: Maybe POSIX
creationTimeAfter = Maybe POSIX
a} :: ListHumanTaskUis) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | A filter that returns only human task user interfaces that were created
-- before the specified timestamp.
listHumanTaskUis_creationTimeBefore :: Lens.Lens' ListHumanTaskUis (Prelude.Maybe Prelude.UTCTime)
listHumanTaskUis_creationTimeBefore :: Lens' ListHumanTaskUis (Maybe UTCTime)
listHumanTaskUis_creationTimeBefore = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListHumanTaskUis' {Maybe POSIX
creationTimeBefore :: Maybe POSIX
$sel:creationTimeBefore:ListHumanTaskUis' :: ListHumanTaskUis -> Maybe POSIX
creationTimeBefore} -> Maybe POSIX
creationTimeBefore) (\s :: ListHumanTaskUis
s@ListHumanTaskUis' {} Maybe POSIX
a -> ListHumanTaskUis
s {$sel:creationTimeBefore:ListHumanTaskUis' :: Maybe POSIX
creationTimeBefore = Maybe POSIX
a} :: ListHumanTaskUis) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The total number of items to return. If the total number of available
-- items is more than the value specified in @MaxResults@, then a
-- @NextToken@ will be provided in the output that you can use to resume
-- pagination.
listHumanTaskUis_maxResults :: Lens.Lens' ListHumanTaskUis (Prelude.Maybe Prelude.Natural)
listHumanTaskUis_maxResults :: Lens' ListHumanTaskUis (Maybe Natural)
listHumanTaskUis_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListHumanTaskUis' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListHumanTaskUis' :: ListHumanTaskUis -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListHumanTaskUis
s@ListHumanTaskUis' {} Maybe Natural
a -> ListHumanTaskUis
s {$sel:maxResults:ListHumanTaskUis' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListHumanTaskUis)

-- | A token to resume pagination.
listHumanTaskUis_nextToken :: Lens.Lens' ListHumanTaskUis (Prelude.Maybe Prelude.Text)
listHumanTaskUis_nextToken :: Lens' ListHumanTaskUis (Maybe Text)
listHumanTaskUis_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListHumanTaskUis' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListHumanTaskUis' :: ListHumanTaskUis -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListHumanTaskUis
s@ListHumanTaskUis' {} Maybe Text
a -> ListHumanTaskUis
s {$sel:nextToken:ListHumanTaskUis' :: Maybe Text
nextToken = Maybe Text
a} :: ListHumanTaskUis)

-- | An optional value that specifies whether you want the results sorted in
-- @Ascending@ or @Descending@ order.
listHumanTaskUis_sortOrder :: Lens.Lens' ListHumanTaskUis (Prelude.Maybe SortOrder)
listHumanTaskUis_sortOrder :: Lens' ListHumanTaskUis (Maybe SortOrder)
listHumanTaskUis_sortOrder = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListHumanTaskUis' {Maybe SortOrder
sortOrder :: Maybe SortOrder
$sel:sortOrder:ListHumanTaskUis' :: ListHumanTaskUis -> Maybe SortOrder
sortOrder} -> Maybe SortOrder
sortOrder) (\s :: ListHumanTaskUis
s@ListHumanTaskUis' {} Maybe SortOrder
a -> ListHumanTaskUis
s {$sel:sortOrder:ListHumanTaskUis' :: Maybe SortOrder
sortOrder = Maybe SortOrder
a} :: ListHumanTaskUis)

instance Core.AWSPager ListHumanTaskUis where
  page :: ListHumanTaskUis
-> AWSResponse ListHumanTaskUis -> Maybe ListHumanTaskUis
page ListHumanTaskUis
rq AWSResponse ListHumanTaskUis
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListHumanTaskUis
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListHumanTaskUisResponse (Maybe Text)
listHumanTaskUisResponse_nextToken
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListHumanTaskUis
rs
            forall s a. s -> Getting a s a -> a
Lens.^. Lens' ListHumanTaskUisResponse [HumanTaskUiSummary]
listHumanTaskUisResponse_humanTaskUiSummaries
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ ListHumanTaskUis
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListHumanTaskUis (Maybe Text)
listHumanTaskUis_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListHumanTaskUis
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListHumanTaskUisResponse (Maybe Text)
listHumanTaskUisResponse_nextToken
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest ListHumanTaskUis where
  type
    AWSResponse ListHumanTaskUis =
      ListHumanTaskUisResponse
  request :: (Service -> Service)
-> ListHumanTaskUis -> Request ListHumanTaskUis
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListHumanTaskUis
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListHumanTaskUis)))
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
-> Int -> [HumanTaskUiSummary] -> ListHumanTaskUisResponse
ListHumanTaskUisResponse'
            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
"NextToken")
            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 (Maybe a)
Data..?> Key
"HumanTaskUiSummaries"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                        )
      )

instance Prelude.Hashable ListHumanTaskUis where
  hashWithSalt :: Int -> ListHumanTaskUis -> Int
hashWithSalt Int
_salt ListHumanTaskUis' {Maybe Natural
Maybe Text
Maybe POSIX
Maybe SortOrder
sortOrder :: Maybe SortOrder
nextToken :: Maybe Text
maxResults :: Maybe Natural
creationTimeBefore :: Maybe POSIX
creationTimeAfter :: Maybe POSIX
$sel:sortOrder:ListHumanTaskUis' :: ListHumanTaskUis -> Maybe SortOrder
$sel:nextToken:ListHumanTaskUis' :: ListHumanTaskUis -> Maybe Text
$sel:maxResults:ListHumanTaskUis' :: ListHumanTaskUis -> Maybe Natural
$sel:creationTimeBefore:ListHumanTaskUis' :: ListHumanTaskUis -> Maybe POSIX
$sel:creationTimeAfter:ListHumanTaskUis' :: ListHumanTaskUis -> Maybe POSIX
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
creationTimeAfter
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
creationTimeBefore
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SortOrder
sortOrder

instance Prelude.NFData ListHumanTaskUis where
  rnf :: ListHumanTaskUis -> ()
rnf ListHumanTaskUis' {Maybe Natural
Maybe Text
Maybe POSIX
Maybe SortOrder
sortOrder :: Maybe SortOrder
nextToken :: Maybe Text
maxResults :: Maybe Natural
creationTimeBefore :: Maybe POSIX
creationTimeAfter :: Maybe POSIX
$sel:sortOrder:ListHumanTaskUis' :: ListHumanTaskUis -> Maybe SortOrder
$sel:nextToken:ListHumanTaskUis' :: ListHumanTaskUis -> Maybe Text
$sel:maxResults:ListHumanTaskUis' :: ListHumanTaskUis -> Maybe Natural
$sel:creationTimeBefore:ListHumanTaskUis' :: ListHumanTaskUis -> Maybe POSIX
$sel:creationTimeAfter:ListHumanTaskUis' :: ListHumanTaskUis -> Maybe POSIX
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
creationTimeAfter
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
creationTimeBefore
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe SortOrder
sortOrder

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

instance Data.ToJSON ListHumanTaskUis where
  toJSON :: ListHumanTaskUis -> Value
toJSON ListHumanTaskUis' {Maybe Natural
Maybe Text
Maybe POSIX
Maybe SortOrder
sortOrder :: Maybe SortOrder
nextToken :: Maybe Text
maxResults :: Maybe Natural
creationTimeBefore :: Maybe POSIX
creationTimeAfter :: Maybe POSIX
$sel:sortOrder:ListHumanTaskUis' :: ListHumanTaskUis -> Maybe SortOrder
$sel:nextToken:ListHumanTaskUis' :: ListHumanTaskUis -> Maybe Text
$sel:maxResults:ListHumanTaskUis' :: ListHumanTaskUis -> Maybe Natural
$sel:creationTimeBefore:ListHumanTaskUis' :: ListHumanTaskUis -> Maybe POSIX
$sel:creationTimeAfter:ListHumanTaskUis' :: ListHumanTaskUis -> Maybe POSIX
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"CreationTimeAfter" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe POSIX
creationTimeAfter,
            (Key
"CreationTimeBefore" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe POSIX
creationTimeBefore,
            (Key
"MaxResults" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
            (Key
"NextToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            (Key
"SortOrder" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SortOrder
sortOrder
          ]
      )

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

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

-- | /See:/ 'newListHumanTaskUisResponse' smart constructor.
data ListHumanTaskUisResponse = ListHumanTaskUisResponse'
  { -- | A token to resume pagination.
    ListHumanTaskUisResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListHumanTaskUisResponse -> Int
httpStatus :: Prelude.Int,
    -- | An array of objects describing the human task user interfaces.
    ListHumanTaskUisResponse -> [HumanTaskUiSummary]
humanTaskUiSummaries :: [HumanTaskUiSummary]
  }
  deriving (ListHumanTaskUisResponse -> ListHumanTaskUisResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListHumanTaskUisResponse -> ListHumanTaskUisResponse -> Bool
$c/= :: ListHumanTaskUisResponse -> ListHumanTaskUisResponse -> Bool
== :: ListHumanTaskUisResponse -> ListHumanTaskUisResponse -> Bool
$c== :: ListHumanTaskUisResponse -> ListHumanTaskUisResponse -> Bool
Prelude.Eq, ReadPrec [ListHumanTaskUisResponse]
ReadPrec ListHumanTaskUisResponse
Int -> ReadS ListHumanTaskUisResponse
ReadS [ListHumanTaskUisResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListHumanTaskUisResponse]
$creadListPrec :: ReadPrec [ListHumanTaskUisResponse]
readPrec :: ReadPrec ListHumanTaskUisResponse
$creadPrec :: ReadPrec ListHumanTaskUisResponse
readList :: ReadS [ListHumanTaskUisResponse]
$creadList :: ReadS [ListHumanTaskUisResponse]
readsPrec :: Int -> ReadS ListHumanTaskUisResponse
$creadsPrec :: Int -> ReadS ListHumanTaskUisResponse
Prelude.Read, Int -> ListHumanTaskUisResponse -> ShowS
[ListHumanTaskUisResponse] -> ShowS
ListHumanTaskUisResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListHumanTaskUisResponse] -> ShowS
$cshowList :: [ListHumanTaskUisResponse] -> ShowS
show :: ListHumanTaskUisResponse -> String
$cshow :: ListHumanTaskUisResponse -> String
showsPrec :: Int -> ListHumanTaskUisResponse -> ShowS
$cshowsPrec :: Int -> ListHumanTaskUisResponse -> ShowS
Prelude.Show, forall x.
Rep ListHumanTaskUisResponse x -> ListHumanTaskUisResponse
forall x.
ListHumanTaskUisResponse -> Rep ListHumanTaskUisResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListHumanTaskUisResponse x -> ListHumanTaskUisResponse
$cfrom :: forall x.
ListHumanTaskUisResponse -> Rep ListHumanTaskUisResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListHumanTaskUisResponse' 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:
--
-- 'nextToken', 'listHumanTaskUisResponse_nextToken' - A token to resume pagination.
--
-- 'httpStatus', 'listHumanTaskUisResponse_httpStatus' - The response's http status code.
--
-- 'humanTaskUiSummaries', 'listHumanTaskUisResponse_humanTaskUiSummaries' - An array of objects describing the human task user interfaces.
newListHumanTaskUisResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListHumanTaskUisResponse
newListHumanTaskUisResponse :: Int -> ListHumanTaskUisResponse
newListHumanTaskUisResponse Int
pHttpStatus_ =
  ListHumanTaskUisResponse'
    { $sel:nextToken:ListHumanTaskUisResponse' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListHumanTaskUisResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:humanTaskUiSummaries:ListHumanTaskUisResponse' :: [HumanTaskUiSummary]
humanTaskUiSummaries = forall a. Monoid a => a
Prelude.mempty
    }

-- | A token to resume pagination.
listHumanTaskUisResponse_nextToken :: Lens.Lens' ListHumanTaskUisResponse (Prelude.Maybe Prelude.Text)
listHumanTaskUisResponse_nextToken :: Lens' ListHumanTaskUisResponse (Maybe Text)
listHumanTaskUisResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListHumanTaskUisResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListHumanTaskUisResponse' :: ListHumanTaskUisResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListHumanTaskUisResponse
s@ListHumanTaskUisResponse' {} Maybe Text
a -> ListHumanTaskUisResponse
s {$sel:nextToken:ListHumanTaskUisResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListHumanTaskUisResponse)

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

-- | An array of objects describing the human task user interfaces.
listHumanTaskUisResponse_humanTaskUiSummaries :: Lens.Lens' ListHumanTaskUisResponse [HumanTaskUiSummary]
listHumanTaskUisResponse_humanTaskUiSummaries :: Lens' ListHumanTaskUisResponse [HumanTaskUiSummary]
listHumanTaskUisResponse_humanTaskUiSummaries = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListHumanTaskUisResponse' {[HumanTaskUiSummary]
humanTaskUiSummaries :: [HumanTaskUiSummary]
$sel:humanTaskUiSummaries:ListHumanTaskUisResponse' :: ListHumanTaskUisResponse -> [HumanTaskUiSummary]
humanTaskUiSummaries} -> [HumanTaskUiSummary]
humanTaskUiSummaries) (\s :: ListHumanTaskUisResponse
s@ListHumanTaskUisResponse' {} [HumanTaskUiSummary]
a -> ListHumanTaskUisResponse
s {$sel:humanTaskUiSummaries:ListHumanTaskUisResponse' :: [HumanTaskUiSummary]
humanTaskUiSummaries = [HumanTaskUiSummary]
a} :: ListHumanTaskUisResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Prelude.NFData ListHumanTaskUisResponse where
  rnf :: ListHumanTaskUisResponse -> ()
rnf ListHumanTaskUisResponse' {Int
[HumanTaskUiSummary]
Maybe Text
humanTaskUiSummaries :: [HumanTaskUiSummary]
httpStatus :: Int
nextToken :: Maybe Text
$sel:humanTaskUiSummaries:ListHumanTaskUisResponse' :: ListHumanTaskUisResponse -> [HumanTaskUiSummary]
$sel:httpStatus:ListHumanTaskUisResponse' :: ListHumanTaskUisResponse -> Int
$sel:nextToken:ListHumanTaskUisResponse' :: ListHumanTaskUisResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      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 [HumanTaskUiSummary]
humanTaskUiSummaries