{-# 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.DeleteClientVpnRoute
(
DeleteClientVpnRoute (..),
newDeleteClientVpnRoute,
deleteClientVpnRoute_dryRun,
deleteClientVpnRoute_targetVpcSubnetId,
deleteClientVpnRoute_clientVpnEndpointId,
deleteClientVpnRoute_destinationCidrBlock,
DeleteClientVpnRouteResponse (..),
newDeleteClientVpnRouteResponse,
deleteClientVpnRouteResponse_status,
deleteClientVpnRouteResponse_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 DeleteClientVpnRoute = DeleteClientVpnRoute'
{
DeleteClientVpnRoute -> Maybe Bool
dryRun :: Prelude.Maybe Prelude.Bool,
DeleteClientVpnRoute -> Maybe Text
targetVpcSubnetId :: Prelude.Maybe Prelude.Text,
DeleteClientVpnRoute -> Text
clientVpnEndpointId :: Prelude.Text,
DeleteClientVpnRoute -> Text
destinationCidrBlock :: Prelude.Text
}
deriving (DeleteClientVpnRoute -> DeleteClientVpnRoute -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteClientVpnRoute -> DeleteClientVpnRoute -> Bool
$c/= :: DeleteClientVpnRoute -> DeleteClientVpnRoute -> Bool
== :: DeleteClientVpnRoute -> DeleteClientVpnRoute -> Bool
$c== :: DeleteClientVpnRoute -> DeleteClientVpnRoute -> Bool
Prelude.Eq, ReadPrec [DeleteClientVpnRoute]
ReadPrec DeleteClientVpnRoute
Int -> ReadS DeleteClientVpnRoute
ReadS [DeleteClientVpnRoute]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteClientVpnRoute]
$creadListPrec :: ReadPrec [DeleteClientVpnRoute]
readPrec :: ReadPrec DeleteClientVpnRoute
$creadPrec :: ReadPrec DeleteClientVpnRoute
readList :: ReadS [DeleteClientVpnRoute]
$creadList :: ReadS [DeleteClientVpnRoute]
readsPrec :: Int -> ReadS DeleteClientVpnRoute
$creadsPrec :: Int -> ReadS DeleteClientVpnRoute
Prelude.Read, Int -> DeleteClientVpnRoute -> ShowS
[DeleteClientVpnRoute] -> ShowS
DeleteClientVpnRoute -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteClientVpnRoute] -> ShowS
$cshowList :: [DeleteClientVpnRoute] -> ShowS
show :: DeleteClientVpnRoute -> String
$cshow :: DeleteClientVpnRoute -> String
showsPrec :: Int -> DeleteClientVpnRoute -> ShowS
$cshowsPrec :: Int -> DeleteClientVpnRoute -> ShowS
Prelude.Show, forall x. Rep DeleteClientVpnRoute x -> DeleteClientVpnRoute
forall x. DeleteClientVpnRoute -> Rep DeleteClientVpnRoute x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteClientVpnRoute x -> DeleteClientVpnRoute
$cfrom :: forall x. DeleteClientVpnRoute -> Rep DeleteClientVpnRoute x
Prelude.Generic)
newDeleteClientVpnRoute ::
Prelude.Text ->
Prelude.Text ->
DeleteClientVpnRoute
newDeleteClientVpnRoute :: Text -> Text -> DeleteClientVpnRoute
newDeleteClientVpnRoute
Text
pClientVpnEndpointId_
Text
pDestinationCidrBlock_ =
DeleteClientVpnRoute'
{ $sel:dryRun:DeleteClientVpnRoute' :: Maybe Bool
dryRun = forall a. Maybe a
Prelude.Nothing,
$sel:targetVpcSubnetId:DeleteClientVpnRoute' :: Maybe Text
targetVpcSubnetId = forall a. Maybe a
Prelude.Nothing,
$sel:clientVpnEndpointId:DeleteClientVpnRoute' :: Text
clientVpnEndpointId = Text
pClientVpnEndpointId_,
$sel:destinationCidrBlock:DeleteClientVpnRoute' :: Text
destinationCidrBlock = Text
pDestinationCidrBlock_
}
deleteClientVpnRoute_dryRun :: Lens.Lens' DeleteClientVpnRoute (Prelude.Maybe Prelude.Bool)
deleteClientVpnRoute_dryRun :: Lens' DeleteClientVpnRoute (Maybe Bool)
deleteClientVpnRoute_dryRun = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteClientVpnRoute' {Maybe Bool
dryRun :: Maybe Bool
$sel:dryRun:DeleteClientVpnRoute' :: DeleteClientVpnRoute -> Maybe Bool
dryRun} -> Maybe Bool
dryRun) (\s :: DeleteClientVpnRoute
s@DeleteClientVpnRoute' {} Maybe Bool
a -> DeleteClientVpnRoute
s {$sel:dryRun:DeleteClientVpnRoute' :: Maybe Bool
dryRun = Maybe Bool
a} :: DeleteClientVpnRoute)
deleteClientVpnRoute_targetVpcSubnetId :: Lens.Lens' DeleteClientVpnRoute (Prelude.Maybe Prelude.Text)
deleteClientVpnRoute_targetVpcSubnetId :: Lens' DeleteClientVpnRoute (Maybe Text)
deleteClientVpnRoute_targetVpcSubnetId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteClientVpnRoute' {Maybe Text
targetVpcSubnetId :: Maybe Text
$sel:targetVpcSubnetId:DeleteClientVpnRoute' :: DeleteClientVpnRoute -> Maybe Text
targetVpcSubnetId} -> Maybe Text
targetVpcSubnetId) (\s :: DeleteClientVpnRoute
s@DeleteClientVpnRoute' {} Maybe Text
a -> DeleteClientVpnRoute
s {$sel:targetVpcSubnetId:DeleteClientVpnRoute' :: Maybe Text
targetVpcSubnetId = Maybe Text
a} :: DeleteClientVpnRoute)
deleteClientVpnRoute_clientVpnEndpointId :: Lens.Lens' DeleteClientVpnRoute Prelude.Text
deleteClientVpnRoute_clientVpnEndpointId :: Lens' DeleteClientVpnRoute Text
deleteClientVpnRoute_clientVpnEndpointId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteClientVpnRoute' {Text
clientVpnEndpointId :: Text
$sel:clientVpnEndpointId:DeleteClientVpnRoute' :: DeleteClientVpnRoute -> Text
clientVpnEndpointId} -> Text
clientVpnEndpointId) (\s :: DeleteClientVpnRoute
s@DeleteClientVpnRoute' {} Text
a -> DeleteClientVpnRoute
s {$sel:clientVpnEndpointId:DeleteClientVpnRoute' :: Text
clientVpnEndpointId = Text
a} :: DeleteClientVpnRoute)
deleteClientVpnRoute_destinationCidrBlock :: Lens.Lens' DeleteClientVpnRoute Prelude.Text
deleteClientVpnRoute_destinationCidrBlock :: Lens' DeleteClientVpnRoute Text
deleteClientVpnRoute_destinationCidrBlock = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteClientVpnRoute' {Text
destinationCidrBlock :: Text
$sel:destinationCidrBlock:DeleteClientVpnRoute' :: DeleteClientVpnRoute -> Text
destinationCidrBlock} -> Text
destinationCidrBlock) (\s :: DeleteClientVpnRoute
s@DeleteClientVpnRoute' {} Text
a -> DeleteClientVpnRoute
s {$sel:destinationCidrBlock:DeleteClientVpnRoute' :: Text
destinationCidrBlock = Text
a} :: DeleteClientVpnRoute)
instance Core.AWSRequest DeleteClientVpnRoute where
type
AWSResponse DeleteClientVpnRoute =
DeleteClientVpnRouteResponse
request :: (Service -> Service)
-> DeleteClientVpnRoute -> Request DeleteClientVpnRoute
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 DeleteClientVpnRoute
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteClientVpnRoute)))
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 ClientVpnRouteStatus -> Int -> DeleteClientVpnRouteResponse
DeleteClientVpnRouteResponse'
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
"status")
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 DeleteClientVpnRoute where
hashWithSalt :: Int -> DeleteClientVpnRoute -> Int
hashWithSalt Int
_salt DeleteClientVpnRoute' {Maybe Bool
Maybe Text
Text
destinationCidrBlock :: Text
clientVpnEndpointId :: Text
targetVpcSubnetId :: Maybe Text
dryRun :: Maybe Bool
$sel:destinationCidrBlock:DeleteClientVpnRoute' :: DeleteClientVpnRoute -> Text
$sel:clientVpnEndpointId:DeleteClientVpnRoute' :: DeleteClientVpnRoute -> Text
$sel:targetVpcSubnetId:DeleteClientVpnRoute' :: DeleteClientVpnRoute -> Maybe Text
$sel:dryRun:DeleteClientVpnRoute' :: DeleteClientVpnRoute -> 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` Maybe Text
targetVpcSubnetId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
clientVpnEndpointId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
destinationCidrBlock
instance Prelude.NFData DeleteClientVpnRoute where
rnf :: DeleteClientVpnRoute -> ()
rnf DeleteClientVpnRoute' {Maybe Bool
Maybe Text
Text
destinationCidrBlock :: Text
clientVpnEndpointId :: Text
targetVpcSubnetId :: Maybe Text
dryRun :: Maybe Bool
$sel:destinationCidrBlock:DeleteClientVpnRoute' :: DeleteClientVpnRoute -> Text
$sel:clientVpnEndpointId:DeleteClientVpnRoute' :: DeleteClientVpnRoute -> Text
$sel:targetVpcSubnetId:DeleteClientVpnRoute' :: DeleteClientVpnRoute -> Maybe Text
$sel:dryRun:DeleteClientVpnRoute' :: DeleteClientVpnRoute -> 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 Maybe Text
targetVpcSubnetId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
clientVpnEndpointId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
destinationCidrBlock
instance Data.ToHeaders DeleteClientVpnRoute where
toHeaders :: DeleteClientVpnRoute -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath DeleteClientVpnRoute where
toPath :: DeleteClientVpnRoute -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery DeleteClientVpnRoute where
toQuery :: DeleteClientVpnRoute -> QueryString
toQuery DeleteClientVpnRoute' {Maybe Bool
Maybe Text
Text
destinationCidrBlock :: Text
clientVpnEndpointId :: Text
targetVpcSubnetId :: Maybe Text
dryRun :: Maybe Bool
$sel:destinationCidrBlock:DeleteClientVpnRoute' :: DeleteClientVpnRoute -> Text
$sel:clientVpnEndpointId:DeleteClientVpnRoute' :: DeleteClientVpnRoute -> Text
$sel:targetVpcSubnetId:DeleteClientVpnRoute' :: DeleteClientVpnRoute -> Maybe Text
$sel:dryRun:DeleteClientVpnRoute' :: DeleteClientVpnRoute -> Maybe Bool
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"DeleteClientVpnRoute" :: 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
"TargetVpcSubnetId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
targetVpcSubnetId,
ByteString
"ClientVpnEndpointId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
clientVpnEndpointId,
ByteString
"DestinationCidrBlock" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
destinationCidrBlock
]
data DeleteClientVpnRouteResponse = DeleteClientVpnRouteResponse'
{
DeleteClientVpnRouteResponse -> Maybe ClientVpnRouteStatus
status :: Prelude.Maybe ClientVpnRouteStatus,
DeleteClientVpnRouteResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteClientVpnRouteResponse
-> DeleteClientVpnRouteResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteClientVpnRouteResponse
-> DeleteClientVpnRouteResponse -> Bool
$c/= :: DeleteClientVpnRouteResponse
-> DeleteClientVpnRouteResponse -> Bool
== :: DeleteClientVpnRouteResponse
-> DeleteClientVpnRouteResponse -> Bool
$c== :: DeleteClientVpnRouteResponse
-> DeleteClientVpnRouteResponse -> Bool
Prelude.Eq, ReadPrec [DeleteClientVpnRouteResponse]
ReadPrec DeleteClientVpnRouteResponse
Int -> ReadS DeleteClientVpnRouteResponse
ReadS [DeleteClientVpnRouteResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteClientVpnRouteResponse]
$creadListPrec :: ReadPrec [DeleteClientVpnRouteResponse]
readPrec :: ReadPrec DeleteClientVpnRouteResponse
$creadPrec :: ReadPrec DeleteClientVpnRouteResponse
readList :: ReadS [DeleteClientVpnRouteResponse]
$creadList :: ReadS [DeleteClientVpnRouteResponse]
readsPrec :: Int -> ReadS DeleteClientVpnRouteResponse
$creadsPrec :: Int -> ReadS DeleteClientVpnRouteResponse
Prelude.Read, Int -> DeleteClientVpnRouteResponse -> ShowS
[DeleteClientVpnRouteResponse] -> ShowS
DeleteClientVpnRouteResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteClientVpnRouteResponse] -> ShowS
$cshowList :: [DeleteClientVpnRouteResponse] -> ShowS
show :: DeleteClientVpnRouteResponse -> String
$cshow :: DeleteClientVpnRouteResponse -> String
showsPrec :: Int -> DeleteClientVpnRouteResponse -> ShowS
$cshowsPrec :: Int -> DeleteClientVpnRouteResponse -> ShowS
Prelude.Show, forall x.
Rep DeleteClientVpnRouteResponse x -> DeleteClientVpnRouteResponse
forall x.
DeleteClientVpnRouteResponse -> Rep DeleteClientVpnRouteResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteClientVpnRouteResponse x -> DeleteClientVpnRouteResponse
$cfrom :: forall x.
DeleteClientVpnRouteResponse -> Rep DeleteClientVpnRouteResponse x
Prelude.Generic)
newDeleteClientVpnRouteResponse ::
Prelude.Int ->
DeleteClientVpnRouteResponse
newDeleteClientVpnRouteResponse :: Int -> DeleteClientVpnRouteResponse
newDeleteClientVpnRouteResponse Int
pHttpStatus_ =
DeleteClientVpnRouteResponse'
{ $sel:status:DeleteClientVpnRouteResponse' :: Maybe ClientVpnRouteStatus
status =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DeleteClientVpnRouteResponse' :: Int
httpStatus = Int
pHttpStatus_
}
deleteClientVpnRouteResponse_status :: Lens.Lens' DeleteClientVpnRouteResponse (Prelude.Maybe ClientVpnRouteStatus)
deleteClientVpnRouteResponse_status :: Lens' DeleteClientVpnRouteResponse (Maybe ClientVpnRouteStatus)
deleteClientVpnRouteResponse_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteClientVpnRouteResponse' {Maybe ClientVpnRouteStatus
status :: Maybe ClientVpnRouteStatus
$sel:status:DeleteClientVpnRouteResponse' :: DeleteClientVpnRouteResponse -> Maybe ClientVpnRouteStatus
status} -> Maybe ClientVpnRouteStatus
status) (\s :: DeleteClientVpnRouteResponse
s@DeleteClientVpnRouteResponse' {} Maybe ClientVpnRouteStatus
a -> DeleteClientVpnRouteResponse
s {$sel:status:DeleteClientVpnRouteResponse' :: Maybe ClientVpnRouteStatus
status = Maybe ClientVpnRouteStatus
a} :: DeleteClientVpnRouteResponse)
deleteClientVpnRouteResponse_httpStatus :: Lens.Lens' DeleteClientVpnRouteResponse Prelude.Int
deleteClientVpnRouteResponse_httpStatus :: Lens' DeleteClientVpnRouteResponse Int
deleteClientVpnRouteResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteClientVpnRouteResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteClientVpnRouteResponse' :: DeleteClientVpnRouteResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteClientVpnRouteResponse
s@DeleteClientVpnRouteResponse' {} Int
a -> DeleteClientVpnRouteResponse
s {$sel:httpStatus:DeleteClientVpnRouteResponse' :: Int
httpStatus = Int
a} :: DeleteClientVpnRouteResponse)
instance Prelude.NFData DeleteClientVpnRouteResponse where
rnf :: DeleteClientVpnRouteResponse -> ()
rnf DeleteClientVpnRouteResponse' {Int
Maybe ClientVpnRouteStatus
httpStatus :: Int
status :: Maybe ClientVpnRouteStatus
$sel:httpStatus:DeleteClientVpnRouteResponse' :: DeleteClientVpnRouteResponse -> Int
$sel:status:DeleteClientVpnRouteResponse' :: DeleteClientVpnRouteResponse -> Maybe ClientVpnRouteStatus
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe ClientVpnRouteStatus
status
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus