{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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
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]
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
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. 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' {$sel:humanLoopName:DeleteHumanLoop' :: Text
humanLoopName = Text
pHumanLoopName_}
deleteHumanLoop_humanLoopName :: Lens.Lens' DeleteHumanLoop Prelude.Text
deleteHumanLoop_humanLoopName :: Lens' DeleteHumanLoop Text
deleteHumanLoop_humanLoopName = 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 :: (Service -> Service) -> DeleteHumanLoop -> Request DeleteHumanLoop
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.delete (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DeleteHumanLoop
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteHumanLoop)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> DeleteHumanLoopResponse
DeleteHumanLoopResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable DeleteHumanLoop where
hashWithSalt :: Int -> DeleteHumanLoop -> Int
hashWithSalt Int
_salt DeleteHumanLoop' {Text
humanLoopName :: Text
$sel:humanLoopName:DeleteHumanLoop' :: DeleteHumanLoop -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
humanLoopName
instance Prelude.NFData DeleteHumanLoop where
rnf :: DeleteHumanLoop -> ()
rnf DeleteHumanLoop' {Text
humanLoopName :: Text
$sel:humanLoopName:DeleteHumanLoop' :: DeleteHumanLoop -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
humanLoopName
instance Data.ToHeaders DeleteHumanLoop where
toHeaders :: DeleteHumanLoop -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath DeleteHumanLoop where
toPath :: DeleteHumanLoop -> ByteString
toPath DeleteHumanLoop' {Text
humanLoopName :: Text
$sel:humanLoopName:DeleteHumanLoop' :: DeleteHumanLoop -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/human-loops/", forall a. ToByteString a => a -> ByteString
Data.toBS Text
humanLoopName]
instance Data.ToQuery DeleteHumanLoop where
toQuery :: DeleteHumanLoop -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DeleteHumanLoopResponse = DeleteHumanLoopResponse'
{
DeleteHumanLoopResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteHumanLoopResponse -> DeleteHumanLoopResponse -> Bool
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]
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
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. 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' {$sel:httpStatus:DeleteHumanLoopResponse' :: Int
httpStatus = Int
pHttpStatus_}
deleteHumanLoopResponse_httpStatus :: Lens.Lens' DeleteHumanLoopResponse Prelude.Int
deleteHumanLoopResponse_httpStatus :: Lens' DeleteHumanLoopResponse Int
deleteHumanLoopResponse_httpStatus = 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 where
rnf :: DeleteHumanLoopResponse -> ()
rnf DeleteHumanLoopResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteHumanLoopResponse' :: DeleteHumanLoopResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus