{-# 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.KafkaConnect.ListConnectors
-- 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 a list of all the connectors in this account and Region. The
-- list is limited to connectors whose name starts with the specified
-- prefix. The response also includes a description of each of the listed
-- connectors.
--
-- This operation returns paginated results.
module Amazonka.KafkaConnect.ListConnectors
  ( -- * Creating a Request
    ListConnectors (..),
    newListConnectors,

    -- * Request Lenses
    listConnectors_connectorNamePrefix,
    listConnectors_maxResults,
    listConnectors_nextToken,

    -- * Destructuring the Response
    ListConnectorsResponse (..),
    newListConnectorsResponse,

    -- * Response Lenses
    listConnectorsResponse_connectors,
    listConnectorsResponse_nextToken,
    listConnectorsResponse_httpStatus,
  )
where

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

-- | /See:/ 'newListConnectors' smart constructor.
data ListConnectors = ListConnectors'
  { -- | The name prefix that you want to use to search for and list connectors.
    ListConnectors -> Maybe Text
connectorNamePrefix :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of connectors to list in one response.
    ListConnectors -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | If the response of a ListConnectors operation is truncated, it will
    -- include a NextToken. Send this NextToken in a subsequent request to
    -- continue listing from where the previous operation left off.
    ListConnectors -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
  }
  deriving (ListConnectors -> ListConnectors -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListConnectors -> ListConnectors -> Bool
$c/= :: ListConnectors -> ListConnectors -> Bool
== :: ListConnectors -> ListConnectors -> Bool
$c== :: ListConnectors -> ListConnectors -> Bool
Prelude.Eq, ReadPrec [ListConnectors]
ReadPrec ListConnectors
Int -> ReadS ListConnectors
ReadS [ListConnectors]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListConnectors]
$creadListPrec :: ReadPrec [ListConnectors]
readPrec :: ReadPrec ListConnectors
$creadPrec :: ReadPrec ListConnectors
readList :: ReadS [ListConnectors]
$creadList :: ReadS [ListConnectors]
readsPrec :: Int -> ReadS ListConnectors
$creadsPrec :: Int -> ReadS ListConnectors
Prelude.Read, Int -> ListConnectors -> ShowS
[ListConnectors] -> ShowS
ListConnectors -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListConnectors] -> ShowS
$cshowList :: [ListConnectors] -> ShowS
show :: ListConnectors -> String
$cshow :: ListConnectors -> String
showsPrec :: Int -> ListConnectors -> ShowS
$cshowsPrec :: Int -> ListConnectors -> ShowS
Prelude.Show, forall x. Rep ListConnectors x -> ListConnectors
forall x. ListConnectors -> Rep ListConnectors x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListConnectors x -> ListConnectors
$cfrom :: forall x. ListConnectors -> Rep ListConnectors x
Prelude.Generic)

-- |
-- Create a value of 'ListConnectors' 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:
--
-- 'connectorNamePrefix', 'listConnectors_connectorNamePrefix' - The name prefix that you want to use to search for and list connectors.
--
-- 'maxResults', 'listConnectors_maxResults' - The maximum number of connectors to list in one response.
--
-- 'nextToken', 'listConnectors_nextToken' - If the response of a ListConnectors operation is truncated, it will
-- include a NextToken. Send this NextToken in a subsequent request to
-- continue listing from where the previous operation left off.
newListConnectors ::
  ListConnectors
newListConnectors :: ListConnectors
newListConnectors =
  ListConnectors'
    { $sel:connectorNamePrefix:ListConnectors' :: Maybe Text
connectorNamePrefix =
        forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListConnectors' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListConnectors' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing
    }

-- | The name prefix that you want to use to search for and list connectors.
listConnectors_connectorNamePrefix :: Lens.Lens' ListConnectors (Prelude.Maybe Prelude.Text)
listConnectors_connectorNamePrefix :: Lens' ListConnectors (Maybe Text)
listConnectors_connectorNamePrefix = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListConnectors' {Maybe Text
connectorNamePrefix :: Maybe Text
$sel:connectorNamePrefix:ListConnectors' :: ListConnectors -> Maybe Text
connectorNamePrefix} -> Maybe Text
connectorNamePrefix) (\s :: ListConnectors
s@ListConnectors' {} Maybe Text
a -> ListConnectors
s {$sel:connectorNamePrefix:ListConnectors' :: Maybe Text
connectorNamePrefix = Maybe Text
a} :: ListConnectors)

