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