{-# 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.Location.Types.ListGeofenceResponseEntry where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Location.Types.GeofenceGeometry
import qualified Amazonka.Prelude as Prelude
data ListGeofenceResponseEntry = ListGeofenceResponseEntry'
{
ListGeofenceResponseEntry -> POSIX
createTime :: Core.POSIX,
ListGeofenceResponseEntry -> Text
geofenceId :: Prelude.Text,
ListGeofenceResponseEntry -> GeofenceGeometry
geometry :: GeofenceGeometry,
ListGeofenceResponseEntry -> Text
status :: Prelude.Text,
ListGeofenceResponseEntry -> POSIX
updateTime :: Core.POSIX
}
deriving (ListGeofenceResponseEntry -> ListGeofenceResponseEntry -> Bool
(ListGeofenceResponseEntry -> ListGeofenceResponseEntry -> Bool)
-> (ListGeofenceResponseEntry -> ListGeofenceResponseEntry -> Bool)
-> Eq ListGeofenceResponseEntry
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListGeofenceResponseEntry -> ListGeofenceResponseEntry -> Bool
$c/= :: ListGeofenceResponseEntry -> ListGeofenceResponseEntry -> Bool
== :: ListGeofenceResponseEntry -> ListGeofenceResponseEntry -> Bool
$c== :: ListGeofenceResponseEntry -> ListGeofenceResponseEntry -> Bool
Prelude.Eq, Int -> ListGeofenceResponseEntry -> ShowS
[ListGeofenceResponseEntry] -> ShowS
ListGeofenceResponseEntry -> String
(Int -> ListGeofenceResponseEntry -> ShowS)
-> (ListGeofenceResponseEntry -> String)
-> ([ListGeofenceResponseEntry] -> ShowS)
-> Show ListGeofenceResponseEntry
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListGeofenceResponseEntry] -> ShowS
$cshowList :: [ListGeofenceResponseEntry] -> ShowS
show :: ListGeofenceResponseEntry -> String
$cshow :: ListGeofenceResponseEntry -> String
showsPrec :: Int -> ListGeofenceResponseEntry -> ShowS
$cshowsPrec :: Int -> ListGeofenceResponseEntry -> ShowS
Prelude.Show, (forall x.
ListGeofenceResponseEntry -> Rep ListGeofenceResponseEntry x)
-> (forall x.
Rep ListGeofenceResponseEntry x -> ListGeofenceResponseEntry)
-> Generic ListGeofenceResponseEntry
forall x.
Rep ListGeofenceResponseEntry x -> ListGeofenceResponseEntry
forall x.
ListGeofenceResponseEntry -> Rep ListGeofenceResponseEntry x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListGeofenceResponseEntry x -> ListGeofenceResponseEntry
$cfrom :: forall x.
ListGeofenceResponseEntry -> Rep ListGeofenceResponseEntry x
Prelude.Generic)
newListGeofenceResponseEntry ::
Prelude.UTCTime ->
Prelude.Text ->
GeofenceGeometry ->
Prelude.Text ->
Prelude.UTCTime ->
ListGeofenceResponseEntry
newListGeofenceResponseEntry :: UTCTime
-> Text
-> GeofenceGeometry
-> Text
-> UTCTime
-> ListGeofenceResponseEntry
newListGeofenceResponseEntry
UTCTime
pCreateTime_
Text
pGeofenceId_
GeofenceGeometry
pGeometry_
Text
pStatus_
UTCTime
pUpdateTime_ =
ListGeofenceResponseEntry' :: POSIX
-> Text
-> GeofenceGeometry
-> Text
-> POSIX
-> ListGeofenceResponseEntry
ListGeofenceResponseEntry'
{ $sel:createTime:ListGeofenceResponseEntry' :: POSIX
createTime =
Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
-> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreateTime_,
$sel:geofenceId:ListGeofenceResponseEntry' :: Text
geofenceId = Text
pGeofenceId_,
$sel:geometry:ListGeofenceResponseEntry' :: GeofenceGeometry
geometry = GeofenceGeometry
pGeometry_,
$sel:status:ListGeofenceResponseEntry' :: Text
status = Text
pStatus_,
$sel:updateTime:ListGeofenceResponseEntry' :: POSIX
updateTime = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
-> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pUpdateTime_
}
listGeofenceResponseEntry_createTime :: Lens.Lens' ListGeofenceResponseEntry Prelude.UTCTime
listGeofenceResponseEntry_createTime :: (UTCTime -> f UTCTime)
-> ListGeofenceResponseEntry -> f ListGeofenceResponseEntry
listGeofenceResponseEntry_createTime = (ListGeofenceResponseEntry -> POSIX)
-> (ListGeofenceResponseEntry
-> POSIX -> ListGeofenceResponseEntry)
-> Lens
ListGeofenceResponseEntry ListGeofenceResponseEntry POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListGeofenceResponseEntry' {POSIX
createTime :: POSIX
$sel:createTime:ListGeofenceResponseEntry' :: ListGeofenceResponseEntry -> POSIX
createTime} -> POSIX
createTime) (\s :: ListGeofenceResponseEntry
s@ListGeofenceResponseEntry' {} POSIX
a -> ListGeofenceResponseEntry
s {$sel:createTime:ListGeofenceResponseEntry' :: POSIX
createTime = POSIX
a} :: ListGeofenceResponseEntry) ((POSIX -> f POSIX)
-> ListGeofenceResponseEntry -> f ListGeofenceResponseEntry)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> ListGeofenceResponseEntry
-> f ListGeofenceResponseEntry
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
listGeofenceResponseEntry_geofenceId :: Lens.Lens' ListGeofenceResponseEntry Prelude.Text
listGeofenceResponseEntry_geofenceId :: (Text -> f Text)
-> ListGeofenceResponseEntry -> f ListGeofenceResponseEntry
listGeofenceResponseEntry_geofenceId = (ListGeofenceResponseEntry -> Text)
-> (ListGeofenceResponseEntry -> Text -> ListGeofenceResponseEntry)
-> Lens
ListGeofenceResponseEntry ListGeofenceResponseEntry Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListGeofenceResponseEntry' {Text
geofenceId :: Text
$sel:geofenceId:ListGeofenceResponseEntry' :: ListGeofenceResponseEntry -> Text
geofenceId} -> Text
geofenceId) (\s :: ListGeofenceResponseEntry
s@ListGeofenceResponseEntry' {} Text
a -> ListGeofenceResponseEntry
s {$sel:geofenceId:ListGeofenceResponseEntry' :: Text
geofenceId = Text
a} :: ListGeofenceResponseEntry)
listGeofenceResponseEntry_geometry :: Lens.Lens' ListGeofenceResponseEntry GeofenceGeometry
listGeofenceResponseEntry_geometry :: (GeofenceGeometry -> f GeofenceGeometry)
-> ListGeofenceResponseEntry -> f ListGeofenceResponseEntry
listGeofenceResponseEntry_geometry = (ListGeofenceResponseEntry -> GeofenceGeometry)
-> (ListGeofenceResponseEntry
-> GeofenceGeometry -> ListGeofenceResponseEntry)
-> Lens
ListGeofenceResponseEntry
ListGeofenceResponseEntry
GeofenceGeometry
GeofenceGeometry
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListGeofenceResponseEntry' {GeofenceGeometry
geometry :: GeofenceGeometry
$sel:geometry:ListGeofenceResponseEntry' :: ListGeofenceResponseEntry -> GeofenceGeometry
geometry} -> GeofenceGeometry
geometry) (\s :: ListGeofenceResponseEntry
s@ListGeofenceResponseEntry' {} GeofenceGeometry
a -> ListGeofenceResponseEntry
s {$sel:geometry:ListGeofenceResponseEntry' :: GeofenceGeometry
geometry = GeofenceGeometry
a} :: ListGeofenceResponseEntry)
listGeofenceResponseEntry_status :: Lens.Lens' ListGeofenceResponseEntry Prelude.Text
listGeofenceResponseEntry_status :: (Text -> f Text)
-> ListGeofenceResponseEntry -> f ListGeofenceResponseEntry
listGeofenceResponseEntry_status = (ListGeofenceResponseEntry -> Text)
-> (ListGeofenceResponseEntry -> Text -> ListGeofenceResponseEntry)
-> Lens
ListGeofenceResponseEntry ListGeofenceResponseEntry Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListGeofenceResponseEntry' {Text
status :: Text
$sel:status:ListGeofenceResponseEntry' :: ListGeofenceResponseEntry -> Text
status} -> Text
status) (\s :: ListGeofenceResponseEntry
s@ListGeofenceResponseEntry' {} Text
a -> ListGeofenceResponseEntry
s {$sel:status:ListGeofenceResponseEntry' :: Text
status = Text
a} :: ListGeofenceResponseEntry)
listGeofenceResponseEntry_updateTime :: Lens.Lens' ListGeofenceResponseEntry Prelude.UTCTime
listGeofenceResponseEntry_updateTime :: (UTCTime -> f UTCTime)
-> ListGeofenceResponseEntry -> f ListGeofenceResponseEntry
listGeofenceResponseEntry_updateTime = (ListGeofenceResponseEntry -> POSIX)
-> (ListGeofenceResponseEntry
-> POSIX -> ListGeofenceResponseEntry)
-> Lens
ListGeofenceResponseEntry ListGeofenceResponseEntry POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListGeofenceResponseEntry' {POSIX
updateTime :: POSIX
$sel:updateTime:ListGeofenceResponseEntry' :: ListGeofenceResponseEntry -> POSIX
updateTime} -> POSIX
updateTime) (\s :: ListGeofenceResponseEntry
s@ListGeofenceResponseEntry' {} POSIX
a -> ListGeofenceResponseEntry
s {$sel:updateTime:ListGeofenceResponseEntry' :: POSIX
updateTime = POSIX
a} :: ListGeofenceResponseEntry) ((POSIX -> f POSIX)
-> ListGeofenceResponseEntry -> f ListGeofenceResponseEntry)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> ListGeofenceResponseEntry
-> f ListGeofenceResponseEntry
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
instance Core.FromJSON ListGeofenceResponseEntry where
parseJSON :: Value -> Parser ListGeofenceResponseEntry
parseJSON =
String
-> (Object -> Parser ListGeofenceResponseEntry)
-> Value
-> Parser ListGeofenceResponseEntry
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ListGeofenceResponseEntry"
( \Object
x ->
POSIX
-> Text
-> GeofenceGeometry
-> Text
-> POSIX
-> ListGeofenceResponseEntry
ListGeofenceResponseEntry'
(POSIX
-> Text
-> GeofenceGeometry
-> Text
-> POSIX
-> ListGeofenceResponseEntry)
-> Parser POSIX
-> Parser
(Text
-> GeofenceGeometry -> Text -> POSIX -> ListGeofenceResponseEntry)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"CreateTime")
Parser
(Text
-> GeofenceGeometry -> Text -> POSIX -> ListGeofenceResponseEntry)
-> Parser Text
-> Parser
(GeofenceGeometry -> Text -> POSIX -> ListGeofenceResponseEntry)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"GeofenceId")
Parser
(GeofenceGeometry -> Text -> POSIX -> ListGeofenceResponseEntry)
-> Parser GeofenceGeometry
-> Parser (Text -> POSIX -> ListGeofenceResponseEntry)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser GeofenceGeometry
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Geometry")
Parser (Text -> POSIX -> ListGeofenceResponseEntry)
-> Parser Text -> Parser (POSIX -> ListGeofenceResponseEntry)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Status")
Parser (POSIX -> ListGeofenceResponseEntry)
-> Parser POSIX -> Parser ListGeofenceResponseEntry
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"UpdateTime")
)
instance Prelude.Hashable ListGeofenceResponseEntry
instance Prelude.NFData ListGeofenceResponseEntry