{-# 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.ELBV2.DeleteLoadBalancer
(
DeleteLoadBalancer (..),
newDeleteLoadBalancer,
deleteLoadBalancer_loadBalancerArn,
DeleteLoadBalancerResponse (..),
newDeleteLoadBalancerResponse,
deleteLoadBalancerResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.ELBV2.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 DeleteLoadBalancer = DeleteLoadBalancer'
{
DeleteLoadBalancer -> Text
loadBalancerArn :: Prelude.Text
}
deriving (DeleteLoadBalancer -> DeleteLoadBalancer -> Bool
(DeleteLoadBalancer -> DeleteLoadBalancer -> Bool)
-> (DeleteLoadBalancer -> DeleteLoadBalancer -> Bool)
-> Eq DeleteLoadBalancer
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteLoadBalancer -> DeleteLoadBalancer -> Bool
$c/= :: DeleteLoadBalancer -> DeleteLoadBalancer -> Bool
== :: DeleteLoadBalancer -> DeleteLoadBalancer -> Bool
$c== :: DeleteLoadBalancer -> DeleteLoadBalancer -> Bool
Prelude.Eq, ReadPrec [DeleteLoadBalancer]
ReadPrec DeleteLoadBalancer
Int -> ReadS DeleteLoadBalancer
ReadS [DeleteLoadBalancer]
(Int -> ReadS DeleteLoadBalancer)
-> ReadS [DeleteLoadBalancer]
-> ReadPrec DeleteLoadBalancer
-> ReadPrec [DeleteLoadBalancer]
-> Read DeleteLoadBalancer
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteLoadBalancer]
$creadListPrec :: ReadPrec [DeleteLoadBalancer]
readPrec :: ReadPrec DeleteLoadBalancer
$creadPrec :: ReadPrec DeleteLoadBalancer
readList :: ReadS [DeleteLoadBalancer]
$creadList :: ReadS [DeleteLoadBalancer]
readsPrec :: Int -> ReadS DeleteLoadBalancer
$creadsPrec :: Int -> ReadS DeleteLoadBalancer
Prelude.Read, Int -> DeleteLoadBalancer -> ShowS
[DeleteLoadBalancer] -> ShowS
DeleteLoadBalancer -> String
(Int -> DeleteLoadBalancer -> ShowS)
-> (DeleteLoadBalancer -> String)
-> ([DeleteLoadBalancer] -> ShowS)
-> Show DeleteLoadBalancer
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteLoadBalancer] -> ShowS
$cshowList :: [DeleteLoadBalancer] -> ShowS
show :: DeleteLoadBalancer -> String
$cshow :: DeleteLoadBalancer -> String
showsPrec :: Int -> DeleteLoadBalancer -> ShowS
$cshowsPrec :: Int -> DeleteLoadBalancer -> ShowS
Prelude.Show, (forall x. DeleteLoadBalancer -> Rep DeleteLoadBalancer x)
-> (forall x. Rep DeleteLoadBalancer x -> DeleteLoadBalancer)
-> Generic DeleteLoadBalancer
forall x. Rep DeleteLoadBalancer x -> DeleteLoadBalancer
forall x. DeleteLoadBalancer -> Rep DeleteLoadBalancer x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteLoadBalancer x -> DeleteLoadBalancer
$cfrom :: forall x. DeleteLoadBalancer -> Rep DeleteLoadBalancer x
Prelude.Generic)
newDeleteLoadBalancer ::
Prelude.Text ->
DeleteLoadBalancer
newDeleteLoadBalancer :: Text -> DeleteLoadBalancer
newDeleteLoadBalancer Text
pLoadBalancerArn_ =
DeleteLoadBalancer' :: Text -> DeleteLoadBalancer
DeleteLoadBalancer'
{ $sel:loadBalancerArn:DeleteLoadBalancer' :: Text
loadBalancerArn =
Text
pLoadBalancerArn_
}
deleteLoadBalancer_loadBalancerArn :: Lens.Lens' DeleteLoadBalancer Prelude.Text
deleteLoadBalancer_loadBalancerArn :: (Text -> f Text) -> DeleteLoadBalancer -> f DeleteLoadBalancer
deleteLoadBalancer_loadBalancerArn = (DeleteLoadBalancer -> Text)
-> (DeleteLoadBalancer -> Text -> DeleteLoadBalancer)
-> Lens DeleteLoadBalancer DeleteLoadBalancer Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteLoadBalancer' {Text
loadBalancerArn :: Text
$sel:loadBalancerArn:DeleteLoadBalancer' :: DeleteLoadBalancer -> Text
loadBalancerArn} -> Text
loadBalancerArn) (\s :: DeleteLoadBalancer
s@DeleteLoadBalancer' {} Text
a -> DeleteLoadBalancer
s {$sel:loadBalancerArn:DeleteLoadBalancer' :: Text
loadBalancerArn = Text
a} :: DeleteLoadBalancer)
instance Core.AWSRequest DeleteLoadBalancer where
type
AWSResponse DeleteLoadBalancer =
DeleteLoadBalancerResponse
request :: DeleteLoadBalancer -> Request DeleteLoadBalancer
request = Service -> DeleteLoadBalancer -> Request DeleteLoadBalancer
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteLoadBalancer
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteLoadBalancer)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse DeleteLoadBalancer))
-> Logger
-> Service
-> Proxy DeleteLoadBalancer
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteLoadBalancer)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
-> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
Text
"DeleteLoadBalancerResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Int -> DeleteLoadBalancerResponse
DeleteLoadBalancerResponse'
(Int -> DeleteLoadBalancerResponse)
-> Either String Int -> Either String DeleteLoadBalancerResponse
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))
)
instance Prelude.Hashable DeleteLoadBalancer
instance Prelude.NFData DeleteLoadBalancer
instance Core.ToHeaders DeleteLoadBalancer where
toHeaders :: DeleteLoadBalancer -> ResponseHeaders
toHeaders = ResponseHeaders -> DeleteLoadBalancer -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath DeleteLoadBalancer where
toPath :: DeleteLoadBalancer -> ByteString
toPath = ByteString -> DeleteLoadBalancer -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteLoadBalancer where
toQuery :: DeleteLoadBalancer -> QueryString
toQuery DeleteLoadBalancer' {Text
loadBalancerArn :: Text
$sel:loadBalancerArn:DeleteLoadBalancer' :: DeleteLoadBalancer -> Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"DeleteLoadBalancer" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2015-12-01" :: Prelude.ByteString),
ByteString
"LoadBalancerArn" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
loadBalancerArn
]
data DeleteLoadBalancerResponse = DeleteLoadBalancerResponse'
{
DeleteLoadBalancerResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteLoadBalancerResponse -> DeleteLoadBalancerResponse -> Bool
(DeleteLoadBalancerResponse -> DeleteLoadBalancerResponse -> Bool)
-> (DeleteLoadBalancerResponse
-> DeleteLoadBalancerResponse -> Bool)
-> Eq DeleteLoadBalancerResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteLoadBalancerResponse -> DeleteLoadBalancerResponse -> Bool
$c/= :: DeleteLoadBalancerResponse -> DeleteLoadBalancerResponse -> Bool
== :: DeleteLoadBalancerResponse -> DeleteLoadBalancerResponse -> Bool
$c== :: DeleteLoadBalancerResponse -> DeleteLoadBalancerResponse -> Bool
Prelude.Eq, ReadPrec [DeleteLoadBalancerResponse]
ReadPrec DeleteLoadBalancerResponse
Int -> ReadS DeleteLoadBalancerResponse
ReadS [DeleteLoadBalancerResponse]
(Int -> ReadS DeleteLoadBalancerResponse)
-> ReadS [DeleteLoadBalancerResponse]
-> ReadPrec DeleteLoadBalancerResponse
-> ReadPrec [DeleteLoadBalancerResponse]
-> Read DeleteLoadBalancerResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteLoadBalancerResponse]
$creadListPrec :: ReadPrec [DeleteLoadBalancerResponse]
readPrec :: ReadPrec DeleteLoadBalancerResponse
$creadPrec :: ReadPrec DeleteLoadBalancerResponse
readList :: ReadS [DeleteLoadBalancerResponse]
$creadList :: ReadS [DeleteLoadBalancerResponse]
readsPrec :: Int -> ReadS DeleteLoadBalancerResponse
$creadsPrec :: Int -> ReadS DeleteLoadBalancerResponse
Prelude.Read, Int -> DeleteLoadBalancerResponse -> ShowS
[DeleteLoadBalancerResponse] -> ShowS
DeleteLoadBalancerResponse -> String
(Int -> DeleteLoadBalancerResponse -> ShowS)
-> (DeleteLoadBalancerResponse -> String)
-> ([DeleteLoadBalancerResponse] -> ShowS)
-> Show DeleteLoadBalancerResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteLoadBalancerResponse] -> ShowS
$cshowList :: [DeleteLoadBalancerResponse] -> ShowS
show :: DeleteLoadBalancerResponse -> String
$cshow :: DeleteLoadBalancerResponse -> String
showsPrec :: Int -> DeleteLoadBalancerResponse -> ShowS
$cshowsPrec :: Int -> DeleteLoadBalancerResponse -> ShowS
Prelude.Show, (forall x.
DeleteLoadBalancerResponse -> Rep DeleteLoadBalancerResponse x)
-> (forall x.
Rep DeleteLoadBalancerResponse x -> DeleteLoadBalancerResponse)
-> Generic DeleteLoadBalancerResponse
forall x.
Rep DeleteLoadBalancerResponse x -> DeleteLoadBalancerResponse
forall x.
DeleteLoadBalancerResponse -> Rep DeleteLoadBalancerResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteLoadBalancerResponse x -> DeleteLoadBalancerResponse
$cfrom :: forall x.
DeleteLoadBalancerResponse -> Rep DeleteLoadBalancerResponse x
Prelude.Generic)
newDeleteLoadBalancerResponse ::
Prelude.Int ->
DeleteLoadBalancerResponse
newDeleteLoadBalancerResponse :: Int -> DeleteLoadBalancerResponse
newDeleteLoadBalancerResponse Int
pHttpStatus_ =
DeleteLoadBalancerResponse' :: Int -> DeleteLoadBalancerResponse
DeleteLoadBalancerResponse'
{ $sel:httpStatus:DeleteLoadBalancerResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteLoadBalancerResponse_httpStatus :: Lens.Lens' DeleteLoadBalancerResponse Prelude.Int
deleteLoadBalancerResponse_httpStatus :: (Int -> f Int)
-> DeleteLoadBalancerResponse -> f DeleteLoadBalancerResponse
deleteLoadBalancerResponse_httpStatus = (DeleteLoadBalancerResponse -> Int)
-> (DeleteLoadBalancerResponse
-> Int -> DeleteLoadBalancerResponse)
-> Lens
DeleteLoadBalancerResponse DeleteLoadBalancerResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteLoadBalancerResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteLoadBalancerResponse' :: DeleteLoadBalancerResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteLoadBalancerResponse
s@DeleteLoadBalancerResponse' {} Int
a -> DeleteLoadBalancerResponse
s {$sel:httpStatus:DeleteLoadBalancerResponse' :: Int
httpStatus = Int
a} :: DeleteLoadBalancerResponse)
instance Prelude.NFData DeleteLoadBalancerResponse