{-# 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.Personalize.Types.EventTrackerSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data EventTrackerSummary = EventTrackerSummary'
{
EventTrackerSummary -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
EventTrackerSummary -> Maybe POSIX
lastUpdatedDateTime :: Prelude.Maybe Core.POSIX,
EventTrackerSummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
EventTrackerSummary -> Maybe POSIX
creationDateTime :: Prelude.Maybe Core.POSIX,
EventTrackerSummary -> Maybe Text
eventTrackerArn :: Prelude.Maybe Prelude.Text
}
deriving (EventTrackerSummary -> EventTrackerSummary -> Bool
(EventTrackerSummary -> EventTrackerSummary -> Bool)
-> (EventTrackerSummary -> EventTrackerSummary -> Bool)
-> Eq EventTrackerSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EventTrackerSummary -> EventTrackerSummary -> Bool
$c/= :: EventTrackerSummary -> EventTrackerSummary -> Bool
== :: EventTrackerSummary -> EventTrackerSummary -> Bool
$c== :: EventTrackerSummary -> EventTrackerSummary -> Bool
Prelude.Eq, ReadPrec [EventTrackerSummary]
ReadPrec EventTrackerSummary
Int -> ReadS EventTrackerSummary
ReadS [EventTrackerSummary]
(Int -> ReadS EventTrackerSummary)
-> ReadS [EventTrackerSummary]
-> ReadPrec EventTrackerSummary
-> ReadPrec [EventTrackerSummary]
-> Read EventTrackerSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EventTrackerSummary]
$creadListPrec :: ReadPrec [EventTrackerSummary]
readPrec :: ReadPrec EventTrackerSummary
$creadPrec :: ReadPrec EventTrackerSummary
readList :: ReadS [EventTrackerSummary]
$creadList :: ReadS [EventTrackerSummary]
readsPrec :: Int -> ReadS EventTrackerSummary
$creadsPrec :: Int -> ReadS EventTrackerSummary
Prelude.Read, Int -> EventTrackerSummary -> ShowS
[EventTrackerSummary] -> ShowS
EventTrackerSummary -> String
(Int -> EventTrackerSummary -> ShowS)
-> (EventTrackerSummary -> String)
-> ([EventTrackerSummary] -> ShowS)
-> Show EventTrackerSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EventTrackerSummary] -> ShowS
$cshowList :: [EventTrackerSummary] -> ShowS
show :: EventTrackerSummary -> String
$cshow :: EventTrackerSummary -> String
showsPrec :: Int -> EventTrackerSummary -> ShowS
$cshowsPrec :: Int -> EventTrackerSummary -> ShowS
Prelude.Show, (forall x. EventTrackerSummary -> Rep EventTrackerSummary x)
-> (forall x. Rep EventTrackerSummary x -> EventTrackerSummary)
-> Generic EventTrackerSummary
forall x. Rep EventTrackerSummary x -> EventTrackerSummary
forall x. EventTrackerSummary -> Rep EventTrackerSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep EventTrackerSummary x -> EventTrackerSummary
$cfrom :: forall x. EventTrackerSummary -> Rep EventTrackerSummary x
Prelude.Generic)
newEventTrackerSummary ::
EventTrackerSummary
newEventTrackerSummary :: EventTrackerSummary
newEventTrackerSummary =
EventTrackerSummary' :: Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> EventTrackerSummary
EventTrackerSummary'
{ $sel:status:EventTrackerSummary' :: Maybe Text
status = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdatedDateTime:EventTrackerSummary' :: Maybe POSIX
lastUpdatedDateTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:name:EventTrackerSummary' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:creationDateTime:EventTrackerSummary' :: Maybe POSIX
creationDateTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:eventTrackerArn:EventTrackerSummary' :: Maybe Text
eventTrackerArn = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
eventTrackerSummary_status :: Lens.Lens' EventTrackerSummary (Prelude.Maybe Prelude.Text)
eventTrackerSummary_status :: (Maybe Text -> f (Maybe Text))
-> EventTrackerSummary -> f EventTrackerSummary
eventTrackerSummary_status = (EventTrackerSummary -> Maybe Text)
-> (EventTrackerSummary -> Maybe Text -> EventTrackerSummary)
-> Lens
EventTrackerSummary EventTrackerSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventTrackerSummary' {Maybe Text
status :: Maybe Text
$sel:status:EventTrackerSummary' :: EventTrackerSummary -> Maybe Text
status} -> Maybe Text
status) (\s :: EventTrackerSummary
s@EventTrackerSummary' {} Maybe Text
a -> EventTrackerSummary
s {$sel:status:EventTrackerSummary' :: Maybe Text
status = Maybe Text
a} :: EventTrackerSummary)
eventTrackerSummary_lastUpdatedDateTime :: Lens.Lens' EventTrackerSummary (Prelude.Maybe Prelude.UTCTime)
eventTrackerSummary_lastUpdatedDateTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> EventTrackerSummary -> f EventTrackerSummary
eventTrackerSummary_lastUpdatedDateTime = (EventTrackerSummary -> Maybe POSIX)
-> (EventTrackerSummary -> Maybe POSIX -> EventTrackerSummary)
-> Lens
EventTrackerSummary EventTrackerSummary (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventTrackerSummary' {Maybe POSIX
lastUpdatedDateTime :: Maybe POSIX
$sel:lastUpdatedDateTime:EventTrackerSummary' :: EventTrackerSummary -> Maybe POSIX
lastUpdatedDateTime} -> Maybe POSIX
lastUpdatedDateTime) (\s :: EventTrackerSummary
s@EventTrackerSummary' {} Maybe POSIX
a -> EventTrackerSummary
s {$sel:lastUpdatedDateTime:EventTrackerSummary' :: Maybe POSIX
lastUpdatedDateTime = Maybe POSIX
a} :: EventTrackerSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> EventTrackerSummary -> f EventTrackerSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> EventTrackerSummary
-> f EventTrackerSummary
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
eventTrackerSummary_name :: Lens.Lens' EventTrackerSummary (Prelude.Maybe Prelude.Text)
eventTrackerSummary_name :: (Maybe Text -> f (Maybe Text))
-> EventTrackerSummary -> f EventTrackerSummary
eventTrackerSummary_name = (EventTrackerSummary -> Maybe Text)
-> (EventTrackerSummary -> Maybe Text -> EventTrackerSummary)
-> Lens
EventTrackerSummary EventTrackerSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventTrackerSummary' {Maybe Text
name :: Maybe Text
$sel:name:EventTrackerSummary' :: EventTrackerSummary -> Maybe Text
name} -> Maybe Text
name) (\s :: EventTrackerSummary
s@EventTrackerSummary' {} Maybe Text
a -> EventTrackerSummary
s {$sel:name:EventTrackerSummary' :: Maybe Text
name = Maybe Text
a} :: EventTrackerSummary)
eventTrackerSummary_creationDateTime :: Lens.Lens' EventTrackerSummary (Prelude.Maybe Prelude.UTCTime)
eventTrackerSummary_creationDateTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> EventTrackerSummary -> f EventTrackerSummary
eventTrackerSummary_creationDateTime = (EventTrackerSummary -> Maybe POSIX)
-> (EventTrackerSummary -> Maybe POSIX -> EventTrackerSummary)
-> Lens
EventTrackerSummary EventTrackerSummary (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventTrackerSummary' {Maybe POSIX
creationDateTime :: Maybe POSIX
$sel:creationDateTime:EventTrackerSummary' :: EventTrackerSummary -> Maybe POSIX
creationDateTime} -> Maybe POSIX
creationDateTime) (\s :: EventTrackerSummary
s@EventTrackerSummary' {} Maybe POSIX
a -> EventTrackerSummary
s {$sel:creationDateTime:EventTrackerSummary' :: Maybe POSIX
creationDateTime = Maybe POSIX
a} :: EventTrackerSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> EventTrackerSummary -> f EventTrackerSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> EventTrackerSummary
-> f EventTrackerSummary
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
eventTrackerSummary_eventTrackerArn :: Lens.Lens' EventTrackerSummary (Prelude.Maybe Prelude.Text)
eventTrackerSummary_eventTrackerArn :: (Maybe Text -> f (Maybe Text))
-> EventTrackerSummary -> f EventTrackerSummary
eventTrackerSummary_eventTrackerArn = (EventTrackerSummary -> Maybe Text)
-> (EventTrackerSummary -> Maybe Text -> EventTrackerSummary)
-> Lens
EventTrackerSummary EventTrackerSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EventTrackerSummary' {Maybe Text
eventTrackerArn :: Maybe Text
$sel:eventTrackerArn:EventTrackerSummary' :: EventTrackerSummary -> Maybe Text
eventTrackerArn} -> Maybe Text
eventTrackerArn) (\s :: EventTrackerSummary
s@EventTrackerSummary' {} Maybe Text
a -> EventTrackerSummary
s {$sel:eventTrackerArn:EventTrackerSummary' :: Maybe Text
eventTrackerArn = Maybe Text
a} :: EventTrackerSummary)
instance Core.FromJSON EventTrackerSummary where
parseJSON :: Value -> Parser EventTrackerSummary
parseJSON =
String
-> (Object -> Parser EventTrackerSummary)
-> Value
-> Parser EventTrackerSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"EventTrackerSummary"
( \Object
x ->
Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> EventTrackerSummary
EventTrackerSummary'
(Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> EventTrackerSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe Text -> Maybe POSIX -> Maybe Text -> EventTrackerSummary)
forall (f :: * -> *) a b. Functor 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
"status")
Parser
(Maybe POSIX
-> Maybe Text -> Maybe POSIX -> Maybe Text -> EventTrackerSummary)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text -> Maybe POSIX -> Maybe Text -> EventTrackerSummary)
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
"lastUpdatedDateTime")
Parser
(Maybe Text -> Maybe POSIX -> Maybe Text -> EventTrackerSummary)
-> Parser (Maybe Text)
-> Parser (Maybe POSIX -> Maybe Text -> EventTrackerSummary)
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
"name")
Parser (Maybe POSIX -> Maybe Text -> EventTrackerSummary)
-> Parser (Maybe POSIX)
-> Parser (Maybe Text -> EventTrackerSummary)
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
"creationDateTime")
Parser (Maybe Text -> EventTrackerSummary)
-> Parser (Maybe Text) -> Parser EventTrackerSummary
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
"eventTrackerArn")
)
instance Prelude.Hashable EventTrackerSummary
instance Prelude.NFData EventTrackerSummary