{-# 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.DescribeDirectConnectGatewayAssociations
-- 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)
--
-- Lists the associations between your Direct Connect gateways and virtual
-- private gateways and transit gateways. You must specify one of the
-- following:
--
-- -   A Direct Connect gateway
--
--     The response contains all virtual private gateways and transit
--     gateways associated with the Direct Connect gateway.
--
-- -   A virtual private gateway
--
--     The response contains the Direct Connect gateway.
--
-- -   A transit gateway
--
--     The response contains the Direct Connect gateway.
--
-- -   A Direct Connect gateway and a virtual private gateway
--
--     The response contains the association between the Direct Connect
--     gateway and virtual private gateway.
--
-- -   A Direct Connect gateway and a transit gateway
--
--     The response contains the association between the Direct Connect
--     gateway and transit gateway.
--
-- This operation returns paginated results.
module Amazonka.DirectConnect.DescribeDirectConnectGatewayAssociations
  ( -- * Creating a Request
    DescribeDirectConnectGatewayAssociations (..),
    newDescribeDirectConnectGatewayAssociations,

    -- * Request Lenses
    describeDirectConnectGatewayAssociations_virtualGatewayId,
    describeDirectConnectGatewayAssociations_associationId,
    describeDirectConnectGatewayAssociations_associatedGatewayId,
    describeDirectConnectGatewayAssociations_directConnectGatewayId,
    describeDirectConnectGatewayAssociations_nextToken,
    describeDirectConnectGatewayAssociations_maxResults,

    -- * Destructuring the Response
    DescribeDirectConnectGatewayAssociationsResponse (..),
    newDescribeDirectConnectGatewayAssociationsResponse,

    -- * Response Lenses
    describeDirectConnectGatewayAssociationsResponse_nextToken,
    describeDirectConnectGatewayAssociationsResponse_directConnectGatewayAssociations,
    describeDirectConnectGatewayAssociationsResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.DirectConnect.Types
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:/ 'newDescribeDirectConnectGatewayAssociations' smart constructor.
data DescribeDirectConnectGatewayAssociations = DescribeDirectConnectGatewayAssociations'
  { -- | The ID of the virtual private gateway or transit gateway.
    DescribeDirectConnectGatewayAssociations -> Maybe Text
virtualGatewayId :: Prelude.Maybe Prelude.Text,
    -- | The ID of the Direct Connect gateway association.
    DescribeDirectConnectGatewayAssociations -> Maybe Text
associationId :: Prelude.Maybe Prelude.Text,
    -- | The ID of the associated gateway.
    DescribeDirectConnectGatewayAssociations -> Maybe Text
associatedGatewayId :: Prelude.Maybe Prelude.Text,
    -- | The ID of the Direct Connect gateway.
    DescribeDirectConnectGatewayAssociations -> Maybe Text
directConnectGatewayId :: Prelude.Maybe Prelude.Text,
    -- | The token provided in the previous call to retrieve the next page.
    DescribeDirectConnectGatewayAssociations -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results to return with a single call. To retrieve
    -- the remaining results, make another call with the returned @nextToken@
    -- value.
    --
    -- If @MaxResults@ is given a value larger than 100, only 100 results are
    -- returned.
    DescribeDirectConnectGatewayAssociations -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int
  }
  deriving (DescribeDirectConnectGatewayAssociations
-> DescribeDirectConnectGatewayAssociations -> Bool
(DescribeDirectConnectGatewayAssociations
 -> DescribeDirectConnectGatewayAssociations -> Bool)
-> (DescribeDirectConnectGatewayAssociations
    -> DescribeDirectConnectGatewayAssociations -> Bool)
-> Eq DescribeDirectConnectGatewayAssociations
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeDirectConnectGatewayAssociations
-> DescribeDirectConnectGatewayAssociations -> Bool
$c/= :: DescribeDirectConnectGatewayAssociations
-> DescribeDirectConnectGatewayAssociations -> Bool
== :: DescribeDirectConnectGatewayAssociations
-> DescribeDirectConnectGatewayAssociations -> Bool
$c== :: DescribeDirectConnectGatewayAssociations
-> DescribeDirectConnectGatewayAssociations -> Bool
Prelude.Eq, ReadPrec [DescribeDirectConnectGatewayAssociations]
ReadPrec DescribeDirectConnectGatewayAssociations
Int -> ReadS DescribeDirectConnectGatewayAssociations
ReadS [DescribeDirectConnectGatewayAssociations]
(Int -> ReadS DescribeDirectConnectGatewayAssociations)
-> ReadS [DescribeDirectConnectGatewayAssociations]
-> ReadPrec DescribeDirectConnectGatewayAssociations
-> ReadPrec [DescribeDirectConnectGatewayAssociations]
-> Read DescribeDirectConnectGatewayAssociations
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeDirectConnectGatewayAssociations]
$creadListPrec :: ReadPrec [DescribeDirectConnectGatewayAssociations]
readPrec :: ReadPrec DescribeDirectConnectGatewayAssociations
$creadPrec :: ReadPrec DescribeDirectConnectGatewayAssociations
readList :: ReadS [DescribeDirectConnectGatewayAssociations]
$creadList :: ReadS [DescribeDirectConnectGatewayAssociations]
readsPrec :: Int -> ReadS DescribeDirectConnectGatewayAssociations
$creadsPrec :: Int -> ReadS DescribeDirectConnectGatewayAssociations
Prelude.Read, Int -> DescribeDirectConnectGatewayAssociations -> ShowS
[DescribeDirectConnectGatewayAssociations] -> ShowS
DescribeDirectConnectGatewayAssociations -> String
(Int -> DescribeDirectConnectGatewayAssociations -> ShowS)
-> (DescribeDirectConnectGatewayAssociations -> String)
-> ([DescribeDirectConnectGatewayAssociations] -> ShowS)
-> Show DescribeDirectConnectGatewayAssociations
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeDirectConnectGatewayAssociations] -> ShowS
$cshowList :: [DescribeDirectConnectGatewayAssociations] -> ShowS
show :: DescribeDirectConnectGatewayAssociations -> String
$cshow :: DescribeDirectConnectGatewayAssociations -> String
showsPrec :: Int -> DescribeDirectConnectGatewayAssociations -> ShowS
$cshowsPrec :: Int -> DescribeDirectConnectGatewayAssociations -> ShowS
Prelude.Show, (forall x.
 DescribeDirectConnectGatewayAssociations
 -> Rep DescribeDirectConnectGatewayAssociations x)
