{-# 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.Comprehend.ListDocumentClassifiers
-- 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)
--
-- Gets a list of the document classifiers that you have created.
--
-- This operation returns paginated results.
module Amazonka.Comprehend.ListDocumentClassifiers
  ( -- * Creating a Request
    ListDocumentClassifiers (..),
    newListDocumentClassifiers,

    -- * Request Lenses
    listDocumentClassifiers_nextToken,
    listDocumentClassifiers_filter,
    listDocumentClassifiers_maxResults,

    -- * Destructuring the Response
    ListDocumentClassifiersResponse (..),
    newListDocumentClassifiersResponse,

    -- * Response Lenses
    listDocumentClassifiersResponse_nextToken,
    listDocumentClassifiersResponse_documentClassifierPropertiesList,
    listDocumentClassifiersResponse_httpStatus,
  )
where

import Amazonka.Comprehend.Types
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

-- | /See:/ 'newListDocumentClassifiers' smart constructor.
data ListDocumentClassifiers = ListDocumentClassifiers'
  { -- | Identifies the next page of results to return.
    ListDocumentClassifiers -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Filters the jobs that are returned. You can filter jobs on their name,
    -- status, or the date and time that they were submitted. You can only set
    -- one filter at a time.
    ListDocumentClassifiers -> Maybe DocumentClassifierFilter
filter' :: Prelude.Maybe DocumentClassifierFilter,
    -- | The maximum number of results to return in each page. The default is
    -- 100.
    ListDocumentClassifiers -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
  }
  deriving (ListDocumentClassifiers -> ListDocumentClassifiers -> Bool
(ListDocumentClassifiers -> ListDocumentClassifiers -> Bool)
-> (ListDocumentClassifiers -> ListDocumentClassifiers -> Bool)
-> Eq ListDocumentClassifiers
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDocumentClassifiers -> ListDocumentClassifiers -> Bool
$c/= :: ListDocumentClassifiers -> ListDocumentClassifiers -> Bool
== :: ListDocumentClassifiers -> ListDocumentClassifiers -> Bool
$c== :: ListDocumentClassifiers -> ListDocumentClassifiers -> Bool
Prelude.Eq, ReadPrec [ListDocumentClassifiers]
ReadPrec ListDocumentClassifiers
Int -> ReadS ListDocumentClassifiers
ReadS [ListDocumentClassifiers]
(Int -> ReadS ListDocumentClassifiers)
-> ReadS [ListDocumentClassifiers]
-> ReadPrec ListDocumentClassifiers
-> ReadPrec [ListDocumentClassifiers]
-> Read ListDocumentClassifiers
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDocumentClassifiers]
$creadListPrec :: ReadPrec [ListDocumentClassifiers]
readPrec :: ReadPrec ListDocumentClassifiers
$creadPrec :: ReadPrec ListDocumentClassifiers
readList :: ReadS [ListDocumentClassifiers]
$creadList :: ReadS [ListDocumentClassifiers]
readsPrec :: Int -> ReadS ListDocumentClassifiers
$creadsPrec :: Int -> ReadS ListDocumentClassifiers
Prelude.Read, Int -> ListDocumentClassifiers -> ShowS
[ListDocumentClassifiers] -> ShowS
ListDocumentClassifiers -> String
(Int -> ListDocumentClassifiers -> ShowS)
-> (ListDocumentClassifiers -> String)
-> ([ListDocumentClassifiers] -> ShowS)
-> Show ListDocumentClassifiers
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDocumentClassifiers] -> ShowS
$cshowList :: [ListDocumentClassifiers] -> ShowS
show :: ListDocumentClassifiers -> String
$cshow :: ListDocumentClassifiers -> String
showsPrec :: Int -> ListDocumentClassifiers -> ShowS
$cshowsPrec :: Int -> ListDocumentClassifiers -> ShowS
Prelude.Show, (forall x.
 ListDocumentClassifiers -> Rep ListDocumentClassifiers x)
