{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# 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.Types.DirectConnectGatewayAssociationProposal
-- 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)
module Amazonka.DirectConnect.Types.DirectConnectGatewayAssociationProposal where

import qualified Amazonka.Core as Core
import Amazonka.DirectConnect.Types.AssociatedGateway
import Amazonka.DirectConnect.Types.DirectConnectGatewayAssociationProposalState
import Amazonka.DirectConnect.Types.RouteFilterPrefix
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Information about the proposal request to attach a virtual private
-- gateway to a Direct Connect gateway.
--
-- /See:/ 'newDirectConnectGatewayAssociationProposal' smart constructor.
data DirectConnectGatewayAssociationProposal = DirectConnectGatewayAssociationProposal'
  { -- | The existing Amazon VPC prefixes advertised to the Direct Connect
    -- gateway.
    DirectConnectGatewayAssociationProposal
-> Maybe [RouteFilterPrefix]
existingAllowedPrefixesToDirectConnectGateway :: Prelude.Maybe [RouteFilterPrefix],
    -- | The ID of the Direct Connect gateway.
    DirectConnectGatewayAssociationProposal -> Maybe Text
directConnectGatewayId :: Prelude.Maybe Prelude.Text,
    -- | The ID of the association proposal.
    DirectConnectGatewayAssociationProposal -> Maybe Text
proposalId :: Prelude.Maybe Prelude.Text,
    -- | Information about the associated gateway.
    DirectConnectGatewayAssociationProposal -> Maybe AssociatedGateway
associatedGateway :: Prelude.Maybe AssociatedGateway,
    -- | The state of the proposal. The following are possible values:
    --
    -- -   @accepted@: The proposal has been accepted. The Direct Connect
    --     gateway association is available to use in this state.
    --
    -- -   @deleted@: The proposal has been deleted by the owner that made the
    --     proposal. The Direct Connect gateway association cannot be used in
    --     this state.
    --
    -- -   @requested@: The proposal has been requested. The Direct Connect
    --     gateway association cannot be used in this state.
    DirectConnectGatewayAssociationProposal
-> Maybe DirectConnectGatewayAssociationProposalState
proposalState :: Prelude.Maybe DirectConnectGatewayAssociationProposalState,
    -- | The ID of the Amazon Web Services account that owns the Direct Connect
    -- gateway.
    DirectConnectGatewayAssociationProposal -> Maybe Text
directConnectGatewayOwnerAccount :: Prelude.Maybe Prelude.Text,
    -- | The Amazon VPC prefixes to advertise to the Direct Connect gateway.
    DirectConnectGatewayAssociationProposal
-> Maybe [RouteFilterPrefix]
requestedAllowedPrefixesToDirectConnectGateway :: Prelude.Maybe [RouteFilterPrefix]
  }
  deriving (DirectConnectGatewayAssociationProposal
-> DirectConnectGatewayAssociationProposal -> Bool
(DirectConnectGatewayAssociationProposal
 -> DirectConnectGatewayAssociationProposal -> Bool)
-> (DirectConnectGatewayAssociationProposal
    -> DirectConnectGatewayAssociationProposal -> Bool)
-> Eq DirectConnectGatewayAssociationProposal
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DirectConnectGatewayAssociationProposal
-> DirectConnectGatewayAssociationProposal -> Bool
$c/= :: DirectConnectGatewayAssociationProposal
-> DirectConnectGatewayAssociationProposal -> Bool
== :: DirectConnectGatewayAssociationProposal
-> DirectConnectGatewayAssociationProposal -> Bool
$c== :: DirectConnectGatewayAssociationProposal
-> DirectConnectGatewayAssociationProposal -> Bool
Prelude.Eq, ReadPrec [DirectConnectGatewayAssociationProposal]
ReadPrec DirectConnectGatewayAssociationProposal
Int -> ReadS DirectConnectGatewayAssociationProposal
ReadS [DirectConnectGatewayAssociationProposal]
(Int -> ReadS DirectConnectGatewayAssociationProposal)
-> ReadS [DirectConnectGatewayAssociationProposal]
-> ReadPrec DirectConnectGatewayAssociationProposal
-> ReadPrec [DirectConnectGatewayAssociationProposal]
-> Read DirectConnectGatewayAssociationProposal
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DirectConnectGatewayAssociationProposal]
$creadListPrec :: ReadPrec [DirectConnectGatewayAssociationProposal]
readPrec :: ReadPrec DirectConnectGatewayAssociationProposal
$creadPrec :: ReadPrec DirectConnectGatewayAssociationProposal
readList :: ReadS [DirectConnectGatewayAssociationProposal]
$creadList :: ReadS [DirectConnectGatewayAssociationProposal]
readsPrec :: Int -> ReadS DirectConnectGatewayAssociationProposal
$creadsPrec :: Int -> ReadS DirectConnectGatewayAssociationProposal
Prelude.Read, Int -> DirectConnectGatewayAssociationProposal -> ShowS
[DirectConnectGatewayAssociationProposal] -> ShowS
DirectConnectGatewayAssociationProposal -> String
(Int -> DirectConnectGatewayAssociationProposal -> ShowS)
-> (DirectConnectGatewayAssociationProposal -> String)
-> ([DirectConnectGatewayAssociationProposal] -> ShowS)
-> Show DirectConnectGatewayAssociationProposal
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DirectConnectGatewayAssociationProposal] -> ShowS
$cshowList :: [DirectConnectGatewayAssociationProposal] -> ShowS
show :: DirectConnectGatewayAssociationProposal -> String
$cshow :: DirectConnectGatewayAssociationProposal -> String
showsPrec :: Int -> DirectConnectGatewayAssociationProposal -> ShowS
$cshowsPrec :: Int -> DirectConnectGatewayAssociationProposal -> ShowS
Prelude.Show, (forall x.
 DirectConnectGatewayAssociationProposal
 -> Rep DirectConnectGatewayAssociationProposal x)