-- | The maximum number of connectors to list in one response.
listConnectors_maxResults :: Lens.Lens' ListConnectors (Prelude.Maybe Prelude.Natural)
listConnectors_maxResults :: Lens' ListConnectors (Maybe Natural)
listConnectors_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListConnectors' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListConnectors' :: ListConnectors -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListConnectors
s@ListConnectors' {} Maybe Natural
a -> ListConnectors
s {$sel:maxResults:ListConnectors' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListConnectors)

-- | If the response of a ListConnectors operation is truncated, it will
-- include a NextToken. Send this NextToken in a subsequent request to
-- continue listing from where the previous operation left off.
listConnectors_nextToken :: Lens.Lens' ListConnectors (Prelude.Maybe Prelude.Text)
listConnectors_nextToken :: Lens' ListConnectors (Maybe Text)
listConnectors_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListConnectors' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListConnectors' :: ListConnectors -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListConnectors
s@ListConnectors' {} Maybe Text
a -> ListConnectors
s {$sel:nextToken:ListConnectors' :: Maybe Text
nextToken = Maybe Text
a} :: ListConnectors)

instance Core.AWSPager ListConnectors where
  page :: ListConnectors
-> AWSResponse ListConnectors -> Maybe ListConnectors
page ListConnectors
rq AWSResponse ListConnectors
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListConnectors
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListConnectorsResponse (Maybe Text)
listConnectorsResponse_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 ListConnectors
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListConnectorsResponse (Maybe [ConnectorSummary])
listConnectorsResponse_connectors
            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
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ ListConnectors
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListConnectors (Maybe Text)
listConnectors_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListConnectors
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListConnectorsResponse (Maybe Text)
listConnectorsResponse_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 ListConnectors where
  type
    AWSResponse ListConnectors =
      ListConnectorsResponse
  request :: (Service -> Service) -> ListConnectors -> Request ListConnectors
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 ListConnectors
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListConnectors)))
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 [ConnectorSummary]
-> Maybe Text -> Int -> ListConnectorsResponse
ListConnectorsResponse'
            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
"connectors" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            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
"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))
      )

instance Prelude.Hashable ListConnectors where
  hashWithSalt :: Int -> ListConnectors -> Int
hashWithSalt Int
_salt ListConnectors' {Maybe Natural
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
connectorNamePrefix :: Maybe Text
$sel:nextToken:ListConnectors' :: ListConnectors -> Maybe Text
$sel:maxResults:ListConnectors' :: ListConnectors -> Maybe Natural
$sel:connectorNamePrefix:ListConnectors' :: ListConnectors -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
connectorNamePrefix
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken

instance Prelude.NFData ListConnectors where
  rnf :: ListConnectors -> ()
rnf ListConnectors' {Maybe Natural
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
connectorNamePrefix :: Maybe Text
$sel:nextToken:ListConnectors' :: ListConnectors -> Maybe Text
$sel:maxResults:ListConnectors' :: ListConnectors -> Maybe Natural
$sel:connectorNamePrefix:ListConnectors' :: ListConnectors -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
connectorNamePrefix
      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

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

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

instance Data.ToQuery ListConnectors where
  toQuery :: ListConnectors -> QueryString
toQuery ListConnectors' {Maybe Natural
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
connectorNamePrefix :: Maybe Text
$sel:nextToken:ListConnectors' :: ListConnectors -> Maybe Text
$sel:maxResults:ListConnectors' :: ListConnectors -> Maybe Natural
$sel:connectorNamePrefix:ListConnectors' :: ListConnectors -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"connectorNamePrefix" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
connectorNamePrefix,
        ByteString
"maxResults" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
maxResults,
        ByteString
"nextToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nextToken
      ]

