{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- 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_maxResults,
    describeDirectConnectGatewayAssociationProposals_nextToken,
    describeDirectConnectGatewayAssociationProposals_proposalId,

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

    -- * Response Lenses
    describeDirectConnectGatewayAssociationProposalsResponse_directConnectGatewayAssociationProposals,
    describeDirectConnectGatewayAssociationProposalsResponse_nextToken,
    describeDirectConnectGatewayAssociationProposalsResponse_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:/ '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 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,
    -- | The token for the next page of results.
    DescribeDirectConnectGatewayAssociationProposals -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The ID of the proposal.
    DescribeDirectConnectGatewayAssociationProposals -> Maybe Text
proposalId :: Prelude.Maybe Prelude.Text
  }
  deriving (DescribeDirectConnectGatewayAssociationProposals
-> DescribeDirectConnectGatewayAssociationProposals -> Bool
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]
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
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.
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.
--
-- '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.
--
-- 'nextToken', 'describeDirectConnectGatewayAssociationProposals_nextToken' - The token for the next page of results.
--
-- 'proposalId', 'describeDirectConnectGatewayAssociationProposals_proposalId' - The ID of the proposal.
newDescribeDirectConnectGatewayAssociationProposals ::
  DescribeDirectConnectGatewayAssociationProposals
newDescribeDirectConnectGatewayAssociationProposals :: DescribeDirectConnectGatewayAssociationProposals
newDescribeDirectConnectGatewayAssociationProposals =
  DescribeDirectConnectGatewayAssociationProposals'
    { $sel:associatedGatewayId:DescribeDirectConnectGatewayAssociationProposals' :: Maybe Text
associatedGatewayId =
        forall a. Maybe a
Prelude.Nothing,
      $sel:directConnectGatewayId:DescribeDirectConnectGatewayAssociationProposals' :: Maybe Text
directConnectGatewayId =
        forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:DescribeDirectConnectGatewayAssociationProposals' :: Maybe Int
maxResults =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeDirectConnectGatewayAssociationProposals' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:proposalId:DescribeDirectConnectGatewayAssociationProposals' :: Maybe Text
proposalId =
        forall a. Maybe a
Prelude.Nothing
    }

-- | The ID of the associated gateway.
describeDirectConnectGatewayAssociationProposals_associatedGatewayId :: Lens.Lens' DescribeDirectConnectGatewayAssociationProposals (Prelude.Maybe Prelude.Text)
describeDirectConnectGatewayAssociationProposals_associatedGatewayId :: Lens' DescribeDirectConnectGatewayAssociationProposals (Maybe Text)
describeDirectConnectGatewayAssociationProposals_associatedGatewayId = 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 :: Lens' DescribeDirectConnectGatewayAssociationProposals (Maybe Text)
describeDirectConnectGatewayAssociationProposals_directConnectGatewayId = 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 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 :: Lens' DescribeDirectConnectGatewayAssociationProposals (Maybe Int)
describeDirectConnectGatewayAssociationProposals_maxResults = 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)

-- | The token for the next page of results.
describeDirectConnectGatewayAssociationProposals_nextToken :: Lens.Lens' DescribeDirectConnectGatewayAssociationProposals (Prelude.Maybe Prelude.Text)
describeDirectConnectGatewayAssociationProposals_nextToken :: Lens' DescribeDirectConnectGatewayAssociationProposals (Maybe Text)
describeDirectConnectGatewayAssociationProposals_nextToken = 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 ID of the proposal.
describeDirectConnectGatewayAssociationProposals_proposalId :: Lens.Lens' DescribeDirectConnectGatewayAssociationProposals (Prelude.Maybe Prelude.Text)
describeDirectConnectGatewayAssociationProposals_proposalId :: Lens' DescribeDirectConnectGatewayAssociationProposals (Maybe Text)
describeDirectConnectGatewayAssociationProposals_proposalId = 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)

instance
  Core.AWSRequest
    DescribeDirectConnectGatewayAssociationProposals
  where
  type
    AWSResponse
      DescribeDirectConnectGatewayAssociationProposals =
      DescribeDirectConnectGatewayAssociationProposalsResponse
  request :: (Service -> Service)
-> DescribeDirectConnectGatewayAssociationProposals
-> Request DescribeDirectConnectGatewayAssociationProposals
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 DescribeDirectConnectGatewayAssociationProposals
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse DescribeDirectConnectGatewayAssociationProposals)))
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 [DirectConnectGatewayAssociationProposal]
-> Maybe Text
-> Int
-> DescribeDirectConnectGatewayAssociationProposalsResponse
DescribeDirectConnectGatewayAssociationProposalsResponse'
            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
"directConnectGatewayAssociationProposals"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"nextToken")
            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
    DescribeDirectConnectGatewayAssociationProposals
  where
  hashWithSalt :: Int -> DescribeDirectConnectGatewayAssociationProposals -> Int
