{-# 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.SageMaker.DeleteHub
(
DeleteHub (..),
newDeleteHub,
deleteHub_hubName,
DeleteHubResponse (..),
newDeleteHubResponse,
)
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.SageMaker.Types
data DeleteHub = DeleteHub'
{
DeleteHub -> Text
hubName :: Prelude.Text
}
deriving (DeleteHub -> DeleteHub -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteHub -> DeleteHub -> Bool
$c/= :: DeleteHub -> DeleteHub -> Bool
== :: DeleteHub -> DeleteHub -> Bool
$c== :: DeleteHub -> DeleteHub -> Bool
Prelude.Eq, ReadPrec [DeleteHub]
ReadPrec DeleteHub
Int -> ReadS DeleteHub
ReadS [DeleteHub]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteHub]
$creadListPrec :: ReadPrec [DeleteHub]
readPrec :: ReadPrec DeleteHub
$creadPrec :: ReadPrec DeleteHub
readList :: ReadS [DeleteHub]
$creadList :: ReadS [DeleteHub]
readsPrec :: Int -> ReadS DeleteHub
$creadsPrec :: Int -> ReadS DeleteHub
Prelude.Read, Int -> DeleteHub -> ShowS
[DeleteHub] -> ShowS
DeleteHub -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteHub] -> ShowS
$cshowList :: [DeleteHub] -> ShowS
show :: DeleteHub -> String
$cshow :: DeleteHub -> String
showsPrec :: Int -> DeleteHub -> ShowS
$cshowsPrec :: Int -> DeleteHub -> ShowS
Prelude.Show, forall x. Rep DeleteHub x -> DeleteHub
forall x. DeleteHub -> Rep DeleteHub x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteHub x -> DeleteHub
$cfrom :: forall x. DeleteHub -> Rep DeleteHub x
Prelude.Generic)
newDeleteHub ::
Prelude.Text ->
DeleteHub
newDeleteHub :: Text -> DeleteHub
newDeleteHub Text
pHubName_ =
DeleteHub' {$sel:hubName:DeleteHub' :: Text
hubName = Text
pHubName_}
deleteHub_hubName :: Lens.Lens' DeleteHub Prelude.Text
deleteHub_hubName :: Lens' DeleteHub Text
deleteHub_hubName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteHub' {Text
hubName :: Text
$sel:hubName:DeleteHub' :: DeleteHub -> Text
hubName} -> Text
hubName) (\s :: DeleteHub
s@DeleteHub' {} Text
a -> DeleteHub
s {$sel:hubName:DeleteHub' :: Text
hubName = Text
a} :: DeleteHub)
instance Core.AWSRequest DeleteHub where
type AWSResponse DeleteHub = DeleteHubResponse
request :: (Service -> Service) -> DeleteHub -> Request DeleteHub
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DeleteHub
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteHub)))
response = forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull DeleteHubResponse
DeleteHubResponse'
instance Prelude.Hashable DeleteHub where
hashWithSalt :: Int -> DeleteHub -> Int
hashWithSalt Int
_salt DeleteHub' {Text
hubName :: Text
$sel:hubName:DeleteHub' :: DeleteHub -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
hubName
instance Prelude.NFData DeleteHub where
rnf :: DeleteHub -> ()
rnf DeleteHub' {Text
hubName :: Text
$sel:hubName:DeleteHub' :: DeleteHub -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
hubName
instance Data.ToHeaders DeleteHub where
toHeaders :: DeleteHub -> [Header]
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
forall a. ToHeader a => HeaderName -> a -> [Header]
Data.=# (ByteString
"SageMaker.DeleteHub" :: Prelude.ByteString),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> [Header]
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON DeleteHub where
toJSON :: DeleteHub -> Value
toJSON DeleteHub' {Text
hubName :: Text
$sel:hubName:DeleteHub' :: DeleteHub -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[forall a. a -> Maybe a
Prelude.Just (Key
"HubName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
hubName)]
)
instance Data.ToPath DeleteHub where
toPath :: DeleteHub -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery DeleteHub where
toQuery :: DeleteHub -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DeleteHubResponse = DeleteHubResponse'
{
}
deriving (DeleteHubResponse -> DeleteHubResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteHubResponse -> DeleteHubResponse -> Bool
$c/= :: DeleteHubResponse -> DeleteHubResponse -> Bool
== :: DeleteHubResponse -> DeleteHubResponse -> Bool
$c== :: DeleteHubResponse -> DeleteHubResponse -> Bool
Prelude.Eq, ReadPrec [DeleteHubResponse]
ReadPrec DeleteHubResponse
Int -> ReadS DeleteHubResponse
ReadS [DeleteHubResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteHubResponse]
$creadListPrec :: ReadPrec [DeleteHubResponse]
readPrec :: ReadPrec DeleteHubResponse
$creadPrec :: ReadPrec DeleteHubResponse
readList :: ReadS [DeleteHubResponse]
$creadList :: ReadS [DeleteHubResponse]
readsPrec :: Int -> ReadS DeleteHubResponse
$creadsPrec :: Int -> ReadS DeleteHubResponse
Prelude.Read, Int -> DeleteHubResponse -> ShowS
[DeleteHubResponse] -> ShowS
DeleteHubResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteHubResponse] -> ShowS
$cshowList :: [DeleteHubResponse] -> ShowS
show :: DeleteHubResponse -> String
$cshow :: DeleteHubResponse -> String
showsPrec :: Int -> DeleteHubResponse -> ShowS
$cshowsPrec :: Int -> DeleteHubResponse -> ShowS
Prelude.Show, forall x. Rep DeleteHubResponse x -> DeleteHubResponse
forall x. DeleteHubResponse -> Rep DeleteHubResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteHubResponse x -> DeleteHubResponse
$cfrom :: forall x. DeleteHubResponse -> Rep DeleteHubResponse x
Prelude.Generic)
newDeleteHubResponse ::
DeleteHubResponse
newDeleteHubResponse :: DeleteHubResponse
newDeleteHubResponse = DeleteHubResponse
DeleteHubResponse'
instance Prelude.NFData DeleteHubResponse where
rnf :: DeleteHubResponse -> ()
rnf DeleteHubResponse
_ = ()