{-# 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.DeleteVpnGateway
(
DeleteVpnGateway (..),
newDeleteVpnGateway,
deleteVpnGateway_dryRun,
deleteVpnGateway_vpnGatewayId,
DeleteVpnGatewayResponse (..),
newDeleteVpnGatewayResponse,
)
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 DeleteVpnGateway = DeleteVpnGateway'
{
DeleteVpnGateway -> Maybe Bool
dryRun :: Prelude.Maybe Prelude.Bool,
DeleteVpnGateway -> Text
vpnGatewayId :: Prelude.Text
}
deriving (DeleteVpnGateway -> DeleteVpnGateway -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteVpnGateway -> DeleteVpnGateway -> Bool
$c/= :: DeleteVpnGateway -> DeleteVpnGateway -> Bool
== :: DeleteVpnGateway -> DeleteVpnGateway -> Bool
$c== :: DeleteVpnGateway -> DeleteVpnGateway -> Bool
Prelude.Eq, ReadPrec [DeleteVpnGateway]
ReadPrec DeleteVpnGateway
Int -> ReadS DeleteVpnGateway
ReadS [DeleteVpnGateway]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteVpnGateway]
$creadListPrec :: ReadPrec [DeleteVpnGateway]
readPrec :: ReadPrec DeleteVpnGateway
$creadPrec :: ReadPrec DeleteVpnGateway
readList :: ReadS [DeleteVpnGateway]
$creadList :: ReadS [DeleteVpnGateway]
readsPrec :: Int -> ReadS DeleteVpnGateway
$creadsPrec :: Int -> ReadS DeleteVpnGateway
Prelude.Read, Int -> DeleteVpnGateway -> ShowS
[DeleteVpnGateway] -> ShowS
DeleteVpnGateway -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteVpnGateway] -> ShowS
$cshowList :: [DeleteVpnGateway] -> ShowS
show :: DeleteVpnGateway -> String
$cshow :: DeleteVpnGateway -> String
showsPrec :: Int -> DeleteVpnGateway -> ShowS
$cshowsPrec :: Int -> DeleteVpnGateway -> ShowS
Prelude.Show, forall x. Rep DeleteVpnGateway x -> DeleteVpnGateway
forall x. DeleteVpnGateway -> Rep DeleteVpnGateway x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteVpnGateway x -> DeleteVpnGateway
$cfrom :: forall x. DeleteVpnGateway -> Rep DeleteVpnGateway x
Prelude.Generic)
newDeleteVpnGateway ::
Prelude.Text ->
DeleteVpnGateway
newDeleteVpnGateway :: Text -> DeleteVpnGateway
newDeleteVpnGateway Text
pVpnGatewayId_ =
DeleteVpnGateway'
{ $sel:dryRun:DeleteVpnGateway' :: Maybe Bool
dryRun = forall a. Maybe a
Prelude.Nothing,
$sel:vpnGatewayId:DeleteVpnGateway' :: Text
vpnGatewayId = Text
pVpnGatewayId_
}
deleteVpnGateway_dryRun :: Lens.Lens' DeleteVpnGateway (Prelude.Maybe Prelude.Bool)
deleteVpnGateway_dryRun :: Lens' DeleteVpnGateway (Maybe Bool)
deleteVpnGateway_dryRun = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteVpnGateway' {Maybe Bool
dryRun :: Maybe Bool
$sel:dryRun:DeleteVpnGateway' :: DeleteVpnGateway -> Maybe Bool
dryRun} -> Maybe Bool
dryRun) (\s :: DeleteVpnGateway
s@DeleteVpnGateway' {} Maybe Bool
a -> DeleteVpnGateway
s {$sel:dryRun:DeleteVpnGateway' :: Maybe Bool
dryRun = Maybe Bool
a} :: DeleteVpnGateway)
deleteVpnGateway_vpnGatewayId :: Lens.Lens' DeleteVpnGateway Prelude.Text
deleteVpnGateway_vpnGatewayId :: Lens' DeleteVpnGateway Text
deleteVpnGateway_vpnGatewayId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteVpnGateway' {Text
vpnGatewayId :: Text
$sel:vpnGatewayId:DeleteVpnGateway' :: DeleteVpnGateway -> Text
vpnGatewayId} -> Text
vpnGatewayId) (\s :: DeleteVpnGateway
s@DeleteVpnGateway' {} Text
a -> DeleteVpnGateway
s {$sel:vpnGatewayId:DeleteVpnGateway' :: Text
vpnGatewayId = Text
a} :: DeleteVpnGateway)
instance Core.AWSRequest DeleteVpnGateway where
type
AWSResponse DeleteVpnGateway =
DeleteVpnGatewayResponse
request :: (Service -> Service)
-> DeleteVpnGateway -> Request DeleteVpnGateway
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 DeleteVpnGateway
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteVpnGateway)))
response =
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull DeleteVpnGatewayResponse
DeleteVpnGatewayResponse'
instance Prelude.Hashable DeleteVpnGateway where
hashWithSalt :: Int -> DeleteVpnGateway -> Int
hashWithSalt Int
_salt DeleteVpnGateway' {Maybe Bool
Text
vpnGatewayId :: Text
dryRun :: Maybe Bool
$sel:vpnGatewayId:DeleteVpnGateway' :: DeleteVpnGateway -> Text
$sel:dryRun:DeleteVpnGateway' :: DeleteVpnGateway -> 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
vpnGatewayId
instance Prelude.NFData DeleteVpnGateway where
rnf :: DeleteVpnGateway -> ()
rnf DeleteVpnGateway' {Maybe Bool
Text
vpnGatewayId :: Text
dryRun :: Maybe Bool
$sel:vpnGatewayId:DeleteVpnGateway' :: DeleteVpnGateway -> Text
$sel:dryRun:DeleteVpnGateway' :: DeleteVpnGateway -> 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
vpnGatewayId
instance Data.ToHeaders DeleteVpnGateway where
toHeaders :: DeleteVpnGateway -> [Header]
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath DeleteVpnGateway where
toPath :: DeleteVpnGateway -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery DeleteVpnGateway where
toQuery :: DeleteVpnGateway -> QueryString
toQuery DeleteVpnGateway' {Maybe Bool
Text
vpnGatewayId :: Text
dryRun :: Maybe Bool
$sel:vpnGatewayId:DeleteVpnGateway' :: DeleteVpnGateway -> Text
$sel:dryRun:DeleteVpnGateway' :: DeleteVpnGateway -> Maybe Bool
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"DeleteVpnGateway" :: 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
"VpnGatewayId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
vpnGatewayId
]
data DeleteVpnGatewayResponse = DeleteVpnGatewayResponse'
{
}
deriving (DeleteVpnGatewayResponse -> DeleteVpnGatewayResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteVpnGatewayResponse -> DeleteVpnGatewayResponse -> Bool
$c/= :: DeleteVpnGatewayResponse -> DeleteVpnGatewayResponse -> Bool
== :: DeleteVpnGatewayResponse -> DeleteVpnGatewayResponse -> Bool
$c== :: DeleteVpnGatewayResponse -> DeleteVpnGatewayResponse -> Bool
Prelude.Eq, ReadPrec [DeleteVpnGatewayResponse]
ReadPrec DeleteVpnGatewayResponse
Int -> ReadS DeleteVpnGatewayResponse
ReadS [DeleteVpnGatewayResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteVpnGatewayResponse]
$creadListPrec :: ReadPrec [DeleteVpnGatewayResponse]
readPrec :: ReadPrec DeleteVpnGatewayResponse
$creadPrec :: ReadPrec DeleteVpnGatewayResponse
readList :: ReadS [DeleteVpnGatewayResponse]
$creadList :: ReadS [DeleteVpnGatewayResponse]
readsPrec :: Int -> ReadS DeleteVpnGatewayResponse
$creadsPrec :: Int -> ReadS DeleteVpnGatewayResponse
Prelude.Read, Int -> DeleteVpnGatewayResponse -> ShowS
[DeleteVpnGatewayResponse] -> ShowS
DeleteVpnGatewayResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteVpnGatewayResponse] -> ShowS
$cshowList :: [DeleteVpnGatewayResponse] -> ShowS
show :: DeleteVpnGatewayResponse -> String
$cshow :: DeleteVpnGatewayResponse -> String
showsPrec :: Int -> DeleteVpnGatewayResponse -> ShowS
$cshowsPrec :: Int -> DeleteVpnGatewayResponse -> ShowS
Prelude.Show, forall x.
Rep DeleteVpnGatewayResponse x -> DeleteVpnGatewayResponse
forall x.
DeleteVpnGatewayResponse -> Rep DeleteVpnGatewayResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteVpnGatewayResponse x -> DeleteVpnGatewayResponse
$cfrom :: forall x.
DeleteVpnGatewayResponse -> Rep DeleteVpnGatewayResponse x
Prelude.Generic)
newDeleteVpnGatewayResponse ::
DeleteVpnGatewayResponse
newDeleteVpnGatewayResponse :: DeleteVpnGatewayResponse
newDeleteVpnGatewayResponse =
DeleteVpnGatewayResponse
DeleteVpnGatewayResponse'
instance Prelude.NFData DeleteVpnGatewayResponse where
rnf :: DeleteVpnGatewayResponse -> ()
rnf DeleteVpnGatewayResponse
_ = ()