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