{-# 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.GlobalAccelerator.DeleteAccelerator
(
DeleteAccelerator (..),
newDeleteAccelerator,
deleteAccelerator_acceleratorArn,
DeleteAcceleratorResponse (..),
newDeleteAcceleratorResponse,
)
where
import qualified Amazonka.Core as Core
import Amazonka.GlobalAccelerator.Types
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 DeleteAccelerator = DeleteAccelerator'
{
DeleteAccelerator -> Text
acceleratorArn :: Prelude.Text
}
deriving (DeleteAccelerator -> DeleteAccelerator -> Bool
(DeleteAccelerator -> DeleteAccelerator -> Bool)
-> (DeleteAccelerator -> DeleteAccelerator -> Bool)
-> Eq DeleteAccelerator
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteAccelerator -> DeleteAccelerator -> Bool
$c/= :: DeleteAccelerator -> DeleteAccelerator -> Bool
== :: DeleteAccelerator -> DeleteAccelerator -> Bool
$c== :: DeleteAccelerator -> DeleteAccelerator -> Bool
Prelude.Eq, ReadPrec [DeleteAccelerator]
ReadPrec DeleteAccelerator
Int -> ReadS DeleteAccelerator
ReadS [DeleteAccelerator]
(Int -> ReadS DeleteAccelerator)
-> ReadS [DeleteAccelerator]
-> ReadPrec DeleteAccelerator
-> ReadPrec [DeleteAccelerator]
-> Read DeleteAccelerator
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteAccelerator]
$creadListPrec :: ReadPrec [DeleteAccelerator]
readPrec :: ReadPrec DeleteAccelerator
$creadPrec :: ReadPrec DeleteAccelerator
readList :: ReadS [DeleteAccelerator]
$creadList :: ReadS [DeleteAccelerator]
readsPrec :: Int -> ReadS DeleteAccelerator
$creadsPrec :: Int -> ReadS DeleteAccelerator
Prelude.Read, Int -> DeleteAccelerator -> ShowS
[DeleteAccelerator] -> ShowS
DeleteAccelerator -> String
(Int -> DeleteAccelerator -> ShowS)
-> (DeleteAccelerator -> String)
-> ([DeleteAccelerator] -> ShowS)
-> Show DeleteAccelerator
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteAccelerator] -> ShowS
$cshowList :: [DeleteAccelerator] -> ShowS
show :: DeleteAccelerator -> String
$cshow :: DeleteAccelerator -> String
showsPrec :: Int -> DeleteAccelerator -> ShowS
$cshowsPrec :: Int -> DeleteAccelerator -> ShowS
Prelude.Show, (forall x. DeleteAccelerator -> Rep DeleteAccelerator x)
-> (forall x. Rep DeleteAccelerator x -> DeleteAccelerator)
-> Generic DeleteAccelerator
forall x. Rep DeleteAccelerator x -> DeleteAccelerator
forall x. DeleteAccelerator -> Rep DeleteAccelerator x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteAccelerator x -> DeleteAccelerator
$cfrom :: forall x. DeleteAccelerator -> Rep DeleteAccelerator x
Prelude.Generic)
newDeleteAccelerator ::
Prelude.Text ->
DeleteAccelerator
newDeleteAccelerator :: Text -> DeleteAccelerator
newDeleteAccelerator Text
pAcceleratorArn_ =
DeleteAccelerator' :: Text -> DeleteAccelerator
DeleteAccelerator'
{ $sel:acceleratorArn:DeleteAccelerator' :: Text
acceleratorArn =
Text
pAcceleratorArn_
}
deleteAccelerator_acceleratorArn :: Lens.Lens' DeleteAccelerator Prelude.Text
deleteAccelerator_acceleratorArn :: (Text -> f Text) -> DeleteAccelerator -> f DeleteAccelerator
deleteAccelerator_acceleratorArn = (DeleteAccelerator -> Text)
-> (DeleteAccelerator -> Text -> DeleteAccelerator)
-> Lens DeleteAccelerator DeleteAccelerator Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteAccelerator' {Text
acceleratorArn :: Text
$sel:acceleratorArn:DeleteAccelerator' :: DeleteAccelerator -> Text
acceleratorArn} -> Text
acceleratorArn) (\s :: DeleteAccelerator
s@DeleteAccelerator' {} Text
a -> DeleteAccelerator
s {$sel:acceleratorArn:DeleteAccelerator' :: Text
acceleratorArn = Text
a} :: DeleteAccelerator)
instance Core.AWSRequest DeleteAccelerator where
type
AWSResponse DeleteAccelerator =
DeleteAcceleratorResponse
request :: DeleteAccelerator -> Request DeleteAccelerator
request = Service -> DeleteAccelerator -> Request DeleteAccelerator
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteAccelerator
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteAccelerator)))
response =
AWSResponse DeleteAccelerator
-> Logger
-> Service
-> Proxy DeleteAccelerator
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteAccelerator)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse DeleteAccelerator
DeleteAcceleratorResponse
DeleteAcceleratorResponse'
instance Prelude.Hashable DeleteAccelerator
instance Prelude.NFData DeleteAccelerator
instance Core.ToHeaders DeleteAccelerator where
toHeaders :: DeleteAccelerator -> [Header]
toHeaders =
[Header] -> DeleteAccelerator -> [Header]
forall a b. a -> b -> a
Prelude.const
( [[Header]] -> [Header]
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"GlobalAccelerator_V20180706.DeleteAccelerator" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON DeleteAccelerator where
toJSON :: DeleteAccelerator -> Value
toJSON DeleteAccelerator' {Text
acceleratorArn :: Text
$sel:acceleratorArn:DeleteAccelerator' :: DeleteAccelerator -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"AcceleratorArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
acceleratorArn)
]
)
instance Core.ToPath DeleteAccelerator where
toPath :: DeleteAccelerator -> ByteString
toPath = ByteString -> DeleteAccelerator -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteAccelerator where
toQuery :: DeleteAccelerator -> QueryString
toQuery = QueryString -> DeleteAccelerator -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteAcceleratorResponse = DeleteAcceleratorResponse'
{
}
deriving (DeleteAcceleratorResponse -> DeleteAcceleratorResponse -> Bool
(DeleteAcceleratorResponse -> DeleteAcceleratorResponse -> Bool)
-> (DeleteAcceleratorResponse -> DeleteAcceleratorResponse -> Bool)
-> Eq DeleteAcceleratorResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteAcceleratorResponse -> DeleteAcceleratorResponse -> Bool
$c/= :: DeleteAcceleratorResponse -> DeleteAcceleratorResponse -> Bool
== :: DeleteAcceleratorResponse -> DeleteAcceleratorResponse -> Bool
$c== :: DeleteAcceleratorResponse -> DeleteAcceleratorResponse -> Bool
Prelude.Eq, ReadPrec [DeleteAcceleratorResponse]
ReadPrec DeleteAcceleratorResponse
Int -> ReadS DeleteAcceleratorResponse
ReadS [DeleteAcceleratorResponse]
(Int -> ReadS DeleteAcceleratorResponse)
-> ReadS [DeleteAcceleratorResponse]
-> ReadPrec DeleteAcceleratorResponse
-> ReadPrec [DeleteAcceleratorResponse]
-> Read DeleteAcceleratorResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteAcceleratorResponse]
$creadListPrec :: ReadPrec [DeleteAcceleratorResponse]
readPrec :: ReadPrec DeleteAcceleratorResponse
$creadPrec :: ReadPrec DeleteAcceleratorResponse
readList :: ReadS [DeleteAcceleratorResponse]
$creadList :: ReadS [DeleteAcceleratorResponse]
readsPrec :: Int -> ReadS DeleteAcceleratorResponse
$creadsPrec :: Int -> ReadS DeleteAcceleratorResponse
Prelude.Read, Int -> DeleteAcceleratorResponse -> ShowS
[DeleteAcceleratorResponse] -> ShowS
DeleteAcceleratorResponse -> String
(Int -> DeleteAcceleratorResponse -> ShowS)
-> (DeleteAcceleratorResponse -> String)
-> ([DeleteAcceleratorResponse] -> ShowS)
-> Show DeleteAcceleratorResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteAcceleratorResponse] -> ShowS
$cshowList :: [DeleteAcceleratorResponse] -> ShowS
show :: DeleteAcceleratorResponse -> String
$cshow :: DeleteAcceleratorResponse -> String
showsPrec :: Int -> DeleteAcceleratorResponse -> ShowS
$cshowsPrec :: Int -> DeleteAcceleratorResponse -> ShowS
Prelude.Show, (forall x.
DeleteAcceleratorResponse -> Rep DeleteAcceleratorResponse x)
-> (forall x.
Rep DeleteAcceleratorResponse x -> DeleteAcceleratorResponse)
-> Generic DeleteAcceleratorResponse
forall x.
Rep DeleteAcceleratorResponse x -> DeleteAcceleratorResponse
forall x.
DeleteAcceleratorResponse -> Rep DeleteAcceleratorResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteAcceleratorResponse x -> DeleteAcceleratorResponse
$cfrom :: forall x.
DeleteAcceleratorResponse -> Rep DeleteAcceleratorResponse x
Prelude.Generic)
newDeleteAcceleratorResponse ::
DeleteAcceleratorResponse
newDeleteAcceleratorResponse :: DeleteAcceleratorResponse
newDeleteAcceleratorResponse =
DeleteAcceleratorResponse
DeleteAcceleratorResponse'
instance Prelude.NFData DeleteAcceleratorResponse