-> (forall x.
    Rep ListDocumentClassifiers x -> ListDocumentClassifiers)
-> Generic ListDocumentClassifiers
forall x. Rep ListDocumentClassifiers x -> ListDocumentClassifiers
forall x. ListDocumentClassifiers -> Rep ListDocumentClassifiers x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListDocumentClassifiers x -> ListDocumentClassifiers
$cfrom :: forall x. ListDocumentClassifiers -> Rep ListDocumentClassifiers x
Prelude.Generic)

-- |
-- Create a value of 'ListDocumentClassifiers' 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', 'listDocumentClassifiers_nextToken' - Identifies the next page of results to return.
--
-- 'filter'', 'listDocumentClassifiers_filter' - Filters the jobs that are returned. You can filter jobs on their name,
-- status, or the date and time that they were submitted. You can only set
-- one filter at a time.
--
-- 'maxResults', 'listDocumentClassifiers_maxResults' - The maximum number of results to return in each page. The default is
-- 100.
newListDocumentClassifiers ::
  ListDocumentClassifiers
newListDocumentClassifiers :: ListDocumentClassifiers
newListDocumentClassifiers =
  ListDocumentClassifiers' :: Maybe Text
-> Maybe DocumentClassifierFilter
-> Maybe Natural
-> ListDocumentClassifiers
ListDocumentClassifiers'
    { $sel:nextToken:ListDocumentClassifiers' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:filter':ListDocumentClassifiers' :: Maybe DocumentClassifierFilter
filter' = Maybe DocumentClassifierFilter
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListDocumentClassifiers' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | Identifies the next page of results to return.
listDocumentClassifiers_nextToken :: Lens.Lens' ListDocumentClassifiers (Prelude.Maybe Prelude.Text)
listDocumentClassifiers_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListDocumentClassifiers -> f ListDocumentClassifiers
listDocumentClassifiers_nextToken = (ListDocumentClassifiers -> Maybe Text)
-> (ListDocumentClassifiers
    -> Maybe Text -> ListDocumentClassifiers)
-> Lens
     ListDocumentClassifiers
     ListDocumentClassifiers
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDocumentClassifiers' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListDocumentClassifiers' :: ListDocumentClassifiers -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListDocumentClassifiers
s@ListDocumentClassifiers' {} Maybe Text
a -> ListDocumentClassifiers
s {$sel:nextToken:ListDocumentClassifiers' :: Maybe Text
nextToken = Maybe Text
a} :: ListDocumentClassifiers)

-- | Filters the jobs that are returned. You can filter jobs on their name,
-- status, or the date and time that they were submitted. You can only set
-- one filter at a time.
listDocumentClassifiers_filter :: Lens.Lens' ListDocumentClassifiers (Prelude.Maybe DocumentClassifierFilter)
listDocumentClassifiers_filter :: (Maybe DocumentClassifierFilter
 -> f (Maybe DocumentClassifierFilter))
-> ListDocumentClassifiers -> f ListDocumentClassifiers
listDocumentClassifiers_filter = (ListDocumentClassifiers -> Maybe DocumentClassifierFilter)
-> (ListDocumentClassifiers
    -> Maybe DocumentClassifierFilter -> ListDocumentClassifiers)
-> Lens
     ListDocumentClassifiers
     ListDocumentClassifiers
     (Maybe DocumentClassifierFilter)
     (Maybe DocumentClassifierFilter)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDocumentClassifiers' {Maybe DocumentClassifierFilter
filter' :: Maybe DocumentClassifierFilter
$sel:filter':ListDocumentClassifiers' :: ListDocumentClassifiers -> Maybe DocumentClassifierFilter
filter'} -> Maybe DocumentClassifierFilter
filter') (\s :: ListDocumentClassifiers
s@ListDocumentClassifiers' {} Maybe DocumentClassifierFilter
a -> ListDocumentClassifiers
s {$sel:filter':ListDocumentClassifiers' :: Maybe DocumentClassifierFilter
filter' = Maybe DocumentClassifierFilter
a} :: ListDocumentClassifiers)

-- | The maximum number of results to return in each page. The default is
-- 100.
listDocumentClassifiers_maxResults :: Lens.Lens' ListDocumentClassifiers (Prelude.Maybe Prelude.Natural)
listDocumentClassifiers_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListDocumentClassifiers -> f ListDocumentClassifiers
listDocumentClassifiers_maxResults = (ListDocumentClassifiers -> Maybe Natural)
-> (ListDocumentClassifiers
    -> Maybe Natural -> ListDocumentClassifiers)
-> Lens
     ListDocumentClassifiers
     ListDocumentClassifiers
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDocumentClassifiers' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListDocumentClassifiers' :: ListDocumentClassifiers -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListDocumentClassifiers
s@ListDocumentClassifiers' {} Maybe Natural
a -> ListDocumentClassifiers
s {$sel:maxResults:ListDocumentClassifiers' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListDocumentClassifiers)

instance Core.AWSPager ListDocumentClassifiers where
  page :: ListDocumentClassifiers
-> AWSResponse ListDocumentClassifiers
-> Maybe ListDocumentClassifiers
page ListDocumentClassifiers
rq AWSResponse ListDocumentClassifiers
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListDocumentClassifiers
ListDocumentClassifiersResponse
rs
            ListDocumentClassifiersResponse
-> Getting (First Text) ListDocumentClassifiersResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListDocumentClassifiersResponse
-> Const (First Text) ListDocumentClassifiersResponse
Lens' ListDocumentClassifiersResponse (Maybe Text)
listDocumentClassifiersResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListDocumentClassifiersResponse
 -> Const (First Text) ListDocumentClassifiersResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListDocumentClassifiersResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListDocumentClassifiers
forall a. Maybe a
Prelude.Nothing
    | Maybe [DocumentClassifierProperties] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListDocumentClassifiers
ListDocumentClassifiersResponse
rs
            ListDocumentClassifiersResponse
-> Getting
     (First [DocumentClassifierProperties])
     ListDocumentClassifiersResponse
     [DocumentClassifierProperties]
-> Maybe [DocumentClassifierProperties]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [DocumentClassifierProperties]
 -> Const
      (First [DocumentClassifierProperties])
      (Maybe [DocumentClassifierProperties]))
-> ListDocumentClassifiersResponse
-> Const
     (First [DocumentClassifierProperties])
     ListDocumentClassifiersResponse
Lens'
  ListDocumentClassifiersResponse
  (Maybe [DocumentClassifierProperties])
listDocumentClassifiersResponse_documentClassifierPropertiesList
              ((Maybe [DocumentClassifierProperties]
  -> Const
       (First [DocumentClassifierProperties])
       (Maybe [DocumentClassifierProperties]))
 -> ListDocumentClassifiersResponse
 -> Const
      (First [DocumentClassifierProperties])
      ListDocumentClassifiersResponse)
-> (([DocumentClassifierProperties]
     -> Const
          (First [DocumentClassifierProperties])
          [DocumentClassifierProperties])
    -> Maybe [DocumentClassifierProperties]
    -> Const
         (First [DocumentClassifierProperties])
         (Maybe [DocumentClassifierProperties]))
-> Getting
     (First [DocumentClassifierProperties])
     ListDocumentClassifiersResponse
     [DocumentClassifierProperties]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DocumentClassifierProperties]
 -> Const
      (First [DocumentClassifierProperties])
      [DocumentClassifierProperties])
-> Maybe [DocumentClassifierProperties]
-> Const
     (First [DocumentClassifierProperties])
     (Maybe [DocumentClassifierProperties])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListDocumentClassifiers
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListDocumentClassifiers -> Maybe ListDocumentClassifiers
forall a. a -> Maybe a
Prelude.Just (ListDocumentClassifiers -> Maybe ListDocumentClassifiers)
-> ListDocumentClassifiers -> Maybe ListDocumentClassifiers
forall a b. (a -> b) -> a -> b
Prelude.$
        ListDocumentClassifiers
rq
          ListDocumentClassifiers
-> (ListDocumentClassifiers -> ListDocumentClassifiers)
-> ListDocumentClassifiers
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListDocumentClassifiers -> Identity ListDocumentClassifiers
Lens
  ListDocumentClassifiers
  ListDocumentClassifiers
  (Maybe Text)
  (Maybe Text)
listDocumentClassifiers_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListDocumentClassifiers -> Identity ListDocumentClassifiers)
-> Maybe Text -> ListDocumentClassifiers -> ListDocumentClassifiers
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListDocumentClassifiers
ListDocumentClassifiersResponse
rs
          ListDocumentClassifiersResponse
-> Getting (First Text) ListDocumentClassifiersResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListDocumentClassifiersResponse
-> Const (First Text) ListDocumentClassifiersResponse
Lens' ListDocumentClassifiersResponse (Maybe Text)
listDocumentClassifiersResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListDocumentClassifiersResponse
 -> Const (First Text) ListDocumentClassifiersResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListDocumentClassifiersResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest ListDocumentClassifiers where
  type
    AWSResponse ListDocumentClassifiers =
      ListDocumentClassifiersResponse
  request :: ListDocumentClassifiers -> Request ListDocumentClassifiers
request = Service
-> ListDocumentClassifiers -> Request ListDocumentClassifiers
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ListDocumentClassifiers
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListDocumentClassifiers)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListDocumentClassifiers))
-> Logger
-> Service
-> Proxy ListDocumentClassifiers
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListDocumentClassifiers)))
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 Text
-> Maybe [DocumentClassifierProperties]
-> Int
-> ListDocumentClassifiersResponse
ListDocumentClassifiersResponse'
            (Maybe Text
 -> Maybe [DocumentClassifierProperties]
 -> Int
 -> ListDocumentClassifiersResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [DocumentClassifierProperties]
      -> Int -> ListDocumentClassifiersResponse)
forall (f :: * -> *) a b. Functor 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
"NextToken")
            Either
  String
  (Maybe [DocumentClassifierProperties]
   -> Int -> ListDocumentClassifiersResponse)