-> (forall x.
    Rep DirectConnectGatewayAssociationProposal x
    -> DirectConnectGatewayAssociationProposal)
-> Generic DirectConnectGatewayAssociationProposal
forall x.
Rep DirectConnectGatewayAssociationProposal x
-> DirectConnectGatewayAssociationProposal
forall x.
DirectConnectGatewayAssociationProposal
-> Rep DirectConnectGatewayAssociationProposal x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DirectConnectGatewayAssociationProposal x
-> DirectConnectGatewayAssociationProposal
$cfrom :: forall x.
DirectConnectGatewayAssociationProposal
-> Rep DirectConnectGatewayAssociationProposal x
Prelude.Generic)

-- |
-- Create a value of 'DirectConnectGatewayAssociationProposal' 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:
--
-- 'existingAllowedPrefixesToDirectConnectGateway', 'directConnectGatewayAssociationProposal_existingAllowedPrefixesToDirectConnectGateway' - The existing Amazon VPC prefixes advertised to the Direct Connect
-- gateway.
--
-- 'directConnectGatewayId', 'directConnectGatewayAssociationProposal_directConnectGatewayId' - The ID of the Direct Connect gateway.
--
-- 'proposalId', 'directConnectGatewayAssociationProposal_proposalId' - The ID of the association proposal.
--
-- 'associatedGateway', 'directConnectGatewayAssociationProposal_associatedGateway' - Information about the associated gateway.
--
-- 'proposalState', 'directConnectGatewayAssociationProposal_proposalState' - The state of the proposal. The following are possible values:
--
-- -   @accepted@: The proposal has been accepted. The Direct Connect
--     gateway association is available to use in this state.
--
-- -   @deleted@: The proposal has been deleted by the owner that made the
--     proposal. The Direct Connect gateway association cannot be used in
--     this state.
--
-- -   @requested@: The proposal has been requested. The Direct Connect
--     gateway association cannot be used in this state.
--
-- 'directConnectGatewayOwnerAccount', 'directConnectGatewayAssociationProposal_directConnectGatewayOwnerAccount' - The ID of the Amazon Web Services account that owns the Direct Connect
-- gateway.
--
-- 'requestedAllowedPrefixesToDirectConnectGateway', 'directConnectGatewayAssociationProposal_requestedAllowedPrefixesToDirectConnectGateway' - The Amazon VPC prefixes to advertise to the Direct Connect gateway.
newDirectConnectGatewayAssociationProposal ::
  DirectConnectGatewayAssociationProposal
