{-# 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.CodeArtifact.AssociateExternalConnection
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Adds an existing external connection to a repository. One external
-- connection is allowed per repository.
--
-- A repository can have one or more upstream repositories, or an external
-- connection.
module Amazonka.CodeArtifact.AssociateExternalConnection
  ( -- * Creating a Request
    AssociateExternalConnection (..),
    newAssociateExternalConnection,

    -- * Request Lenses
    associateExternalConnection_domainOwner,
    associateExternalConnection_domain,
    associateExternalConnection_repository,
    associateExternalConnection_externalConnection,

    -- * Destructuring the Response
    AssociateExternalConnectionResponse (..),
    newAssociateExternalConnectionResponse,

    -- * Response Lenses
    associateExternalConnectionResponse_repository,
    associateExternalConnectionResponse_httpStatus,
  )
where

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

-- | /See:/ 'newAssociateExternalConnection' smart constructor.
data AssociateExternalConnection = AssociateExternalConnection'
  { -- | The 12-digit account number of the Amazon Web Services account that owns
    -- the domain. It does not include dashes or spaces.
    AssociateExternalConnection -> Maybe Text
domainOwner :: Prelude.Maybe Prelude.Text,
    -- | The name of the domain that contains the repository.
    AssociateExternalConnection -> Text
domain :: Prelude.Text,
    -- | The name of the repository to which the external connection is added.
    AssociateExternalConnection -> Text
repository :: Prelude.Text,
    -- | The name of the external connection to add to the repository. The
    -- following values are supported:
    --
    -- -   @public:npmjs@ - for the npm public repository.
    --
    -- -   @public:pypi@ - for the Python Package Index.
    --
    -- -   @public:maven-central@ - for Maven Central.
    --
    -- -   @public:maven-googleandroid@ - for the Google Android repository.
    --
    -- -   @public:maven-gradleplugins@ - for the Gradle plugins repository.
    --
    -- -   @public:maven-commonsware@ - for the CommonsWare Android repository.
    AssociateExternalConnection -> Text
externalConnection :: Prelude.Text
  }
  deriving (AssociateExternalConnection -> AssociateExternalConnection -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssociateExternalConnection -> AssociateExternalConnection -> Bool
$c/= :: AssociateExternalConnection -> AssociateExternalConnection -> Bool
== :: AssociateExternalConnection -> AssociateExternalConnection -> Bool
$c== :: AssociateExternalConnection -> AssociateExternalConnection -> Bool
Prelude.Eq, ReadPrec [AssociateExternalConnection]
ReadPrec AssociateExternalConnection
Int -> ReadS AssociateExternalConnection
ReadS [AssociateExternalConnection]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AssociateExternalConnection]
$creadListPrec :: ReadPrec [AssociateExternalConnection]
readPrec :: ReadPrec AssociateExternalConnection
$creadPrec :: ReadPrec AssociateExternalConnection
readList :: ReadS [AssociateExternalConnection]
$creadList :: ReadS [AssociateExternalConnection]
readsPrec :: Int -> ReadS AssociateExternalConnection
$creadsPrec :: Int -> ReadS AssociateExternalConnection
Prelude.Read, Int -> AssociateExternalConnection -> ShowS
[AssociateExternalConnection] -> ShowS
AssociateExternalConnection -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssociateExternalConnection] -> ShowS
$cshowList :: [AssociateExternalConnection] -> ShowS
show :: AssociateExternalConnection -> String
$cshow :: AssociateExternalConnection -> String
showsPrec :: Int -> AssociateExternalConnection -> ShowS
$cshowsPrec :: Int -> AssociateExternalConnection -> ShowS
Prelude.Show, forall x.
Rep AssociateExternalConnection x -> AssociateExternalConnection
forall x.
AssociateExternalConnection -> Rep AssociateExternalConnection x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AssociateExternalConnection x -> AssociateExternalConnection
$cfrom :: forall x.
AssociateExternalConnection -> Rep AssociateExternalConnection x
Prelude.Generic)

-- |
-- Create a value of 'AssociateExternalConnection' 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:
--
-- 'domainOwner', 'associateExternalConnection_domainOwner' - The 12-digit account number of the Amazon Web Services account that owns
-- the domain. It does not include dashes or spaces.
--
-- 'domain', 'associateExternalConnection_domain' - The name of the domain that contains the repository.
--
-- 'repository', 'associateExternalConnection_repository' - The name of the repository to which the external connection is added.
--
-- 'externalConnection', 'associateExternalConnection_externalConnection' - The name of the external connection to add to the repository. The
-- following values are supported:
--
-- -   @public:npmjs@ - for the npm public repository.
--
-- -   @public:pypi@ - for the Python Package Index.
--
-- -   @public:maven-central@ - for Maven Central.
--
-- -   @public:maven-googleandroid@ - for the Google Android repository.
--
-- -   @public:maven-gradleplugins@ - for the Gradle plugins repository.
--
-- -   @public:maven-commonsware@ - for the CommonsWare Android repository.
newAssociateExternalConnection ::
  -- | 'domain'
  Prelude.Text ->
  -- | 'repository'
  Prelude.Text ->
  -- | 'externalConnection'
  Prelude.Text ->
  AssociateExternalConnection
newAssociateExternalConnection :: Text -> Text -> Text -> AssociateExternalConnection
newAssociateExternalConnection
  Text
pDomain_
  Text
pRepository_
  Text
pExternalConnection_ =
    AssociateExternalConnection'
      { $sel:domainOwner:AssociateExternalConnection' :: Maybe Text
domainOwner =
          forall a. Maybe a
Prelude.Nothing,
        $sel:domain:AssociateExternalConnection' :: Text
domain = Text
pDomain_,
        $sel:repository:AssociateExternalConnection' :: Text
repository = Text
pRepository_,
        $sel:externalConnection:AssociateExternalConnection' :: Text
externalConnection = Text
pExternalConnection_
      }

-- | The 12-digit account number of the Amazon Web Services account that owns
-- the domain. It does not include dashes or spaces.
associateExternalConnection_domainOwner :: Lens.Lens' AssociateExternalConnection (Prelude.Maybe Prelude.Text)
associateExternalConnection_domainOwner :: Lens' AssociateExternalConnection (Maybe Text)
associateExternalConnection_domainOwner = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateExternalConnection' {Maybe Text
domainOwner :: Maybe Text
$sel:domainOwner:AssociateExternalConnection' :: AssociateExternalConnection -> Maybe Text
domainOwner} -> Maybe Text
domainOwner) (\s :: AssociateExternalConnection
s@AssociateExternalConnection' {} Maybe Text
a -> AssociateExternalConnection
s {$sel:domainOwner:AssociateExternalConnection' :: Maybe Text
domainOwner = Maybe Text
a} :: AssociateExternalConnection)

-- | The name of the domain that contains the repository.
associateExternalConnection_domain :: Lens.Lens' AssociateExternalConnection Prelude.Text
associateExternalConnection_domain :: Lens' AssociateExternalConnection Text
associateExternalConnection_domain = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateExternalConnection' {Text
domain :: Text
$sel:domain:AssociateExternalConnection' :: AssociateExternalConnection -> Text
domain} -> Text
domain) (\s :: AssociateExternalConnection
s@AssociateExternalConnection' {} Text
a -> AssociateExternalConnection
s {$sel:domain:AssociateExternalConnection' :: Text
domain = Text
a} :: AssociateExternalConnection)

-- | The name of the repository to which the external connection is added.
associateExternalConnection_repository :: Lens.Lens' AssociateExternalConnection Prelude.Text
associateExternalConnection_repository :: Lens' AssociateExternalConnection Text
associateExternalConnection_repository = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateExternalConnection' {Text
repository :: Text
$sel:repository:AssociateExternalConnection' :: AssociateExternalConnection -> Text
repository} -> Text
repository) (\s :: AssociateExternalConnection
s@AssociateExternalConnection' {} Text
a -> AssociateExternalConnection
s {$sel:repository:AssociateExternalConnection' :: Text
repository = Text
a} :: AssociateExternalConnection)

-- | The name of the external connection to add to the repository. The
-- following values are supported:
--
-- -   @public:npmjs@ - for the npm public repository.
--
-- -   @public:pypi@ - for the Python Package Index.
--
-- -   @public:maven-central@ - for Maven Central.
--
-- -   @public:maven-googleandroid@ - for the Google Android repository.
--
-- -   @public:maven-gradleplugins@ - for the Gradle plugins repository.
--
-- -   @public:maven-commonsware@ - for the CommonsWare Android repository.
associateExternalConnection_externalConnection :: Lens.Lens' AssociateExternalConnection Prelude.Text
associateExternalConnection_externalConnection :: Lens' AssociateExternalConnection Text
associateExternalConnection_externalConnection = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateExternalConnection' {Text
externalConnection :: Text
$sel:externalConnection:AssociateExternalConnection' :: AssociateExternalConnection -> Text
externalConnection} -> Text
externalConnection) (\s :: AssociateExternalConnection
s@AssociateExternalConnection' {} Text
a -> AssociateExternalConnection
s {$sel:externalConnection:AssociateExternalConnection' :: Text
externalConnection = Text
a} :: AssociateExternalConnection)

