{-# 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.DescribeDirectConnectGatewayAssociationProposals
-- 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)
--
-- Describes one or more association proposals for connection between a
-- virtual private gateway or transit gateway and a Direct Connect gateway.
module Amazonka.DirectConnect.DescribeDirectConnectGatewayAssociationProposals
  ( -- * Creating a Request
    DescribeDirectConnectGatewayAssociationProposals (..),
    newDescribeDirectConnectGatewayAssociationProposals,

    -- * Request Lenses
    describeDirectConnectGatewayAssociationProposals_associatedGatewayId,
    describeDirectConnectGatewayAssociationProposals_directConnectGatewayId,
    describeDirectConnectGatewayAssociationProposals_proposalId,
    describeDirectConnectGatewayAssociationProposals_nextToken,
    describeDirectConnectGatewayAssociationProposals_maxResults,

    -- * Destructuring the Response
    DescribeDirectConnectGatewayAssociationProposalsResponse (..),
    newDescribeDirectConnectGatewayAssociationProposalsResponse,

    -- * Response Lenses
    describeDirectConnectGatewayAssociationProposalsResponse_directConnectGatewayAssociationProposals,
    describeDirectConnectGatewayAssociationProposalsResponse_nextToken,
    describeDirectConnectGatewayAssociationProposalsResponse_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:/ 'newDescribeDirectConnectGatewayAssociationProposals' smart constructor.
data DescribeDirectConnectGatewayAssociationProposals = DescribeDirectConnectGatewayAssociationProposals'
  { -- | The ID of the associated gateway.
    DescribeDirectConnectGatewayAssociationProposals -> Maybe Text
associatedGatewayId :: Prelude.Maybe Prelude.Text,
    -- | The ID of the Direct Connect gateway.
    DescribeDirectConnectGatewayAssociationProposals -> Maybe Text
directConnectGatewayId :: Prelude.Maybe Prelude.Text,
    -- | The ID of the proposal.
    DescribeDirectConnectGatewayAssociationProposals -> Maybe Text
proposalId :: Prelude.Maybe Prelude.Text,
    -- | The token for the next page of results.
    DescribeDirectConnectGatewayAssociationProposals -> 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.
    DescribeDirectConnectGatewayAssociationProposals -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int
  }
  deriving (DescribeDirectConnectGatewayAssociationProposals
-> DescribeDirectConnectGatewayAssociationProposals -> Bool
(DescribeDirectConnectGatewayAssociationProposals
 -> DescribeDirectConnectGatewayAssociationProposals -> Bool)
-> (DescribeDirectConnectGatewayAssociationProposals
    -> DescribeDirectConnectGatewayAssociationProposals -> Bool)
-> Eq DescribeDirectConnectGatewayAssociationProposals
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeDirectConnectGatewayAssociationProposals
-> DescribeDirectConnectGatewayAssociationProposals -> Bool
$c/= :: DescribeDirectConnectGatewayAssociationProposals
-> DescribeDirectConnectGatewayAssociationProposals -> Bool
== :: DescribeDirectConnectGatewayAssociationProposals
-> DescribeDirectConnectGatewayAssociationProposals -> Bool
$c== :: DescribeDirectConnectGatewayAssociationProposals
-> DescribeDirectConnectGatewayAssociationProposals -> Bool
Prelude.Eq, ReadPrec [DescribeDirectConnectGatewayAssociationProposals]
ReadPrec DescribeDirectConnectGatewayAssociationProposals
Int -> ReadS DescribeDirectConnectGatewayAssociationProposals
ReadS [DescribeDirectConnectGatewayAssociationProposals]
(Int -> ReadS DescribeDirectConnectGatewayAssociationProposals)
-> ReadS [DescribeDirectConnectGatewayAssociationProposals]
-> ReadPrec DescribeDirectConnectGatewayAssociationProposals
-> ReadPrec [DescribeDirectConnectGatewayAssociationProposals]
-> Read DescribeDirectConnectGatewayAssociationProposals
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeDirectConnectGatewayAssociationProposals]
$creadListPrec :: ReadPrec [DescribeDirectConnectGatewayAssociationProposals]
readPrec :: ReadPrec DescribeDirectConnectGatewayAssociationProposals
$creadPrec :: ReadPrec DescribeDirectConnectGatewayAssociationProposals
readList :: ReadS [DescribeDirectConnectGatewayAssociationProposals]
$creadList :: ReadS [DescribeDirectConnectGatewayAssociationProposals]
readsPrec :: Int -> ReadS DescribeDirectConnectGatewayAssociationProposals
$creadsPrec :: Int -> ReadS DescribeDirectConnectGatewayAssociationProposals
Prelude.Read, Int -> DescribeDirectConnectGatewayAssociationProposals -> ShowS
[DescribeDirectConnectGatewayAssociationProposals] -> ShowS
DescribeDirectConnectGatewayAssociationProposals -> String
(Int -> DescribeDirectConnectGatewayAssociationProposals -> ShowS)
-> (DescribeDirectConnectGatewayAssociationProposals -> String)
-> ([DescribeDirectConnectGatewayAssociationProposals] -> ShowS)
-> Show DescribeDirectConnectGatewayAssociationProposals
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeDirectConnectGatewayAssociationProposals] -> ShowS
$cshowList :: [DescribeDirectConnectGatewayAssociationProposals] -> ShowS
show :: DescribeDirectConnectGatewayAssociationProposals -> String
$cshow :: DescribeDirectConnectGatewayAssociationProposals -> String
showsPrec :: Int -> DescribeDirectConnectGatewayAssociationProposals -> ShowS
$cshowsPrec :: Int -> DescribeDirectConnectGatewayAssociationProposals -> ShowS
Prelude.Show, (forall x.
 DescribeDirectConnectGatewayAssociationProposals
 -> Rep DescribeDirectConnectGatewayAssociationProposals x)
