{-# 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.AppMesh.DeleteVirtualGateway
(
DeleteVirtualGateway (..),
newDeleteVirtualGateway,
deleteVirtualGateway_meshOwner,
deleteVirtualGateway_meshName,
deleteVirtualGateway_virtualGatewayName,
DeleteVirtualGatewayResponse (..),
newDeleteVirtualGatewayResponse,
deleteVirtualGatewayResponse_httpStatus,
deleteVirtualGatewayResponse_virtualGateway,
)
where
import Amazonka.AppMesh.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DeleteVirtualGateway = DeleteVirtualGateway'
{
DeleteVirtualGateway -> Maybe Text
meshOwner :: Prelude.Maybe Prelude.Text,
DeleteVirtualGateway -> Text
meshName :: Prelude.Text,
DeleteVirtualGateway -> Text
virtualGatewayName :: Prelude.Text
}
deriving (DeleteVirtualGateway -> DeleteVirtualGateway -> Bool
(DeleteVirtualGateway -> DeleteVirtualGateway -> Bool)
-> (DeleteVirtualGateway -> DeleteVirtualGateway -> Bool)
-> Eq DeleteVirtualGateway
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteVirtualGateway -> DeleteVirtualGateway -> Bool
$c/= :: DeleteVirtualGateway -> DeleteVirtualGateway -> Bool
== :: DeleteVirtualGateway -> DeleteVirtualGateway -> Bool
$c== :: DeleteVirtualGateway -> DeleteVirtualGateway -> Bool
Prelude.Eq, ReadPrec [DeleteVirtualGateway]
ReadPrec DeleteVirtualGateway
Int -> ReadS DeleteVirtualGateway
ReadS [DeleteVirtualGateway]
(Int -> ReadS DeleteVirtualGateway)
-> ReadS [DeleteVirtualGateway]
-> ReadPrec DeleteVirtualGateway
-> ReadPrec [DeleteVirtualGateway]
-> Read DeleteVirtualGateway
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteVirtualGateway]
$creadListPrec :: ReadPrec [DeleteVirtualGateway]
readPrec :: ReadPrec DeleteVirtualGateway
$creadPrec :: ReadPrec DeleteVirtualGateway
readList :: ReadS [DeleteVirtualGateway]
$creadList :: ReadS [DeleteVirtualGateway]
readsPrec :: Int -> ReadS DeleteVirtualGateway
$creadsPrec :: Int -> ReadS DeleteVirtualGateway
Prelude.Read, Int -> DeleteVirtualGateway -> ShowS
[DeleteVirtualGateway] -> ShowS
DeleteVirtualGateway -> String
(Int -> DeleteVirtualGateway -> ShowS)
-> (DeleteVirtualGateway -> String)
-> ([DeleteVirtualGateway] -> ShowS)
-> Show DeleteVirtualGateway
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteVirtualGateway] -> ShowS
$cshowList :: [DeleteVirtualGateway] -> ShowS
show :: DeleteVirtualGateway -> String
$cshow :: DeleteVirtualGateway -> String
showsPrec :: Int -> DeleteVirtualGateway -> ShowS
$cshowsPrec :: Int -> DeleteVirtualGateway -> ShowS
Prelude.Show, (forall x. DeleteVirtualGateway -> Rep DeleteVirtualGateway x)
-> (forall x. Rep DeleteVirtualGateway x -> DeleteVirtualGateway)
-> Generic DeleteVirtualGateway
forall x. Rep DeleteVirtualGateway x -> DeleteVirtualGateway
forall x. DeleteVirtualGateway -> Rep DeleteVirtualGateway x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteVirtualGateway x -> DeleteVirtualGateway
$cfrom :: forall x. DeleteVirtualGateway -> Rep DeleteVirtualGateway x
Prelude.Generic)
newDeleteVirtualGateway ::
Prelude.Text ->
Prelude.Text ->
DeleteVirtualGateway
newDeleteVirtualGateway :: Text -> Text -> DeleteVirtualGateway
newDeleteVirtualGateway
Text
pMeshName_
Text
pVirtualGatewayName_ =
DeleteVirtualGateway' :: Maybe Text -> Text -> Text -> DeleteVirtualGateway
DeleteVirtualGateway'
{ $sel:meshOwner:DeleteVirtualGateway' :: Maybe Text
meshOwner = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:meshName:DeleteVirtualGateway' :: Text
meshName = Text
pMeshName_,
$sel:virtualGatewayName:DeleteVirtualGateway' :: Text
virtualGatewayName = Text
pVirtualGatewayName_
}
deleteVirtualGateway_meshOwner :: Lens.Lens' DeleteVirtualGateway (Prelude.Maybe Prelude.Text)
deleteVirtualGateway_meshOwner :: (Maybe Text -> f (Maybe Text))
-> DeleteVirtualGateway -> f DeleteVirtualGateway
deleteVirtualGateway_meshOwner = (DeleteVirtualGateway -> Maybe Text)
-> (DeleteVirtualGateway -> Maybe Text -> DeleteVirtualGateway)
-> Lens
DeleteVirtualGateway DeleteVirtualGateway (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteVirtualGateway' {Maybe Text
meshOwner :: Maybe Text
$sel:meshOwner:DeleteVirtualGateway' :: DeleteVirtualGateway -> Maybe Text
meshOwner} -> Maybe Text
meshOwner) (\s :: DeleteVirtualGateway
s@DeleteVirtualGateway' {} Maybe Text
a -> DeleteVirtualGateway
s {$sel:meshOwner:DeleteVirtualGateway' :: Maybe Text
meshOwner = Maybe Text
a} :: DeleteVirtualGateway)
deleteVirtualGateway_meshName :: Lens.Lens' DeleteVirtualGateway Prelude.Text
deleteVirtualGateway_meshName :: (Text -> f Text) -> DeleteVirtualGateway -> f DeleteVirtualGateway
deleteVirtualGateway_meshName = (DeleteVirtualGateway -> Text)
-> (DeleteVirtualGateway -> Text -> DeleteVirtualGateway)
-> Lens DeleteVirtualGateway DeleteVirtualGateway Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteVirtualGateway' {Text
meshName :: Text
$sel:meshName:DeleteVirtualGateway' :: DeleteVirtualGateway -> Text
meshName} -> Text
meshName) (\s :: DeleteVirtualGateway
s@DeleteVirtualGateway' {} Text
a -> DeleteVirtualGateway
s {$sel:meshName:DeleteVirtualGateway' :: Text
meshName = Text
a} :: DeleteVirtualGateway)
deleteVirtualGateway_virtualGatewayName :: Lens.Lens' DeleteVirtualGateway Prelude.Text
deleteVirtualGateway_virtualGatewayName :: (Text -> f Text) -> DeleteVirtualGateway -> f DeleteVirtualGateway
deleteVirtualGateway_virtualGatewayName = (DeleteVirtualGateway -> Text)
-> (DeleteVirtualGateway -> Text -> DeleteVirtualGateway)
-> Lens DeleteVirtualGateway DeleteVirtualGateway Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteVirtualGateway' {Text
virtualGatewayName :: Text
$sel:virtualGatewayName:DeleteVirtualGateway' :: DeleteVirtualGateway -> Text
virtualGatewayName} -> Text
virtualGatewayName) (\s :: DeleteVirtualGateway
s@DeleteVirtualGateway' {} Text
a -> DeleteVirtualGateway
s {$sel:virtualGatewayName:DeleteVirtualGateway' :: Text
virtualGatewayName = Text
a} :: DeleteVirtualGateway)
instance Core.AWSRequest DeleteVirtualGateway where
type
AWSResponse DeleteVirtualGateway =
DeleteVirtualGatewayResponse
request :: DeleteVirtualGateway -> Request DeleteVirtualGateway
request = Service -> DeleteVirtualGateway -> Request DeleteVirtualGateway
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteVirtualGateway
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteVirtualGateway)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DeleteVirtualGateway))
-> Logger
-> Service
-> Proxy DeleteVirtualGateway
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteVirtualGateway)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Int -> VirtualGatewayData -> DeleteVirtualGatewayResponse
DeleteVirtualGatewayResponse'
(Int -> VirtualGatewayData -> DeleteVirtualGatewayResponse)
-> Either String Int
-> Either
String (VirtualGatewayData -> DeleteVirtualGatewayResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
Either String (VirtualGatewayData -> DeleteVirtualGatewayResponse)
-> Either String VirtualGatewayData
-> Either String DeleteVirtualGatewayResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object -> Either String VirtualGatewayData
forall a. FromJSON a => Object -> Either String a
Core.eitherParseJSON Object
x)
)
instance Prelude.Hashable DeleteVirtualGateway
instance Prelude.NFData DeleteVirtualGateway
instance Core.ToHeaders DeleteVirtualGateway where
toHeaders :: DeleteVirtualGateway -> ResponseHeaders
toHeaders =
ResponseHeaders -> DeleteVirtualGateway -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToPath DeleteVirtualGateway where
toPath :: DeleteVirtualGateway -> ByteString
toPath DeleteVirtualGateway' {Maybe Text
Text
virtualGatewayName :: Text
meshName :: Text
meshOwner :: Maybe Text
$sel:virtualGatewayName:DeleteVirtualGateway' :: DeleteVirtualGateway -> Text
$sel:meshName:DeleteVirtualGateway' :: DeleteVirtualGateway -> Text
$sel:meshOwner:DeleteVirtualGateway' :: DeleteVirtualGateway -> Maybe Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/v20190125/meshes/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
meshName,
ByteString
"/virtualGateways/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
virtualGatewayName
]
instance Core.ToQuery DeleteVirtualGateway where
toQuery :: DeleteVirtualGateway -> QueryString
toQuery DeleteVirtualGateway' {Maybe Text
Text
virtualGatewayName :: Text
meshName :: Text
meshOwner :: Maybe Text
$sel:virtualGatewayName:DeleteVirtualGateway' :: DeleteVirtualGateway -> Text
$sel:meshName:DeleteVirtualGateway' :: DeleteVirtualGateway -> Text
$sel:meshOwner:DeleteVirtualGateway' :: DeleteVirtualGateway -> Maybe Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"meshOwner" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
meshOwner]
data DeleteVirtualGatewayResponse = DeleteVirtualGatewayResponse'
{
DeleteVirtualGatewayResponse -> Int
httpStatus :: Prelude.Int,
DeleteVirtualGatewayResponse -> VirtualGatewayData
virtualGateway :: VirtualGatewayData
}
deriving (DeleteVirtualGatewayResponse
-> DeleteVirtualGatewayResponse -> Bool
(DeleteVirtualGatewayResponse
-> DeleteVirtualGatewayResponse -> Bool)
-> (DeleteVirtualGatewayResponse
-> DeleteVirtualGatewayResponse -> Bool)
-> Eq DeleteVirtualGatewayResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteVirtualGatewayResponse
-> DeleteVirtualGatewayResponse -> Bool
$c/= :: DeleteVirtualGatewayResponse
-> DeleteVirtualGatewayResponse -> Bool
== :: DeleteVirtualGatewayResponse
-> DeleteVirtualGatewayResponse -> Bool
$c== :: DeleteVirtualGatewayResponse
-> DeleteVirtualGatewayResponse -> Bool
Prelude.Eq, ReadPrec [DeleteVirtualGatewayResponse]
ReadPrec DeleteVirtualGatewayResponse
Int -> ReadS DeleteVirtualGatewayResponse
ReadS [DeleteVirtualGatewayResponse]
(Int -> ReadS DeleteVirtualGatewayResponse)
-> ReadS [DeleteVirtualGatewayResponse]
-> ReadPrec DeleteVirtualGatewayResponse
-> ReadPrec [DeleteVirtualGatewayResponse]
-> Read DeleteVirtualGatewayResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteVirtualGatewayResponse]
$creadListPrec :: ReadPrec [DeleteVirtualGatewayResponse]
readPrec :: ReadPrec DeleteVirtualGatewayResponse
$creadPrec :: ReadPrec DeleteVirtualGatewayResponse
readList :: ReadS [DeleteVirtualGatewayResponse]
$creadList :: ReadS [DeleteVirtualGatewayResponse]
readsPrec :: Int -> ReadS DeleteVirtualGatewayResponse
$creadsPrec :: Int -> ReadS DeleteVirtualGatewayResponse
Prelude.Read, Int -> DeleteVirtualGatewayResponse -> ShowS
[DeleteVirtualGatewayResponse] -> ShowS
DeleteVirtualGatewayResponse -> String
(Int -> DeleteVirtualGatewayResponse -> ShowS)
-> (DeleteVirtualGatewayResponse -> String)
-> ([DeleteVirtualGatewayResponse] -> ShowS)
-> Show DeleteVirtualGatewayResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteVirtualGatewayResponse] -> ShowS
$cshowList :: [DeleteVirtualGatewayResponse] -> ShowS
show :: DeleteVirtualGatewayResponse -> String
$cshow :: DeleteVirtualGatewayResponse -> String
showsPrec :: Int -> DeleteVirtualGatewayResponse -> ShowS
$cshowsPrec :: Int -> DeleteVirtualGatewayResponse -> ShowS
Prelude.Show, (forall x.
DeleteVirtualGatewayResponse -> Rep DeleteVirtualGatewayResponse x)
-> (forall x.
Rep DeleteVirtualGatewayResponse x -> DeleteVirtualGatewayResponse)
-> Generic DeleteVirtualGatewayResponse
forall x.
Rep DeleteVirtualGatewayResponse x -> DeleteVirtualGatewayResponse
forall x.
DeleteVirtualGatewayResponse -> Rep DeleteVirtualGatewayResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteVirtualGatewayResponse x -> DeleteVirtualGatewayResponse
$cfrom :: forall x.
DeleteVirtualGatewayResponse -> Rep DeleteVirtualGatewayResponse x
Prelude.Generic)
newDeleteVirtualGatewayResponse ::
Prelude.Int ->
VirtualGatewayData ->
DeleteVirtualGatewayResponse
newDeleteVirtualGatewayResponse :: Int -> VirtualGatewayData -> DeleteVirtualGatewayResponse
newDeleteVirtualGatewayResponse
Int
pHttpStatus_
VirtualGatewayData
pVirtualGateway_ =
DeleteVirtualGatewayResponse' :: Int -> VirtualGatewayData -> DeleteVirtualGatewayResponse
DeleteVirtualGatewayResponse'
{ $sel:httpStatus:DeleteVirtualGatewayResponse' :: Int
httpStatus =
Int
pHttpStatus_,
$sel:virtualGateway:DeleteVirtualGatewayResponse' :: VirtualGatewayData
virtualGateway = VirtualGatewayData
pVirtualGateway_
}
deleteVirtualGatewayResponse_httpStatus :: Lens.Lens' DeleteVirtualGatewayResponse Prelude.Int
deleteVirtualGatewayResponse_httpStatus :: (Int -> f Int)
-> DeleteVirtualGatewayResponse -> f DeleteVirtualGatewayResponse
deleteVirtualGatewayResponse_httpStatus = (DeleteVirtualGatewayResponse -> Int)
-> (DeleteVirtualGatewayResponse
-> Int -> DeleteVirtualGatewayResponse)
-> Lens
DeleteVirtualGatewayResponse DeleteVirtualGatewayResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteVirtualGatewayResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteVirtualGatewayResponse' :: DeleteVirtualGatewayResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteVirtualGatewayResponse
s@DeleteVirtualGatewayResponse' {} Int
a -> DeleteVirtualGatewayResponse
s {$sel:httpStatus:DeleteVirtualGatewayResponse' :: Int
httpStatus = Int
a} :: DeleteVirtualGatewayResponse)
deleteVirtualGatewayResponse_virtualGateway :: Lens.Lens' DeleteVirtualGatewayResponse VirtualGatewayData
deleteVirtualGatewayResponse_virtualGateway :: (VirtualGatewayData -> f VirtualGatewayData)
-> DeleteVirtualGatewayResponse -> f DeleteVirtualGatewayResponse
deleteVirtualGatewayResponse_virtualGateway = (DeleteVirtualGatewayResponse -> VirtualGatewayData)
-> (DeleteVirtualGatewayResponse
-> VirtualGatewayData -> DeleteVirtualGatewayResponse)
-> Lens
DeleteVirtualGatewayResponse
DeleteVirtualGatewayResponse
VirtualGatewayData
VirtualGatewayData
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteVirtualGatewayResponse' {VirtualGatewayData
virtualGateway :: VirtualGatewayData
$sel:virtualGateway:DeleteVirtualGatewayResponse' :: DeleteVirtualGatewayResponse -> VirtualGatewayData
virtualGateway} -> VirtualGatewayData
virtualGateway) (\s :: DeleteVirtualGatewayResponse
s@DeleteVirtualGatewayResponse' {} VirtualGatewayData
a -> DeleteVirtualGatewayResponse
s {$sel:virtualGateway:DeleteVirtualGatewayResponse' :: VirtualGatewayData
virtualGateway = VirtualGatewayData
a} :: DeleteVirtualGatewayResponse)
instance Prelude.NFData DeleteVirtualGatewayResponse