{-# 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.DirectConnect.UpdateDirectConnectGatewayAssociation
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Updates the specified attributes of the Direct Connect gateway
-- association.
--
-- Add or remove prefixes from the association.
module Amazonka.DirectConnect.UpdateDirectConnectGatewayAssociation
  ( -- * Creating a Request
    UpdateDirectConnectGatewayAssociation (..),
    newUpdateDirectConnectGatewayAssociation,

    -- * Request Lenses
    updateDirectConnectGatewayAssociation_addAllowedPrefixesToDirectConnectGateway,
    updateDirectConnectGatewayAssociation_associationId,
    updateDirectConnectGatewayAssociation_removeAllowedPrefixesToDirectConnectGateway,

    -- * Destructuring the Response
    UpdateDirectConnectGatewayAssociationResponse (..),
    newUpdateDirectConnectGatewayAssociationResponse,

    -- * Response Lenses
    updateDirectConnectGatewayAssociationResponse_directConnectGatewayAssociation,
    updateDirectConnectGatewayAssociationResponse_httpStatus,
  )
where

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

-- | /See:/ 'newUpdateDirectConnectGatewayAssociation' smart constructor.
data UpdateDirectConnectGatewayAssociation = UpdateDirectConnectGatewayAssociation'
  { -- | The Amazon VPC prefixes to advertise to the Direct Connect gateway.
    UpdateDirectConnectGatewayAssociation -> Maybe [RouteFilterPrefix]
addAllowedPrefixesToDirectConnectGateway :: Prelude.Maybe [RouteFilterPrefix],
    -- | The ID of the Direct Connect gateway association.
    UpdateDirectConnectGatewayAssociation -> Maybe Text
associationId :: Prelude.Maybe Prelude.Text,
    -- | The Amazon VPC prefixes to no longer advertise to the Direct Connect
    -- gateway.
    UpdateDirectConnectGatewayAssociation -> Maybe [RouteFilterPrefix]
removeAllowedPrefixesToDirectConnectGateway :: Prelude.Maybe [RouteFilterPrefix]
  }
  deriving (UpdateDirectConnectGatewayAssociation
-> UpdateDirectConnectGatewayAssociation -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateDirectConnectGatewayAssociation
-> UpdateDirectConnectGatewayAssociation -> Bool
$c/= :: UpdateDirectConnectGatewayAssociation
-> UpdateDirectConnectGatewayAssociation -> Bool
== :: UpdateDirectConnectGatewayAssociation
-> UpdateDirectConnectGatewayAssociation -> Bool
$c== :: UpdateDirectConnectGatewayAssociation
-> UpdateDirectConnectGatewayAssociation -> Bool
Prelude.Eq, ReadPrec [UpdateDirectConnectGatewayAssociation]
ReadPrec UpdateDirectConnectGatewayAssociation
Int -> ReadS UpdateDirectConnectGatewayAssociation
ReadS [UpdateDirectConnectGatewayAssociation]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateDirectConnectGatewayAssociation]
$creadListPrec :: ReadPrec [UpdateDirectConnectGatewayAssociation]
readPrec :: ReadPrec UpdateDirectConnectGatewayAssociation
$creadPrec :: ReadPrec UpdateDirectConnectGatewayAssociation
readList :: ReadS [UpdateDirectConnectGatewayAssociation]
$creadList :: ReadS [UpdateDirectConnectGatewayAssociation]
readsPrec :: Int -> ReadS UpdateDirectConnectGatewayAssociation
$creadsPrec :: Int -> ReadS UpdateDirectConnectGatewayAssociation
Prelude.Read, Int -> UpdateDirectConnectGatewayAssociation -> ShowS
[UpdateDirectConnectGatewayAssociation] -> ShowS
UpdateDirectConnectGatewayAssociation -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateDirectConnectGatewayAssociation] -> ShowS
$cshowList :: [UpdateDirectConnectGatewayAssociation] -> ShowS
show :: UpdateDirectConnectGatewayAssociation -> String
$cshow :: UpdateDirectConnectGatewayAssociation -> String
showsPrec :: Int -> UpdateDirectConnectGatewayAssociation -> ShowS
$cshowsPrec :: Int -> UpdateDirectConnectGatewayAssociation -> ShowS
Prelude.Show, forall x.
Rep UpdateDirectConnectGatewayAssociation x
-> UpdateDirectConnectGatewayAssociation
forall x.
UpdateDirectConnectGatewayAssociation
-> Rep UpdateDirectConnectGatewayAssociation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateDirectConnectGatewayAssociation x
-> UpdateDirectConnectGatewayAssociation
$cfrom :: forall x.
UpdateDirectConnectGatewayAssociation
-> Rep UpdateDirectConnectGatewayAssociation x
Prelude.Generic)