-> (forall x.
    Rep DescribeDirectConnectGatewayAssociationProposals x
    -> DescribeDirectConnectGatewayAssociationProposals)
-> Generic DescribeDirectConnectGatewayAssociationProposals
forall x.
Rep DescribeDirectConnectGatewayAssociationProposals x
-> DescribeDirectConnectGatewayAssociationProposals
forall x.
DescribeDirectConnectGatewayAssociationProposals
-> Rep DescribeDirectConnectGatewayAssociationProposals x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeDirectConnectGatewayAssociationProposals x
-> DescribeDirectConnectGatewayAssociationProposals
$cfrom :: forall x.
DescribeDirectConnectGatewayAssociationProposals
-> Rep DescribeDirectConnectGatewayAssociationProposals x
Prelude.Generic)

-- |
-- Create a value of 'DescribeDirectConnectGatewayAssociationProposals' 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:
--
-- 'associatedGatewayId', 'describeDirectConnectGatewayAssociationProposals_associatedGatewayId' - The ID of the associated gateway.
--
-- 'directConnectGatewayId', 'describeDirectConnectGatewayAssociationProposals_directConnectGatewayId' - The ID of the Direct Connect gateway.
--
-- 'proposalId', 'describeDirectConnectGatewayAssociationProposals_proposalId' - The ID of the proposal.
--
-- 'nextToken', 'describeDirectConnectGatewayAssociationProposals_nextToken' - The token for the next page of results.
--
-- 'maxResults', 'describeDirectConnectGatewayAssociationProposals_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.
newDescribeDirectConnectGatewayAssociationProposals ::
  DescribeDirectConnectGatewayAssociationProposals
newDescribeDirectConnectGatewayAssociationProposals :: DescribeDirectConnectGatewayAssociationProposals
newDescribeDirectConnectGatewayAssociationProposals =
  DescribeDirectConnectGatewayAssociationProposals' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> DescribeDirectConnectGatewayAssociationProposals
