{-# 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.SageMakerA2IRuntime.DeleteHumanLoop
(
DeleteHumanLoop (..),
newDeleteHumanLoop,
deleteHumanLoop_humanLoopName,
DeleteHumanLoopResponse (..),
newDeleteHumanLoopResponse,
deleteHumanLoopResponse_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.SageMakerA2IRuntime.Types
data DeleteHumanLoop = DeleteHumanLoop'
{
DeleteHumanLoop -> Text
humanLoopName :: Prelude.Text
}
deriving (DeleteHumanLoop -> DeleteHumanLoop -> Bool
(DeleteHumanLoop -> DeleteHumanLoop -> Bool)
-> (DeleteHumanLoop -> DeleteHumanLoop -> Bool)
-> Eq DeleteHumanLoop
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteHumanLoop -> DeleteHumanLoop -> Bool
$c/= :: DeleteHumanLoop -> DeleteHumanLoop -> Bool
== :: DeleteHumanLoop -> DeleteHumanLoop -> Bool
$c== :: DeleteHumanLoop -> DeleteHumanLoop -> Bool
Prelude.Eq, ReadPrec [DeleteHumanLoop]
ReadPrec DeleteHumanLoop
Int -> ReadS DeleteHumanLoop
ReadS [DeleteHumanLoop]
(Int -> ReadS DeleteHumanLoop)
-> ReadS [DeleteHumanLoop]
-> ReadPrec DeleteHumanLoop
-> ReadPrec [DeleteHumanLoop]
-> Read DeleteHumanLoop
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteHumanLoop]
$creadListPrec :: ReadPrec [DeleteHumanLoop]
readPrec :: ReadPrec DeleteHumanLoop
$creadPrec :: ReadPrec DeleteHumanLoop
readList :: ReadS [DeleteHumanLoop]
$creadList :: ReadS [DeleteHumanLoop]
readsPrec :: Int -> ReadS DeleteHumanLoop
$creadsPrec :: Int -> ReadS DeleteHumanLoop
Prelude.Read, Int -> DeleteHumanLoop -> ShowS
[DeleteHumanLoop] -> ShowS
DeleteHumanLoop -> String
(Int -> DeleteHumanLoop -> ShowS)
-> (DeleteHumanLoop -> String)
-> ([DeleteHumanLoop] -> ShowS)
-> Show DeleteHumanLoop
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteHumanLoop] -> ShowS
$cshowList :: [DeleteHumanLoop] -> ShowS
show :: DeleteHumanLoop -> String
$cshow :: DeleteHumanLoop -> String
showsPrec :: Int -> DeleteHumanLoop -> ShowS
$cshowsPrec :: Int -> DeleteHumanLoop -> ShowS
Prelude.Show, (forall x. DeleteHumanLoop -> Rep DeleteHumanLoop x)
-> (forall x. Rep DeleteHumanLoop x -> DeleteHumanLoop)
-> Generic DeleteHumanLoop
forall x. Rep DeleteHumanLoop x -> DeleteHumanLoop
forall x. DeleteHumanLoop -> Rep DeleteHumanLoop x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteHumanLoop x -> DeleteHumanLoop
$cfrom :: forall x. DeleteHumanLoop -> Rep DeleteHumanLoop x
Prelude.Generic)
newDeleteHumanLoop ::
Prelude.Text ->
DeleteHumanLoop
newDeleteHumanLoop :: Text -> DeleteHumanLoop
newDeleteHumanLoop Text
pHumanLoopName_ =
DeleteHumanLoop' :: Text -> DeleteHumanLoop
DeleteHumanLoop' {$sel:humanLoopName:DeleteHumanLoop' :: Text
humanLoopName = Text
pHumanLoopName_}
deleteHumanLoop_humanLoopName :: Lens.Lens' DeleteHumanLoop Prelude.Text
deleteHumanLoop_humanLoopName :: (Text -> f Text) -> DeleteHumanLoop -> f DeleteHumanLoop
deleteHumanLoop_humanLoopName = (DeleteHumanLoop -> Text)
-> (DeleteHumanLoop -> Text -> DeleteHumanLoop)
-> Lens DeleteHumanLoop DeleteHumanLoop Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteHumanLoop' {Text
humanLoopName :: Text
$sel:humanLoopName:DeleteHumanLoop' :: DeleteHumanLoop -> Text
humanLoopName} -> Text
humanLoopName) (\s :: DeleteHumanLoop
s@DeleteHumanLoop' {} Text
a -> DeleteHumanLoop
s {$sel:humanLoopName:DeleteHumanLoop' :: Text
humanLoopName = Text
a} :: DeleteHumanLoop)
instance Core.AWSRequest DeleteHumanLoop where
type
AWSResponse DeleteHumanLoop =
DeleteHumanLoopResponse
request :: DeleteHumanLoop -> Request DeleteHumanLoop
request = Service -> DeleteHumanLoop -> Request DeleteHumanLoop
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteHumanLoop
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteHumanLoop)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse DeleteHumanLoop))
-> Logger
-> Service
-> Proxy DeleteHumanLoop
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteHumanLoop)))
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 -> DeleteHumanLoopResponse
DeleteHumanLoopResponse'
(Int -> DeleteHumanLoopResponse)
-> Either String Int -> Either String DeleteHumanLoopResponse
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 DeleteHumanLoop
instance Prelude.NFData DeleteHumanLoop
instance Core.ToHeaders DeleteHumanLoop where
toHeaders :: DeleteHumanLoop -> ResponseHeaders
toHeaders =
ResponseHeaders -> DeleteHumanLoop -> 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 DeleteHumanLoop where
toPath :: DeleteHumanLoop -> ByteString
toPath DeleteHumanLoop' {Text
humanLoopName :: Text
$sel:humanLoopName:DeleteHumanLoop' :: DeleteHumanLoop -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/human-loops/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
humanLoopName]
instance Core.ToQuery DeleteHumanLoop where
toQuery :: DeleteHumanLoop -> QueryString
toQuery = QueryString -> DeleteHumanLoop -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteHumanLoopResponse = DeleteHumanLoopResponse'
{
DeleteHumanLoopResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteHumanLoopResponse -> DeleteHumanLoopResponse -> Bool
(DeleteHumanLoopResponse -> DeleteHumanLoopResponse -> Bool)
-> (DeleteHumanLoopResponse -> DeleteHumanLoopResponse -> Bool)
-> Eq DeleteHumanLoopResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteHumanLoopResponse -> DeleteHumanLoopResponse -> Bool
$c/= :: DeleteHumanLoopResponse -> DeleteHumanLoopResponse -> Bool
== :: DeleteHumanLoopResponse -> DeleteHumanLoopResponse -> Bool
$c== :: DeleteHumanLoopResponse -> DeleteHumanLoopResponse -> Bool
Prelude.Eq, ReadPrec [DeleteHumanLoopResponse]
ReadPrec DeleteHumanLoopResponse
Int -> ReadS DeleteHumanLoopResponse
ReadS [DeleteHumanLoopResponse]
(Int -> ReadS DeleteHumanLoopResponse)
-> ReadS [DeleteHumanLoopResponse]
-> ReadPrec DeleteHumanLoopResponse
-> ReadPrec [DeleteHumanLoopResponse]
-> Read DeleteHumanLoopResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteHumanLoopResponse]
$creadListPrec :: ReadPrec [DeleteHumanLoopResponse]
readPrec :: ReadPrec DeleteHumanLoopResponse
$creadPrec :: ReadPrec DeleteHumanLoopResponse
readList :: ReadS [DeleteHumanLoopResponse]
$creadList :: ReadS [DeleteHumanLoopResponse]
readsPrec :: Int -> ReadS DeleteHumanLoopResponse
$creadsPrec :: Int -> ReadS DeleteHumanLoopResponse
Prelude.Read, Int -> DeleteHumanLoopResponse -> ShowS
[DeleteHumanLoopResponse] -> ShowS
DeleteHumanLoopResponse -> String
(Int -> DeleteHumanLoopResponse -> ShowS)
-> (DeleteHumanLoopResponse -> String)
-> ([DeleteHumanLoopResponse] -> ShowS)
-> Show DeleteHumanLoopResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteHumanLoopResponse] -> ShowS
$cshowList :: [DeleteHumanLoopResponse] -> ShowS
show :: DeleteHumanLoopResponse -> String
$cshow :: DeleteHumanLoopResponse -> String
showsPrec :: Int -> DeleteHumanLoopResponse -> ShowS
$cshowsPrec :: Int -> DeleteHumanLoopResponse -> ShowS
Prelude.Show, (forall x.
DeleteHumanLoopResponse -> Rep DeleteHumanLoopResponse x)
-> (forall x.
Rep DeleteHumanLoopResponse x -> DeleteHumanLoopResponse)
-> Generic DeleteHumanLoopResponse
forall x. Rep DeleteHumanLoopResponse x -> DeleteHumanLoopResponse
forall x. DeleteHumanLoopResponse -> Rep DeleteHumanLoopResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteHumanLoopResponse x -> DeleteHumanLoopResponse
$cfrom :: forall x. DeleteHumanLoopResponse -> Rep DeleteHumanLoopResponse x
Prelude.Generic)
newDeleteHumanLoopResponse ::
Prelude.Int ->
DeleteHumanLoopResponse
newDeleteHumanLoopResponse :: Int -> DeleteHumanLoopResponse
newDeleteHumanLoopResponse Int
pHttpStatus_ =
DeleteHumanLoopResponse' :: Int -> DeleteHumanLoopResponse
DeleteHumanLoopResponse' {$sel:httpStatus:DeleteHumanLoopResponse' :: Int
httpStatus = Int
pHttpStatus_}
deleteHumanLoopResponse_httpStatus :: Lens.Lens' DeleteHumanLoopResponse Prelude.Int
deleteHumanLoopResponse_httpStatus :: (Int -> f Int)
-> DeleteHumanLoopResponse -> f DeleteHumanLoopResponse
deleteHumanLoopResponse_httpStatus = (DeleteHumanLoopResponse -> Int)
-> (DeleteHumanLoopResponse -> Int -> DeleteHumanLoopResponse)
-> Lens DeleteHumanLoopResponse DeleteHumanLoopResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteHumanLoopResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteHumanLoopResponse' :: DeleteHumanLoopResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteHumanLoopResponse
s@DeleteHumanLoopResponse' {} Int
a -> DeleteHumanLoopResponse
s {$sel:httpStatus:DeleteHumanLoopResponse' :: Int
httpStatus = Int
a} :: DeleteHumanLoopResponse)
instance Prelude.NFData DeleteHumanLoopResponse