{-# 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.DeleteCustomRoutingListener
(
DeleteCustomRoutingListener (..),
newDeleteCustomRoutingListener,
deleteCustomRoutingListener_listenerArn,
DeleteCustomRoutingListenerResponse (..),
newDeleteCustomRoutingListenerResponse,
)
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 DeleteCustomRoutingListener = DeleteCustomRoutingListener'
{
DeleteCustomRoutingListener -> Text
listenerArn :: Prelude.Text
}
deriving (DeleteCustomRoutingListener -> DeleteCustomRoutingListener -> Bool
(DeleteCustomRoutingListener
-> DeleteCustomRoutingListener -> Bool)
-> (DeleteCustomRoutingListener
-> DeleteCustomRoutingListener -> Bool)
-> Eq DeleteCustomRoutingListener
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteCustomRoutingListener -> DeleteCustomRoutingListener -> Bool
$c/= :: DeleteCustomRoutingListener -> DeleteCustomRoutingListener -> Bool
== :: DeleteCustomRoutingListener -> DeleteCustomRoutingListener -> Bool
$c== :: DeleteCustomRoutingListener -> DeleteCustomRoutingListener -> Bool
Prelude.Eq, ReadPrec [DeleteCustomRoutingListener]
ReadPrec DeleteCustomRoutingListener
Int -> ReadS DeleteCustomRoutingListener
ReadS [DeleteCustomRoutingListener]
(Int -> ReadS DeleteCustomRoutingListener)
-> ReadS [DeleteCustomRoutingListener]
-> ReadPrec DeleteCustomRoutingListener
-> ReadPrec [DeleteCustomRoutingListener]
-> Read DeleteCustomRoutingListener
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteCustomRoutingListener]
$creadListPrec :: ReadPrec [DeleteCustomRoutingListener]
readPrec :: ReadPrec DeleteCustomRoutingListener
$creadPrec :: ReadPrec DeleteCustomRoutingListener
readList :: ReadS [DeleteCustomRoutingListener]
$creadList :: ReadS [DeleteCustomRoutingListener]
readsPrec :: Int -> ReadS DeleteCustomRoutingListener
$creadsPrec :: Int -> ReadS DeleteCustomRoutingListener
Prelude.Read, Int -> DeleteCustomRoutingListener -> ShowS
[DeleteCustomRoutingListener] -> ShowS
DeleteCustomRoutingListener -> String
(Int -> DeleteCustomRoutingListener -> ShowS)
-> (DeleteCustomRoutingListener -> String)
-> ([DeleteCustomRoutingListener] -> ShowS)
-> Show DeleteCustomRoutingListener
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteCustomRoutingListener] -> ShowS
$cshowList :: [DeleteCustomRoutingListener] -> ShowS
show :: DeleteCustomRoutingListener -> String
$cshow :: DeleteCustomRoutingListener -> String
showsPrec :: Int -> DeleteCustomRoutingListener -> ShowS
$cshowsPrec :: Int -> DeleteCustomRoutingListener -> ShowS
Prelude.Show, (forall x.
DeleteCustomRoutingListener -> Rep DeleteCustomRoutingListener x)
-> (forall x.
Rep DeleteCustomRoutingListener x -> DeleteCustomRoutingListener)
-> Generic DeleteCustomRoutingListener
forall x.
Rep DeleteCustomRoutingListener x -> DeleteCustomRoutingListener
forall x.
DeleteCustomRoutingListener -> Rep DeleteCustomRoutingListener x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteCustomRoutingListener x -> DeleteCustomRoutingListener
$cfrom :: forall x.
DeleteCustomRoutingListener -> Rep DeleteCustomRoutingListener x
Prelude.Generic)
newDeleteCustomRoutingListener ::
Prelude.Text ->
DeleteCustomRoutingListener
newDeleteCustomRoutingListener :: Text -> DeleteCustomRoutingListener
newDeleteCustomRoutingListener Text
pListenerArn_ =
DeleteCustomRoutingListener' :: Text -> DeleteCustomRoutingListener
DeleteCustomRoutingListener'
{ $sel:listenerArn:DeleteCustomRoutingListener' :: Text
listenerArn =
Text
pListenerArn_
}
deleteCustomRoutingListener_listenerArn :: Lens.Lens' DeleteCustomRoutingListener Prelude.Text
deleteCustomRoutingListener_listenerArn :: (Text -> f Text)
-> DeleteCustomRoutingListener -> f DeleteCustomRoutingListener
deleteCustomRoutingListener_listenerArn = (DeleteCustomRoutingListener -> Text)
-> (DeleteCustomRoutingListener
-> Text -> DeleteCustomRoutingListener)
-> Lens
DeleteCustomRoutingListener DeleteCustomRoutingListener Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteCustomRoutingListener' {Text
listenerArn :: Text
$sel:listenerArn:DeleteCustomRoutingListener' :: DeleteCustomRoutingListener -> Text
listenerArn} -> Text
listenerArn) (\s :: DeleteCustomRoutingListener
s@DeleteCustomRoutingListener' {} Text
a -> DeleteCustomRoutingListener
s {$sel:listenerArn:DeleteCustomRoutingListener' :: Text
listenerArn = Text
a} :: DeleteCustomRoutingListener)
instance Core.AWSRequest DeleteCustomRoutingListener where
type
AWSResponse DeleteCustomRoutingListener =
DeleteCustomRoutingListenerResponse
request :: DeleteCustomRoutingListener -> Request DeleteCustomRoutingListener
request = Service
-> DeleteCustomRoutingListener
-> Request DeleteCustomRoutingListener
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteCustomRoutingListener
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteCustomRoutingListener)))
response =
AWSResponse DeleteCustomRoutingListener
-> Logger
-> Service
-> Proxy DeleteCustomRoutingListener
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteCustomRoutingListener)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
AWSResponse DeleteCustomRoutingListener
DeleteCustomRoutingListenerResponse
DeleteCustomRoutingListenerResponse'
instance Prelude.Hashable DeleteCustomRoutingListener
instance Prelude.NFData DeleteCustomRoutingListener
instance Core.ToHeaders DeleteCustomRoutingListener where
toHeaders :: DeleteCustomRoutingListener -> [Header]
toHeaders =
[Header] -> DeleteCustomRoutingListener -> [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.DeleteCustomRoutingListener" ::
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 DeleteCustomRoutingListener where
toJSON :: DeleteCustomRoutingListener -> Value
toJSON DeleteCustomRoutingListener' {Text
listenerArn :: Text
$sel:listenerArn:DeleteCustomRoutingListener' :: DeleteCustomRoutingListener -> 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
"ListenerArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
listenerArn)]
)
instance Core.ToPath DeleteCustomRoutingListener where
toPath :: DeleteCustomRoutingListener -> ByteString
toPath = ByteString -> DeleteCustomRoutingListener -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteCustomRoutingListener where
toQuery :: DeleteCustomRoutingListener -> QueryString
toQuery = QueryString -> DeleteCustomRoutingListener -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteCustomRoutingListenerResponse = DeleteCustomRoutingListenerResponse'
{
}
deriving (DeleteCustomRoutingListenerResponse
-> DeleteCustomRoutingListenerResponse -> Bool
(DeleteCustomRoutingListenerResponse
-> DeleteCustomRoutingListenerResponse -> Bool)
-> (DeleteCustomRoutingListenerResponse
-> DeleteCustomRoutingListenerResponse -> Bool)
-> Eq DeleteCustomRoutingListenerResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteCustomRoutingListenerResponse
-> DeleteCustomRoutingListenerResponse -> Bool
$c/= :: DeleteCustomRoutingListenerResponse
-> DeleteCustomRoutingListenerResponse -> Bool
== :: DeleteCustomRoutingListenerResponse
-> DeleteCustomRoutingListenerResponse -> Bool
$c== :: DeleteCustomRoutingListenerResponse
-> DeleteCustomRoutingListenerResponse -> Bool
Prelude.Eq, ReadPrec [DeleteCustomRoutingListenerResponse]
ReadPrec DeleteCustomRoutingListenerResponse
Int -> ReadS DeleteCustomRoutingListenerResponse
ReadS [DeleteCustomRoutingListenerResponse]
(Int -> ReadS DeleteCustomRoutingListenerResponse)
-> ReadS [DeleteCustomRoutingListenerResponse]
-> ReadPrec DeleteCustomRoutingListenerResponse
-> ReadPrec [DeleteCustomRoutingListenerResponse]
-> Read DeleteCustomRoutingListenerResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteCustomRoutingListenerResponse]
$creadListPrec :: ReadPrec [DeleteCustomRoutingListenerResponse]
readPrec :: ReadPrec DeleteCustomRoutingListenerResponse
$creadPrec :: ReadPrec DeleteCustomRoutingListenerResponse
readList :: ReadS [DeleteCustomRoutingListenerResponse]
$creadList :: ReadS [DeleteCustomRoutingListenerResponse]
readsPrec :: Int -> ReadS DeleteCustomRoutingListenerResponse
$creadsPrec :: Int -> ReadS DeleteCustomRoutingListenerResponse
Prelude.Read, Int -> DeleteCustomRoutingListenerResponse -> ShowS
[DeleteCustomRoutingListenerResponse] -> ShowS
DeleteCustomRoutingListenerResponse -> String
(Int -> DeleteCustomRoutingListenerResponse -> ShowS)
-> (DeleteCustomRoutingListenerResponse -> String)
-> ([DeleteCustomRoutingListenerResponse] -> ShowS)
-> Show DeleteCustomRoutingListenerResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteCustomRoutingListenerResponse] -> ShowS
$cshowList :: [DeleteCustomRoutingListenerResponse] -> ShowS
show :: DeleteCustomRoutingListenerResponse -> String
$cshow :: DeleteCustomRoutingListenerResponse -> String
showsPrec :: Int -> DeleteCustomRoutingListenerResponse -> ShowS
$cshowsPrec :: Int -> DeleteCustomRoutingListenerResponse -> ShowS
Prelude.Show, (forall x.
DeleteCustomRoutingListenerResponse
-> Rep DeleteCustomRoutingListenerResponse x)
-> (forall x.
Rep DeleteCustomRoutingListenerResponse x
-> DeleteCustomRoutingListenerResponse)
-> Generic DeleteCustomRoutingListenerResponse
forall x.
Rep DeleteCustomRoutingListenerResponse x
-> DeleteCustomRoutingListenerResponse
forall x.
DeleteCustomRoutingListenerResponse
-> Rep DeleteCustomRoutingListenerResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteCustomRoutingListenerResponse x
-> DeleteCustomRoutingListenerResponse
$cfrom :: forall x.
DeleteCustomRoutingListenerResponse
-> Rep DeleteCustomRoutingListenerResponse x
Prelude.Generic)
newDeleteCustomRoutingListenerResponse ::
DeleteCustomRoutingListenerResponse
newDeleteCustomRoutingListenerResponse :: DeleteCustomRoutingListenerResponse
newDeleteCustomRoutingListenerResponse =
DeleteCustomRoutingListenerResponse
DeleteCustomRoutingListenerResponse'
instance
Prelude.NFData
DeleteCustomRoutingListenerResponse