DescribeDirectConnectGatewayAssociationProposals'
    { $sel:associatedGatewayId:DescribeDirectConnectGatewayAssociationProposals' :: Maybe Text
associatedGatewayId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:directConnectGatewayId:DescribeDirectConnectGatewayAssociationProposals' :: Maybe Text
directConnectGatewayId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:proposalId:DescribeDirectConnectGatewayAssociationProposals' :: Maybe Text
proposalId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeDirectConnectGatewayAssociationProposals' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:DescribeDirectConnectGatewayAssociationProposals' :: Maybe Int
maxResults =
        Maybe Int
forall a. Maybe a
Prelude.Nothing
    }

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

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

-- | The ID of the proposal.
describeDirectConnectGatewayAssociationProposals_proposalId :: Lens.Lens' DescribeDirectConnectGatewayAssociationProposals (Prelude.Maybe Prelude.Text)
describeDirectConnectGatewayAssociationProposals_proposalId :: (Maybe Text -> f (Maybe Text))
-> DescribeDirectConnectGatewayAssociationProposals
-> f DescribeDirectConnectGatewayAssociationProposals
describeDirectConnectGatewayAssociationProposals_proposalId = (DescribeDirectConnectGatewayAssociationProposals -> Maybe Text)
-> (DescribeDirectConnectGatewayAssociationProposals
    -> Maybe Text -> DescribeDirectConnectGatewayAssociationProposals)
-> Lens
     DescribeDirectConnectGatewayAssociationProposals
     DescribeDirectConnectGatewayAssociationProposals
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDirectConnectGatewayAssociationProposals' {Maybe Text
proposalId :: Maybe Text
$sel:proposalId:DescribeDirectConnectGatewayAssociationProposals' :: DescribeDirectConnectGatewayAssociationProposals -> Maybe Text
proposalId} -> Maybe Text
proposalId) (\s :: DescribeDirectConnectGatewayAssociationProposals
s@DescribeDirectConnectGatewayAssociationProposals' {} Maybe Text
a -> DescribeDirectConnectGatewayAssociationProposals
s {$sel:proposalId:DescribeDirectConnectGatewayAssociationProposals' :: Maybe Text
proposalId = Maybe Text
a} :: DescribeDirectConnectGatewayAssociationProposals)

-- | The token for the next page of results.
describeDirectConnectGatewayAssociationProposals_nextToken :: Lens.Lens' DescribeDirectConnectGatewayAssociationProposals (Prelude.Maybe Prelude.Text)
describeDirectConnectGatewayAssociationProposals_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeDirectConnectGatewayAssociationProposals
-> f DescribeDirectConnectGatewayAssociationProposals
describeDirectConnectGatewayAssociationProposals_nextToken = (DescribeDirectConnectGatewayAssociationProposals -> Maybe Text)
-> (DescribeDirectConnectGatewayAssociationProposals
    -> Maybe Text -> DescribeDirectConnectGatewayAssociationProposals)
-> Lens
     DescribeDirectConnectGatewayAssociationProposals
     DescribeDirectConnectGatewayAssociationProposals
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDirectConnectGatewayAssociationProposals' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeDirectConnectGatewayAssociationProposals' :: DescribeDirectConnectGatewayAssociationProposals -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeDirectConnectGatewayAssociationProposals
s@DescribeDirectConnectGatewayAssociationProposals' {} Maybe Text
a -> DescribeDirectConnectGatewayAssociationProposals
s {$sel:nextToken:DescribeDirectConnectGatewayAssociationProposals' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeDirectConnectGatewayAssociationProposals)

-- | 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.
describeDirectConnectGatewayAssociationProposals_maxResults :: Lens.Lens' DescribeDirectConnectGatewayAssociationProposals (Prelude.Maybe Prelude.Int)
describeDirectConnectGatewayAssociationProposals_maxResults :: (Maybe Int -> f (Maybe Int))
-> DescribeDirectConnectGatewayAssociationProposals
-> f DescribeDirectConnectGatewayAssociationProposals
describeDirectConnectGatewayAssociationProposals_maxResults = (DescribeDirectConnectGatewayAssociationProposals -> Maybe Int)
-> (DescribeDirectConnectGatewayAssociationProposals
    -> Maybe Int -> DescribeDirectConnectGatewayAssociationProposals)
-> Lens
     DescribeDirectConnectGatewayAssociationProposals
     DescribeDirectConnectGatewayAssociationProposals
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDirectConnectGatewayAssociationProposals' {Maybe Int
maxResults :: Maybe Int
$sel:maxResults:DescribeDirectConnectGatewayAssociationProposals' :: DescribeDirectConnectGatewayAssociationProposals -> Maybe Int
maxResults} -> Maybe Int
maxResults) (\s :: DescribeDirectConnectGatewayAssociationProposals
s@DescribeDirectConnectGatewayAssociationProposals' {} Maybe Int
a -> DescribeDirectConnectGatewayAssociationProposals
s {$sel:maxResults:DescribeDirectConnectGatewayAssociationProposals' :: Maybe Int
maxResults = Maybe Int
a} :: DescribeDirectConnectGatewayAssociationProposals)

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