newDirectConnectGatewayAssociationProposal :: DirectConnectGatewayAssociationProposal
newDirectConnectGatewayAssociationProposal =
  DirectConnectGatewayAssociationProposal' :: Maybe [RouteFilterPrefix]
-> Maybe Text
-> Maybe Text
-> Maybe AssociatedGateway
-> Maybe DirectConnectGatewayAssociationProposalState
-> Maybe Text
-> Maybe [RouteFilterPrefix]
-> DirectConnectGatewayAssociationProposal
DirectConnectGatewayAssociationProposal'
    { $sel:existingAllowedPrefixesToDirectConnectGateway:DirectConnectGatewayAssociationProposal' :: Maybe [RouteFilterPrefix]
existingAllowedPrefixesToDirectConnectGateway =
        Maybe [RouteFilterPrefix]
forall a. Maybe a
Prelude.Nothing,
      $sel:directConnectGatewayId:DirectConnectGatewayAssociationProposal' :: Maybe Text
directConnectGatewayId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:proposalId:DirectConnectGatewayAssociationProposal' :: Maybe Text
proposalId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:associatedGateway:DirectConnectGatewayAssociationProposal' :: Maybe AssociatedGateway
associatedGateway =
        Maybe AssociatedGateway
forall a. Maybe a
Prelude.Nothing,
      $sel:proposalState:DirectConnectGatewayAssociationProposal' :: Maybe DirectConnectGatewayAssociationProposalState
proposalState = Maybe DirectConnectGatewayAssociationProposalState
forall a. Maybe a
Prelude.Nothing,
      $sel:directConnectGatewayOwnerAccount:DirectConnectGatewayAssociationProposal' :: Maybe Text
directConnectGatewayOwnerAccount =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:requestedAllowedPrefixesToDirectConnectGateway:DirectConnectGatewayAssociationProposal' :: Maybe [RouteFilterPrefix]
requestedAllowedPrefixesToDirectConnectGateway =
        Maybe [RouteFilterPrefix]
forall a. Maybe a
Prelude.Nothing
    }

-- | The existing Amazon VPC prefixes advertised to the Direct Connect
-- gateway.
directConnectGatewayAssociationProposal_existingAllowedPrefixesToDirectConnectGateway :: Lens.Lens' DirectConnectGatewayAssociationProposal (Prelude.Maybe [RouteFilterPrefix])
directConnectGatewayAssociationProposal_existingAllowedPrefixesToDirectConnectGateway :: (Maybe [RouteFilterPrefix] -> f (Maybe [RouteFilterPrefix]))
-> DirectConnectGatewayAssociationProposal
-> f DirectConnectGatewayAssociationProposal
directConnectGatewayAssociationProposal_existingAllowedPrefixesToDirectConnectGateway = (DirectConnectGatewayAssociationProposal
 -> Maybe [RouteFilterPrefix])
-> (DirectConnectGatewayAssociationProposal
    -> Maybe [RouteFilterPrefix]
    -> DirectConnectGatewayAssociationProposal)
-> Lens
     DirectConnectGatewayAssociationProposal
     DirectConnectGatewayAssociationProposal
     (Maybe [RouteFilterPrefix])
     (Maybe [RouteFilterPrefix])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DirectConnectGatewayAssociationProposal' {Maybe [RouteFilterPrefix]
existingAllowedPrefixesToDirectConnectGateway :: Maybe [RouteFilterPrefix]
$sel:existingAllowedPrefixesToDirectConnectGateway:DirectConnectGatewayAssociationProposal' :: DirectConnectGatewayAssociationProposal
-> Maybe [RouteFilterPrefix]
existingAllowedPrefixesToDirectConnectGateway} -> Maybe [RouteFilterPrefix]
existingAllowedPrefixesToDirectConnectGateway) (\s :: DirectConnectGatewayAssociationProposal
s@DirectConnectGatewayAssociationProposal' {} Maybe [RouteFilterPrefix]
a -> DirectConnectGatewayAssociationProposal
s {$sel:existingAllowedPrefixesToDirectConnectGateway:DirectConnectGatewayAssociationProposal' :: Maybe [RouteFilterPrefix]
existingAllowedPrefixesToDirectConnectGateway = Maybe [RouteFilterPrefix]
a} :: DirectConnectGatewayAssociationProposal) ((Maybe [RouteFilterPrefix] -> f (Maybe [RouteFilterPrefix]))
 -> DirectConnectGatewayAssociationProposal
 -> f DirectConnectGatewayAssociationProposal)
-> ((Maybe [RouteFilterPrefix] -> f (Maybe [RouteFilterPrefix]))
    -> Maybe [RouteFilterPrefix] -> f (Maybe [RouteFilterPrefix]))
-> (Maybe [RouteFilterPrefix] -> f (Maybe [RouteFilterPrefix]))
-> DirectConnectGatewayAssociationProposal
-> f DirectConnectGatewayAssociationProposal
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [RouteFilterPrefix]
  [RouteFilterPrefix]
  [RouteFilterPrefix]
  [RouteFilterPrefix]
-> Iso
     (Maybe [RouteFilterPrefix])
     (Maybe [RouteFilterPrefix])
     (Maybe [RouteFilterPrefix])
     (Maybe [RouteFilterPrefix])
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
  [RouteFilterPrefix]
  [RouteFilterPrefix]
  [RouteFilterPrefix]
  [RouteFilterPrefix]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

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

-- | Information about the associated gateway.
directConnectGatewayAssociationProposal_associatedGateway :: Lens.Lens' DirectConnectGatewayAssociationProposal (Prelude.Maybe AssociatedGateway)
directConnectGatewayAssociationProposal_associatedGateway :: (Maybe AssociatedGateway -> f (Maybe AssociatedGateway))
-> DirectConnectGatewayAssociationProposal
-> f DirectConnectGatewayAssociationProposal
directConnectGatewayAssociationProposal_associatedGateway = (DirectConnectGatewayAssociationProposal
 -> Maybe AssociatedGateway)
-> (DirectConnectGatewayAssociationProposal
    -> Maybe AssociatedGateway
    -> DirectConnectGatewayAssociationProposal)
-> Lens
     DirectConnectGatewayAssociationProposal
     DirectConnectGatewayAssociationProposal
     (Maybe AssociatedGateway)
     (Maybe AssociatedGateway)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DirectConnectGatewayAssociationProposal' {Maybe AssociatedGateway
associatedGateway :: Maybe AssociatedGateway
$sel:associatedGateway:DirectConnectGatewayAssociationProposal' :: DirectConnectGatewayAssociationProposal -> Maybe AssociatedGateway
associatedGateway} -> Maybe AssociatedGateway
associatedGateway) (\s :: DirectConnectGatewayAssociationProposal
s@DirectConnectGatewayAssociationProposal' {} Maybe AssociatedGateway
a -> DirectConnectGatewayAssociationProposal
s {$sel:associatedGateway:DirectConnectGatewayAssociationProposal' :: Maybe AssociatedGateway
associatedGateway = Maybe AssociatedGateway
a} :: DirectConnectGatewayAssociationProposal)

-- | The state of the proposal. The following are possible values:
--
-- -   @accepted@: The proposal has been accepted. The Direct Connect
--     gateway association is available to use in this state.
--
-- -   @deleted@: The proposal has been deleted by the owner that made the
--     proposal. The Direct Connect gateway association cannot be used in
--     this state.
--
-- -   @requested@: The proposal has been requested. The Direct Connect
--     gateway association cannot be used in this state.
directConnectGatewayAssociationProposal_proposalState :: Lens.Lens' DirectConnectGatewayAssociationProposal (Prelude.Maybe DirectConnectGatewayAssociationProposalState)
directConnectGatewayAssociationProposal_proposalState :: (Maybe DirectConnectGatewayAssociationProposalState
 -> f (Maybe DirectConnectGatewayAssociationProposalState))