hashWithSalt
    Int
_salt
    DescribeDirectConnectGatewayAssociationProposals' {Maybe Int
Maybe Text
proposalId :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Int
directConnectGatewayId :: Maybe Text
associatedGatewayId :: Maybe Text
$sel:proposalId:DescribeDirectConnectGatewayAssociationProposals' :: DescribeDirectConnectGatewayAssociationProposals -> Maybe Text
$sel:nextToken:DescribeDirectConnectGatewayAssociationProposals' :: DescribeDirectConnectGatewayAssociationProposals -> Maybe Text
$sel:maxResults:DescribeDirectConnectGatewayAssociationProposals' :: DescribeDirectConnectGatewayAssociationProposals -> Maybe Int
$sel:directConnectGatewayId:DescribeDirectConnectGatewayAssociationProposals' :: DescribeDirectConnectGatewayAssociationProposals -> Maybe Text
$sel:associatedGatewayId:DescribeDirectConnectGatewayAssociationProposals' :: DescribeDirectConnectGatewayAssociationProposals -> Maybe Text
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
associatedGatewayId
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
directConnectGatewayId
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
maxResults
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
proposalId

instance
  Prelude.NFData
    DescribeDirectConnectGatewayAssociationProposals
  where
  rnf :: DescribeDirectConnectGatewayAssociationProposals -> ()
rnf
    DescribeDirectConnectGatewayAssociationProposals' {Maybe Int
Maybe Text
proposalId :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Int
directConnectGatewayId :: Maybe Text
associatedGatewayId :: Maybe Text
$sel:proposalId:DescribeDirectConnectGatewayAssociationProposals' :: DescribeDirectConnectGatewayAssociationProposals -> Maybe Text
$sel:nextToken:DescribeDirectConnectGatewayAssociationProposals' :: DescribeDirectConnectGatewayAssociationProposals -> Maybe Text
$sel:maxResults:DescribeDirectConnectGatewayAssociationProposals' :: DescribeDirectConnectGatewayAssociationProposals -> Maybe Int
$sel:directConnectGatewayId:DescribeDirectConnectGatewayAssociationProposals' :: DescribeDirectConnectGatewayAssociationProposals -> Maybe Text
$sel:associatedGatewayId:DescribeDirectConnectGatewayAssociationProposals' :: DescribeDirectConnectGatewayAssociationProposals -> Maybe Text
..} =
      forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
associatedGatewayId
        seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
directConnectGatewayId
        seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
maxResults
        seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
        seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
proposalId

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

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

instance
  Data.ToQuery
    DescribeDirectConnectGatewayAssociationProposals
  where
  toQuery :: DescribeDirectConnectGatewayAssociationProposals -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const 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
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]
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
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.
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'
      { $sel:directConnectGatewayAssociationProposals:DescribeDirectConnectGatewayAssociationProposalsResponse' :: Maybe [DirectConnectGatewayAssociationProposal]
directConnectGatewayAssociationProposals =
          forall a. Maybe a
Prelude.Nothing,
        $sel:nextToken:DescribeDirectConnectGatewayAssociationProposalsResponse' :: Maybe Text
nextToken =
          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 :: Lens'
  DescribeDirectConnectGatewayAssociationProposalsResponse
  (Maybe [DirectConnectGatewayAssociationProposal])
describeDirectConnectGatewayAssociationProposalsResponse_directConnectGatewayAssociationProposals = 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) 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 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 :: Lens'
  DescribeDirectConnectGatewayAssociationProposalsResponse
  (Maybe Text)
describeDirectConnectGatewayAssociationProposalsResponse_nextToken = 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 :: Lens' DescribeDirectConnectGatewayAssociationProposalsResponse Int
describeDirectConnectGatewayAssociationProposalsResponse_httpStatus = 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
  where
  rnf :: DescribeDirectConnectGatewayAssociationProposalsResponse -> ()
rnf
    DescribeDirectConnectGatewayAssociationProposalsResponse' {Int
Maybe [DirectConnectGatewayAssociationProposal]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
directConnectGatewayAssociationProposals :: Maybe [DirectConnectGatewayAssociationProposal]
$sel:httpStatus:DescribeDirectConnectGatewayAssociationProposalsResponse' :: DescribeDirectConnectGatewayAssociationProposalsResponse -> Int
$sel:nextToken:DescribeDirectConnectGatewayAssociationProposalsResponse' :: DescribeDirectConnectGatewayAssociationProposalsResponse
-> Maybe Text
$sel:directConnectGatewayAssociationProposals:DescribeDirectConnectGatewayAssociationProposalsResponse' :: DescribeDirectConnectGatewayAssociationProposalsResponse
-> Maybe [DirectConnectGatewayAssociationProposal]
..} =
      forall a. NFData a => a -> ()
Prelude.rnf
        Maybe [DirectConnectGatewayAssociationProposal]
directConnectGatewayAssociationProposals
        seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
        seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus