{-# 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 #-}
module Amazonka.EC2.Types.PeeringConnectionOptions where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EC2.Internal
import qualified Amazonka.Prelude as Prelude
data PeeringConnectionOptions = PeeringConnectionOptions'
{
PeeringConnectionOptions -> Maybe Bool
allowDnsResolutionFromRemoteVpc :: Prelude.Maybe Prelude.Bool,
PeeringConnectionOptions -> Maybe Bool
allowEgressFromLocalClassicLinkToRemoteVpc :: Prelude.Maybe Prelude.Bool,
PeeringConnectionOptions -> Maybe Bool
allowEgressFromLocalVpcToRemoteClassicLink :: Prelude.Maybe Prelude.Bool
}
deriving (PeeringConnectionOptions -> PeeringConnectionOptions -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PeeringConnectionOptions -> PeeringConnectionOptions -> Bool
$c/= :: PeeringConnectionOptions -> PeeringConnectionOptions -> Bool
== :: PeeringConnectionOptions -> PeeringConnectionOptions -> Bool
$c== :: PeeringConnectionOptions -> PeeringConnectionOptions -> Bool
Prelude.Eq, ReadPrec [PeeringConnectionOptions]
ReadPrec PeeringConnectionOptions
Int -> ReadS PeeringConnectionOptions
ReadS [PeeringConnectionOptions]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PeeringConnectionOptions]
$creadListPrec :: ReadPrec [PeeringConnectionOptions]
readPrec :: ReadPrec PeeringConnectionOptions
$creadPrec :: ReadPrec PeeringConnectionOptions
readList :: ReadS [PeeringConnectionOptions]
$creadList :: ReadS [PeeringConnectionOptions]
readsPrec :: Int -> ReadS PeeringConnectionOptions
$creadsPrec :: Int -> ReadS PeeringConnectionOptions
Prelude.Read, Int -> PeeringConnectionOptions -> ShowS
[PeeringConnectionOptions] -> ShowS
PeeringConnectionOptions -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PeeringConnectionOptions] -> ShowS
$cshowList :: [PeeringConnectionOptions] -> ShowS
show :: PeeringConnectionOptions -> String
$cshow :: PeeringConnectionOptions -> String
showsPrec :: Int -> PeeringConnectionOptions -> ShowS
$cshowsPrec :: Int -> PeeringConnectionOptions -> ShowS
Prelude.Show, forall x.
Rep PeeringConnectionOptions x -> PeeringConnectionOptions
forall x.
PeeringConnectionOptions -> Rep PeeringConnectionOptions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PeeringConnectionOptions x -> PeeringConnectionOptions
$cfrom :: forall x.
PeeringConnectionOptions -> Rep PeeringConnectionOptions x
Prelude.Generic)
newPeeringConnectionOptions ::
PeeringConnectionOptions
newPeeringConnectionOptions :: PeeringConnectionOptions
newPeeringConnectionOptions =
PeeringConnectionOptions'
{ $sel:allowDnsResolutionFromRemoteVpc:PeeringConnectionOptions' :: Maybe Bool
allowDnsResolutionFromRemoteVpc =
forall a. Maybe a
Prelude.Nothing,
$sel:allowEgressFromLocalClassicLinkToRemoteVpc:PeeringConnectionOptions' :: Maybe Bool
allowEgressFromLocalClassicLinkToRemoteVpc =
forall a. Maybe a
Prelude.Nothing,
$sel:allowEgressFromLocalVpcToRemoteClassicLink:PeeringConnectionOptions' :: Maybe Bool
allowEgressFromLocalVpcToRemoteClassicLink =
forall a. Maybe a
Prelude.Nothing
}
peeringConnectionOptions_allowDnsResolutionFromRemoteVpc :: Lens.Lens' PeeringConnectionOptions (Prelude.Maybe Prelude.Bool)
peeringConnectionOptions_allowDnsResolutionFromRemoteVpc :: Lens' PeeringConnectionOptions (Maybe Bool)
peeringConnectionOptions_allowDnsResolutionFromRemoteVpc = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PeeringConnectionOptions' {Maybe Bool
allowDnsResolutionFromRemoteVpc :: Maybe Bool
$sel:allowDnsResolutionFromRemoteVpc:PeeringConnectionOptions' :: PeeringConnectionOptions -> Maybe Bool
allowDnsResolutionFromRemoteVpc} -> Maybe Bool
allowDnsResolutionFromRemoteVpc) (\s :: PeeringConnectionOptions
s@PeeringConnectionOptions' {} Maybe Bool
a -> PeeringConnectionOptions
s {$sel:allowDnsResolutionFromRemoteVpc:PeeringConnectionOptions' :: Maybe Bool
allowDnsResolutionFromRemoteVpc = Maybe Bool
a} :: PeeringConnectionOptions)
peeringConnectionOptions_allowEgressFromLocalClassicLinkToRemoteVpc :: Lens.Lens' PeeringConnectionOptions (Prelude.Maybe Prelude.Bool)
peeringConnectionOptions_allowEgressFromLocalClassicLinkToRemoteVpc :: Lens' PeeringConnectionOptions (Maybe Bool)
peeringConnectionOptions_allowEgressFromLocalClassicLinkToRemoteVpc = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PeeringConnectionOptions' {Maybe Bool
allowEgressFromLocalClassicLinkToRemoteVpc :: Maybe Bool
$sel:allowEgressFromLocalClassicLinkToRemoteVpc:PeeringConnectionOptions' :: PeeringConnectionOptions -> Maybe Bool
allowEgressFromLocalClassicLinkToRemoteVpc} -> Maybe Bool
allowEgressFromLocalClassicLinkToRemoteVpc) (\s :: PeeringConnectionOptions
s@PeeringConnectionOptions' {} Maybe Bool
a -> PeeringConnectionOptions
s {$sel:allowEgressFromLocalClassicLinkToRemoteVpc:PeeringConnectionOptions' :: Maybe Bool
allowEgressFromLocalClassicLinkToRemoteVpc = Maybe Bool
a} :: PeeringConnectionOptions)
peeringConnectionOptions_allowEgressFromLocalVpcToRemoteClassicLink :: Lens.Lens' PeeringConnectionOptions (Prelude.Maybe Prelude.Bool)
peeringConnectionOptions_allowEgressFromLocalVpcToRemoteClassicLink :: Lens' PeeringConnectionOptions (Maybe Bool)
peeringConnectionOptions_allowEgressFromLocalVpcToRemoteClassicLink = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PeeringConnectionOptions' {Maybe Bool
allowEgressFromLocalVpcToRemoteClassicLink :: Maybe Bool
$sel:allowEgressFromLocalVpcToRemoteClassicLink:PeeringConnectionOptions' :: PeeringConnectionOptions -> Maybe Bool
allowEgressFromLocalVpcToRemoteClassicLink} -> Maybe Bool
allowEgressFromLocalVpcToRemoteClassicLink) (\s :: PeeringConnectionOptions
s@PeeringConnectionOptions' {} Maybe Bool
a -> PeeringConnectionOptions
s {$sel:allowEgressFromLocalVpcToRemoteClassicLink:PeeringConnectionOptions' :: Maybe Bool
allowEgressFromLocalVpcToRemoteClassicLink = Maybe Bool
a} :: PeeringConnectionOptions)
instance Data.FromXML PeeringConnectionOptions where
parseXML :: [Node] -> Either String PeeringConnectionOptions
parseXML [Node]
x =
Maybe Bool -> Maybe Bool -> Maybe Bool -> PeeringConnectionOptions
PeeringConnectionOptions'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"allowDnsResolutionFromRemoteVpc")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"allowEgressFromLocalClassicLinkToRemoteVpc"
)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"allowEgressFromLocalVpcToRemoteClassicLink"
)
instance Prelude.Hashable PeeringConnectionOptions where
hashWithSalt :: Int -> PeeringConnectionOptions -> Int
hashWithSalt Int
_salt PeeringConnectionOptions' {Maybe Bool
allowEgressFromLocalVpcToRemoteClassicLink :: Maybe Bool
allowEgressFromLocalClassicLinkToRemoteVpc :: Maybe Bool
allowDnsResolutionFromRemoteVpc :: Maybe Bool
$sel:allowEgressFromLocalVpcToRemoteClassicLink:PeeringConnectionOptions' :: PeeringConnectionOptions -> Maybe Bool
$sel:allowEgressFromLocalClassicLinkToRemoteVpc:PeeringConnectionOptions' :: PeeringConnectionOptions -> Maybe Bool
$sel:allowDnsResolutionFromRemoteVpc:PeeringConnectionOptions' :: PeeringConnectionOptions -> Maybe Bool
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
allowDnsResolutionFromRemoteVpc
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
allowEgressFromLocalClassicLinkToRemoteVpc
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
allowEgressFromLocalVpcToRemoteClassicLink
instance Prelude.NFData PeeringConnectionOptions where
rnf :: PeeringConnectionOptions -> ()
rnf PeeringConnectionOptions' {Maybe Bool
allowEgressFromLocalVpcToRemoteClassicLink :: Maybe Bool
allowEgressFromLocalClassicLinkToRemoteVpc :: Maybe Bool
allowDnsResolutionFromRemoteVpc :: Maybe Bool
$sel:allowEgressFromLocalVpcToRemoteClassicLink:PeeringConnectionOptions' :: PeeringConnectionOptions -> Maybe Bool
$sel:allowEgressFromLocalClassicLinkToRemoteVpc:PeeringConnectionOptions' :: PeeringConnectionOptions -> Maybe Bool
$sel:allowDnsResolutionFromRemoteVpc:PeeringConnectionOptions' :: PeeringConnectionOptions -> Maybe Bool
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
allowDnsResolutionFromRemoteVpc
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
Maybe Bool
allowEgressFromLocalClassicLinkToRemoteVpc
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
Maybe Bool
allowEgressFromLocalVpcToRemoteClassicLink