{-# 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.BatchPutGeofenceSuccess where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data BatchPutGeofenceSuccess = BatchPutGeofenceSuccess'
{
BatchPutGeofenceSuccess -> POSIX
createTime :: Core.POSIX,
BatchPutGeofenceSuccess -> Text
geofenceId :: Prelude.Text,
BatchPutGeofenceSuccess -> POSIX
updateTime :: Core.POSIX
}
deriving (BatchPutGeofenceSuccess -> BatchPutGeofenceSuccess -> Bool
(BatchPutGeofenceSuccess -> BatchPutGeofenceSuccess -> Bool)
-> (BatchPutGeofenceSuccess -> BatchPutGeofenceSuccess -> Bool)
-> Eq BatchPutGeofenceSuccess
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchPutGeofenceSuccess -> BatchPutGeofenceSuccess -> Bool
$c/= :: BatchPutGeofenceSuccess -> BatchPutGeofenceSuccess -> Bool
== :: BatchPutGeofenceSuccess -> BatchPutGeofenceSuccess -> Bool
$c== :: BatchPutGeofenceSuccess -> BatchPutGeofenceSuccess -> Bool
Prelude.Eq, ReadPrec [BatchPutGeofenceSuccess]
ReadPrec BatchPutGeofenceSuccess
Int -> ReadS BatchPutGeofenceSuccess
ReadS [BatchPutGeofenceSuccess]
(Int -> ReadS BatchPutGeofenceSuccess)
-> ReadS [BatchPutGeofenceSuccess]
-> ReadPrec BatchPutGeofenceSuccess
-> ReadPrec [BatchPutGeofenceSuccess]
-> Read BatchPutGeofenceSuccess
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchPutGeofenceSuccess]
$creadListPrec :: ReadPrec [BatchPutGeofenceSuccess]
readPrec :: ReadPrec BatchPutGeofenceSuccess
$creadPrec :: ReadPrec BatchPutGeofenceSuccess
readList :: ReadS [BatchPutGeofenceSuccess]
$creadList :: ReadS [BatchPutGeofenceSuccess]
readsPrec :: Int -> ReadS BatchPutGeofenceSuccess
$creadsPrec :: Int -> ReadS BatchPutGeofenceSuccess
Prelude.Read, Int -> BatchPutGeofenceSuccess -> ShowS
[BatchPutGeofenceSuccess] -> ShowS
BatchPutGeofenceSuccess -> String
(Int -> BatchPutGeofenceSuccess -> ShowS)
-> (BatchPutGeofenceSuccess -> String)
-> ([BatchPutGeofenceSuccess] -> ShowS)
-> Show BatchPutGeofenceSuccess
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchPutGeofenceSuccess] -> ShowS
$cshowList :: [BatchPutGeofenceSuccess] -> ShowS
show :: BatchPutGeofenceSuccess -> String
$cshow :: BatchPutGeofenceSuccess -> String
showsPrec :: Int -> BatchPutGeofenceSuccess -> ShowS
$cshowsPrec :: Int -> BatchPutGeofenceSuccess -> ShowS
Prelude.Show, (forall x.
BatchPutGeofenceSuccess -> Rep BatchPutGeofenceSuccess x)
-> (forall x.
Rep BatchPutGeofenceSuccess x -> BatchPutGeofenceSuccess)
-> Generic BatchPutGeofenceSuccess
forall x. Rep BatchPutGeofenceSuccess x -> BatchPutGeofenceSuccess
forall x. BatchPutGeofenceSuccess -> Rep BatchPutGeofenceSuccess x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BatchPutGeofenceSuccess x -> BatchPutGeofenceSuccess
$cfrom :: forall x. BatchPutGeofenceSuccess -> Rep BatchPutGeofenceSuccess x
Prelude.Generic)
newBatchPutGeofenceSuccess ::
Prelude.UTCTime ->
Prelude.Text ->
Prelude.UTCTime ->
BatchPutGeofenceSuccess
newBatchPutGeofenceSuccess :: UTCTime -> Text -> UTCTime -> BatchPutGeofenceSuccess
newBatchPutGeofenceSuccess
UTCTime
pCreateTime_
Text
pGeofenceId_
UTCTime
pUpdateTime_ =
BatchPutGeofenceSuccess' :: POSIX -> Text -> POSIX -> BatchPutGeofenceSuccess
BatchPutGeofenceSuccess'
{ $sel:createTime:BatchPutGeofenceSuccess' :: 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:BatchPutGeofenceSuccess' :: Text
geofenceId = Text
pGeofenceId_,
$sel:updateTime:BatchPutGeofenceSuccess' :: 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_
}
batchPutGeofenceSuccess_createTime :: Lens.Lens' BatchPutGeofenceSuccess Prelude.UTCTime
batchPutGeofenceSuccess_createTime :: (UTCTime -> f UTCTime)
-> BatchPutGeofenceSuccess -> f BatchPutGeofenceSuccess
batchPutGeofenceSuccess_createTime = (BatchPutGeofenceSuccess -> POSIX)
-> (BatchPutGeofenceSuccess -> POSIX -> BatchPutGeofenceSuccess)
-> Lens BatchPutGeofenceSuccess BatchPutGeofenceSuccess POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchPutGeofenceSuccess' {POSIX
createTime :: POSIX
$sel:createTime:BatchPutGeofenceSuccess' :: BatchPutGeofenceSuccess -> POSIX
createTime} -> POSIX
createTime) (\s :: BatchPutGeofenceSuccess
s@BatchPutGeofenceSuccess' {} POSIX
a -> BatchPutGeofenceSuccess
s {$sel:createTime:BatchPutGeofenceSuccess' :: POSIX
createTime = POSIX
a} :: BatchPutGeofenceSuccess) ((POSIX -> f POSIX)
-> BatchPutGeofenceSuccess -> f BatchPutGeofenceSuccess)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> BatchPutGeofenceSuccess
-> f BatchPutGeofenceSuccess
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
batchPutGeofenceSuccess_geofenceId :: Lens.Lens' BatchPutGeofenceSuccess Prelude.Text
batchPutGeofenceSuccess_geofenceId :: (Text -> f Text)
-> BatchPutGeofenceSuccess -> f BatchPutGeofenceSuccess
batchPutGeofenceSuccess_geofenceId = (BatchPutGeofenceSuccess -> Text)
-> (BatchPutGeofenceSuccess -> Text -> BatchPutGeofenceSuccess)
-> Lens BatchPutGeofenceSuccess BatchPutGeofenceSuccess Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchPutGeofenceSuccess' {Text
geofenceId :: Text
$sel:geofenceId:BatchPutGeofenceSuccess' :: BatchPutGeofenceSuccess -> Text
geofenceId} -> Text
geofenceId) (\s :: BatchPutGeofenceSuccess
s@BatchPutGeofenceSuccess' {} Text
a -> BatchPutGeofenceSuccess
s {$sel:geofenceId:BatchPutGeofenceSuccess' :: Text
geofenceId = Text
a} :: BatchPutGeofenceSuccess)
batchPutGeofenceSuccess_updateTime :: Lens.Lens' BatchPutGeofenceSuccess Prelude.UTCTime
batchPutGeofenceSuccess_updateTime :: (UTCTime -> f UTCTime)
-> BatchPutGeofenceSuccess -> f BatchPutGeofenceSuccess
batchPutGeofenceSuccess_updateTime = (BatchPutGeofenceSuccess -> POSIX)
-> (BatchPutGeofenceSuccess -> POSIX -> BatchPutGeofenceSuccess)
-> Lens BatchPutGeofenceSuccess BatchPutGeofenceSuccess POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchPutGeofenceSuccess' {POSIX
updateTime :: POSIX
$sel:updateTime:BatchPutGeofenceSuccess' :: BatchPutGeofenceSuccess -> POSIX
updateTime} -> POSIX
updateTime) (\s :: BatchPutGeofenceSuccess
s@BatchPutGeofenceSuccess' {} POSIX
a -> BatchPutGeofenceSuccess
s {$sel:updateTime:BatchPutGeofenceSuccess' :: POSIX
updateTime = POSIX
a} :: BatchPutGeofenceSuccess) ((POSIX -> f POSIX)
-> BatchPutGeofenceSuccess -> f BatchPutGeofenceSuccess)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> BatchPutGeofenceSuccess
-> f BatchPutGeofenceSuccess
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 BatchPutGeofenceSuccess where
parseJSON :: Value -> Parser BatchPutGeofenceSuccess
parseJSON =
String
-> (Object -> Parser BatchPutGeofenceSuccess)
-> Value
-> Parser BatchPutGeofenceSuccess
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"BatchPutGeofenceSuccess"
( \Object
x ->
POSIX -> Text -> POSIX -> BatchPutGeofenceSuccess
BatchPutGeofenceSuccess'
(POSIX -> Text -> POSIX -> BatchPutGeofenceSuccess)
-> Parser POSIX
-> Parser (Text -> POSIX -> BatchPutGeofenceSuccess)
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 -> POSIX -> BatchPutGeofenceSuccess)
-> Parser Text -> Parser (POSIX -> BatchPutGeofenceSuccess)
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 (POSIX -> BatchPutGeofenceSuccess)
-> Parser POSIX -> Parser BatchPutGeofenceSuccess
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 BatchPutGeofenceSuccess
instance Prelude.NFData BatchPutGeofenceSuccess