{-# 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.DeleteLocalGatewayRouteTable
(
DeleteLocalGatewayRouteTable (..),
newDeleteLocalGatewayRouteTable,
deleteLocalGatewayRouteTable_dryRun,
deleteLocalGatewayRouteTable_localGatewayRouteTableId,
DeleteLocalGatewayRouteTableResponse (..),
newDeleteLocalGatewayRouteTableResponse,
deleteLocalGatewayRouteTableResponse_localGatewayRouteTable,
deleteLocalGatewayRouteTableResponse_httpStatus,
)
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 DeleteLocalGatewayRouteTable = DeleteLocalGatewayRouteTable'
{
DeleteLocalGatewayRouteTable -> Maybe Bool
dryRun :: Prelude.Maybe Prelude.Bool,
DeleteLocalGatewayRouteTable -> Text
localGatewayRouteTableId :: Prelude.Text
}
deriving (DeleteLocalGatewayRouteTable
-> DeleteLocalGatewayRouteTable -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteLocalGatewayRouteTable
-> DeleteLocalGatewayRouteTable -> Bool
$c/= :: DeleteLocalGatewayRouteTable
-> DeleteLocalGatewayRouteTable -> Bool
== :: DeleteLocalGatewayRouteTable
-> DeleteLocalGatewayRouteTable -> Bool
$c== :: DeleteLocalGatewayRouteTable
-> DeleteLocalGatewayRouteTable -> Bool
Prelude.Eq, ReadPrec [DeleteLocalGatewayRouteTable]
ReadPrec DeleteLocalGatewayRouteTable
Int -> ReadS DeleteLocalGatewayRouteTable
ReadS [DeleteLocalGatewayRouteTable]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteLocalGatewayRouteTable]
$creadListPrec :: ReadPrec [DeleteLocalGatewayRouteTable]
readPrec :: ReadPrec DeleteLocalGatewayRouteTable
$creadPrec :: ReadPrec DeleteLocalGatewayRouteTable
readList :: ReadS [DeleteLocalGatewayRouteTable]
$creadList :: ReadS [DeleteLocalGatewayRouteTable]
readsPrec :: Int -> ReadS DeleteLocalGatewayRouteTable
$creadsPrec :: Int -> ReadS DeleteLocalGatewayRouteTable
Prelude.Read, Int -> DeleteLocalGatewayRouteTable -> ShowS
[DeleteLocalGatewayRouteTable] -> ShowS
DeleteLocalGatewayRouteTable -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteLocalGatewayRouteTable] -> ShowS
$cshowList :: [DeleteLocalGatewayRouteTable] -> ShowS
show :: DeleteLocalGatewayRouteTable -> String
$cshow :: DeleteLocalGatewayRouteTable -> String
showsPrec :: Int -> DeleteLocalGatewayRouteTable -> ShowS
$cshowsPrec :: Int -> DeleteLocalGatewayRouteTable -> ShowS
Prelude.Show, forall x.
Rep DeleteLocalGatewayRouteTable x -> DeleteLocalGatewayRouteTable
forall x.
DeleteLocalGatewayRouteTable -> Rep DeleteLocalGatewayRouteTable x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteLocalGatewayRouteTable x -> DeleteLocalGatewayRouteTable
$cfrom :: forall x.
DeleteLocalGatewayRouteTable -> Rep DeleteLocalGatewayRouteTable x
Prelude.Generic)
newDeleteLocalGatewayRouteTable ::
Prelude.Text ->
DeleteLocalGatewayRouteTable
newDeleteLocalGatewayRouteTable :: Text -> DeleteLocalGatewayRouteTable
newDeleteLocalGatewayRouteTable
Text
pLocalGatewayRouteTableId_ =
DeleteLocalGatewayRouteTable'
{ $sel:dryRun:DeleteLocalGatewayRouteTable' :: Maybe Bool
dryRun =
forall a. Maybe a
Prelude.Nothing,
$sel:localGatewayRouteTableId:DeleteLocalGatewayRouteTable' :: Text
localGatewayRouteTableId =
Text
pLocalGatewayRouteTableId_
}
deleteLocalGatewayRouteTable_dryRun :: Lens.Lens' DeleteLocalGatewayRouteTable (Prelude.Maybe Prelude.Bool)
deleteLocalGatewayRouteTable_dryRun :: Lens' DeleteLocalGatewayRouteTable (Maybe Bool)
deleteLocalGatewayRouteTable_dryRun = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteLocalGatewayRouteTable' {Maybe Bool
dryRun :: Maybe Bool
$sel:dryRun:DeleteLocalGatewayRouteTable' :: DeleteLocalGatewayRouteTable -> Maybe Bool
dryRun} -> Maybe Bool
dryRun) (\s :: DeleteLocalGatewayRouteTable
s@DeleteLocalGatewayRouteTable' {} Maybe Bool
a -> DeleteLocalGatewayRouteTable
s {$sel:dryRun:DeleteLocalGatewayRouteTable' :: Maybe Bool
dryRun = Maybe Bool
a} :: DeleteLocalGatewayRouteTable)
deleteLocalGatewayRouteTable_localGatewayRouteTableId :: Lens.Lens' DeleteLocalGatewayRouteTable Prelude.Text
deleteLocalGatewayRouteTable_localGatewayRouteTableId :: Lens' DeleteLocalGatewayRouteTable Text
deleteLocalGatewayRouteTable_localGatewayRouteTableId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteLocalGatewayRouteTable' {Text
localGatewayRouteTableId :: Text
$sel:localGatewayRouteTableId:DeleteLocalGatewayRouteTable' :: DeleteLocalGatewayRouteTable -> Text
localGatewayRouteTableId} -> Text
localGatewayRouteTableId) (\s :: DeleteLocalGatewayRouteTable
s@DeleteLocalGatewayRouteTable' {} Text
a -> DeleteLocalGatewayRouteTable
s {$sel:localGatewayRouteTableId:DeleteLocalGatewayRouteTable' :: Text
localGatewayRouteTableId = Text
a} :: DeleteLocalGatewayRouteTable)
instance Core.AWSRequest DeleteLocalGatewayRouteTable where
type
AWSResponse DeleteLocalGatewayRouteTable =
DeleteLocalGatewayRouteTableResponse
request :: (Service -> Service)
-> DeleteLocalGatewayRouteTable
-> Request DeleteLocalGatewayRouteTable
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 DeleteLocalGatewayRouteTable
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteLocalGatewayRouteTable)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXML
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe LocalGatewayRouteTable
-> Int -> DeleteLocalGatewayRouteTableResponse
DeleteLocalGatewayRouteTableResponse'
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
"localGatewayRouteTable")
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
DeleteLocalGatewayRouteTable
where
hashWithSalt :: Int -> DeleteLocalGatewayRouteTable -> Int
hashWithSalt Int
_salt DeleteLocalGatewayRouteTable' {Maybe Bool
Text
localGatewayRouteTableId :: Text
dryRun :: Maybe Bool
$sel:localGatewayRouteTableId:DeleteLocalGatewayRouteTable' :: DeleteLocalGatewayRouteTable -> Text
$sel:dryRun:DeleteLocalGatewayRouteTable' :: DeleteLocalGatewayRouteTable -> 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
localGatewayRouteTableId
instance Prelude.NFData DeleteLocalGatewayRouteTable where
rnf :: DeleteLocalGatewayRouteTable -> ()
rnf DeleteLocalGatewayRouteTable' {Maybe Bool
Text
localGatewayRouteTableId :: Text
dryRun :: Maybe Bool
$sel:localGatewayRouteTableId:DeleteLocalGatewayRouteTable' :: DeleteLocalGatewayRouteTable -> Text
$sel:dryRun:DeleteLocalGatewayRouteTable' :: DeleteLocalGatewayRouteTable -> 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
localGatewayRouteTableId
instance Data.ToHeaders DeleteLocalGatewayRouteTable where
toHeaders :: DeleteLocalGatewayRouteTable -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath DeleteLocalGatewayRouteTable where
toPath :: DeleteLocalGatewayRouteTable -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery DeleteLocalGatewayRouteTable where
toQuery :: DeleteLocalGatewayRouteTable -> QueryString
toQuery DeleteLocalGatewayRouteTable' {Maybe Bool
Text
localGatewayRouteTableId :: Text
dryRun :: Maybe Bool
$sel:localGatewayRouteTableId:DeleteLocalGatewayRouteTable' :: DeleteLocalGatewayRouteTable -> Text
$sel:dryRun:DeleteLocalGatewayRouteTable' :: DeleteLocalGatewayRouteTable -> Maybe Bool
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: ( ByteString
"DeleteLocalGatewayRouteTable" ::
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
"LocalGatewayRouteTableId"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
localGatewayRouteTableId
]
data DeleteLocalGatewayRouteTableResponse = DeleteLocalGatewayRouteTableResponse'
{
DeleteLocalGatewayRouteTableResponse
-> Maybe LocalGatewayRouteTable
localGatewayRouteTable :: Prelude.Maybe LocalGatewayRouteTable,
DeleteLocalGatewayRouteTableResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteLocalGatewayRouteTableResponse
-> DeleteLocalGatewayRouteTableResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteLocalGatewayRouteTableResponse
-> DeleteLocalGatewayRouteTableResponse -> Bool
$c/= :: DeleteLocalGatewayRouteTableResponse
-> DeleteLocalGatewayRouteTableResponse -> Bool
== :: DeleteLocalGatewayRouteTableResponse
-> DeleteLocalGatewayRouteTableResponse -> Bool
$c== :: DeleteLocalGatewayRouteTableResponse
-> DeleteLocalGatewayRouteTableResponse -> Bool
Prelude.Eq, ReadPrec [DeleteLocalGatewayRouteTableResponse]
ReadPrec DeleteLocalGatewayRouteTableResponse
Int -> ReadS DeleteLocalGatewayRouteTableResponse
ReadS [DeleteLocalGatewayRouteTableResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteLocalGatewayRouteTableResponse]
$creadListPrec :: ReadPrec [DeleteLocalGatewayRouteTableResponse]
readPrec :: ReadPrec DeleteLocalGatewayRouteTableResponse
$creadPrec :: ReadPrec DeleteLocalGatewayRouteTableResponse
readList :: ReadS [DeleteLocalGatewayRouteTableResponse]
$creadList :: ReadS [DeleteLocalGatewayRouteTableResponse]
readsPrec :: Int -> ReadS DeleteLocalGatewayRouteTableResponse
$creadsPrec :: Int -> ReadS DeleteLocalGatewayRouteTableResponse
Prelude.Read, Int -> DeleteLocalGatewayRouteTableResponse -> ShowS
[DeleteLocalGatewayRouteTableResponse] -> ShowS
DeleteLocalGatewayRouteTableResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteLocalGatewayRouteTableResponse] -> ShowS
$cshowList :: [DeleteLocalGatewayRouteTableResponse] -> ShowS
show :: DeleteLocalGatewayRouteTableResponse -> String
$cshow :: DeleteLocalGatewayRouteTableResponse -> String
showsPrec :: Int -> DeleteLocalGatewayRouteTableResponse -> ShowS
$cshowsPrec :: Int -> DeleteLocalGatewayRouteTableResponse -> ShowS
Prelude.Show, forall x.
Rep DeleteLocalGatewayRouteTableResponse x
-> DeleteLocalGatewayRouteTableResponse
forall x.
DeleteLocalGatewayRouteTableResponse
-> Rep DeleteLocalGatewayRouteTableResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteLocalGatewayRouteTableResponse x
-> DeleteLocalGatewayRouteTableResponse
$cfrom :: forall x.
DeleteLocalGatewayRouteTableResponse
-> Rep DeleteLocalGatewayRouteTableResponse x
Prelude.Generic)
newDeleteLocalGatewayRouteTableResponse ::
Prelude.Int ->
DeleteLocalGatewayRouteTableResponse
newDeleteLocalGatewayRouteTableResponse :: Int -> DeleteLocalGatewayRouteTableResponse
newDeleteLocalGatewayRouteTableResponse Int
pHttpStatus_ =
DeleteLocalGatewayRouteTableResponse'
{ $sel:localGatewayRouteTable:DeleteLocalGatewayRouteTableResponse' :: Maybe LocalGatewayRouteTable
localGatewayRouteTable =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DeleteLocalGatewayRouteTableResponse' :: Int
httpStatus = Int
pHttpStatus_
}
deleteLocalGatewayRouteTableResponse_localGatewayRouteTable :: Lens.Lens' DeleteLocalGatewayRouteTableResponse (Prelude.Maybe LocalGatewayRouteTable)
deleteLocalGatewayRouteTableResponse_localGatewayRouteTable :: Lens'
DeleteLocalGatewayRouteTableResponse (Maybe LocalGatewayRouteTable)
deleteLocalGatewayRouteTableResponse_localGatewayRouteTable = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteLocalGatewayRouteTableResponse' {Maybe LocalGatewayRouteTable
localGatewayRouteTable :: Maybe LocalGatewayRouteTable
$sel:localGatewayRouteTable:DeleteLocalGatewayRouteTableResponse' :: DeleteLocalGatewayRouteTableResponse
-> Maybe LocalGatewayRouteTable
localGatewayRouteTable} -> Maybe LocalGatewayRouteTable
localGatewayRouteTable) (\s :: DeleteLocalGatewayRouteTableResponse
s@DeleteLocalGatewayRouteTableResponse' {} Maybe LocalGatewayRouteTable
a -> DeleteLocalGatewayRouteTableResponse
s {$sel:localGatewayRouteTable:DeleteLocalGatewayRouteTableResponse' :: Maybe LocalGatewayRouteTable
localGatewayRouteTable = Maybe LocalGatewayRouteTable
a} :: DeleteLocalGatewayRouteTableResponse)
deleteLocalGatewayRouteTableResponse_httpStatus :: Lens.Lens' DeleteLocalGatewayRouteTableResponse Prelude.Int
deleteLocalGatewayRouteTableResponse_httpStatus :: Lens' DeleteLocalGatewayRouteTableResponse Int
deleteLocalGatewayRouteTableResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteLocalGatewayRouteTableResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteLocalGatewayRouteTableResponse' :: DeleteLocalGatewayRouteTableResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteLocalGatewayRouteTableResponse
s@DeleteLocalGatewayRouteTableResponse' {} Int
a -> DeleteLocalGatewayRouteTableResponse
s {$sel:httpStatus:DeleteLocalGatewayRouteTableResponse' :: Int
httpStatus = Int
a} :: DeleteLocalGatewayRouteTableResponse)
instance
Prelude.NFData
DeleteLocalGatewayRouteTableResponse
where
rnf :: DeleteLocalGatewayRouteTableResponse -> ()
rnf DeleteLocalGatewayRouteTableResponse' {Int
Maybe LocalGatewayRouteTable
httpStatus :: Int
localGatewayRouteTable :: Maybe LocalGatewayRouteTable
$sel:httpStatus:DeleteLocalGatewayRouteTableResponse' :: DeleteLocalGatewayRouteTableResponse -> Int
$sel:localGatewayRouteTable:DeleteLocalGatewayRouteTableResponse' :: DeleteLocalGatewayRouteTableResponse
-> Maybe LocalGatewayRouteTable
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe LocalGatewayRouteTable
localGatewayRouteTable
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus