{-# 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 #-}
module Amazonka.EC2.EnableVgwRoutePropagation
(
EnableVgwRoutePropagation (..),
newEnableVgwRoutePropagation,
enableVgwRoutePropagation_dryRun,
enableVgwRoutePropagation_gatewayId,
enableVgwRoutePropagation_routeTableId,
EnableVgwRoutePropagationResponse (..),
newEnableVgwRoutePropagationResponse,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EC2.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data EnableVgwRoutePropagation = EnableVgwRoutePropagation'
{
EnableVgwRoutePropagation -> Maybe Bool
dryRun :: Prelude.Maybe Prelude.Bool,
EnableVgwRoutePropagation -> Text
gatewayId :: Prelude.Text,
EnableVgwRoutePropagation -> Text
routeTableId :: Prelude.Text
}
deriving (EnableVgwRoutePropagation -> EnableVgwRoutePropagation -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EnableVgwRoutePropagation -> EnableVgwRoutePropagation -> Bool
$c/= :: EnableVgwRoutePropagation -> EnableVgwRoutePropagation -> Bool
== :: EnableVgwRoutePropagation -> EnableVgwRoutePropagation -> Bool
$c== :: EnableVgwRoutePropagation -> EnableVgwRoutePropagation -> Bool
Prelude.Eq, ReadPrec [EnableVgwRoutePropagation]
ReadPrec EnableVgwRoutePropagation
Int -> ReadS EnableVgwRoutePropagation
ReadS [EnableVgwRoutePropagation]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EnableVgwRoutePropagation]
$creadListPrec :: ReadPrec [EnableVgwRoutePropagation]
readPrec :: ReadPrec EnableVgwRoutePropagation
$creadPrec :: ReadPrec EnableVgwRoutePropagation
readList :: ReadS [EnableVgwRoutePropagation]
$creadList :: ReadS [EnableVgwRoutePropagation]
readsPrec :: Int -> ReadS EnableVgwRoutePropagation
$creadsPrec :: Int -> ReadS EnableVgwRoutePropagation
Prelude.Read, Int -> EnableVgwRoutePropagation -> ShowS
[EnableVgwRoutePropagation] -> ShowS
EnableVgwRoutePropagation -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EnableVgwRoutePropagation] -> ShowS
$cshowList :: [EnableVgwRoutePropagation] -> ShowS
show :: EnableVgwRoutePropagation -> String
$cshow :: EnableVgwRoutePropagation -> String
showsPrec :: Int -> EnableVgwRoutePropagation -> ShowS
$cshowsPrec :: Int -> EnableVgwRoutePropagation -> ShowS
Prelude.Show, forall x.
Rep EnableVgwRoutePropagation x -> EnableVgwRoutePropagation
forall x.
EnableVgwRoutePropagation -> Rep EnableVgwRoutePropagation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep EnableVgwRoutePropagation x -> EnableVgwRoutePropagation
$cfrom :: forall x.
EnableVgwRoutePropagation -> Rep EnableVgwRoutePropagation x
Prelude.Generic)
newEnableVgwRoutePropagation ::
Prelude.Text ->
Prelude.Text ->
EnableVgwRoutePropagation
newEnableVgwRoutePropagation :: Text -> Text -> EnableVgwRoutePropagation
newEnableVgwRoutePropagation
Text
pGatewayId_
Text
pRouteTableId_ =
EnableVgwRoutePropagation'
{ $sel:dryRun:EnableVgwRoutePropagation' :: Maybe Bool
dryRun =
forall a. Maybe a
Prelude.Nothing,
$sel:gatewayId:EnableVgwRoutePropagation' :: Text
gatewayId = Text
pGatewayId_,
$sel:routeTableId:EnableVgwRoutePropagation' :: Text
routeTableId = Text
pRouteTableId_
}
enableVgwRoutePropagation_dryRun :: Lens.Lens' EnableVgwRoutePropagation (Prelude.Maybe Prelude.Bool)
enableVgwRoutePropagation_dryRun :: Lens' EnableVgwRoutePropagation (Maybe Bool)
enableVgwRoutePropagation_dryRun = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnableVgwRoutePropagation' {Maybe Bool
dryRun :: Maybe Bool
$sel:dryRun:EnableVgwRoutePropagation' :: EnableVgwRoutePropagation -> Maybe Bool
dryRun} -> Maybe Bool
dryRun) (\s :: EnableVgwRoutePropagation
s@EnableVgwRoutePropagation' {} Maybe Bool
a -> EnableVgwRoutePropagation
s {$sel:dryRun:EnableVgwRoutePropagation' :: Maybe Bool
dryRun = Maybe Bool
a} :: EnableVgwRoutePropagation)
enableVgwRoutePropagation_gatewayId :: Lens.Lens' EnableVgwRoutePropagation Prelude.Text
enableVgwRoutePropagation_gatewayId :: Lens' EnableVgwRoutePropagation Text
enableVgwRoutePropagation_gatewayId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnableVgwRoutePropagation' {Text
gatewayId :: Text
$sel:gatewayId:EnableVgwRoutePropagation' :: EnableVgwRoutePropagation -> Text
gatewayId} -> Text
gatewayId) (\s :: EnableVgwRoutePropagation
s@EnableVgwRoutePropagation' {} Text
a -> EnableVgwRoutePropagation
s {$sel:gatewayId:EnableVgwRoutePropagation' :: Text
gatewayId = Text
a} :: EnableVgwRoutePropagation)
enableVgwRoutePropagation_routeTableId :: Lens.Lens' EnableVgwRoutePropagation Prelude.Text
enableVgwRoutePropagation_routeTableId :: Lens' EnableVgwRoutePropagation Text
enableVgwRoutePropagation_routeTableId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnableVgwRoutePropagation' {Text
routeTableId :: Text
$sel:routeTableId:EnableVgwRoutePropagation' :: EnableVgwRoutePropagation -> Text
routeTableId} -> Text
routeTableId) (\s :: EnableVgwRoutePropagation
s@EnableVgwRoutePropagation' {} Text
a -> EnableVgwRoutePropagation
s {$sel:routeTableId:EnableVgwRoutePropagation' :: Text
routeTableId = Text
a} :: EnableVgwRoutePropagation)
instance Core.AWSRequest EnableVgwRoutePropagation where
type
AWSResponse EnableVgwRoutePropagation =
EnableVgwRoutePropagationResponse
request :: (Service -> Service)
-> EnableVgwRoutePropagation -> Request EnableVgwRoutePropagation
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy EnableVgwRoutePropagation
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse EnableVgwRoutePropagation)))
response =
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
EnableVgwRoutePropagationResponse
EnableVgwRoutePropagationResponse'
instance Prelude.Hashable EnableVgwRoutePropagation where
hashWithSalt :: Int -> EnableVgwRoutePropagation -> Int
hashWithSalt Int
_salt EnableVgwRoutePropagation' {Maybe Bool
Text
routeTableId :: Text
gatewayId :: Text
dryRun :: Maybe Bool
$sel:routeTableId:EnableVgwRoutePropagation' :: EnableVgwRoutePropagation -> Text
$sel:gatewayId:EnableVgwRoutePropagation' :: EnableVgwRoutePropagation -> Text
$sel:dryRun:EnableVgwRoutePropagation' :: EnableVgwRoutePropagation -> Maybe Bool
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
dryRun
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
gatewayId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
routeTableId
instance Prelude.NFData EnableVgwRoutePropagation where
rnf :: EnableVgwRoutePropagation -> ()
rnf EnableVgwRoutePropagation' {Maybe Bool
Text
routeTableId :: Text
gatewayId :: Text
dryRun :: Maybe Bool
$sel:routeTableId:EnableVgwRoutePropagation' :: EnableVgwRoutePropagation -> Text
$sel:gatewayId:EnableVgwRoutePropagation' :: EnableVgwRoutePropagation -> Text
$sel:dryRun:EnableVgwRoutePropagation' :: EnableVgwRoutePropagation -> Maybe Bool
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
dryRun
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
gatewayId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
routeTableId
instance Data.ToHeaders EnableVgwRoutePropagation where
toHeaders :: EnableVgwRoutePropagation -> [Header]
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath EnableVgwRoutePropagation where
toPath :: EnableVgwRoutePropagation -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery EnableVgwRoutePropagation where
toQuery :: EnableVgwRoutePropagation -> QueryString
toQuery EnableVgwRoutePropagation' {Maybe Bool
Text
routeTableId :: Text
gatewayId :: Text
dryRun :: Maybe Bool
$sel:routeTableId:EnableVgwRoutePropagation' :: EnableVgwRoutePropagation -> Text
$sel:gatewayId:EnableVgwRoutePropagation' :: EnableVgwRoutePropagation -> Text
$sel:dryRun:EnableVgwRoutePropagation' :: EnableVgwRoutePropagation -> Maybe Bool
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"EnableVgwRoutePropagation" :: Prelude.ByteString),
ByteString
"Version"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2016-11-15" :: Prelude.ByteString),
ByteString
"DryRun" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
dryRun,
ByteString
"GatewayId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
gatewayId,
ByteString
"RouteTableId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
routeTableId
]
data EnableVgwRoutePropagationResponse = EnableVgwRoutePropagationResponse'
{
}
deriving (EnableVgwRoutePropagationResponse
-> EnableVgwRoutePropagationResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EnableVgwRoutePropagationResponse
-> EnableVgwRoutePropagationResponse -> Bool
$c/= :: EnableVgwRoutePropagationResponse
-> EnableVgwRoutePropagationResponse -> Bool
== :: EnableVgwRoutePropagationResponse
-> EnableVgwRoutePropagationResponse -> Bool
$c== :: EnableVgwRoutePropagationResponse
-> EnableVgwRoutePropagationResponse -> Bool
Prelude.Eq, ReadPrec [EnableVgwRoutePropagationResponse]
ReadPrec EnableVgwRoutePropagationResponse
Int -> ReadS EnableVgwRoutePropagationResponse
ReadS [EnableVgwRoutePropagationResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EnableVgwRoutePropagationResponse]
$creadListPrec :: ReadPrec [EnableVgwRoutePropagationResponse]
readPrec :: ReadPrec EnableVgwRoutePropagationResponse
$creadPrec :: ReadPrec EnableVgwRoutePropagationResponse
readList :: ReadS [EnableVgwRoutePropagationResponse]
$creadList :: ReadS [EnableVgwRoutePropagationResponse]
readsPrec :: Int -> ReadS EnableVgwRoutePropagationResponse
$creadsPrec :: Int -> ReadS EnableVgwRoutePropagationResponse
Prelude.Read, Int -> EnableVgwRoutePropagationResponse -> ShowS
[EnableVgwRoutePropagationResponse] -> ShowS
EnableVgwRoutePropagationResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EnableVgwRoutePropagationResponse] -> ShowS
$cshowList :: [EnableVgwRoutePropagationResponse] -> ShowS
show :: EnableVgwRoutePropagationResponse -> String
$cshow :: EnableVgwRoutePropagationResponse -> String
showsPrec :: Int -> EnableVgwRoutePropagationResponse -> ShowS
$cshowsPrec :: Int -> EnableVgwRoutePropagationResponse -> ShowS
Prelude.Show, forall x.
Rep EnableVgwRoutePropagationResponse x
-> EnableVgwRoutePropagationResponse
forall x.
EnableVgwRoutePropagationResponse
-> Rep EnableVgwRoutePropagationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep EnableVgwRoutePropagationResponse x
-> EnableVgwRoutePropagationResponse
$cfrom :: forall x.
EnableVgwRoutePropagationResponse
-> Rep EnableVgwRoutePropagationResponse x
Prelude.Generic)
newEnableVgwRoutePropagationResponse ::
EnableVgwRoutePropagationResponse
newEnableVgwRoutePropagationResponse :: EnableVgwRoutePropagationResponse
newEnableVgwRoutePropagationResponse =
EnableVgwRoutePropagationResponse
EnableVgwRoutePropagationResponse'
instance
Prelude.NFData
EnableVgwRoutePropagationResponse
where
rnf :: EnableVgwRoutePropagationResponse -> ()
rnf EnableVgwRoutePropagationResponse
_ = ()