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