-- |
-- Create a value of 'UpdateDirectConnectGatewayAssociation' 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:
--
-- 'addAllowedPrefixesToDirectConnectGateway', 'updateDirectConnectGatewayAssociation_addAllowedPrefixesToDirectConnectGateway' - The Amazon VPC prefixes to advertise to the Direct Connect gateway.
--
-- 'associationId', 'updateDirectConnectGatewayAssociation_associationId' - The ID of the Direct Connect gateway association.
--
-- 'removeAllowedPrefixesToDirectConnectGateway', 'updateDirectConnectGatewayAssociation_removeAllowedPrefixesToDirectConnectGateway' - The Amazon VPC prefixes to no longer advertise to the Direct Connect
-- gateway.
newUpdateDirectConnectGatewayAssociation ::
  UpdateDirectConnectGatewayAssociation
newUpdateDirectConnectGatewayAssociation :: UpdateDirectConnectGatewayAssociation
newUpdateDirectConnectGatewayAssociation =
  UpdateDirectConnectGatewayAssociation'
    { $sel:addAllowedPrefixesToDirectConnectGateway:UpdateDirectConnectGatewayAssociation' :: Maybe [RouteFilterPrefix]
addAllowedPrefixesToDirectConnectGateway =
        forall a. Maybe a
Prelude.Nothing,
      $sel:associationId:UpdateDirectConnectGatewayAssociation' :: Maybe Text
associationId = forall a. Maybe a
Prelude.Nothing,
      $sel:removeAllowedPrefixesToDirectConnectGateway:UpdateDirectConnectGatewayAssociation' :: Maybe [RouteFilterPrefix]
removeAllowedPrefixesToDirectConnectGateway =
        forall a. Maybe a
Prelude.Nothing
    }

-- | The Amazon VPC prefixes to advertise to the Direct Connect gateway.
updateDirectConnectGatewayAssociation_addAllowedPrefixesToDirectConnectGateway :: Lens.Lens' UpdateDirectConnectGatewayAssociation (Prelude.Maybe [RouteFilterPrefix])
updateDirectConnectGatewayAssociation_addAllowedPrefixesToDirectConnectGateway :: Lens'
  UpdateDirectConnectGatewayAssociation (Maybe [RouteFilterPrefix])
updateDirectConnectGatewayAssociation_addAllowedPrefixesToDirectConnectGateway = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDirectConnectGatewayAssociation' {Maybe [RouteFilterPrefix]
addAllowedPrefixesToDirectConnectGateway :: Maybe [RouteFilterPrefix]
$sel:addAllowedPrefixesToDirectConnectGateway:UpdateDirectConnectGatewayAssociation' :: UpdateDirectConnectGatewayAssociation -> Maybe [RouteFilterPrefix]
addAllowedPrefixesToDirectConnectGateway} -> Maybe [RouteFilterPrefix]
addAllowedPrefixesToDirectConnectGateway) (\s :: UpdateDirectConnectGatewayAssociation
s@UpdateDirectConnectGatewayAssociation' {} Maybe [RouteFilterPrefix]
a -> UpdateDirectConnectGatewayAssociation
s {$sel:addAllowedPrefixesToDirectConnectGateway:UpdateDirectConnectGatewayAssociation' :: Maybe [RouteFilterPrefix]
addAllowedPrefixesToDirectConnectGateway = Maybe [RouteFilterPrefix]
a} :: UpdateDirectConnectGatewayAssociation) 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

-- | The ID of the Direct Connect gateway association.
updateDirectConnectGatewayAssociation_associationId :: Lens.Lens' UpdateDirectConnectGatewayAssociation (Prelude.Maybe Prelude.Text)
updateDirectConnectGatewayAssociation_associationId :: Lens' UpdateDirectConnectGatewayAssociation (Maybe Text)
updateDirectConnectGatewayAssociation_associationId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDirectConnectGatewayAssociation' {Maybe Text
associationId :: Maybe Text
$sel:associationId:UpdateDirectConnectGatewayAssociation' :: UpdateDirectConnectGatewayAssociation -> Maybe Text
associationId} -> Maybe Text
associationId) (\s :: UpdateDirectConnectGatewayAssociation
s@UpdateDirectConnectGatewayAssociation' {} Maybe Text
a -> UpdateDirectConnectGatewayAssociation
s {$sel:associationId:UpdateDirectConnectGatewayAssociation' :: Maybe Text
associationId = Maybe Text
a} :: UpdateDirectConnectGatewayAssociation)