instance Core.AWSRequest AssociateExternalConnection where
  type
    AWSResponse AssociateExternalConnection =
      AssociateExternalConnectionResponse
  request :: (Service -> Service)
-> AssociateExternalConnection
-> Request AssociateExternalConnection
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 AssociateExternalConnection
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse AssociateExternalConnection)))
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 RepositoryDescription
-> Int -> AssociateExternalConnectionResponse
AssociateExternalConnectionResponse'
            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
"repository")
            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 AssociateExternalConnection where
  hashWithSalt :: Int -> AssociateExternalConnection -> Int
hashWithSalt Int
_salt AssociateExternalConnection' {Maybe Text
Text
externalConnection :: Text
repository :: Text
domain :: Text
domainOwner :: Maybe Text
$sel:externalConnection:AssociateExternalConnection' :: AssociateExternalConnection -> Text
$sel:repository:AssociateExternalConnection' :: AssociateExternalConnection -> Text
$sel:domain:AssociateExternalConnection' :: AssociateExternalConnection -> Text
$sel:domainOwner:AssociateExternalConnection' :: AssociateExternalConnection -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
domainOwner
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
domain
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
repository
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
externalConnection

instance Prelude.NFData AssociateExternalConnection where
  rnf :: AssociateExternalConnection -> ()
rnf AssociateExternalConnection' {Maybe Text
Text
externalConnection :: Text
repository :: Text
domain :: Text
domainOwner :: Maybe Text
$sel:externalConnection:AssociateExternalConnection' :: AssociateExternalConnection -> Text
$sel:repository:AssociateExternalConnection' :: AssociateExternalConnection -> Text
$sel:domain:AssociateExternalConnection' :: AssociateExternalConnection -> Text
$sel:domainOwner:AssociateExternalConnection' :: AssociateExternalConnection -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
domainOwner
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
domain
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
repository
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
externalConnection

instance Data.ToHeaders AssociateExternalConnection where
  toHeaders :: AssociateExternalConnection -> 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.ToJSON AssociateExternalConnection where
  toJSON :: AssociateExternalConnection -> Value
toJSON = forall a b. a -> b -> a
Prelude.const (Object -> Value
Data.Object forall a. Monoid a => a
Prelude.mempty)

instance Data.ToPath AssociateExternalConnection where
  toPath :: AssociateExternalConnection -> ByteString
toPath =
    forall a b. a -> b -> a
Prelude.const ByteString
"/v1/repository/external-connection"

instance Data.ToQuery AssociateExternalConnection where
  toQuery :: AssociateExternalConnection -> QueryString
toQuery AssociateExternalConnection' {Maybe Text
Text
externalConnection :: Text
repository :: Text
domain :: Text
domainOwner :: Maybe Text
$sel:externalConnection:AssociateExternalConnection' :: AssociateExternalConnection -> Text
$sel:repository:AssociateExternalConnection' :: AssociateExternalConnection -> Text
$sel:domain:AssociateExternalConnection' :: AssociateExternalConnection -> Text
$sel:domainOwner:AssociateExternalConnection' :: AssociateExternalConnection -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"domain-owner" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
domainOwner,
        ByteString
"domain" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
domain,
        ByteString
"repository" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
repository,
        ByteString
"external-connection" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
externalConnection
      ]