-- | /See:/ 'newListConnectorsResponse' smart constructor.
data ListConnectorsResponse = ListConnectorsResponse'
  { -- | An array of connector descriptions.
    ListConnectorsResponse -> Maybe [ConnectorSummary]
connectors :: Prelude.Maybe [ConnectorSummary],
    -- | If the response of a ListConnectors operation is truncated, it will
    -- include a NextToken. Send this NextToken in a subsequent request to
    -- continue listing from where it left off.
    ListConnectorsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListConnectorsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListConnectorsResponse -> ListConnectorsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListConnectorsResponse -> ListConnectorsResponse -> Bool
$c/= :: ListConnectorsResponse -> ListConnectorsResponse -> Bool
== :: ListConnectorsResponse -> ListConnectorsResponse -> Bool
$c== :: ListConnectorsResponse -> ListConnectorsResponse -> Bool
Prelude.Eq, ReadPrec [ListConnectorsResponse]
ReadPrec ListConnectorsResponse
Int -> ReadS ListConnectorsResponse
ReadS [ListConnectorsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListConnectorsResponse]
$creadListPrec :: ReadPrec [ListConnectorsResponse]
readPrec :: ReadPrec ListConnectorsResponse
$creadPrec :: ReadPrec ListConnectorsResponse
readList :: ReadS [ListConnectorsResponse]
$creadList :: ReadS [ListConnectorsResponse]
readsPrec :: Int -> ReadS ListConnectorsResponse
$creadsPrec :: Int -> ReadS ListConnectorsResponse
Prelude.Read, Int -> ListConnectorsResponse -> ShowS
[ListConnectorsResponse] -> ShowS
ListConnectorsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListConnectorsResponse] -> ShowS
$cshowList :: [ListConnectorsResponse] -> ShowS
show :: ListConnectorsResponse -> String
$cshow :: ListConnectorsResponse -> String
showsPrec :: Int -> ListConnectorsResponse -> ShowS
$cshowsPrec :: Int -> ListConnectorsResponse -> ShowS
Prelude.Show, forall x. Rep ListConnectorsResponse x -> ListConnectorsResponse
forall x. ListConnectorsResponse -> Rep ListConnectorsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListConnectorsResponse x -> ListConnectorsResponse
$cfrom :: forall x. ListConnectorsResponse -> Rep ListConnectorsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListConnectorsResponse' 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:
--
-- 'connectors', 'listConnectorsResponse_connectors' - An array of connector descriptions.
--
-- 'nextToken', 'listConnectorsResponse_nextToken' - If the response of a ListConnectors operation is truncated, it will
-- include a NextToken. Send this NextToken in a subsequent request to
-- continue listing from where it left off.
--
-- 'httpStatus', 'listConnectorsResponse_httpStatus' - The response's http status code.
newListConnectorsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListConnectorsResponse
newListConnectorsResponse :: Int -> ListConnectorsResponse
newListConnectorsResponse Int
pHttpStatus_ =
  ListConnectorsResponse'
    { $sel:connectors:ListConnectorsResponse' :: Maybe [ConnectorSummary]
connectors =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListConnectorsResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListConnectorsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An array of connector descriptions.
listConnectorsResponse_connectors :: Lens.Lens' ListConnectorsResponse (Prelude.Maybe [ConnectorSummary])
listConnectorsResponse_connectors :: Lens' ListConnectorsResponse (Maybe [ConnectorSummary])
listConnectorsResponse_connectors = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListConnectorsResponse' {Maybe [ConnectorSummary]
connectors :: Maybe [ConnectorSummary]
$sel:connectors:ListConnectorsResponse' :: ListConnectorsResponse -> Maybe [ConnectorSummary]
connectors} -> Maybe [ConnectorSummary]
connectors) (\s :: ListConnectorsResponse
s@ListConnectorsResponse' {} Maybe [ConnectorSummary]
a -> ListConnectorsResponse
s {$sel:connectors:ListConnectorsResponse' :: Maybe [ConnectorSummary]
connectors = Maybe [ConnectorSummary]
a} :: ListConnectorsResponse) 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 s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | If the response of a ListConnectors operation is truncated, it will
-- include a NextToken. Send this NextToken in a subsequent request to
-- continue listing from where it left off.
listConnectorsResponse_nextToken :: Lens.Lens' ListConnectorsResponse (Prelude.Maybe Prelude.Text)
listConnectorsResponse_nextToken :: Lens' ListConnectorsResponse (Maybe Text)
listConnectorsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListConnectorsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListConnectorsResponse' :: ListConnectorsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListConnectorsResponse
s@ListConnectorsResponse' {} Maybe Text
a -> ListConnectorsResponse
s {$sel:nextToken:ListConnectorsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListConnectorsResponse)

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

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