{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.EMR.Types.SessionMappingDetail where
import qualified Amazonka.Core as Core
import Amazonka.EMR.Types.IdentityType
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data SessionMappingDetail = SessionMappingDetail'
{
SessionMappingDetail -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
SessionMappingDetail -> Maybe Text
studioId :: Prelude.Maybe Prelude.Text,
SessionMappingDetail -> Maybe POSIX
lastModifiedTime :: Prelude.Maybe Core.POSIX,
SessionMappingDetail -> Maybe IdentityType
identityType :: Prelude.Maybe IdentityType,
SessionMappingDetail -> Maybe Text
identityId :: Prelude.Maybe Prelude.Text,
SessionMappingDetail -> Maybe Text
sessionPolicyArn :: Prelude.Maybe Prelude.Text,
SessionMappingDetail -> Maybe Text
identityName :: Prelude.Maybe Prelude.Text
}
deriving (SessionMappingDetail -> SessionMappingDetail -> Bool
(SessionMappingDetail -> SessionMappingDetail -> Bool)
-> (SessionMappingDetail -> SessionMappingDetail -> Bool)
-> Eq SessionMappingDetail
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SessionMappingDetail -> SessionMappingDetail -> Bool
$c/= :: SessionMappingDetail -> SessionMappingDetail -> Bool
== :: SessionMappingDetail -> SessionMappingDetail -> Bool
$c== :: SessionMappingDetail -> SessionMappingDetail -> Bool
Prelude.Eq, ReadPrec [SessionMappingDetail]
ReadPrec SessionMappingDetail
Int -> ReadS SessionMappingDetail
ReadS [SessionMappingDetail]
(Int -> ReadS SessionMappingDetail)
-> ReadS [SessionMappingDetail]
-> ReadPrec SessionMappingDetail
-> ReadPrec [SessionMappingDetail]
-> Read SessionMappingDetail
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SessionMappingDetail]
$creadListPrec :: ReadPrec [SessionMappingDetail]
readPrec :: ReadPrec SessionMappingDetail
$creadPrec :: ReadPrec SessionMappingDetail
readList :: ReadS [SessionMappingDetail]
$creadList :: ReadS [SessionMappingDetail]
readsPrec :: Int -> ReadS SessionMappingDetail
$creadsPrec :: Int -> ReadS SessionMappingDetail
Prelude.Read, Int -> SessionMappingDetail -> ShowS
[SessionMappingDetail] -> ShowS
SessionMappingDetail -> String
(Int -> SessionMappingDetail -> ShowS)
-> (SessionMappingDetail -> String)
-> ([SessionMappingDetail] -> ShowS)
-> Show SessionMappingDetail
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SessionMappingDetail] -> ShowS
$cshowList :: [SessionMappingDetail] -> ShowS
show :: SessionMappingDetail -> String
$cshow :: SessionMappingDetail -> String
showsPrec :: Int -> SessionMappingDetail -> ShowS
$cshowsPrec :: Int -> SessionMappingDetail -> ShowS
Prelude.Show, (forall x. SessionMappingDetail -> Rep SessionMappingDetail x)
-> (forall x. Rep SessionMappingDetail x -> SessionMappingDetail)
-> Generic SessionMappingDetail
forall x. Rep SessionMappingDetail x -> SessionMappingDetail
forall x. SessionMappingDetail -> Rep SessionMappingDetail x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SessionMappingDetail x -> SessionMappingDetail
$cfrom :: forall x. SessionMappingDetail -> Rep SessionMappingDetail x
Prelude.Generic)
newSessionMappingDetail ::
SessionMappingDetail
newSessionMappingDetail :: SessionMappingDetail
newSessionMappingDetail =
SessionMappingDetail' :: Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe IdentityType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SessionMappingDetail
SessionMappingDetail'
{ $sel:creationTime:SessionMappingDetail' :: Maybe POSIX
creationTime =
Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:studioId:SessionMappingDetail' :: Maybe Text
studioId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lastModifiedTime:SessionMappingDetail' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:identityType:SessionMappingDetail' :: Maybe IdentityType
identityType = Maybe IdentityType
forall a. Maybe a
Prelude.Nothing,
$sel:identityId:SessionMappingDetail' :: Maybe Text
identityId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:sessionPolicyArn:SessionMappingDetail' :: Maybe Text
sessionPolicyArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:identityName:SessionMappingDetail' :: Maybe Text
identityName = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
sessionMappingDetail_creationTime :: Lens.Lens' SessionMappingDetail (Prelude.Maybe Prelude.UTCTime)
sessionMappingDetail_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> SessionMappingDetail -> f SessionMappingDetail
sessionMappingDetail_creationTime = (SessionMappingDetail -> Maybe POSIX)
-> (SessionMappingDetail -> Maybe POSIX -> SessionMappingDetail)
-> Lens
SessionMappingDetail
SessionMappingDetail
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SessionMappingDetail' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:SessionMappingDetail' :: SessionMappingDetail -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: SessionMappingDetail
s@SessionMappingDetail' {} Maybe POSIX
a -> SessionMappingDetail
s {$sel:creationTime:SessionMappingDetail' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: SessionMappingDetail) ((Maybe POSIX -> f (Maybe POSIX))
-> SessionMappingDetail -> f SessionMappingDetail)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> SessionMappingDetail
-> f SessionMappingDetail
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
sessionMappingDetail_studioId :: Lens.Lens' SessionMappingDetail (Prelude.Maybe Prelude.Text)
sessionMappingDetail_studioId :: (Maybe Text -> f (Maybe Text))
-> SessionMappingDetail -> f SessionMappingDetail
sessionMappingDetail_studioId = (SessionMappingDetail -> Maybe Text)
-> (SessionMappingDetail -> Maybe Text -> SessionMappingDetail)
-> Lens
SessionMappingDetail SessionMappingDetail (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SessionMappingDetail' {Maybe Text
studioId :: Maybe Text
$sel:studioId:SessionMappingDetail' :: SessionMappingDetail -> Maybe Text
studioId} -> Maybe Text
studioId) (\s :: SessionMappingDetail
s@SessionMappingDetail' {} Maybe Text
a -> SessionMappingDetail
s {$sel:studioId:SessionMappingDetail' :: Maybe Text
studioId = Maybe Text
a} :: SessionMappingDetail)
sessionMappingDetail_lastModifiedTime :: Lens.Lens' SessionMappingDetail (Prelude.Maybe Prelude.UTCTime)
sessionMappingDetail_lastModifiedTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> SessionMappingDetail -> f SessionMappingDetail
sessionMappingDetail_lastModifiedTime = (SessionMappingDetail -> Maybe POSIX)
-> (SessionMappingDetail -> Maybe POSIX -> SessionMappingDetail)
-> Lens
SessionMappingDetail
SessionMappingDetail
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SessionMappingDetail' {Maybe POSIX
lastModifiedTime :: Maybe POSIX
$sel:lastModifiedTime:SessionMappingDetail' :: SessionMappingDetail -> Maybe POSIX
lastModifiedTime} -> Maybe POSIX
lastModifiedTime) (\s :: SessionMappingDetail
s@SessionMappingDetail' {} Maybe POSIX
a -> SessionMappingDetail
s {$sel:lastModifiedTime:SessionMappingDetail' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
a} :: SessionMappingDetail) ((Maybe POSIX -> f (Maybe POSIX))
-> SessionMappingDetail -> f SessionMappingDetail)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> SessionMappingDetail
-> f SessionMappingDetail
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
sessionMappingDetail_identityType :: Lens.Lens' SessionMappingDetail (Prelude.Maybe IdentityType)
sessionMappingDetail_identityType :: (Maybe IdentityType -> f (Maybe IdentityType))
-> SessionMappingDetail -> f SessionMappingDetail
sessionMappingDetail_identityType = (SessionMappingDetail -> Maybe IdentityType)
-> (SessionMappingDetail
-> Maybe IdentityType -> SessionMappingDetail)
-> Lens
SessionMappingDetail
SessionMappingDetail
(Maybe IdentityType)
(Maybe IdentityType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SessionMappingDetail' {Maybe IdentityType
identityType :: Maybe IdentityType
$sel:identityType:SessionMappingDetail' :: SessionMappingDetail -> Maybe IdentityType
identityType} -> Maybe IdentityType
identityType) (\s :: SessionMappingDetail
s@SessionMappingDetail' {} Maybe IdentityType
a -> SessionMappingDetail
s {$sel:identityType:SessionMappingDetail' :: Maybe IdentityType
identityType = Maybe IdentityType
a} :: SessionMappingDetail)
sessionMappingDetail_identityId :: Lens.Lens' SessionMappingDetail (Prelude.Maybe Prelude.Text)
sessionMappingDetail_identityId :: (Maybe Text -> f (Maybe Text))
-> SessionMappingDetail -> f SessionMappingDetail
sessionMappingDetail_identityId = (SessionMappingDetail -> Maybe Text)
-> (SessionMappingDetail -> Maybe Text -> SessionMappingDetail)
-> Lens
SessionMappingDetail SessionMappingDetail (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SessionMappingDetail' {Maybe Text
identityId :: Maybe Text
$sel:identityId:SessionMappingDetail' :: SessionMappingDetail -> Maybe Text
identityId} -> Maybe Text
identityId) (\s :: SessionMappingDetail
s@SessionMappingDetail' {} Maybe Text
a -> SessionMappingDetail
s {$sel:identityId:SessionMappingDetail' :: Maybe Text
identityId = Maybe Text
a} :: SessionMappingDetail)
sessionMappingDetail_sessionPolicyArn :: Lens.Lens' SessionMappingDetail (Prelude.Maybe Prelude.Text)
sessionMappingDetail_sessionPolicyArn :: (Maybe Text -> f (Maybe Text))
-> SessionMappingDetail -> f SessionMappingDetail
sessionMappingDetail_sessionPolicyArn = (SessionMappingDetail -> Maybe Text)
-> (SessionMappingDetail -> Maybe Text -> SessionMappingDetail)
-> Lens
SessionMappingDetail SessionMappingDetail (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SessionMappingDetail' {Maybe Text
sessionPolicyArn :: Maybe Text
$sel:sessionPolicyArn:SessionMappingDetail' :: SessionMappingDetail -> Maybe Text
sessionPolicyArn} -> Maybe Text
sessionPolicyArn) (\s :: SessionMappingDetail
s@SessionMappingDetail' {} Maybe Text
a -> SessionMappingDetail
s {$sel:sessionPolicyArn:SessionMappingDetail' :: Maybe Text
sessionPolicyArn = Maybe Text
a} :: SessionMappingDetail)
sessionMappingDetail_identityName :: Lens.Lens' SessionMappingDetail (Prelude.Maybe Prelude.Text)
sessionMappingDetail_identityName :: (Maybe Text -> f (Maybe Text))
-> SessionMappingDetail -> f SessionMappingDetail
sessionMappingDetail_identityName = (SessionMappingDetail -> Maybe Text)
-> (SessionMappingDetail -> Maybe Text -> SessionMappingDetail)
-> Lens
SessionMappingDetail SessionMappingDetail (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SessionMappingDetail' {Maybe Text
identityName :: Maybe Text
$sel:identityName:SessionMappingDetail' :: SessionMappingDetail -> Maybe Text
identityName} -> Maybe Text
identityName) (\s :: SessionMappingDetail
s@SessionMappingDetail' {} Maybe Text
a -> SessionMappingDetail
s {$sel:identityName:SessionMappingDetail' :: Maybe Text
identityName = Maybe Text
a} :: SessionMappingDetail)
instance Core.FromJSON SessionMappingDetail where
parseJSON :: Value -> Parser SessionMappingDetail
parseJSON =
String
-> (Object -> Parser SessionMappingDetail)
-> Value
-> Parser SessionMappingDetail
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"SessionMappingDetail"
( \Object
x ->
Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe IdentityType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SessionMappingDetail
SessionMappingDetail'
(Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe IdentityType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SessionMappingDetail)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text
-> Maybe POSIX
-> Maybe IdentityType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SessionMappingDetail)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreationTime")
Parser
(Maybe Text
-> Maybe POSIX
-> Maybe IdentityType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SessionMappingDetail)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe IdentityType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SessionMappingDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StudioId")
Parser
(Maybe POSIX
-> Maybe IdentityType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SessionMappingDetail)
-> Parser (Maybe POSIX)
-> Parser
(Maybe IdentityType
-> Maybe Text -> Maybe Text -> Maybe Text -> SessionMappingDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LastModifiedTime")
Parser
(Maybe IdentityType
-> Maybe Text -> Maybe Text -> Maybe Text -> SessionMappingDetail)
-> Parser (Maybe IdentityType)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Text -> SessionMappingDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe IdentityType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IdentityType")
Parser
(Maybe Text -> Maybe Text -> Maybe Text -> SessionMappingDetail)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> SessionMappingDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IdentityId")
Parser (Maybe Text -> Maybe Text -> SessionMappingDetail)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> SessionMappingDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SessionPolicyArn")
Parser (Maybe Text -> SessionMappingDetail)
-> Parser (Maybe Text) -> Parser SessionMappingDetail
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IdentityName")
)
instance Prelude.Hashable SessionMappingDetail
instance Prelude.NFData SessionMappingDetail