instance
  Prelude.NFData
    DescribeDirectConnectGatewayAssociationProposals

instance
  Core.ToHeaders
    DescribeDirectConnectGatewayAssociationProposals
  where
  toHeaders :: DescribeDirectConnectGatewayAssociationProposals -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> DescribeDirectConnectGatewayAssociationProposals
-> 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.DescribeDirectConnectGatewayAssociationProposals" ::
                          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
    DescribeDirectConnectGatewayAssociationProposals
  where
  toJSON :: DescribeDirectConnectGatewayAssociationProposals -> Value
toJSON
    DescribeDirectConnectGatewayAssociationProposals' {Maybe Int
Maybe Text
maxResults :: Maybe Int
nextToken :: Maybe Text
proposalId :: Maybe Text
directConnectGatewayId :: Maybe Text
associatedGatewayId :: Maybe Text
$sel:maxResults:DescribeDirectConnectGatewayAssociationProposals' :: DescribeDirectConnectGatewayAssociationProposals -> Maybe Int
$sel:nextToken:DescribeDirectConnectGatewayAssociationProposals' :: DescribeDirectConnectGatewayAssociationProposals -> Maybe Text
$sel:proposalId:DescribeDirectConnectGatewayAssociationProposals' :: DescribeDirectConnectGatewayAssociationProposals -> Maybe Text
$sel:directConnectGatewayId:DescribeDirectConnectGatewayAssociationProposals' :: DescribeDirectConnectGatewayAssociationProposals -> Maybe Text
$sel:associatedGatewayId:DescribeDirectConnectGatewayAssociationProposals' :: DescribeDirectConnectGatewayAssociationProposals -> Maybe Text
..} =
      [Pair] -> Value