-> (forall x.
    Rep DescribeDirectConnectGatewayAssociations x
    -> DescribeDirectConnectGatewayAssociations)
-> Generic DescribeDirectConnectGatewayAssociations
forall x.
Rep DescribeDirectConnectGatewayAssociations x
-> DescribeDirectConnectGatewayAssociations
forall x.
DescribeDirectConnectGatewayAssociations
-> Rep DescribeDirectConnectGatewayAssociations x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeDirectConnectGatewayAssociations x
-> DescribeDirectConnectGatewayAssociations
$cfrom :: forall x.
DescribeDirectConnectGatewayAssociations
-> Rep DescribeDirectConnectGatewayAssociations x
Prelude.Generic)

-- |
-- Create a value of 'DescribeDirectConnectGatewayAssociations' 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:
--
-- 'virtualGatewayId', 'describeDirectConnectGatewayAssociations_virtualGatewayId' - The ID of the virtual private gateway or transit gateway.
--
-- 'associationId', 'describeDirectConnectGatewayAssociations_associationId' - The ID of the Direct Connect gateway association.
--
-- 'associatedGatewayId', 'describeDirectConnectGatewayAssociations_associatedGatewayId' - The ID of the associated gateway.
--
-- 'directConnectGatewayId', 'describeDirectConnectGatewayAssociations_directConnectGatewayId' - The ID of the Direct Connect gateway.
--
-- 'nextToken', 'describeDirectConnectGatewayAssociations_nextToken' - The token provided in the previous call to retrieve the next page.
--
-- 'maxResults', 'describeDirectConnectGatewayAssociations_maxResults' - The maximum number of results to return with a single call. To retrieve
-- the remaining results, make another call with the returned @nextToken@
-- value.
--
-- If @MaxResults@ is given a value larger than 100, only 100 results are
-- returned.
newDescribeDirectConnectGatewayAssociations ::
  DescribeDirectConnectGatewayAssociations
newDescribeDirectConnectGatewayAssociations :: DescribeDirectConnectGatewayAssociations
newDescribeDirectConnectGatewayAssociations =
  DescribeDirectConnectGatewayAssociations' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> DescribeDirectConnectGatewayAssociations
DescribeDirectConnectGatewayAssociations'
    { $sel:virtualGatewayId:DescribeDirectConnectGatewayAssociations' :: Maybe Text
virtualGatewayId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:associationId:DescribeDirectConnectGatewayAssociations' :: Maybe Text
associationId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:associatedGatewayId:DescribeDirectConnectGatewayAssociations' :: Maybe Text
associatedGatewayId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:directConnectGatewayId:DescribeDirectConnectGatewayAssociations' :: Maybe Text
directConnectGatewayId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeDirectConnectGatewayAssociations' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:DescribeDirectConnectGatewayAssociations' :: Maybe Int
maxResults = Maybe Int
forall a. Maybe a
Prelude.Nothing
    }