-- | /See:/ 'newAssociateExternalConnectionResponse' smart constructor.
data AssociateExternalConnectionResponse = AssociateExternalConnectionResponse'
  { -- | Information about the connected repository after processing the request.
    AssociateExternalConnectionResponse -> Maybe RepositoryDescription
repository :: Prelude.Maybe RepositoryDescription,
    -- | The response's http status code.
    AssociateExternalConnectionResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (AssociateExternalConnectionResponse
-> AssociateExternalConnectionResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssociateExternalConnectionResponse
-> AssociateExternalConnectionResponse -> Bool
$c/= :: AssociateExternalConnectionResponse
-> AssociateExternalConnectionResponse -> Bool
== :: AssociateExternalConnectionResponse
-> AssociateExternalConnectionResponse -> Bool
$c== :: AssociateExternalConnectionResponse
-> AssociateExternalConnectionResponse -> Bool
Prelude.Eq, ReadPrec [AssociateExternalConnectionResponse]
ReadPrec AssociateExternalConnectionResponse
Int -> ReadS AssociateExternalConnectionResponse
ReadS [AssociateExternalConnectionResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AssociateExternalConnectionResponse]
$creadListPrec :: ReadPrec [AssociateExternalConnectionResponse]
readPrec :: ReadPrec AssociateExternalConnectionResponse
$creadPrec :: ReadPrec AssociateExternalConnectionResponse
readList :: ReadS [AssociateExternalConnectionResponse]
$creadList :: ReadS [AssociateExternalConnectionResponse]
readsPrec :: Int -> ReadS AssociateExternalConnectionResponse
$creadsPrec :: Int -> ReadS AssociateExternalConnectionResponse
Prelude.Read, Int -> AssociateExternalConnectionResponse -> ShowS
[AssociateExternalConnectionResponse] -> ShowS
AssociateExternalConnectionResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssociateExternalConnectionResponse] -> ShowS
$cshowList :: [AssociateExternalConnectionResponse] -> ShowS
show :: AssociateExternalConnectionResponse -> String
$cshow :: AssociateExternalConnectionResponse -> String
showsPrec :: Int -> AssociateExternalConnectionResponse -> ShowS
$cshowsPrec :: Int -> AssociateExternalConnectionResponse -> ShowS
Prelude.Show, forall x.
Rep AssociateExternalConnectionResponse x
-> AssociateExternalConnectionResponse
forall x.
AssociateExternalConnectionResponse
-> Rep AssociateExternalConnectionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AssociateExternalConnectionResponse x
-> AssociateExternalConnectionResponse
$cfrom :: forall x.
AssociateExternalConnectionResponse
-> Rep AssociateExternalConnectionResponse x
Prelude.Generic)

-- |
-- Create a value of 'AssociateExternalConnectionResponse' 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:
--
-- 'repository', 'associateExternalConnectionResponse_repository' - Information about the connected repository after processing the request.
--
-- 'httpStatus', 'associateExternalConnectionResponse_httpStatus' - The response's http status code.
newAssociateExternalConnectionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  AssociateExternalConnectionResponse
newAssociateExternalConnectionResponse :: Int -> AssociateExternalConnectionResponse
newAssociateExternalConnectionResponse Int
pHttpStatus_ =
  AssociateExternalConnectionResponse'
    { $sel:repository:AssociateExternalConnectionResponse' :: Maybe RepositoryDescription
repository =
        forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:AssociateExternalConnectionResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Information about the connected repository after processing the request.
associateExternalConnectionResponse_repository :: Lens.Lens' AssociateExternalConnectionResponse (Prelude.Maybe RepositoryDescription)
associateExternalConnectionResponse_repository :: Lens'
  AssociateExternalConnectionResponse (Maybe RepositoryDescription)
associateExternalConnectionResponse_repository = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateExternalConnectionResponse' {Maybe RepositoryDescription
repository :: Maybe RepositoryDescription
$sel:repository:AssociateExternalConnectionResponse' :: AssociateExternalConnectionResponse -> Maybe RepositoryDescription
repository} -> Maybe RepositoryDescription
repository) (\s :: AssociateExternalConnectionResponse
s@AssociateExternalConnectionResponse' {} Maybe RepositoryDescription
a -> AssociateExternalConnectionResponse
s {$sel:repository:AssociateExternalConnectionResponse' :: Maybe RepositoryDescription
repository = Maybe RepositoryDescription
a} :: AssociateExternalConnectionResponse)

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

instance
  Prelude.NFData
    AssociateExternalConnectionResponse
  where
  rnf :: AssociateExternalConnectionResponse -> ()
rnf AssociateExternalConnectionResponse' {Int
Maybe RepositoryDescription
httpStatus :: Int
repository :: Maybe RepositoryDescription
$sel:httpStatus:AssociateExternalConnectionResponse' :: AssociateExternalConnectionResponse -> Int
$sel:repository:AssociateExternalConnectionResponse' :: AssociateExternalConnectionResponse -> Maybe RepositoryDescription
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe RepositoryDescription
repository
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus