{-# 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.IAM.Types.TrackedActionLastAccessed where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data TrackedActionLastAccessed = TrackedActionLastAccessed'
{
TrackedActionLastAccessed -> Maybe ISO8601
lastAccessedTime :: Prelude.Maybe Core.ISO8601,
TrackedActionLastAccessed -> Maybe Text
actionName :: Prelude.Maybe Prelude.Text,
TrackedActionLastAccessed -> Maybe Text
lastAccessedEntity :: Prelude.Maybe Prelude.Text,
TrackedActionLastAccessed -> Maybe Text
lastAccessedRegion :: Prelude.Maybe Prelude.Text
}
deriving (TrackedActionLastAccessed -> TrackedActionLastAccessed -> Bool
(TrackedActionLastAccessed -> TrackedActionLastAccessed -> Bool)
-> (TrackedActionLastAccessed -> TrackedActionLastAccessed -> Bool)
-> Eq TrackedActionLastAccessed
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TrackedActionLastAccessed -> TrackedActionLastAccessed -> Bool
$c/= :: TrackedActionLastAccessed -> TrackedActionLastAccessed -> Bool
== :: TrackedActionLastAccessed -> TrackedActionLastAccessed -> Bool
$c== :: TrackedActionLastAccessed -> TrackedActionLastAccessed -> Bool
Prelude.Eq, ReadPrec [TrackedActionLastAccessed]
ReadPrec TrackedActionLastAccessed
Int -> ReadS TrackedActionLastAccessed
ReadS [TrackedActionLastAccessed]
(Int -> ReadS TrackedActionLastAccessed)
-> ReadS [TrackedActionLastAccessed]
-> ReadPrec TrackedActionLastAccessed
-> ReadPrec [TrackedActionLastAccessed]
-> Read TrackedActionLastAccessed
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TrackedActionLastAccessed]
$creadListPrec :: ReadPrec [TrackedActionLastAccessed]
readPrec :: ReadPrec TrackedActionLastAccessed
$creadPrec :: ReadPrec TrackedActionLastAccessed
readList :: ReadS [TrackedActionLastAccessed]
$creadList :: ReadS [TrackedActionLastAccessed]
readsPrec :: Int -> ReadS TrackedActionLastAccessed
$creadsPrec :: Int -> ReadS TrackedActionLastAccessed
Prelude.Read, Int -> TrackedActionLastAccessed -> ShowS
[TrackedActionLastAccessed] -> ShowS
TrackedActionLastAccessed -> String
(Int -> TrackedActionLastAccessed -> ShowS)
-> (TrackedActionLastAccessed -> String)
-> ([TrackedActionLastAccessed] -> ShowS)
-> Show TrackedActionLastAccessed
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TrackedActionLastAccessed] -> ShowS
$cshowList :: [TrackedActionLastAccessed] -> ShowS
show :: TrackedActionLastAccessed -> String
$cshow :: TrackedActionLastAccessed -> String
showsPrec :: Int -> TrackedActionLastAccessed -> ShowS
$cshowsPrec :: Int -> TrackedActionLastAccessed -> ShowS
Prelude.Show, (forall x.
TrackedActionLastAccessed -> Rep TrackedActionLastAccessed x)
-> (forall x.
Rep TrackedActionLastAccessed x -> TrackedActionLastAccessed)
-> Generic TrackedActionLastAccessed
forall x.
Rep TrackedActionLastAccessed x -> TrackedActionLastAccessed
forall x.
TrackedActionLastAccessed -> Rep TrackedActionLastAccessed x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep TrackedActionLastAccessed x -> TrackedActionLastAccessed
$cfrom :: forall x.
TrackedActionLastAccessed -> Rep TrackedActionLastAccessed x
Prelude.Generic)
newTrackedActionLastAccessed ::
TrackedActionLastAccessed
newTrackedActionLastAccessed :: TrackedActionLastAccessed
newTrackedActionLastAccessed =
TrackedActionLastAccessed' :: Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> TrackedActionLastAccessed
TrackedActionLastAccessed'
{ $sel:lastAccessedTime:TrackedActionLastAccessed' :: Maybe ISO8601
lastAccessedTime =
Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
$sel:actionName:TrackedActionLastAccessed' :: Maybe Text
actionName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lastAccessedEntity:TrackedActionLastAccessed' :: Maybe Text
lastAccessedEntity = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lastAccessedRegion:TrackedActionLastAccessed' :: Maybe Text
lastAccessedRegion = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
trackedActionLastAccessed_lastAccessedTime :: Lens.Lens' TrackedActionLastAccessed (Prelude.Maybe Prelude.UTCTime)
trackedActionLastAccessed_lastAccessedTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> TrackedActionLastAccessed -> f TrackedActionLastAccessed
trackedActionLastAccessed_lastAccessedTime = (TrackedActionLastAccessed -> Maybe ISO8601)
-> (TrackedActionLastAccessed
-> Maybe ISO8601 -> TrackedActionLastAccessed)
-> Lens
TrackedActionLastAccessed
TrackedActionLastAccessed
(Maybe ISO8601)
(Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrackedActionLastAccessed' {Maybe ISO8601
lastAccessedTime :: Maybe ISO8601
$sel:lastAccessedTime:TrackedActionLastAccessed' :: TrackedActionLastAccessed -> Maybe ISO8601
lastAccessedTime} -> Maybe ISO8601
lastAccessedTime) (\s :: TrackedActionLastAccessed
s@TrackedActionLastAccessed' {} Maybe ISO8601
a -> TrackedActionLastAccessed
s {$sel:lastAccessedTime:TrackedActionLastAccessed' :: Maybe ISO8601
lastAccessedTime = Maybe ISO8601
a} :: TrackedActionLastAccessed) ((Maybe ISO8601 -> f (Maybe ISO8601))
-> TrackedActionLastAccessed -> f TrackedActionLastAccessed)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> TrackedActionLastAccessed
-> f TrackedActionLastAccessed
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso ISO8601 ISO8601 UTCTime UTCTime
-> Iso
(Maybe ISO8601) (Maybe ISO8601) (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 ISO8601 ISO8601 UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
trackedActionLastAccessed_actionName :: Lens.Lens' TrackedActionLastAccessed (Prelude.Maybe Prelude.Text)
trackedActionLastAccessed_actionName :: (Maybe Text -> f (Maybe Text))
-> TrackedActionLastAccessed -> f TrackedActionLastAccessed
trackedActionLastAccessed_actionName = (TrackedActionLastAccessed -> Maybe Text)
-> (TrackedActionLastAccessed
-> Maybe Text -> TrackedActionLastAccessed)
-> Lens
TrackedActionLastAccessed
TrackedActionLastAccessed
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrackedActionLastAccessed' {Maybe Text
actionName :: Maybe Text
$sel:actionName:TrackedActionLastAccessed' :: TrackedActionLastAccessed -> Maybe Text
actionName} -> Maybe Text
actionName) (\s :: TrackedActionLastAccessed
s@TrackedActionLastAccessed' {} Maybe Text
a -> TrackedActionLastAccessed
s {$sel:actionName:TrackedActionLastAccessed' :: Maybe Text
actionName = Maybe Text
a} :: TrackedActionLastAccessed)
trackedActionLastAccessed_lastAccessedEntity :: Lens.Lens' TrackedActionLastAccessed (Prelude.Maybe Prelude.Text)
trackedActionLastAccessed_lastAccessedEntity :: (Maybe Text -> f (Maybe Text))
-> TrackedActionLastAccessed -> f TrackedActionLastAccessed
trackedActionLastAccessed_lastAccessedEntity = (TrackedActionLastAccessed -> Maybe Text)
-> (TrackedActionLastAccessed
-> Maybe Text -> TrackedActionLastAccessed)
-> Lens
TrackedActionLastAccessed
TrackedActionLastAccessed
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrackedActionLastAccessed' {Maybe Text
lastAccessedEntity :: Maybe Text
$sel:lastAccessedEntity:TrackedActionLastAccessed' :: TrackedActionLastAccessed -> Maybe Text
lastAccessedEntity} -> Maybe Text
lastAccessedEntity) (\s :: TrackedActionLastAccessed
s@TrackedActionLastAccessed' {} Maybe Text
a -> TrackedActionLastAccessed
s {$sel:lastAccessedEntity:TrackedActionLastAccessed' :: Maybe Text
lastAccessedEntity = Maybe Text
a} :: TrackedActionLastAccessed)
trackedActionLastAccessed_lastAccessedRegion :: Lens.Lens' TrackedActionLastAccessed (Prelude.Maybe Prelude.Text)
trackedActionLastAccessed_lastAccessedRegion :: (Maybe Text -> f (Maybe Text))
-> TrackedActionLastAccessed -> f TrackedActionLastAccessed
trackedActionLastAccessed_lastAccessedRegion = (TrackedActionLastAccessed -> Maybe Text)
-> (TrackedActionLastAccessed
-> Maybe Text -> TrackedActionLastAccessed)
-> Lens
TrackedActionLastAccessed
TrackedActionLastAccessed
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrackedActionLastAccessed' {Maybe Text
lastAccessedRegion :: Maybe Text
$sel:lastAccessedRegion:TrackedActionLastAccessed' :: TrackedActionLastAccessed -> Maybe Text
lastAccessedRegion} -> Maybe Text
lastAccessedRegion) (\s :: TrackedActionLastAccessed
s@TrackedActionLastAccessed' {} Maybe Text
a -> TrackedActionLastAccessed
s {$sel:lastAccessedRegion:TrackedActionLastAccessed' :: Maybe Text
lastAccessedRegion = Maybe Text
a} :: TrackedActionLastAccessed)
instance Core.FromXML TrackedActionLastAccessed where
parseXML :: [Node] -> Either String TrackedActionLastAccessed
parseXML [Node]
x =
Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> TrackedActionLastAccessed
TrackedActionLastAccessed'
(Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> TrackedActionLastAccessed)
-> Either String (Maybe ISO8601)
-> Either
String
(Maybe Text
-> Maybe Text -> Maybe Text -> TrackedActionLastAccessed)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe ISO8601)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"LastAccessedTime")
Either
String
(Maybe Text
-> Maybe Text -> Maybe Text -> TrackedActionLastAccessed)
-> Either String (Maybe Text)
-> Either
String (Maybe Text -> Maybe Text -> TrackedActionLastAccessed)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ActionName")
Either
String (Maybe Text -> Maybe Text -> TrackedActionLastAccessed)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> TrackedActionLastAccessed)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"LastAccessedEntity")
Either String (Maybe Text -> TrackedActionLastAccessed)
-> Either String (Maybe Text)
-> Either String TrackedActionLastAccessed
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"LastAccessedRegion")
instance Prelude.Hashable TrackedActionLastAccessed
instance Prelude.NFData TrackedActionLastAccessed