-> DirectConnectGatewayAssociationProposal
-> f DirectConnectGatewayAssociationProposal
directConnectGatewayAssociationProposal_proposalState = (DirectConnectGatewayAssociationProposal
 -> Maybe DirectConnectGatewayAssociationProposalState)
-> (DirectConnectGatewayAssociationProposal
    -> Maybe DirectConnectGatewayAssociationProposalState
    -> DirectConnectGatewayAssociationProposal)
-> Lens
     DirectConnectGatewayAssociationProposal
     DirectConnectGatewayAssociationProposal
     (Maybe DirectConnectGatewayAssociationProposalState)
     (Maybe DirectConnectGatewayAssociationProposalState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DirectConnectGatewayAssociationProposal' {Maybe DirectConnectGatewayAssociationProposalState
proposalState :: Maybe DirectConnectGatewayAssociationProposalState
$sel:proposalState:DirectConnectGatewayAssociationProposal' :: DirectConnectGatewayAssociationProposal
-> Maybe DirectConnectGatewayAssociationProposalState
proposalState} -> Maybe DirectConnectGatewayAssociationProposalState
proposalState) (\s :: DirectConnectGatewayAssociationProposal
s@DirectConnectGatewayAssociationProposal' {} Maybe DirectConnectGatewayAssociationProposalState
a -> DirectConnectGatewayAssociationProposal
s {$sel:proposalState:DirectConnectGatewayAssociationProposal' :: Maybe DirectConnectGatewayAssociationProposalState
proposalState = Maybe DirectConnectGatewayAssociationProposalState
a} :: DirectConnectGatewayAssociationProposal)

-- | The ID of the Amazon Web Services account that owns the Direct Connect
-- gateway.
directConnectGatewayAssociationProposal_directConnectGatewayOwnerAccount :: Lens.Lens' DirectConnectGatewayAssociationProposal (Prelude.Maybe Prelude.Text)
directConnectGatewayAssociationProposal_directConnectGatewayOwnerAccount :: (Maybe Text -> f (Maybe Text))
-> DirectConnectGatewayAssociationProposal
-> f DirectConnectGatewayAssociationProposal
directConnectGatewayAssociationProposal_directConnectGatewayOwnerAccount = (DirectConnectGatewayAssociationProposal -> Maybe Text)
-> (DirectConnectGatewayAssociationProposal
    -> Maybe Text -> DirectConnectGatewayAssociationProposal)
-> Lens
     DirectConnectGatewayAssociationProposal
     DirectConnectGatewayAssociationProposal
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DirectConnectGatewayAssociationProposal' {Maybe Text
directConnectGatewayOwnerAccount :: Maybe Text
$sel:directConnectGatewayOwnerAccount:DirectConnectGatewayAssociationProposal' :: DirectConnectGatewayAssociationProposal -> Maybe Text
directConnectGatewayOwnerAccount} -> Maybe Text
directConnectGatewayOwnerAccount) (\s :: DirectConnectGatewayAssociationProposal
s@DirectConnectGatewayAssociationProposal' {} Maybe Text
a -> DirectConnectGatewayAssociationProposal
s {$sel:directConnectGatewayOwnerAccount:DirectConnectGatewayAssociationProposal' :: Maybe Text
directConnectGatewayOwnerAccount = Maybe Text
a} :: DirectConnectGatewayAssociationProposal)

