{-# 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.Route53.DeleteHealthCheck
(
DeleteHealthCheck (..),
newDeleteHealthCheck,
deleteHealthCheck_healthCheckId,
DeleteHealthCheckResponse (..),
newDeleteHealthCheckResponse,
deleteHealthCheckResponse_httpStatus,
)
where
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
import Amazonka.Route53.Types
data DeleteHealthCheck = DeleteHealthCheck'
{
DeleteHealthCheck -> Text
healthCheckId :: Prelude.Text
}
deriving (DeleteHealthCheck -> DeleteHealthCheck -> Bool
(DeleteHealthCheck -> DeleteHealthCheck -> Bool)
-> (DeleteHealthCheck -> DeleteHealthCheck -> Bool)
-> Eq DeleteHealthCheck
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteHealthCheck -> DeleteHealthCheck -> Bool
$c/= :: DeleteHealthCheck -> DeleteHealthCheck -> Bool
== :: DeleteHealthCheck -> DeleteHealthCheck -> Bool
$c== :: DeleteHealthCheck -> DeleteHealthCheck -> Bool
Prelude.Eq, ReadPrec [DeleteHealthCheck]
ReadPrec DeleteHealthCheck
Int -> ReadS DeleteHealthCheck
ReadS [DeleteHealthCheck]
(Int -> ReadS DeleteHealthCheck)
-> ReadS [DeleteHealthCheck]
-> ReadPrec DeleteHealthCheck
-> ReadPrec [DeleteHealthCheck]
-> Read DeleteHealthCheck
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteHealthCheck]
$creadListPrec :: ReadPrec [DeleteHealthCheck]
readPrec :: ReadPrec DeleteHealthCheck
$creadPrec :: ReadPrec DeleteHealthCheck
readList :: ReadS [DeleteHealthCheck]
$creadList :: ReadS [DeleteHealthCheck]
readsPrec :: Int -> ReadS DeleteHealthCheck
$creadsPrec :: Int -> ReadS DeleteHealthCheck
Prelude.Read, Int -> DeleteHealthCheck -> ShowS
[DeleteHealthCheck] -> ShowS
DeleteHealthCheck -> String
(Int -> DeleteHealthCheck -> ShowS)
-> (DeleteHealthCheck -> String)
-> ([DeleteHealthCheck] -> ShowS)
-> Show DeleteHealthCheck
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteHealthCheck] -> ShowS
$cshowList :: [DeleteHealthCheck] -> ShowS
show :: DeleteHealthCheck -> String
$cshow :: DeleteHealthCheck -> String
showsPrec :: Int -> DeleteHealthCheck -> ShowS
$cshowsPrec :: Int -> DeleteHealthCheck -> ShowS
Prelude.Show, (forall x. DeleteHealthCheck -> Rep DeleteHealthCheck x)
-> (forall x. Rep DeleteHealthCheck x -> DeleteHealthCheck)
-> Generic DeleteHealthCheck
forall x. Rep DeleteHealthCheck x -> DeleteHealthCheck
forall x. DeleteHealthCheck -> Rep DeleteHealthCheck x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteHealthCheck x -> DeleteHealthCheck
$cfrom :: forall x. DeleteHealthCheck -> Rep DeleteHealthCheck x
Prelude.Generic)
newDeleteHealthCheck ::
Prelude.Text ->
DeleteHealthCheck
newDeleteHealthCheck :: Text -> DeleteHealthCheck
newDeleteHealthCheck Text
pHealthCheckId_ =
DeleteHealthCheck' :: Text -> DeleteHealthCheck
DeleteHealthCheck' {$sel:healthCheckId:DeleteHealthCheck' :: Text
healthCheckId = Text
pHealthCheckId_}
deleteHealthCheck_healthCheckId :: Lens.Lens' DeleteHealthCheck Prelude.Text
deleteHealthCheck_healthCheckId :: (Text -> f Text) -> DeleteHealthCheck -> f DeleteHealthCheck
deleteHealthCheck_healthCheckId = (DeleteHealthCheck -> Text)
-> (DeleteHealthCheck -> Text -> DeleteHealthCheck)
-> Lens DeleteHealthCheck DeleteHealthCheck Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteHealthCheck' {Text
healthCheckId :: Text
$sel:healthCheckId:DeleteHealthCheck' :: DeleteHealthCheck -> Text
healthCheckId} -> Text
healthCheckId) (\s :: DeleteHealthCheck
s@DeleteHealthCheck' {} Text
a -> DeleteHealthCheck
s {$sel:healthCheckId:DeleteHealthCheck' :: Text
healthCheckId = Text
a} :: DeleteHealthCheck)
instance Core.AWSRequest DeleteHealthCheck where
type
AWSResponse DeleteHealthCheck =
DeleteHealthCheckResponse
request :: DeleteHealthCheck -> Request DeleteHealthCheck
request = Service -> DeleteHealthCheck -> Request DeleteHealthCheck
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteHealthCheck
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteHealthCheck)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse DeleteHealthCheck))
-> Logger
-> Service
-> Proxy DeleteHealthCheck
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteHealthCheck)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> DeleteHealthCheckResponse
DeleteHealthCheckResponse'
(Int -> DeleteHealthCheckResponse)
-> Either String Int -> Either String DeleteHealthCheckResponse
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 DeleteHealthCheck
instance Prelude.NFData DeleteHealthCheck
instance Core.ToHeaders DeleteHealthCheck where
toHeaders :: DeleteHealthCheck -> ResponseHeaders
toHeaders = ResponseHeaders -> DeleteHealthCheck -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath DeleteHealthCheck where
toPath :: DeleteHealthCheck -> ByteString
toPath DeleteHealthCheck' {Text
healthCheckId :: Text
$sel:healthCheckId:DeleteHealthCheck' :: DeleteHealthCheck -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/2013-04-01/healthcheck/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
healthCheckId]
instance Core.ToQuery DeleteHealthCheck where
toQuery :: DeleteHealthCheck -> QueryString
toQuery = QueryString -> DeleteHealthCheck -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteHealthCheckResponse = DeleteHealthCheckResponse'
{
DeleteHealthCheckResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteHealthCheckResponse -> DeleteHealthCheckResponse -> Bool
(DeleteHealthCheckResponse -> DeleteHealthCheckResponse -> Bool)
-> (DeleteHealthCheckResponse -> DeleteHealthCheckResponse -> Bool)
-> Eq DeleteHealthCheckResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteHealthCheckResponse -> DeleteHealthCheckResponse -> Bool
$c/= :: DeleteHealthCheckResponse -> DeleteHealthCheckResponse -> Bool
== :: DeleteHealthCheckResponse -> DeleteHealthCheckResponse -> Bool
$c== :: DeleteHealthCheckResponse -> DeleteHealthCheckResponse -> Bool
Prelude.Eq, ReadPrec [DeleteHealthCheckResponse]
ReadPrec DeleteHealthCheckResponse
Int -> ReadS DeleteHealthCheckResponse
ReadS [DeleteHealthCheckResponse]
(Int -> ReadS DeleteHealthCheckResponse)
-> ReadS [DeleteHealthCheckResponse]
-> ReadPrec DeleteHealthCheckResponse
-> ReadPrec [DeleteHealthCheckResponse]
-> Read DeleteHealthCheckResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteHealthCheckResponse]
$creadListPrec :: ReadPrec [DeleteHealthCheckResponse]
readPrec :: ReadPrec DeleteHealthCheckResponse
$creadPrec :: ReadPrec DeleteHealthCheckResponse
readList :: ReadS [DeleteHealthCheckResponse]
$creadList :: ReadS [DeleteHealthCheckResponse]
readsPrec :: Int -> ReadS DeleteHealthCheckResponse
$creadsPrec :: Int -> ReadS DeleteHealthCheckResponse
Prelude.Read, Int -> DeleteHealthCheckResponse -> ShowS
[DeleteHealthCheckResponse] -> ShowS
DeleteHealthCheckResponse -> String
(Int -> DeleteHealthCheckResponse -> ShowS)
-> (DeleteHealthCheckResponse -> String)
-> ([DeleteHealthCheckResponse] -> ShowS)
-> Show DeleteHealthCheckResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteHealthCheckResponse] -> ShowS
$cshowList :: [DeleteHealthCheckResponse] -> ShowS
show :: DeleteHealthCheckResponse -> String
$cshow :: DeleteHealthCheckResponse -> String
showsPrec :: Int -> DeleteHealthCheckResponse -> ShowS
$cshowsPrec :: Int -> DeleteHealthCheckResponse -> ShowS
Prelude.Show, (forall x.
DeleteHealthCheckResponse -> Rep DeleteHealthCheckResponse x)
-> (forall x.
Rep DeleteHealthCheckResponse x -> DeleteHealthCheckResponse)
-> Generic DeleteHealthCheckResponse
forall x.
Rep DeleteHealthCheckResponse x -> DeleteHealthCheckResponse
forall x.
DeleteHealthCheckResponse -> Rep DeleteHealthCheckResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteHealthCheckResponse x -> DeleteHealthCheckResponse
$cfrom :: forall x.
DeleteHealthCheckResponse -> Rep DeleteHealthCheckResponse x
Prelude.Generic)
newDeleteHealthCheckResponse ::
Prelude.Int ->
DeleteHealthCheckResponse
newDeleteHealthCheckResponse :: Int -> DeleteHealthCheckResponse
newDeleteHealthCheckResponse Int
pHttpStatus_ =
DeleteHealthCheckResponse' :: Int -> DeleteHealthCheckResponse
DeleteHealthCheckResponse'
{ $sel:httpStatus:DeleteHealthCheckResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteHealthCheckResponse_httpStatus :: Lens.Lens' DeleteHealthCheckResponse Prelude.Int
deleteHealthCheckResponse_httpStatus :: (Int -> f Int)
-> DeleteHealthCheckResponse -> f DeleteHealthCheckResponse
deleteHealthCheckResponse_httpStatus = (DeleteHealthCheckResponse -> Int)
-> (DeleteHealthCheckResponse -> Int -> DeleteHealthCheckResponse)
-> Lens DeleteHealthCheckResponse DeleteHealthCheckResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteHealthCheckResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteHealthCheckResponse' :: DeleteHealthCheckResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteHealthCheckResponse
s@DeleteHealthCheckResponse' {} Int
a -> DeleteHealthCheckResponse
s {$sel:httpStatus:DeleteHealthCheckResponse' :: Int
httpStatus = Int
a} :: DeleteHealthCheckResponse)
instance Prelude.NFData DeleteHealthCheckResponse