-- | The Amazon VPC prefixes to no longer advertise to the Direct Connect
-- gateway.
updateDirectConnectGatewayAssociation_removeAllowedPrefixesToDirectConnectGateway :: Lens.Lens' UpdateDirectConnectGatewayAssociation (Prelude.Maybe [RouteFilterPrefix])
updateDirectConnectGatewayAssociation_removeAllowedPrefixesToDirectConnectGateway :: Lens'
  UpdateDirectConnectGatewayAssociation (Maybe [RouteFilterPrefix])
updateDirectConnectGatewayAssociation_removeAllowedPrefixesToDirectConnectGateway = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDirectConnectGatewayAssociation' {Maybe [RouteFilterPrefix]
removeAllowedPrefixesToDirectConnectGateway :: Maybe [RouteFilterPrefix]
$sel:removeAllowedPrefixesToDirectConnectGateway:UpdateDirectConnectGatewayAssociation' :: UpdateDirectConnectGatewayAssociation -> Maybe [RouteFilterPrefix]
removeAllowedPrefixesToDirectConnectGateway} -> Maybe [RouteFilterPrefix]
removeAllowedPrefixesToDirectConnectGateway) (\s :: UpdateDirectConnectGatewayAssociation
s@UpdateDirectConnectGatewayAssociation' {} Maybe [RouteFilterPrefix]
a -> UpdateDirectConnectGatewayAssociation
s {$sel:removeAllowedPrefixesToDirectConnectGateway:UpdateDirectConnectGatewayAssociation' :: Maybe [RouteFilterPrefix]
removeAllowedPrefixesToDirectConnectGateway = Maybe [RouteFilterPrefix]
a} :: UpdateDirectConnectGatewayAssociation) 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

instance
  Core.AWSRequest
    UpdateDirectConnectGatewayAssociation
  where
  type
    AWSResponse
      UpdateDirectConnectGatewayAssociation =
      UpdateDirectConnectGatewayAssociationResponse
  request :: (Service -> Service)
-> UpdateDirectConnectGatewayAssociation
-> Request UpdateDirectConnectGatewayAssociation
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 UpdateDirectConnectGatewayAssociation
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse UpdateDirectConnectGatewayAssociation)))
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 DirectConnectGatewayAssociation
-> Int -> UpdateDirectConnectGatewayAssociationResponse
UpdateDirectConnectGatewayAssociationResponse'
            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
"directConnectGatewayAssociation")
            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
    UpdateDirectConnectGatewayAssociation
  where
  hashWithSalt :: Int -> UpdateDirectConnectGatewayAssociation -> Int
hashWithSalt
    Int
_salt
    UpdateDirectConnectGatewayAssociation' {Maybe [RouteFilterPrefix]
Maybe Text
removeAllowedPrefixesToDirectConnectGateway :: Maybe [RouteFilterPrefix]
associationId :: Maybe Text
addAllowedPrefixesToDirectConnectGateway :: Maybe [RouteFilterPrefix]
$sel:removeAllowedPrefixesToDirectConnectGateway:UpdateDirectConnectGatewayAssociation' :: UpdateDirectConnectGatewayAssociation -> Maybe [RouteFilterPrefix]
$sel:associationId:UpdateDirectConnectGatewayAssociation' :: UpdateDirectConnectGatewayAssociation -> Maybe Text
$sel:addAllowedPrefixesToDirectConnectGateway:UpdateDirectConnectGatewayAssociation' :: UpdateDirectConnectGatewayAssociation -> Maybe [RouteFilterPrefix]
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [RouteFilterPrefix]
addAllowedPrefixesToDirectConnectGateway
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
associationId
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [RouteFilterPrefix]
removeAllowedPrefixesToDirectConnectGateway

instance
  Prelude.NFData
    UpdateDirectConnectGatewayAssociation
  where
  rnf :: UpdateDirectConnectGatewayAssociation -> ()
rnf UpdateDirectConnectGatewayAssociation' {Maybe [RouteFilterPrefix]
Maybe Text
removeAllowedPrefixesToDirectConnectGateway :: Maybe [RouteFilterPrefix]
associationId :: Maybe Text
addAllowedPrefixesToDirectConnectGateway :: Maybe [RouteFilterPrefix]
$sel:removeAllowedPrefixesToDirectConnectGateway:UpdateDirectConnectGatewayAssociation' :: UpdateDirectConnectGatewayAssociation -> Maybe [RouteFilterPrefix]
$sel:associationId:UpdateDirectConnectGatewayAssociation' :: UpdateDirectConnectGatewayAssociation -> Maybe Text
$sel:addAllowedPrefixesToDirectConnectGateway:UpdateDirectConnectGatewayAssociation' :: UpdateDirectConnectGatewayAssociation -> Maybe [RouteFilterPrefix]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf
      Maybe [RouteFilterPrefix]