Core.object
        ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
            [ (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
"proposalId" 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
proposalId,
              (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
    DescribeDirectConnectGatewayAssociationProposals
  where
  toPath :: DescribeDirectConnectGatewayAssociationProposals -> ByteString
toPath = ByteString
-> DescribeDirectConnectGatewayAssociationProposals -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | /See:/ 'newDescribeDirectConnectGatewayAssociationProposalsResponse' smart constructor.
data DescribeDirectConnectGatewayAssociationProposalsResponse = DescribeDirectConnectGatewayAssociationProposalsResponse'
  { -- | Describes the Direct Connect gateway association proposals.
    DescribeDirectConnectGatewayAssociationProposalsResponse
-> Maybe [DirectConnectGatewayAssociationProposal]
directConnectGatewayAssociationProposals :: Prelude.Maybe [DirectConnectGatewayAssociationProposal],
    -- | The token to use to retrieve the next page of results. This value is
    -- @null@ when there are no more results to return.
    DescribeDirectConnectGatewayAssociationProposalsResponse
-> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeDirectConnectGatewayAssociationProposalsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeDirectConnectGatewayAssociationProposalsResponse
-> DescribeDirectConnectGatewayAssociationProposalsResponse -> Bool
(DescribeDirectConnectGatewayAssociationProposalsResponse
 -> DescribeDirectConnectGatewayAssociationProposalsResponse
 -> Bool)
-> (DescribeDirectConnectGatewayAssociationProposalsResponse
    -> DescribeDirectConnectGatewayAssociationProposalsResponse
    -> Bool)
-> Eq DescribeDirectConnectGatewayAssociationProposalsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeDirectConnectGatewayAssociationProposalsResponse
-> DescribeDirectConnectGatewayAssociationProposalsResponse -> Bool
$c/= :: DescribeDirectConnectGatewayAssociationProposalsResponse
-> DescribeDirectConnectGatewayAssociationProposalsResponse -> Bool
== :: DescribeDirectConnectGatewayAssociationProposalsResponse
-> DescribeDirectConnectGatewayAssociationProposalsResponse -> Bool
$c== :: DescribeDirectConnectGatewayAssociationProposalsResponse
-> DescribeDirectConnectGatewayAssociationProposalsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeDirectConnectGatewayAssociationProposalsResponse]
ReadPrec DescribeDirectConnectGatewayAssociationProposalsResponse
Int
-> ReadS DescribeDirectConnectGatewayAssociationProposalsResponse
ReadS [DescribeDirectConnectGatewayAssociationProposalsResponse]
(Int
 -> ReadS DescribeDirectConnectGatewayAssociationProposalsResponse)
-> ReadS [DescribeDirectConnectGatewayAssociationProposalsResponse]
-> ReadPrec
     DescribeDirectConnectGatewayAssociationProposalsResponse
-> ReadPrec
     [DescribeDirectConnectGatewayAssociationProposalsResponse]
-> Read DescribeDirectConnectGatewayAssociationProposalsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeDirectConnectGatewayAssociationProposalsResponse]
$creadListPrec :: ReadPrec [DescribeDirectConnectGatewayAssociationProposalsResponse]
readPrec :: ReadPrec DescribeDirectConnectGatewayAssociationProposalsResponse
$creadPrec :: ReadPrec DescribeDirectConnectGatewayAssociationProposalsResponse
readList :: ReadS [DescribeDirectConnectGatewayAssociationProposalsResponse]
$creadList :: ReadS [DescribeDirectConnectGatewayAssociationProposalsResponse]
readsPrec :: Int
-> ReadS DescribeDirectConnectGatewayAssociationProposalsResponse
$creadsPrec :: Int
-> ReadS DescribeDirectConnectGatewayAssociationProposalsResponse
Prelude.Read, Int
-> DescribeDirectConnectGatewayAssociationProposalsResponse
-> ShowS
[DescribeDirectConnectGatewayAssociationProposalsResponse] -> ShowS
DescribeDirectConnectGatewayAssociationProposalsResponse -> String
(Int
 -> DescribeDirectConnectGatewayAssociationProposalsResponse
 -> ShowS)
-> (DescribeDirectConnectGatewayAssociationProposalsResponse
    -> String)
-> ([DescribeDirectConnectGatewayAssociationProposalsResponse]
    -> ShowS)
-> Show DescribeDirectConnectGatewayAssociationProposalsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeDirectConnectGatewayAssociationProposalsResponse] -> ShowS
$cshowList :: [DescribeDirectConnectGatewayAssociationProposalsResponse] -> ShowS
show :: DescribeDirectConnectGatewayAssociationProposalsResponse -> String
$cshow :: DescribeDirectConnectGatewayAssociationProposalsResponse -> String
showsPrec :: Int
-> DescribeDirectConnectGatewayAssociationProposalsResponse
-> ShowS
$cshowsPrec :: Int
-> DescribeDirectConnectGatewayAssociationProposalsResponse
-> ShowS
Prelude.Show, (forall x.
 DescribeDirectConnectGatewayAssociationProposalsResponse
 -> Rep DescribeDirectConnectGatewayAssociationProposalsResponse x)
-> (forall x.
    Rep DescribeDirectConnectGatewayAssociationProposalsResponse x
    -> DescribeDirectConnectGatewayAssociationProposalsResponse)
-> Generic DescribeDirectConnectGatewayAssociationProposalsResponse
forall x.
Rep DescribeDirectConnectGatewayAssociationProposalsResponse x
-> DescribeDirectConnectGatewayAssociationProposalsResponse
forall x.
DescribeDirectConnectGatewayAssociationProposalsResponse
-> Rep DescribeDirectConnectGatewayAssociationProposalsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeDirectConnectGatewayAssociationProposalsResponse x
-> DescribeDirectConnectGatewayAssociationProposalsResponse
$cfrom :: forall x.
DescribeDirectConnectGatewayAssociationProposalsResponse
-> Rep DescribeDirectConnectGatewayAssociationProposalsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeDirectConnectGatewayAssociationProposalsResponse' 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:
--
-- 'directConnectGatewayAssociationProposals', 'describeDirectConnectGatewayAssociationProposalsResponse_directConnectGatewayAssociationProposals' - Describes the Direct Connect gateway association proposals.
--
-- 'nextToken', 'describeDirectConnectGatewayAssociationProposalsResponse_nextToken' - The token to use to retrieve the next page of results. This value is
-- @null@ when there are no more results to return.
--
-- 'httpStatus', 'describeDirectConnectGatewayAssociationProposalsResponse_httpStatus' - The response's http status code.
newDescribeDirectConnectGatewayAssociationProposalsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeDirectConnectGatewayAssociationProposalsResponse
newDescribeDirectConnectGatewayAssociationProposalsResponse :: Int -> DescribeDirectConnectGatewayAssociationProposalsResponse
newDescribeDirectConnectGatewayAssociationProposalsResponse
  Int
pHttpStatus_ =
    DescribeDirectConnectGatewayAssociationProposalsResponse' :: Maybe [DirectConnectGatewayAssociationProposal]
-> Maybe Text
-> Int
-> DescribeDirectConnectGatewayAssociationProposalsResponse
DescribeDirectConnectGatewayAssociationProposalsResponse'
      { $sel:directConnectGatewayAssociationProposals:DescribeDirectConnectGatewayAssociationProposalsResponse' :: Maybe [DirectConnectGatewayAssociationProposal]
directConnectGatewayAssociationProposals =
          Maybe [DirectConnectGatewayAssociationProposal]
forall a. Maybe a
Prelude.Nothing,
        $sel:nextToken:DescribeDirectConnectGatewayAssociationProposalsResponse' :: Maybe Text
nextToken =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DescribeDirectConnectGatewayAssociationProposalsResponse' :: Int
httpStatus =
          Int
pHttpStatus_
      }

-- | Describes the Direct Connect gateway association proposals.
describeDirectConnectGatewayAssociationProposalsResponse_directConnectGatewayAssociationProposals :: Lens.Lens' DescribeDirectConnectGatewayAssociationProposalsResponse (Prelude.Maybe [DirectConnectGatewayAssociationProposal])
describeDirectConnectGatewayAssociationProposalsResponse_directConnectGatewayAssociationProposals :: (Maybe [DirectConnectGatewayAssociationProposal]
 -> f (Maybe [DirectConnectGatewayAssociationProposal]))
-> DescribeDirectConnectGatewayAssociationProposalsResponse
-> f DescribeDirectConnectGatewayAssociationProposalsResponse
describeDirectConnectGatewayAssociationProposalsResponse_directConnectGatewayAssociationProposals = (DescribeDirectConnectGatewayAssociationProposalsResponse
 -> Maybe [DirectConnectGatewayAssociationProposal])
-> (DescribeDirectConnectGatewayAssociationProposalsResponse
    -> Maybe [DirectConnectGatewayAssociationProposal]
    -> DescribeDirectConnectGatewayAssociationProposalsResponse)
-> Lens
     DescribeDirectConnectGatewayAssociationProposalsResponse
     DescribeDirectConnectGatewayAssociationProposalsResponse
     (Maybe [DirectConnectGatewayAssociationProposal])
     (Maybe [DirectConnectGatewayAssociationProposal])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDirectConnectGatewayAssociationProposalsResponse' {Maybe [DirectConnectGatewayAssociationProposal]
directConnectGatewayAssociationProposals :: Maybe [DirectConnectGatewayAssociationProposal]
$sel:directConnectGatewayAssociationProposals:DescribeDirectConnectGatewayAssociationProposalsResponse' :: DescribeDirectConnectGatewayAssociationProposalsResponse
-> Maybe [DirectConnectGatewayAssociationProposal]
directConnectGatewayAssociationProposals} -> Maybe [DirectConnectGatewayAssociationProposal]
directConnectGatewayAssociationProposals) (\s :: DescribeDirectConnectGatewayAssociationProposalsResponse
s@DescribeDirectConnectGatewayAssociationProposalsResponse' {} Maybe [DirectConnectGatewayAssociationProposal]
a -> DescribeDirectConnectGatewayAssociationProposalsResponse
s {$sel:directConnectGatewayAssociationProposals:DescribeDirectConnectGatewayAssociationProposalsResponse' :: Maybe [DirectConnectGatewayAssociationProposal]
directConnectGatewayAssociationProposals = Maybe [DirectConnectGatewayAssociationProposal]
a} :: DescribeDirectConnectGatewayAssociationProposalsResponse) ((Maybe [DirectConnectGatewayAssociationProposal]
  -> f (Maybe [DirectConnectGatewayAssociationProposal]))
 -> DescribeDirectConnectGatewayAssociationProposalsResponse
 -> f DescribeDirectConnectGatewayAssociationProposalsResponse)
-> ((Maybe [DirectConnectGatewayAssociationProposal]
     -> f (Maybe [DirectConnectGatewayAssociationProposal]))
    -> Maybe [DirectConnectGatewayAssociationProposal]
    -> f (Maybe [DirectConnectGatewayAssociationProposal]))
-> (Maybe [DirectConnectGatewayAssociationProposal]
    -> f (Maybe [DirectConnectGatewayAssociationProposal]))
-> DescribeDirectConnectGatewayAssociationProposalsResponse
-> f DescribeDirectConnectGatewayAssociationProposalsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [DirectConnectGatewayAssociationProposal]
  [DirectConnectGatewayAssociationProposal]
  [DirectConnectGatewayAssociationProposal]
  [DirectConnectGatewayAssociationProposal]
-> Iso
     (Maybe [DirectConnectGatewayAssociationProposal])
     (Maybe [DirectConnectGatewayAssociationProposal])
     (Maybe [DirectConnectGatewayAssociationProposal])
     (Maybe [DirectConnectGatewayAssociationProposal])
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
  [DirectConnectGatewayAssociationProposal]
  [DirectConnectGatewayAssociationProposal]
  [DirectConnectGatewayAssociationProposal]
  [DirectConnectGatewayAssociationProposal]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The token to use to retrieve the next page of results. This value is
