{-# 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.EMR.StopNotebookExecution
(
StopNotebookExecution (..),
newStopNotebookExecution,
stopNotebookExecution_notebookExecutionId,
StopNotebookExecutionResponse (..),
newStopNotebookExecutionResponse,
)
where
import qualified Amazonka.Core as Core
import Amazonka.EMR.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data StopNotebookExecution = StopNotebookExecution'
{
StopNotebookExecution -> Text
notebookExecutionId :: Prelude.Text
}
deriving (StopNotebookExecution -> StopNotebookExecution -> Bool
(StopNotebookExecution -> StopNotebookExecution -> Bool)
-> (StopNotebookExecution -> StopNotebookExecution -> Bool)
-> Eq StopNotebookExecution
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StopNotebookExecution -> StopNotebookExecution -> Bool
$c/= :: StopNotebookExecution -> StopNotebookExecution -> Bool
== :: StopNotebookExecution -> StopNotebookExecution -> Bool
$c== :: StopNotebookExecution -> StopNotebookExecution -> Bool
Prelude.Eq, ReadPrec [StopNotebookExecution]
ReadPrec StopNotebookExecution
Int -> ReadS StopNotebookExecution
ReadS [StopNotebookExecution]
(Int -> ReadS StopNotebookExecution)
-> ReadS [StopNotebookExecution]
-> ReadPrec StopNotebookExecution
-> ReadPrec [StopNotebookExecution]
-> Read StopNotebookExecution
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StopNotebookExecution]
$creadListPrec :: ReadPrec [StopNotebookExecution]
readPrec :: ReadPrec StopNotebookExecution
$creadPrec :: ReadPrec StopNotebookExecution
readList :: ReadS [StopNotebookExecution]
$creadList :: ReadS [StopNotebookExecution]
readsPrec :: Int -> ReadS StopNotebookExecution
$creadsPrec :: Int -> ReadS StopNotebookExecution
Prelude.Read, Int -> StopNotebookExecution -> ShowS
[StopNotebookExecution] -> ShowS
StopNotebookExecution -> String
(Int -> StopNotebookExecution -> ShowS)
-> (StopNotebookExecution -> String)
-> ([StopNotebookExecution] -> ShowS)
-> Show StopNotebookExecution
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StopNotebookExecution] -> ShowS
$cshowList :: [StopNotebookExecution] -> ShowS
show :: StopNotebookExecution -> String
$cshow :: StopNotebookExecution -> String
showsPrec :: Int -> StopNotebookExecution -> ShowS
$cshowsPrec :: Int -> StopNotebookExecution -> ShowS
Prelude.Show, (forall x. StopNotebookExecution -> Rep StopNotebookExecution x)
-> (forall x. Rep StopNotebookExecution x -> StopNotebookExecution)
-> Generic StopNotebookExecution
forall x. Rep StopNotebookExecution x -> StopNotebookExecution
forall x. StopNotebookExecution -> Rep StopNotebookExecution x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StopNotebookExecution x -> StopNotebookExecution
$cfrom :: forall x. StopNotebookExecution -> Rep StopNotebookExecution x
Prelude.Generic)
newStopNotebookExecution ::
Prelude.Text ->
StopNotebookExecution
newStopNotebookExecution :: Text -> StopNotebookExecution
newStopNotebookExecution Text
pNotebookExecutionId_ =
StopNotebookExecution' :: Text -> StopNotebookExecution
StopNotebookExecution'
{ $sel:notebookExecutionId:StopNotebookExecution' :: Text
notebookExecutionId =
Text
pNotebookExecutionId_
}
stopNotebookExecution_notebookExecutionId :: Lens.Lens' StopNotebookExecution Prelude.Text
stopNotebookExecution_notebookExecutionId :: (Text -> f Text)
-> StopNotebookExecution -> f StopNotebookExecution
stopNotebookExecution_notebookExecutionId = (StopNotebookExecution -> Text)
-> (StopNotebookExecution -> Text -> StopNotebookExecution)
-> Lens StopNotebookExecution StopNotebookExecution Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StopNotebookExecution' {Text
notebookExecutionId :: Text
$sel:notebookExecutionId:StopNotebookExecution' :: StopNotebookExecution -> Text
notebookExecutionId} -> Text
notebookExecutionId) (\s :: StopNotebookExecution
s@StopNotebookExecution' {} Text
a -> StopNotebookExecution
s {$sel:notebookExecutionId:StopNotebookExecution' :: Text
notebookExecutionId = Text
a} :: StopNotebookExecution)
instance Core.AWSRequest StopNotebookExecution where
type
AWSResponse StopNotebookExecution =
StopNotebookExecutionResponse
request :: StopNotebookExecution -> Request StopNotebookExecution
request = Service -> StopNotebookExecution -> Request StopNotebookExecution
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy StopNotebookExecution
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse StopNotebookExecution)))
response =
AWSResponse StopNotebookExecution
-> Logger
-> Service
-> Proxy StopNotebookExecution
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse StopNotebookExecution)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse StopNotebookExecution
StopNotebookExecutionResponse
StopNotebookExecutionResponse'
instance Prelude.Hashable StopNotebookExecution
instance Prelude.NFData StopNotebookExecution
instance Core.ToHeaders StopNotebookExecution where
toHeaders :: StopNotebookExecution -> [Header]
toHeaders =
[Header] -> StopNotebookExecution -> [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
"ElasticMapReduce.StopNotebookExecution" ::
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 StopNotebookExecution where
toJSON :: StopNotebookExecution -> Value
toJSON StopNotebookExecution' {Text
notebookExecutionId :: Text
$sel:notebookExecutionId:StopNotebookExecution' :: StopNotebookExecution -> 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
"NotebookExecutionId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
notebookExecutionId)
]
)
instance Core.ToPath StopNotebookExecution where
toPath :: StopNotebookExecution -> ByteString
toPath = ByteString -> StopNotebookExecution -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery StopNotebookExecution where
toQuery :: StopNotebookExecution -> QueryString
toQuery = QueryString -> StopNotebookExecution -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data StopNotebookExecutionResponse = StopNotebookExecutionResponse'
{
}
deriving (StopNotebookExecutionResponse
-> StopNotebookExecutionResponse -> Bool
(StopNotebookExecutionResponse
-> StopNotebookExecutionResponse -> Bool)
-> (StopNotebookExecutionResponse
-> StopNotebookExecutionResponse -> Bool)
-> Eq StopNotebookExecutionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StopNotebookExecutionResponse
-> StopNotebookExecutionResponse -> Bool
$c/= :: StopNotebookExecutionResponse
-> StopNotebookExecutionResponse -> Bool
== :: StopNotebookExecutionResponse
-> StopNotebookExecutionResponse -> Bool
$c== :: StopNotebookExecutionResponse
-> StopNotebookExecutionResponse -> Bool
Prelude.Eq, ReadPrec [StopNotebookExecutionResponse]
ReadPrec StopNotebookExecutionResponse
Int -> ReadS StopNotebookExecutionResponse
ReadS [StopNotebookExecutionResponse]
(Int -> ReadS StopNotebookExecutionResponse)
-> ReadS [StopNotebookExecutionResponse]
-> ReadPrec StopNotebookExecutionResponse
-> ReadPrec [StopNotebookExecutionResponse]
-> Read StopNotebookExecutionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StopNotebookExecutionResponse]
$creadListPrec :: ReadPrec [StopNotebookExecutionResponse]
readPrec :: ReadPrec StopNotebookExecutionResponse
$creadPrec :: ReadPrec StopNotebookExecutionResponse
readList :: ReadS [StopNotebookExecutionResponse]
$creadList :: ReadS [StopNotebookExecutionResponse]
readsPrec :: Int -> ReadS StopNotebookExecutionResponse
$creadsPrec :: Int -> ReadS StopNotebookExecutionResponse
Prelude.Read, Int -> StopNotebookExecutionResponse -> ShowS
[StopNotebookExecutionResponse] -> ShowS
StopNotebookExecutionResponse -> String
(Int -> StopNotebookExecutionResponse -> ShowS)
-> (StopNotebookExecutionResponse -> String)
-> ([StopNotebookExecutionResponse] -> ShowS)
-> Show StopNotebookExecutionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StopNotebookExecutionResponse] -> ShowS
$cshowList :: [StopNotebookExecutionResponse] -> ShowS
show :: StopNotebookExecutionResponse -> String
$cshow :: StopNotebookExecutionResponse -> String
showsPrec :: Int -> StopNotebookExecutionResponse -> ShowS
$cshowsPrec :: Int -> StopNotebookExecutionResponse -> ShowS
Prelude.Show, (forall x.
StopNotebookExecutionResponse
-> Rep StopNotebookExecutionResponse x)
-> (forall x.
Rep StopNotebookExecutionResponse x
-> StopNotebookExecutionResponse)
-> Generic StopNotebookExecutionResponse
forall x.
Rep StopNotebookExecutionResponse x
-> StopNotebookExecutionResponse
forall x.
StopNotebookExecutionResponse
-> Rep StopNotebookExecutionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StopNotebookExecutionResponse x
-> StopNotebookExecutionResponse
$cfrom :: forall x.
StopNotebookExecutionResponse
-> Rep StopNotebookExecutionResponse x
Prelude.Generic)
newStopNotebookExecutionResponse ::
StopNotebookExecutionResponse
newStopNotebookExecutionResponse :: StopNotebookExecutionResponse
newStopNotebookExecutionResponse =
StopNotebookExecutionResponse
StopNotebookExecutionResponse'
instance Prelude.NFData StopNotebookExecutionResponse