addAllowedPrefixesToDirectConnectGateway
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
associationId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe [RouteFilterPrefix]
removeAllowedPrefixesToDirectConnectGateway

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

instance
  Data.ToJSON
    UpdateDirectConnectGatewayAssociation
  where
  toJSON :: UpdateDirectConnectGatewayAssociation -> Value
toJSON UpdateDirectConnectGatewayAssociation' {Maybe [RouteFilterPrefix]
Maybe Text
removeAllowedPrefixesToDirectConnectGateway :: Maybe [RouteFilterPrefix]
associationId :: Maybe Text
addAllowedPrefixesToDirectConnectGateway :: Maybe [RouteFilterPrefix]
$sel:removeAllowedPrefixesToDirectConnectGateway:UpdateDirectConnectGatewayAssociation' :: UpdateDirectConnectGatewayAssociation -> Maybe [RouteFilterPrefix]
$sel:associationId:UpdateDirectConnectGatewayAssociation' :: UpdateDirectConnectGatewayAssociation -> Maybe Text
$sel:addAllowedPrefixesToDirectConnectGateway:UpdateDirectConnectGatewayAssociation' :: UpdateDirectConnectGatewayAssociation -> Maybe [RouteFilterPrefix]
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"addAllowedPrefixesToDirectConnectGateway" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [RouteFilterPrefix]
addAllowedPrefixesToDirectConnectGateway,
            (Key
"associationId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
associationId,
            ( Key
"removeAllowedPrefixesToDirectConnectGateway"
                forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=
            )
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [RouteFilterPrefix]
removeAllowedPrefixesToDirectConnectGateway
          ]
      )

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

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

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

-- |
-- Create a value of 'UpdateDirectConnectGatewayAssociationResponse' 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:
--
-- 'directConnectGatewayAssociation', 'updateDirectConnectGatewayAssociationResponse_directConnectGatewayAssociation' - Undocumented member.
--
-- 'httpStatus', 'updateDirectConnectGatewayAssociationResponse_httpStatus' - The response's http status code.
newUpdateDirectConnectGatewayAssociationResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateDirectConnectGatewayAssociationResponse
newUpdateDirectConnectGatewayAssociationResponse :: Int -> UpdateDirectConnectGatewayAssociationResponse
newUpdateDirectConnectGatewayAssociationResponse
  Int
pHttpStatus_ =
    UpdateDirectConnectGatewayAssociationResponse'
      { $sel:directConnectGatewayAssociation:UpdateDirectConnectGatewayAssociationResponse' :: Maybe DirectConnectGatewayAssociation
directConnectGatewayAssociation =
          forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:UpdateDirectConnectGatewayAssociationResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | Undocumented member.
updateDirectConnectGatewayAssociationResponse_directConnectGatewayAssociation :: Lens.Lens' UpdateDirectConnectGatewayAssociationResponse (Prelude.Maybe DirectConnectGatewayAssociation)
updateDirectConnectGatewayAssociationResponse_directConnectGatewayAssociation :: Lens'
  UpdateDirectConnectGatewayAssociationResponse
  (Maybe DirectConnectGatewayAssociation)
updateDirectConnectGatewayAssociationResponse_directConnectGatewayAssociation = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDirectConnectGatewayAssociationResponse' {Maybe DirectConnectGatewayAssociation
directConnectGatewayAssociation :: Maybe DirectConnectGatewayAssociation
$sel:directConnectGatewayAssociation:UpdateDirectConnectGatewayAssociationResponse' :: UpdateDirectConnectGatewayAssociationResponse
-> Maybe DirectConnectGatewayAssociation
directConnectGatewayAssociation} -> Maybe DirectConnectGatewayAssociation
directConnectGatewayAssociation) (\s :: UpdateDirectConnectGatewayAssociationResponse
s@UpdateDirectConnectGatewayAssociationResponse' {} Maybe DirectConnectGatewayAssociation
a -> UpdateDirectConnectGatewayAssociationResponse
s {$sel:directConnectGatewayAssociation:UpdateDirectConnectGatewayAssociationResponse' :: Maybe DirectConnectGatewayAssociation
directConnectGatewayAssociation = Maybe DirectConnectGatewayAssociation
a} :: UpdateDirectConnectGatewayAssociationResponse)

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

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