-- @null@ when there are no more results to return.
describeDirectConnectGatewayAssociationProposalsResponse_nextToken :: Lens.Lens' DescribeDirectConnectGatewayAssociationProposalsResponse (Prelude.Maybe Prelude.Text)
describeDirectConnectGatewayAssociationProposalsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeDirectConnectGatewayAssociationProposalsResponse
-> f DescribeDirectConnectGatewayAssociationProposalsResponse
describeDirectConnectGatewayAssociationProposalsResponse_nextToken = (DescribeDirectConnectGatewayAssociationProposalsResponse
 -> Maybe Text)
-> (DescribeDirectConnectGatewayAssociationProposalsResponse
    -> Maybe Text
    -> DescribeDirectConnectGatewayAssociationProposalsResponse)
-> Lens
     DescribeDirectConnectGatewayAssociationProposalsResponse
     DescribeDirectConnectGatewayAssociationProposalsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDirectConnectGatewayAssociationProposalsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeDirectConnectGatewayAssociationProposalsResponse' :: DescribeDirectConnectGatewayAssociationProposalsResponse
-> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeDirectConnectGatewayAssociationProposalsResponse
s@DescribeDirectConnectGatewayAssociationProposalsResponse' {} Maybe Text
a -> DescribeDirectConnectGatewayAssociationProposalsResponse
s {$sel:nextToken:DescribeDirectConnectGatewayAssociationProposalsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeDirectConnectGatewayAssociationProposalsResponse)

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

instance
  Prelude.NFData
    DescribeDirectConnectGatewayAssociationProposalsResponse