{-# 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.BatchEvaluateGeofencesError where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Location.Types.BatchItemError
import qualified Amazonka.Prelude as Prelude
data BatchEvaluateGeofencesError = BatchEvaluateGeofencesError'
{
BatchEvaluateGeofencesError -> Text
deviceId :: Prelude.Text,
BatchEvaluateGeofencesError -> BatchItemError
error :: BatchItemError,
BatchEvaluateGeofencesError -> POSIX
sampleTime :: Core.POSIX
}
deriving (BatchEvaluateGeofencesError -> BatchEvaluateGeofencesError -> Bool
(BatchEvaluateGeofencesError
-> BatchEvaluateGeofencesError -> Bool)
-> (BatchEvaluateGeofencesError
-> BatchEvaluateGeofencesError -> Bool)
-> Eq BatchEvaluateGeofencesError
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchEvaluateGeofencesError -> BatchEvaluateGeofencesError -> Bool
$c/= :: BatchEvaluateGeofencesError -> BatchEvaluateGeofencesError -> Bool
== :: BatchEvaluateGeofencesError -> BatchEvaluateGeofencesError -> Bool
$c== :: BatchEvaluateGeofencesError -> BatchEvaluateGeofencesError -> Bool
Prelude.Eq, ReadPrec [BatchEvaluateGeofencesError]
ReadPrec BatchEvaluateGeofencesError
Int -> ReadS BatchEvaluateGeofencesError
ReadS [BatchEvaluateGeofencesError]
(Int -> ReadS BatchEvaluateGeofencesError)
-> ReadS [BatchEvaluateGeofencesError]
-> ReadPrec BatchEvaluateGeofencesError
-> ReadPrec [BatchEvaluateGeofencesError]
-> Read BatchEvaluateGeofencesError
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchEvaluateGeofencesError]
$creadListPrec :: ReadPrec [BatchEvaluateGeofencesError]
readPrec :: ReadPrec BatchEvaluateGeofencesError
$creadPrec :: ReadPrec BatchEvaluateGeofencesError
readList :: ReadS [BatchEvaluateGeofencesError]
$creadList :: ReadS [BatchEvaluateGeofencesError]
readsPrec :: Int -> ReadS BatchEvaluateGeofencesError
$creadsPrec :: Int -> ReadS BatchEvaluateGeofencesError
Prelude.Read, Int -> BatchEvaluateGeofencesError -> ShowS
[BatchEvaluateGeofencesError] -> ShowS
BatchEvaluateGeofencesError -> String
(Int -> BatchEvaluateGeofencesError -> ShowS)
-> (BatchEvaluateGeofencesError -> String)
-> ([BatchEvaluateGeofencesError] -> ShowS)
-> Show BatchEvaluateGeofencesError
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchEvaluateGeofencesError] -> ShowS
$cshowList :: [BatchEvaluateGeofencesError] -> ShowS
show :: BatchEvaluateGeofencesError -> String
$cshow :: BatchEvaluateGeofencesError -> String
showsPrec :: Int -> BatchEvaluateGeofencesError -> ShowS
$cshowsPrec :: Int -> BatchEvaluateGeofencesError -> ShowS
Prelude.Show, (forall x.
BatchEvaluateGeofencesError -> Rep BatchEvaluateGeofencesError x)
-> (forall x.
Rep BatchEvaluateGeofencesError x -> BatchEvaluateGeofencesError)
-> Generic BatchEvaluateGeofencesError
forall x.
Rep BatchEvaluateGeofencesError x -> BatchEvaluateGeofencesError
forall x.
BatchEvaluateGeofencesError -> Rep BatchEvaluateGeofencesError x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchEvaluateGeofencesError x -> BatchEvaluateGeofencesError
$cfrom :: forall x.
BatchEvaluateGeofencesError -> Rep BatchEvaluateGeofencesError x
Prelude.Generic)
newBatchEvaluateGeofencesError ::
Prelude.Text ->
BatchItemError ->
Prelude.UTCTime ->
BatchEvaluateGeofencesError
newBatchEvaluateGeofencesError :: Text -> BatchItemError -> UTCTime -> BatchEvaluateGeofencesError
newBatchEvaluateGeofencesError
Text
pDeviceId_
BatchItemError
pError_
UTCTime
pSampleTime_ =
BatchEvaluateGeofencesError' :: Text -> BatchItemError -> POSIX -> BatchEvaluateGeofencesError
BatchEvaluateGeofencesError'
{ $sel:deviceId:BatchEvaluateGeofencesError' :: Text
deviceId = Text
pDeviceId_,
$sel:error:BatchEvaluateGeofencesError' :: BatchItemError
error = BatchItemError
pError_,
$sel:sampleTime:BatchEvaluateGeofencesError' :: POSIX
sampleTime = 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
pSampleTime_
}
batchEvaluateGeofencesError_deviceId :: Lens.Lens' BatchEvaluateGeofencesError Prelude.Text
batchEvaluateGeofencesError_deviceId :: (Text -> f Text)
-> BatchEvaluateGeofencesError -> f BatchEvaluateGeofencesError
batchEvaluateGeofencesError_deviceId = (BatchEvaluateGeofencesError -> Text)
-> (BatchEvaluateGeofencesError
-> Text -> BatchEvaluateGeofencesError)
-> Lens
BatchEvaluateGeofencesError BatchEvaluateGeofencesError Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchEvaluateGeofencesError' {Text
deviceId :: Text
$sel:deviceId:BatchEvaluateGeofencesError' :: BatchEvaluateGeofencesError -> Text
deviceId} -> Text
deviceId) (\s :: BatchEvaluateGeofencesError
s@BatchEvaluateGeofencesError' {} Text
a -> BatchEvaluateGeofencesError
s {$sel:deviceId:BatchEvaluateGeofencesError' :: Text
deviceId = Text
a} :: BatchEvaluateGeofencesError)
batchEvaluateGeofencesError_error :: Lens.Lens' BatchEvaluateGeofencesError BatchItemError
batchEvaluateGeofencesError_error :: (BatchItemError -> f BatchItemError)
-> BatchEvaluateGeofencesError -> f BatchEvaluateGeofencesError
batchEvaluateGeofencesError_error = (BatchEvaluateGeofencesError -> BatchItemError)
-> (BatchEvaluateGeofencesError
-> BatchItemError -> BatchEvaluateGeofencesError)
-> Lens
BatchEvaluateGeofencesError
BatchEvaluateGeofencesError
BatchItemError
BatchItemError
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchEvaluateGeofencesError' {BatchItemError
error :: BatchItemError
$sel:error:BatchEvaluateGeofencesError' :: BatchEvaluateGeofencesError -> BatchItemError
error} -> BatchItemError
error) (\s :: BatchEvaluateGeofencesError
s@BatchEvaluateGeofencesError' {} BatchItemError
a -> BatchEvaluateGeofencesError
s {$sel:error:BatchEvaluateGeofencesError' :: BatchItemError
error = BatchItemError
a} :: BatchEvaluateGeofencesError)
batchEvaluateGeofencesError_sampleTime :: Lens.Lens' BatchEvaluateGeofencesError Prelude.UTCTime
batchEvaluateGeofencesError_sampleTime :: (UTCTime -> f UTCTime)
-> BatchEvaluateGeofencesError -> f BatchEvaluateGeofencesError
batchEvaluateGeofencesError_sampleTime = (BatchEvaluateGeofencesError -> POSIX)
-> (BatchEvaluateGeofencesError
-> POSIX -> BatchEvaluateGeofencesError)
-> Lens
BatchEvaluateGeofencesError BatchEvaluateGeofencesError POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchEvaluateGeofencesError' {POSIX
sampleTime :: POSIX
$sel:sampleTime:BatchEvaluateGeofencesError' :: BatchEvaluateGeofencesError -> POSIX
sampleTime} -> POSIX
sampleTime) (\s :: BatchEvaluateGeofencesError
s@BatchEvaluateGeofencesError' {} POSIX
a -> BatchEvaluateGeofencesError
s {$sel:sampleTime:BatchEvaluateGeofencesError' :: POSIX
sampleTime = POSIX
a} :: BatchEvaluateGeofencesError) ((POSIX -> f POSIX)
-> BatchEvaluateGeofencesError -> f BatchEvaluateGeofencesError)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> BatchEvaluateGeofencesError
-> f BatchEvaluateGeofencesError
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 BatchEvaluateGeofencesError where
parseJSON :: Value -> Parser BatchEvaluateGeofencesError
parseJSON =
String
-> (Object -> Parser BatchEvaluateGeofencesError)
-> Value
-> Parser BatchEvaluateGeofencesError
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"BatchEvaluateGeofencesError"
( \Object
x ->
Text -> BatchItemError -> POSIX -> BatchEvaluateGeofencesError
BatchEvaluateGeofencesError'
(Text -> BatchItemError -> POSIX -> BatchEvaluateGeofencesError)
-> Parser Text
-> Parser (BatchItemError -> POSIX -> BatchEvaluateGeofencesError)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"DeviceId")
Parser (BatchItemError -> POSIX -> BatchEvaluateGeofencesError)
-> Parser BatchItemError
-> Parser (POSIX -> BatchEvaluateGeofencesError)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser BatchItemError
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Error")
Parser (POSIX -> BatchEvaluateGeofencesError)
-> Parser POSIX -> Parser BatchEvaluateGeofencesError
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
"SampleTime")
)
instance Prelude.Hashable BatchEvaluateGeofencesError
instance Prelude.NFData BatchEvaluateGeofencesError