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