{-# 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-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)
--
-- 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.Lens as Lens
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 AWS 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
(AssociateExternalConnection
 -> AssociateExternalConnection -> Bool)
-> (AssociateExternalConnection
    -> AssociateExternalConnection -> Bool)
-> Eq AssociateExternalConnection
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]
(Int -> ReadS AssociateExternalConnection)
-> ReadS [AssociateExternalConnection]
-> ReadPrec AssociateExternalConnection
-> ReadPrec [AssociateExternalConnection]
-> Read 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
(Int -> AssociateExternalConnection -> ShowS)
-> (AssociateExternalConnection -> String)
-> ([AssociateExternalConnection] -> ShowS)
-> Show AssociateExternalConnection
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.
 AssociateExternalConnection -> Rep AssociateExternalConnection x)
-> (forall x.
    Rep AssociateExternalConnection x -> AssociateExternalConnection)
-> Generic AssociateExternalConnection
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 AWS 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' :: Maybe Text -> Text -> Text -> Text -> AssociateExternalConnection
AssociateExternalConnection'
      { $sel:domainOwner:AssociateExternalConnection' :: Maybe Text
domainOwner =
          Maybe Text
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 AWS account that owns the domain. It
-- does not include dashes or spaces.
associateExternalConnection_domainOwner :: Lens.Lens' AssociateExternalConnection (Prelude.Maybe Prelude.Text)
associateExternalConnection_domainOwner :: (Maybe Text -> f (Maybe Text))
-> AssociateExternalConnection -> f AssociateExternalConnection
associateExternalConnection_domainOwner = (AssociateExternalConnection -> Maybe Text)
-> (AssociateExternalConnection
    -> Maybe Text -> AssociateExternalConnection)
-> Lens
     AssociateExternalConnection
     AssociateExternalConnection
     (Maybe Text)
     (Maybe Text)
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 :: (Text -> f Text)
-> AssociateExternalConnection -> f AssociateExternalConnection
associateExternalConnection_domain = (AssociateExternalConnection -> Text)
-> (AssociateExternalConnection
    -> Text -> AssociateExternalConnection)
-> Lens
     AssociateExternalConnection AssociateExternalConnection Text Text
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 :: (Text -> f Text)
-> AssociateExternalConnection -> f AssociateExternalConnection
associateExternalConnection_repository = (AssociateExternalConnection -> Text)
-> (AssociateExternalConnection
    -> Text -> AssociateExternalConnection)
-> Lens
     AssociateExternalConnection AssociateExternalConnection Text Text
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 :: (Text -> f Text)
-> AssociateExternalConnection -> f AssociateExternalConnection
associateExternalConnection_externalConnection = (AssociateExternalConnection -> Text)
-> (AssociateExternalConnection
    -> Text -> AssociateExternalConnection)
-> Lens
     AssociateExternalConnection AssociateExternalConnection Text Text
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 :: AssociateExternalConnection -> Request AssociateExternalConnection
request = Service
-> AssociateExternalConnection
-> Request AssociateExternalConnection
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy AssociateExternalConnection
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse AssociateExternalConnection)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse AssociateExternalConnection))
-> Logger
-> Service
-> Proxy AssociateExternalConnection
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse AssociateExternalConnection)))
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 RepositoryDescription
-> Int -> AssociateExternalConnectionResponse
AssociateExternalConnectionResponse'
            (Maybe RepositoryDescription
 -> Int -> AssociateExternalConnectionResponse)
-> Either String (Maybe RepositoryDescription)
-> Either String (Int -> AssociateExternalConnectionResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe RepositoryDescription)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"repository")
            Either String (Int -> AssociateExternalConnectionResponse)
-> Either String Int
-> Either String AssociateExternalConnectionResponse
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 AssociateExternalConnection

instance Prelude.NFData AssociateExternalConnection

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

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

instance Core.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
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"domain-owner" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
domainOwner,
        ByteString
"domain" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
domain,
        ByteString
"repository" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
repository,
        ByteString
"external-connection" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: 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
(AssociateExternalConnectionResponse
 -> AssociateExternalConnectionResponse -> Bool)
-> (AssociateExternalConnectionResponse
    -> AssociateExternalConnectionResponse -> Bool)
-> Eq AssociateExternalConnectionResponse
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]
(Int -> ReadS AssociateExternalConnectionResponse)
-> ReadS [AssociateExternalConnectionResponse]
-> ReadPrec AssociateExternalConnectionResponse
-> ReadPrec [AssociateExternalConnectionResponse]
-> Read 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
(Int -> AssociateExternalConnectionResponse -> ShowS)
-> (AssociateExternalConnectionResponse -> String)
-> ([AssociateExternalConnectionResponse] -> ShowS)
-> Show AssociateExternalConnectionResponse
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.
 AssociateExternalConnectionResponse
 -> Rep AssociateExternalConnectionResponse x)
-> (forall x.
    Rep AssociateExternalConnectionResponse x
    -> AssociateExternalConnectionResponse)
-> Generic AssociateExternalConnectionResponse
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' :: Maybe RepositoryDescription
-> Int -> AssociateExternalConnectionResponse
AssociateExternalConnectionResponse'
    { $sel:repository:AssociateExternalConnectionResponse' :: Maybe RepositoryDescription
repository =
        Maybe RepositoryDescription
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 :: (Maybe RepositoryDescription -> f (Maybe RepositoryDescription))
-> AssociateExternalConnectionResponse
-> f AssociateExternalConnectionResponse
associateExternalConnectionResponse_repository = (AssociateExternalConnectionResponse
 -> Maybe RepositoryDescription)
-> (AssociateExternalConnectionResponse
    -> Maybe RepositoryDescription
    -> AssociateExternalConnectionResponse)
-> Lens
     AssociateExternalConnectionResponse
     AssociateExternalConnectionResponse
     (Maybe RepositoryDescription)
     (Maybe RepositoryDescription)
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 :: (Int -> f Int)
-> AssociateExternalConnectionResponse
-> f AssociateExternalConnectionResponse
associateExternalConnectionResponse_httpStatus = (AssociateExternalConnectionResponse -> Int)
-> (AssociateExternalConnectionResponse
    -> Int -> AssociateExternalConnectionResponse)
-> Lens
     AssociateExternalConnectionResponse
     AssociateExternalConnectionResponse
     Int
     Int
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