-- | The Amazon VPC prefixes to advertise to the Direct Connect gateway.
directConnectGatewayAssociationProposal_requestedAllowedPrefixesToDirectConnectGateway :: Lens.Lens' DirectConnectGatewayAssociationProposal (Prelude.Maybe [RouteFilterPrefix])
directConnectGatewayAssociationProposal_requestedAllowedPrefixesToDirectConnectGateway :: (Maybe [RouteFilterPrefix] -> f (Maybe [RouteFilterPrefix]))
-> DirectConnectGatewayAssociationProposal
-> f DirectConnectGatewayAssociationProposal
directConnectGatewayAssociationProposal_requestedAllowedPrefixesToDirectConnectGateway = (DirectConnectGatewayAssociationProposal
 -> Maybe [RouteFilterPrefix])
-> (DirectConnectGatewayAssociationProposal
    -> Maybe [RouteFilterPrefix]
    -> DirectConnectGatewayAssociationProposal)
-> Lens
     DirectConnectGatewayAssociationProposal
     DirectConnectGatewayAssociationProposal
     (Maybe [RouteFilterPrefix])
     (Maybe [RouteFilterPrefix])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DirectConnectGatewayAssociationProposal' {Maybe [RouteFilterPrefix]
requestedAllowedPrefixesToDirectConnectGateway :: Maybe [RouteFilterPrefix]
$sel:requestedAllowedPrefixesToDirectConnectGateway:DirectConnectGatewayAssociationProposal' :: DirectConnectGatewayAssociationProposal
-> Maybe [RouteFilterPrefix]
requestedAllowedPrefixesToDirectConnectGateway} -> Maybe [RouteFilterPrefix]
requestedAllowedPrefixesToDirectConnectGateway) (\s :: DirectConnectGatewayAssociationProposal
s@DirectConnectGatewayAssociationProposal' {} Maybe [RouteFilterPrefix]
a -> DirectConnectGatewayAssociationProposal
s {$sel:requestedAllowedPrefixesToDirectConnectGateway:DirectConnectGatewayAssociationProposal' :: Maybe [RouteFilterPrefix]
requestedAllowedPrefixesToDirectConnectGateway = Maybe [RouteFilterPrefix]
a} :: DirectConnectGatewayAssociationProposal) ((Maybe [RouteFilterPrefix] -> f (Maybe [RouteFilterPrefix]))
 -> DirectConnectGatewayAssociationProposal
 -> f DirectConnectGatewayAssociationProposal)
-> ((Maybe [RouteFilterPrefix] -> f (Maybe [RouteFilterPrefix]))
    -> Maybe [RouteFilterPrefix] -> f (Maybe [RouteFilterPrefix]))
-> (Maybe [RouteFilterPrefix] -> f (Maybe [RouteFilterPrefix]))
-> DirectConnectGatewayAssociationProposal
-> f DirectConnectGatewayAssociationProposal
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [RouteFilterPrefix]
  [RouteFilterPrefix]
  [RouteFilterPrefix]
  [RouteFilterPrefix]
-> Iso
     (Maybe [RouteFilterPrefix])
     (Maybe [RouteFilterPrefix])
     (Maybe [RouteFilterPrefix])
     (Maybe [RouteFilterPrefix])
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
  [RouteFilterPrefix]
  [RouteFilterPrefix]
  [RouteFilterPrefix]
  [RouteFilterPrefix]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance
  Core.FromJSON
    DirectConnectGatewayAssociationProposal
  where
  parseJSON :: Value -> Parser DirectConnectGatewayAssociationProposal
parseJSON =
    String