-> Either String (Maybe [DocumentClassifierProperties])
-> Either String (Int -> ListDocumentClassifiersResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text
-> Either String (Maybe (Maybe [DocumentClassifierProperties]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"DocumentClassifierPropertiesList"
                            Either String (Maybe (Maybe [DocumentClassifierProperties]))
-> Maybe [DocumentClassifierProperties]
-> Either String (Maybe [DocumentClassifierProperties])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [DocumentClassifierProperties]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either String (Int -> ListDocumentClassifiersResponse)
-> Either String Int
-> Either String ListDocumentClassifiersResponse
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 ListDocumentClassifiers

instance Prelude.NFData ListDocumentClassifiers

instance Core.ToHeaders ListDocumentClassifiers where
  toHeaders :: ListDocumentClassifiers -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListDocumentClassifiers -> 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
"Comprehend_20171127.ListDocumentClassifiers" ::
                          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 ListDocumentClassifiers where
  toJSON :: ListDocumentClassifiers -> Value
toJSON ListDocumentClassifiers' {Maybe Natural
Maybe Text
Maybe DocumentClassifierFilter
maxResults :: Maybe Natural
filter' :: Maybe DocumentClassifierFilter
nextToken :: Maybe Text
$sel:maxResults:ListDocumentClassifiers' :: ListDocumentClassifiers -> Maybe Natural
$sel:filter':ListDocumentClassifiers' :: ListDocumentClassifiers -> Maybe DocumentClassifierFilter
$sel:nextToken:ListDocumentClassifiers' :: ListDocumentClassifiers -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"NextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            (Text
"Filter" Text -> DocumentClassifierFilter -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (DocumentClassifierFilter -> Pair)
-> Maybe DocumentClassifierFilter -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DocumentClassifierFilter
filter',
            (Text
"MaxResults" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults
          ]
      )

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

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

-- | /See:/ 'newListDocumentClassifiersResponse' smart constructor.
data ListDocumentClassifiersResponse = ListDocumentClassifiersResponse'
  { -- | Identifies the next page of results to return.
    ListDocumentClassifiersResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | A list containing the properties of each job returned.
    ListDocumentClassifiersResponse
-> Maybe [DocumentClassifierProperties]
documentClassifierPropertiesList :: Prelude.Maybe [DocumentClassifierProperties],
    -- | The response's http status code.
    ListDocumentClassifiersResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListDocumentClassifiersResponse
-> ListDocumentClassifiersResponse -> Bool
(ListDocumentClassifiersResponse
 -> ListDocumentClassifiersResponse -> Bool)
-> (ListDocumentClassifiersResponse
    -> ListDocumentClassifiersResponse -> Bool)
-> Eq ListDocumentClassifiersResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDocumentClassifiersResponse
-> ListDocumentClassifiersResponse -> Bool
$c/= :: ListDocumentClassifiersResponse
-> ListDocumentClassifiersResponse -> Bool
== :: ListDocumentClassifiersResponse
-> ListDocumentClassifiersResponse -> Bool
$c== :: ListDocumentClassifiersResponse
-> ListDocumentClassifiersResponse -> Bool
Prelude.Eq, Int -> ListDocumentClassifiersResponse -> ShowS
[ListDocumentClassifiersResponse] -> ShowS
ListDocumentClassifiersResponse -> String
(Int -> ListDocumentClassifiersResponse -> ShowS)
-> (ListDocumentClassifiersResponse -> String)
-> ([ListDocumentClassifiersResponse] -> ShowS)
-> Show ListDocumentClassifiersResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDocumentClassifiersResponse] -> ShowS
$cshowList :: [ListDocumentClassifiersResponse] -> ShowS
show :: ListDocumentClassifiersResponse -> String
$cshow :: ListDocumentClassifiersResponse -> String
showsPrec :: Int -> ListDocumentClassifiersResponse -> ShowS
$cshowsPrec :: Int -> ListDocumentClassifiersResponse -> ShowS
Prelude.Show, (forall x.
 ListDocumentClassifiersResponse
 -> Rep ListDocumentClassifiersResponse x)
-> (forall x.
    Rep ListDocumentClassifiersResponse x
    -> ListDocumentClassifiersResponse)
-> Generic ListDocumentClassifiersResponse
forall x.
Rep ListDocumentClassifiersResponse x
-> ListDocumentClassifiersResponse
forall x.
ListDocumentClassifiersResponse
-> Rep ListDocumentClassifiersResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListDocumentClassifiersResponse x
-> ListDocumentClassifiersResponse
$cfrom :: forall x.
ListDocumentClassifiersResponse
-> Rep ListDocumentClassifiersResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListDocumentClassifiersResponse' 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', 'listDocumentClassifiersResponse_nextToken' - Identifies the next page of results to return.
--
-- 'documentClassifierPropertiesList', 'listDocumentClassifiersResponse_documentClassifierPropertiesList' - A list containing the properties of each job returned.
--
-- 'httpStatus', 'listDocumentClassifiersResponse_httpStatus' - The response's http status code.
newListDocumentClassifiersResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListDocumentClassifiersResponse
newListDocumentClassifiersResponse :: Int -> ListDocumentClassifiersResponse
newListDocumentClassifiersResponse Int
pHttpStatus_ =
  ListDocumentClassifiersResponse' :: Maybe Text
-> Maybe [DocumentClassifierProperties]
-> Int
-> ListDocumentClassifiersResponse
ListDocumentClassifiersResponse'
    { $sel:nextToken:ListDocumentClassifiersResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:documentClassifierPropertiesList:ListDocumentClassifiersResponse' :: Maybe [DocumentClassifierProperties]
documentClassifierPropertiesList =
        Maybe [DocumentClassifierProperties]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListDocumentClassifiersResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Identifies the next page of results to return.
listDocumentClassifiersResponse_nextToken :: Lens.Lens' ListDocumentClassifiersResponse (Prelude.Maybe Prelude.Text)
listDocumentClassifiersResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListDocumentClassifiersResponse
-> f ListDocumentClassifiersResponse
listDocumentClassifiersResponse_nextToken = (ListDocumentClassifiersResponse -> Maybe Text)
-> (ListDocumentClassifiersResponse
    -> Maybe Text -> ListDocumentClassifiersResponse)
-> Lens' ListDocumentClassifiersResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDocumentClassifiersResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListDocumentClassifiersResponse' :: ListDocumentClassifiersResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListDocumentClassifiersResponse
s@ListDocumentClassifiersResponse' {} Maybe Text
a -> ListDocumentClassifiersResponse
s {$sel:nextToken:ListDocumentClassifiersResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListDocumentClassifiersResponse)

-- | A list containing the properties of each job returned.
listDocumentClassifiersResponse_documentClassifierPropertiesList :: Lens.Lens' ListDocumentClassifiersResponse (Prelude.Maybe [DocumentClassifierProperties])
listDocumentClassifiersResponse_documentClassifierPropertiesList :: (Maybe [DocumentClassifierProperties]
 -> f (Maybe [DocumentClassifierProperties]))
-> ListDocumentClassifiersResponse
-> f ListDocumentClassifiersResponse
listDocumentClassifiersResponse_documentClassifierPropertiesList = (ListDocumentClassifiersResponse
 -> Maybe [DocumentClassifierProperties])
-> (ListDocumentClassifiersResponse
    -> Maybe [DocumentClassifierProperties]
    -> ListDocumentClassifiersResponse)
-> Lens'
     ListDocumentClassifiersResponse
     (Maybe [DocumentClassifierProperties])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDocumentClassifiersResponse' {Maybe [DocumentClassifierProperties]
documentClassifierPropertiesList :: Maybe [DocumentClassifierProperties]
$sel:documentClassifierPropertiesList:ListDocumentClassifiersResponse' :: ListDocumentClassifiersResponse
-> Maybe [DocumentClassifierProperties]
documentClassifierPropertiesList} -> Maybe [DocumentClassifierProperties]
documentClassifierPropertiesList) (\s :: ListDocumentClassifiersResponse
s@ListDocumentClassifiersResponse' {} Maybe [DocumentClassifierProperties]
a -> ListDocumentClassifiersResponse
s {$sel:documentClassifierPropertiesList:ListDocumentClassifiersResponse' :: Maybe [DocumentClassifierProperties]
documentClassifierPropertiesList = Maybe [DocumentClassifierProperties]
a} :: ListDocumentClassifiersResponse) ((Maybe [DocumentClassifierProperties]
  -> f (Maybe [DocumentClassifierProperties]))
 -> ListDocumentClassifiersResponse
 -> f ListDocumentClassifiersResponse)
-> ((Maybe [DocumentClassifierProperties]
     -> f (Maybe [DocumentClassifierProperties]))
    -> Maybe [DocumentClassifierProperties]
    -> f (Maybe [DocumentClassifierProperties]))
-> (Maybe [DocumentClassifierProperties]
    -> f (Maybe [DocumentClassifierProperties]))
-> ListDocumentClassifiersResponse
-> f ListDocumentClassifiersResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [DocumentClassifierProperties]
  [DocumentClassifierProperties]
  [DocumentClassifierProperties]
  [DocumentClassifierProperties]
-> Iso
     (Maybe [DocumentClassifierProperties])
     (Maybe [DocumentClassifierProperties])
     (Maybe [DocumentClassifierProperties])
     (Maybe [DocumentClassifierProperties])
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
  [DocumentClassifierProperties]
  [DocumentClassifierProperties]
  [DocumentClassifierProperties]
  [DocumentClassifierProperties]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    ListDocumentClassifiersResponse