-- | The ID of the virtual private gateway or transit gateway.
describeDirectConnectGatewayAssociations_virtualGatewayId :: Lens.Lens' DescribeDirectConnectGatewayAssociations (Prelude.Maybe Prelude.Text)
describeDirectConnectGatewayAssociations_virtualGatewayId :: (Maybe Text -> f (Maybe Text))
-> DescribeDirectConnectGatewayAssociations
-> f DescribeDirectConnectGatewayAssociations
describeDirectConnectGatewayAssociations_virtualGatewayId = (DescribeDirectConnectGatewayAssociations -> Maybe Text)
-> (DescribeDirectConnectGatewayAssociations
    -> Maybe Text -> DescribeDirectConnectGatewayAssociations)
-> Lens
     DescribeDirectConnectGatewayAssociations
     DescribeDirectConnectGatewayAssociations
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDirectConnectGatewayAssociations' {Maybe Text
virtualGatewayId :: Maybe Text
$sel:virtualGatewayId:DescribeDirectConnectGatewayAssociations' :: DescribeDirectConnectGatewayAssociations -> Maybe Text
virtualGatewayId} -> Maybe Text
virtualGatewayId) (\s :: DescribeDirectConnectGatewayAssociations
s@DescribeDirectConnectGatewayAssociations' {} Maybe Text
a -> DescribeDirectConnectGatewayAssociations
s {$sel:virtualGatewayId:DescribeDirectConnectGatewayAssociations' :: Maybe Text
virtualGatewayId = Maybe Text
a} :: DescribeDirectConnectGatewayAssociations)

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

-- | The ID of the associated gateway.
describeDirectConnectGatewayAssociations_associatedGatewayId :: Lens.Lens' DescribeDirectConnectGatewayAssociations (Prelude.Maybe Prelude.Text)
describeDirectConnectGatewayAssociations_associatedGatewayId :: (Maybe Text -> f (Maybe Text))
-> DescribeDirectConnectGatewayAssociations
-> f DescribeDirectConnectGatewayAssociations
describeDirectConnectGatewayAssociations_associatedGatewayId = (DescribeDirectConnectGatewayAssociations -> Maybe Text)
-> (DescribeDirectConnectGatewayAssociations
    -> Maybe Text -> DescribeDirectConnectGatewayAssociations)
-> Lens
     DescribeDirectConnectGatewayAssociations
     DescribeDirectConnectGatewayAssociations
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDirectConnectGatewayAssociations' {Maybe Text
associatedGatewayId :: Maybe Text
$sel:associatedGatewayId:DescribeDirectConnectGatewayAssociations' :: DescribeDirectConnectGatewayAssociations -> Maybe Text
associatedGatewayId} -> Maybe Text
associatedGatewayId) (\s :: DescribeDirectConnectGatewayAssociations
s@DescribeDirectConnectGatewayAssociations' {} Maybe Text
a -> DescribeDirectConnectGatewayAssociations
s {$sel:associatedGatewayId:DescribeDirectConnectGatewayAssociations' :: Maybe Text
associatedGatewayId = Maybe Text
a} :: DescribeDirectConnectGatewayAssociations)

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

-- | The token provided in the previous call to retrieve the next page.
describeDirectConnectGatewayAssociations_nextToken :: Lens.Lens' DescribeDirectConnectGatewayAssociations (Prelude.Maybe Prelude.Text)
describeDirectConnectGatewayAssociations_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeDirectConnectGatewayAssociations
-> f DescribeDirectConnectGatewayAssociations
describeDirectConnectGatewayAssociations_nextToken = (DescribeDirectConnectGatewayAssociations -> Maybe Text)
-> (DescribeDirectConnectGatewayAssociations
    -> Maybe Text -> DescribeDirectConnectGatewayAssociations)