-> (Object -> Parser DirectConnectGatewayAssociationProposal)
-> Value
-> Parser DirectConnectGatewayAssociationProposal
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"DirectConnectGatewayAssociationProposal"
      ( \Object
x ->
          Maybe [RouteFilterPrefix]
-> Maybe Text
-> Maybe Text
-> Maybe AssociatedGateway
-> Maybe DirectConnectGatewayAssociationProposalState
-> Maybe Text
-> Maybe [RouteFilterPrefix]
-> DirectConnectGatewayAssociationProposal
DirectConnectGatewayAssociationProposal'
            (Maybe [RouteFilterPrefix]
 -> Maybe Text
 -> Maybe Text
 -> Maybe AssociatedGateway
 -> Maybe DirectConnectGatewayAssociationProposalState
 -> Maybe Text
 -> Maybe [RouteFilterPrefix]
 -> DirectConnectGatewayAssociationProposal)
-> Parser (Maybe [RouteFilterPrefix])
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe AssociatedGateway
      -> Maybe DirectConnectGatewayAssociationProposalState
      -> Maybe Text
      -> Maybe [RouteFilterPrefix]
      -> DirectConnectGatewayAssociationProposal)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x
                            Object -> Text -> Parser (Maybe (Maybe [RouteFilterPrefix]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"existingAllowedPrefixesToDirectConnectGateway"
                            Parser (Maybe (Maybe [RouteFilterPrefix]))
-> Maybe [RouteFilterPrefix] -> Parser (Maybe [RouteFilterPrefix])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [RouteFilterPrefix]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe AssociatedGateway
   -> Maybe DirectConnectGatewayAssociationProposalState
   -> Maybe Text
   -> Maybe [RouteFilterPrefix]
   -> DirectConnectGatewayAssociationProposal)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe AssociatedGateway
      -> Maybe DirectConnectGatewayAssociationProposalState
      -> Maybe Text
      -> Maybe [RouteFilterPrefix]
      -> DirectConnectGatewayAssociationProposal)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"directConnectGatewayId")
            Parser
  (Maybe Text
   -> Maybe AssociatedGateway
   -> Maybe DirectConnectGatewayAssociationProposalState
   -> Maybe Text
   -> Maybe [RouteFilterPrefix]
   -> DirectConnectGatewayAssociationProposal)
-> Parser (Maybe Text)
-> Parser
     (Maybe AssociatedGateway
      -> Maybe DirectConnectGatewayAssociationProposalState
      -> Maybe Text
      -> Maybe [RouteFilterPrefix]
      -> DirectConnectGatewayAssociationProposal)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"proposalId")
            Parser
  (Maybe AssociatedGateway
   -> Maybe DirectConnectGatewayAssociationProposalState
   -> Maybe Text
   -> Maybe [RouteFilterPrefix]
   -> DirectConnectGatewayAssociationProposal)
-> Parser (Maybe AssociatedGateway)
-> Parser
     (Maybe DirectConnectGatewayAssociationProposalState
      -> Maybe Text
      -> Maybe [RouteFilterPrefix]
      -> DirectConnectGatewayAssociationProposal)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AssociatedGateway)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"associatedGateway")
            Parser
  (Maybe DirectConnectGatewayAssociationProposalState
   -> Maybe Text
   -> Maybe [RouteFilterPrefix]
   -> DirectConnectGatewayAssociationProposal)
-> Parser (Maybe DirectConnectGatewayAssociationProposalState)
-> Parser
     (Maybe Text
      -> Maybe [RouteFilterPrefix]
      -> DirectConnectGatewayAssociationProposal)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text
-> Parser (Maybe DirectConnectGatewayAssociationProposalState)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"proposalState")
            Parser
  (Maybe Text
   -> Maybe [RouteFilterPrefix]
   -> DirectConnectGatewayAssociationProposal)
-> Parser (Maybe Text)
-> Parser
     (Maybe [RouteFilterPrefix]
      -> DirectConnectGatewayAssociationProposal)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"directConnectGatewayOwnerAccount")
            Parser
  (Maybe [RouteFilterPrefix]
   -> DirectConnectGatewayAssociationProposal)
-> Parser (Maybe [RouteFilterPrefix])
-> Parser DirectConnectGatewayAssociationProposal
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            Object -> Text -> Parser (Maybe (Maybe [RouteFilterPrefix]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"requestedAllowedPrefixesToDirectConnectGateway"
                            Parser (Maybe (Maybe [RouteFilterPrefix]))
-> Maybe [RouteFilterPrefix] -> Parser (Maybe [RouteFilterPrefix])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [RouteFilterPrefix]
forall a. Monoid a => a
Prelude.mempty
                        )
      )

instance
  Prelude.Hashable
    DirectConnectGatewayAssociationProposal

instance
  Prelude.NFData
    DirectConnectGatewayAssociationProposal