-> Lens
     DescribeDirectConnectGatewayAssociations
     DescribeDirectConnectGatewayAssociations
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDirectConnectGatewayAssociations' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeDirectConnectGatewayAssociations' :: DescribeDirectConnectGatewayAssociations -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeDirectConnectGatewayAssociations
s@DescribeDirectConnectGatewayAssociations' {} Maybe Text
a -> DescribeDirectConnectGatewayAssociations
s {$sel:nextToken:DescribeDirectConnectGatewayAssociations' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeDirectConnectGatewayAssociations)

-- | The maximum number of results to return with a single call. To retrieve
-- the remaining results, make another call with the returned @nextToken@
-- value.
--
-- If @MaxResults@ is given a value larger than 100, only 100 results are
-- returned.
describeDirectConnectGatewayAssociations_maxResults :: Lens.Lens' DescribeDirectConnectGatewayAssociations (Prelude.Maybe Prelude.Int)
describeDirectConnectGatewayAssociations_maxResults :: (Maybe Int -> f (Maybe Int))
-> DescribeDirectConnectGatewayAssociations
-> f DescribeDirectConnectGatewayAssociations
describeDirectConnectGatewayAssociations_maxResults = (DescribeDirectConnectGatewayAssociations -> Maybe Int)
-> (DescribeDirectConnectGatewayAssociations
    -> Maybe Int -> DescribeDirectConnectGatewayAssociations)
-> Lens
     DescribeDirectConnectGatewayAssociations
     DescribeDirectConnectGatewayAssociations
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDirectConnectGatewayAssociations' {Maybe Int
maxResults :: Maybe Int
$sel:maxResults:DescribeDirectConnectGatewayAssociations' :: DescribeDirectConnectGatewayAssociations -> Maybe Int
maxResults} -> Maybe Int
maxResults) (\s :: DescribeDirectConnectGatewayAssociations
s@DescribeDirectConnectGatewayAssociations' {} Maybe Int
a -> DescribeDirectConnectGatewayAssociations
s {$sel:maxResults:DescribeDirectConnectGatewayAssociations' :: Maybe Int
maxResults = Maybe Int
a} :: DescribeDirectConnectGatewayAssociations)

instance
  Core.AWSPager
    DescribeDirectConnectGatewayAssociations
  where
  page :: DescribeDirectConnectGatewayAssociations
-> AWSResponse DescribeDirectConnectGatewayAssociations
-> Maybe DescribeDirectConnectGatewayAssociations
page DescribeDirectConnectGatewayAssociations
rq AWSResponse DescribeDirectConnectGatewayAssociations
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeDirectConnectGatewayAssociations
DescribeDirectConnectGatewayAssociationsResponse
rs
            DescribeDirectConnectGatewayAssociationsResponse
-> Getting
     (First Text) DescribeDirectConnectGatewayAssociationsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeDirectConnectGatewayAssociationsResponse
-> Const
     (First Text) DescribeDirectConnectGatewayAssociationsResponse
Lens' DescribeDirectConnectGatewayAssociationsResponse (Maybe Text)
describeDirectConnectGatewayAssociationsResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> DescribeDirectConnectGatewayAssociationsResponse
 -> Const
      (First Text) DescribeDirectConnectGatewayAssociationsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting
     (First Text) DescribeDirectConnectGatewayAssociationsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe DescribeDirectConnectGatewayAssociations
forall a. Maybe a
Prelude.Nothing
    | Maybe [DirectConnectGatewayAssociation] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeDirectConnectGatewayAssociations
DescribeDirectConnectGatewayAssociationsResponse
rs
            DescribeDirectConnectGatewayAssociationsResponse
-> Getting
     (First [DirectConnectGatewayAssociation])
     DescribeDirectConnectGatewayAssociationsResponse
     [DirectConnectGatewayAssociation]
-> Maybe [DirectConnectGatewayAssociation]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [DirectConnectGatewayAssociation]
 -> Const
      (First [DirectConnectGatewayAssociation])
      (Maybe [DirectConnectGatewayAssociation]))
-> DescribeDirectConnectGatewayAssociationsResponse
-> Const
     (First [DirectConnectGatewayAssociation])
     DescribeDirectConnectGatewayAssociationsResponse
Lens'
  DescribeDirectConnectGatewayAssociationsResponse
  (Maybe [DirectConnectGatewayAssociation])
describeDirectConnectGatewayAssociationsResponse_directConnectGatewayAssociations
              ((Maybe [DirectConnectGatewayAssociation]
  -> Const
       (First [DirectConnectGatewayAssociation])
       (Maybe [DirectConnectGatewayAssociation]))
 -> DescribeDirectConnectGatewayAssociationsResponse
 -> Const
      (First [DirectConnectGatewayAssociation])
      DescribeDirectConnectGatewayAssociationsResponse)
-> (([DirectConnectGatewayAssociation]
     -> Const
          (First [DirectConnectGatewayAssociation])
          [DirectConnectGatewayAssociation])
    -> Maybe [DirectConnectGatewayAssociation]
    -> Const
         (First [DirectConnectGatewayAssociation])
         (Maybe [DirectConnectGatewayAssociation]))
-> Getting
     (First [DirectConnectGatewayAssociation])
     DescribeDirectConnectGatewayAssociationsResponse
     [DirectConnectGatewayAssociation]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DirectConnectGatewayAssociation]
 -> Const
      (First [DirectConnectGatewayAssociation])
      [DirectConnectGatewayAssociation])
-> Maybe [DirectConnectGatewayAssociation]
-> Const
     (First [DirectConnectGatewayAssociation])
     (Maybe [DirectConnectGatewayAssociation])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe DescribeDirectConnectGatewayAssociations
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      DescribeDirectConnectGatewayAssociations
-> Maybe DescribeDirectConnectGatewayAssociations
forall a. a -> Maybe a
Prelude.Just (DescribeDirectConnectGatewayAssociations
 -> Maybe DescribeDirectConnectGatewayAssociations)
-> DescribeDirectConnectGatewayAssociations
-> Maybe DescribeDirectConnectGatewayAssociations
forall a b. (a -> b) -> a -> b
Prelude.$
        DescribeDirectConnectGatewayAssociations
rq
          DescribeDirectConnectGatewayAssociations
-> (DescribeDirectConnectGatewayAssociations
    -> DescribeDirectConnectGatewayAssociations)
-> DescribeDirectConnectGatewayAssociations
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeDirectConnectGatewayAssociations
-> Identity DescribeDirectConnectGatewayAssociations
Lens
  DescribeDirectConnectGatewayAssociations
  DescribeDirectConnectGatewayAssociations
  (Maybe Text)
  (Maybe Text)
describeDirectConnectGatewayAssociations_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> DescribeDirectConnectGatewayAssociations
 -> Identity DescribeDirectConnectGatewayAssociations)
-> Maybe Text
-> DescribeDirectConnectGatewayAssociations
-> DescribeDirectConnectGatewayAssociations
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeDirectConnectGatewayAssociations
DescribeDirectConnectGatewayAssociationsResponse
rs
            DescribeDirectConnectGatewayAssociationsResponse
-> Getting
     (First Text) DescribeDirectConnectGatewayAssociationsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeDirectConnectGatewayAssociationsResponse
-> Const
     (First Text) DescribeDirectConnectGatewayAssociationsResponse
Lens' DescribeDirectConnectGatewayAssociationsResponse (Maybe Text)
describeDirectConnectGatewayAssociationsResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> DescribeDirectConnectGatewayAssociationsResponse
 -> Const
      (First Text) DescribeDirectConnectGatewayAssociationsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting
     (First Text) DescribeDirectConnectGatewayAssociationsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance
  Core.AWSRequest
    DescribeDirectConnectGatewayAssociations
  where
  type
    AWSResponse
      DescribeDirectConnectGatewayAssociations =
      DescribeDirectConnectGatewayAssociationsResponse
  request :: DescribeDirectConnectGatewayAssociations
-> Request DescribeDirectConnectGatewayAssociations
request = Service
-> DescribeDirectConnectGatewayAssociations
-> Request DescribeDirectConnectGatewayAssociations
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeDirectConnectGatewayAssociations
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse DescribeDirectConnectGatewayAssociations)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either
      String (AWSResponse DescribeDirectConnectGatewayAssociations))
-> Logger
-> Service
-> Proxy DescribeDirectConnectGatewayAssociations
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse DescribeDirectConnectGatewayAssociations)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe [DirectConnectGatewayAssociation]
-> Int
-> DescribeDirectConnectGatewayAssociationsResponse
DescribeDirectConnectGatewayAssociationsResponse'
            (Maybe Text
 -> Maybe [DirectConnectGatewayAssociation]
 -> Int
 -> DescribeDirectConnectGatewayAssociationsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [DirectConnectGatewayAssociation]
      -> Int -> DescribeDirectConnectGatewayAssociationsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"nextToken")
              Either
  String
  (Maybe [DirectConnectGatewayAssociation]
   -> Int -> DescribeDirectConnectGatewayAssociationsResponse)
-> Either String (Maybe [DirectConnectGatewayAssociation])
-> Either
     String (Int -> DescribeDirectConnectGatewayAssociationsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text
-> Either String (Maybe (Maybe [DirectConnectGatewayAssociation]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"directConnectGatewayAssociations"
                              Either String (Maybe (Maybe [DirectConnectGatewayAssociation]))
-> Maybe [DirectConnectGatewayAssociation]
-> Either String (Maybe [DirectConnectGatewayAssociation])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [DirectConnectGatewayAssociation]
forall a. Monoid a => a
Prelude.mempty
                          )
              Either
  String (Int -> DescribeDirectConnectGatewayAssociationsResponse)
-> Either String Int
-> Either String DescribeDirectConnectGatewayAssociationsResponse
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
    DescribeDirectConnectGatewayAssociations

instance
  Prelude.NFData
    DescribeDirectConnectGatewayAssociations

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

instance
  Core.ToJSON
    DescribeDirectConnectGatewayAssociations
  where
  toJSON :: DescribeDirectConnectGatewayAssociations -> Value
toJSON DescribeDirectConnectGatewayAssociations' {Maybe Int
Maybe Text
maxResults :: Maybe Int
nextToken :: Maybe Text
directConnectGatewayId :: Maybe Text
associatedGatewayId :: Maybe Text
associationId :: Maybe Text
virtualGatewayId :: Maybe Text
$sel:maxResults:DescribeDirectConnectGatewayAssociations' :: DescribeDirectConnectGatewayAssociations -> Maybe Int
$sel:nextToken:DescribeDirectConnectGatewayAssociations' :: DescribeDirectConnectGatewayAssociations -> Maybe Text
$sel:directConnectGatewayId:DescribeDirectConnectGatewayAssociations' :: DescribeDirectConnectGatewayAssociations -> Maybe Text
$sel:associatedGatewayId:DescribeDirectConnectGatewayAssociations' :: DescribeDirectConnectGatewayAssociations -> Maybe Text
$sel:associationId:DescribeDirectConnectGatewayAssociations' :: DescribeDirectConnectGatewayAssociations -> Maybe Text
$sel:virtualGatewayId:DescribeDirectConnectGatewayAssociations' :: DescribeDirectConnectGatewayAssociations -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"virtualGatewayId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
virtualGatewayId,
            (Text
"associationId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
associationId,
            (Text
"associatedGatewayId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
associatedGatewayId,
            (Text
"directConnectGatewayId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
directConnectGatewayId,
            (Text
"nextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            (Text
"maxResults" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maxResults
          ]
      )

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

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

-- | /See:/ 'newDescribeDirectConnectGatewayAssociationsResponse' smart constructor.
data DescribeDirectConnectGatewayAssociationsResponse = DescribeDirectConnectGatewayAssociationsResponse'
  { -- | The token to retrieve the next page.
    DescribeDirectConnectGatewayAssociationsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Information about the associations.
    DescribeDirectConnectGatewayAssociationsResponse
-> Maybe [DirectConnectGatewayAssociation]
directConnectGatewayAssociations :: Prelude.Maybe [DirectConnectGatewayAssociation],
    -- | The response's http status code.
    DescribeDirectConnectGatewayAssociationsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeDirectConnectGatewayAssociationsResponse
-> DescribeDirectConnectGatewayAssociationsResponse -> Bool
(DescribeDirectConnectGatewayAssociationsResponse
 -> DescribeDirectConnectGatewayAssociationsResponse -> Bool)
-> (DescribeDirectConnectGatewayAssociationsResponse
    -> DescribeDirectConnectGatewayAssociationsResponse -> Bool)
-> Eq DescribeDirectConnectGatewayAssociationsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeDirectConnectGatewayAssociationsResponse
-> DescribeDirectConnectGatewayAssociationsResponse -> Bool
$c/= :: DescribeDirectConnectGatewayAssociationsResponse
-> DescribeDirectConnectGatewayAssociationsResponse -> Bool
== :: DescribeDirectConnectGatewayAssociationsResponse
-> DescribeDirectConnectGatewayAssociationsResponse -> Bool
$c== :: DescribeDirectConnectGatewayAssociationsResponse
-> DescribeDirectConnectGatewayAssociationsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeDirectConnectGatewayAssociationsResponse]
ReadPrec DescribeDirectConnectGatewayAssociationsResponse
Int -> ReadS DescribeDirectConnectGatewayAssociationsResponse
ReadS [DescribeDirectConnectGatewayAssociationsResponse]
(Int -> ReadS DescribeDirectConnectGatewayAssociationsResponse)
-> ReadS [DescribeDirectConnectGatewayAssociationsResponse]
-> ReadPrec DescribeDirectConnectGatewayAssociationsResponse
-> ReadPrec [DescribeDirectConnectGatewayAssociationsResponse]
-> Read DescribeDirectConnectGatewayAssociationsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeDirectConnectGatewayAssociationsResponse]
$creadListPrec :: ReadPrec [DescribeDirectConnectGatewayAssociationsResponse]
readPrec :: ReadPrec DescribeDirectConnectGatewayAssociationsResponse
$creadPrec :: ReadPrec DescribeDirectConnectGatewayAssociationsResponse
readList :: ReadS [DescribeDirectConnectGatewayAssociationsResponse]
$creadList :: ReadS [DescribeDirectConnectGatewayAssociationsResponse]
readsPrec :: Int -> ReadS DescribeDirectConnectGatewayAssociationsResponse
$creadsPrec :: Int -> ReadS DescribeDirectConnectGatewayAssociationsResponse
Prelude.Read, Int -> DescribeDirectConnectGatewayAssociationsResponse -> ShowS
[DescribeDirectConnectGatewayAssociationsResponse] -> ShowS
DescribeDirectConnectGatewayAssociationsResponse -> String
(Int -> DescribeDirectConnectGatewayAssociationsResponse -> ShowS)
-> (DescribeDirectConnectGatewayAssociationsResponse -> String)
-> ([DescribeDirectConnectGatewayAssociationsResponse] -> ShowS)
-> Show DescribeDirectConnectGatewayAssociationsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeDirectConnectGatewayAssociationsResponse] -> ShowS
$cshowList :: [DescribeDirectConnectGatewayAssociationsResponse] -> ShowS
show :: DescribeDirectConnectGatewayAssociationsResponse -> String
$cshow :: DescribeDirectConnectGatewayAssociationsResponse -> String
showsPrec :: Int -> DescribeDirectConnectGatewayAssociationsResponse -> ShowS
$cshowsPrec :: Int -> DescribeDirectConnectGatewayAssociationsResponse -> ShowS
Prelude.Show, (forall x.
 DescribeDirectConnectGatewayAssociationsResponse
 -> Rep DescribeDirectConnectGatewayAssociationsResponse x)
-> (forall x.
    Rep DescribeDirectConnectGatewayAssociationsResponse x
    -> DescribeDirectConnectGatewayAssociationsResponse)
-> Generic DescribeDirectConnectGatewayAssociationsResponse
forall x.
Rep DescribeDirectConnectGatewayAssociationsResponse x
-> DescribeDirectConnectGatewayAssociationsResponse
forall x.
DescribeDirectConnectGatewayAssociationsResponse
-> Rep DescribeDirectConnectGatewayAssociationsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeDirectConnectGatewayAssociationsResponse x
-> DescribeDirectConnectGatewayAssociationsResponse
$cfrom :: forall x.
DescribeDirectConnectGatewayAssociationsResponse
-> Rep DescribeDirectConnectGatewayAssociationsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeDirectConnectGatewayAssociationsResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'nextToken', 'describeDirectConnectGatewayAssociationsResponse_nextToken' - The token to retrieve the next page.
--
-- 'directConnectGatewayAssociations', 'describeDirectConnectGatewayAssociationsResponse_directConnectGatewayAssociations' - Information about the associations.
--
-- 'httpStatus', 'describeDirectConnectGatewayAssociationsResponse_httpStatus' - The response's http status code.
newDescribeDirectConnectGatewayAssociationsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeDirectConnectGatewayAssociationsResponse
newDescribeDirectConnectGatewayAssociationsResponse :: Int -> DescribeDirectConnectGatewayAssociationsResponse
newDescribeDirectConnectGatewayAssociationsResponse
  Int
pHttpStatus_ =
    DescribeDirectConnectGatewayAssociationsResponse' :: Maybe Text
-> Maybe [DirectConnectGatewayAssociation]
-> Int
-> DescribeDirectConnectGatewayAssociationsResponse
DescribeDirectConnectGatewayAssociationsResponse'
      { $sel:nextToken:DescribeDirectConnectGatewayAssociationsResponse' :: Maybe Text
nextToken =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:directConnectGatewayAssociations:DescribeDirectConnectGatewayAssociationsResponse' :: Maybe [DirectConnectGatewayAssociation]
directConnectGatewayAssociations =
          Maybe [DirectConnectGatewayAssociation]
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DescribeDirectConnectGatewayAssociationsResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | The token to retrieve the next page.
describeDirectConnectGatewayAssociationsResponse_nextToken :: Lens.Lens' DescribeDirectConnectGatewayAssociationsResponse (Prelude.Maybe Prelude.Text)
describeDirectConnectGatewayAssociationsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeDirectConnectGatewayAssociationsResponse
-> f DescribeDirectConnectGatewayAssociationsResponse
describeDirectConnectGatewayAssociationsResponse_nextToken = (DescribeDirectConnectGatewayAssociationsResponse -> Maybe Text)
-> (DescribeDirectConnectGatewayAssociationsResponse
    -> Maybe Text -> DescribeDirectConnectGatewayAssociationsResponse)
-> Lens'
     DescribeDirectConnectGatewayAssociationsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDirectConnectGatewayAssociationsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeDirectConnectGatewayAssociationsResponse' :: DescribeDirectConnectGatewayAssociationsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeDirectConnectGatewayAssociationsResponse
s@DescribeDirectConnectGatewayAssociationsResponse' {} Maybe Text
a -> DescribeDirectConnectGatewayAssociationsResponse
s {$sel:nextToken:DescribeDirectConnectGatewayAssociationsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeDirectConnectGatewayAssociationsResponse)

-- | Information about the associations.
describeDirectConnectGatewayAssociationsResponse_directConnectGatewayAssociations :: Lens.Lens' DescribeDirectConnectGatewayAssociationsResponse (Prelude.Maybe [DirectConnectGatewayAssociation])
describeDirectConnectGatewayAssociationsResponse_directConnectGatewayAssociations :: (Maybe [DirectConnectGatewayAssociation]
 -> f (Maybe [DirectConnectGatewayAssociation]))
-> DescribeDirectConnectGatewayAssociationsResponse
-> f DescribeDirectConnectGatewayAssociationsResponse
describeDirectConnectGatewayAssociationsResponse_directConnectGatewayAssociations = (DescribeDirectConnectGatewayAssociationsResponse
 -> Maybe [DirectConnectGatewayAssociation])
-> (DescribeDirectConnectGatewayAssociationsResponse
    -> Maybe [DirectConnectGatewayAssociation]
    -> DescribeDirectConnectGatewayAssociationsResponse)
-> Lens'
     DescribeDirectConnectGatewayAssociationsResponse
     (Maybe [DirectConnectGatewayAssociation])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDirectConnectGatewayAssociationsResponse' {Maybe [DirectConnectGatewayAssociation]
directConnectGatewayAssociations :: Maybe [DirectConnectGatewayAssociation]
$sel:directConnectGatewayAssociations:DescribeDirectConnectGatewayAssociationsResponse' :: DescribeDirectConnectGatewayAssociationsResponse
-> Maybe [DirectConnectGatewayAssociation]
directConnectGatewayAssociations} -> Maybe [DirectConnectGatewayAssociation]
directConnectGatewayAssociations) (\s :: DescribeDirectConnectGatewayAssociationsResponse
s@DescribeDirectConnectGatewayAssociationsResponse' {} Maybe [DirectConnectGatewayAssociation]
a -> DescribeDirectConnectGatewayAssociationsResponse
s {$sel:directConnectGatewayAssociations:DescribeDirectConnectGatewayAssociationsResponse' :: Maybe [DirectConnectGatewayAssociation]
directConnectGatewayAssociations = Maybe [DirectConnectGatewayAssociation]
a} :: DescribeDirectConnectGatewayAssociationsResponse) ((Maybe [DirectConnectGatewayAssociation]
  -> f (Maybe [DirectConnectGatewayAssociation]))
 -> DescribeDirectConnectGatewayAssociationsResponse
 -> f DescribeDirectConnectGatewayAssociationsResponse)
-> ((Maybe [DirectConnectGatewayAssociation]
     -> f (Maybe [DirectConnectGatewayAssociation]))
    -> Maybe [DirectConnectGatewayAssociation]
    -> f (Maybe [DirectConnectGatewayAssociation]))
-> (Maybe [DirectConnectGatewayAssociation]
    -> f (Maybe [DirectConnectGatewayAssociation]))
-> DescribeDirectConnectGatewayAssociationsResponse
-> f DescribeDirectConnectGatewayAssociationsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [DirectConnectGatewayAssociation]
  [DirectConnectGatewayAssociation]
  [DirectConnectGatewayAssociation]
  [DirectConnectGatewayAssociation]
-> Iso
     (Maybe [DirectConnectGatewayAssociation])
     (Maybe [DirectConnectGatewayAssociation])
     (Maybe [DirectConnectGatewayAssociation])
     (Maybe [DirectConnectGatewayAssociation])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  [DirectConnectGatewayAssociation]
  [DirectConnectGatewayAssociation]
  [DirectConnectGatewayAssociation]
  [DirectConnectGatewayAssociation]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    DescribeDirectConnectGatewayAssociationsResponse