{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Location.Types.BatchItemError
import qualified Amazonka.Prelude as Prelude
data BatchEvaluateGeofencesError = BatchEvaluateGeofencesError'
{
BatchEvaluateGeofencesError -> Text
deviceId :: Prelude.Text,
BatchEvaluateGeofencesError -> BatchItemError
error :: BatchItemError,
BatchEvaluateGeofencesError -> ISO8601
sampleTime :: Data.ISO8601
}
deriving (BatchEvaluateGeofencesError -> BatchEvaluateGeofencesError -> Bool
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]
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
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.
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'
{ $sel:deviceId:BatchEvaluateGeofencesError' :: Text
deviceId = Text
pDeviceId_,
$sel:error:BatchEvaluateGeofencesError' :: BatchItemError
error = BatchItemError
pError_,
$sel:sampleTime:BatchEvaluateGeofencesError' :: ISO8601
sampleTime = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pSampleTime_
}
batchEvaluateGeofencesError_deviceId :: Lens.Lens' BatchEvaluateGeofencesError Prelude.Text
batchEvaluateGeofencesError_deviceId :: Lens' BatchEvaluateGeofencesError Text
batchEvaluateGeofencesError_deviceId = 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 :: Lens' BatchEvaluateGeofencesError BatchItemError
batchEvaluateGeofencesError_error = 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 :: Lens' BatchEvaluateGeofencesError UTCTime
batchEvaluateGeofencesError_sampleTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchEvaluateGeofencesError' {ISO8601
sampleTime :: ISO8601
$sel:sampleTime:BatchEvaluateGeofencesError' :: BatchEvaluateGeofencesError -> ISO8601
sampleTime} -> ISO8601
sampleTime) (\s :: BatchEvaluateGeofencesError
s@BatchEvaluateGeofencesError' {} ISO8601
a -> BatchEvaluateGeofencesError
s {$sel:sampleTime:BatchEvaluateGeofencesError' :: ISO8601
sampleTime = ISO8601
a} :: BatchEvaluateGeofencesError) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
instance Data.FromJSON BatchEvaluateGeofencesError where
parseJSON :: Value -> Parser BatchEvaluateGeofencesError
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"BatchEvaluateGeofencesError"
( \Object
x ->
Text -> BatchItemError -> ISO8601 -> BatchEvaluateGeofencesError
BatchEvaluateGeofencesError'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"DeviceId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"Error")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"SampleTime")
)
instance Prelude.Hashable BatchEvaluateGeofencesError where
hashWithSalt :: Int -> BatchEvaluateGeofencesError -> Int
hashWithSalt Int
_salt BatchEvaluateGeofencesError' {Text
ISO8601
BatchItemError
sampleTime :: ISO8601
error :: BatchItemError
deviceId :: Text
$sel:sampleTime:BatchEvaluateGeofencesError' :: BatchEvaluateGeofencesError -> ISO8601
$sel:error:BatchEvaluateGeofencesError' :: BatchEvaluateGeofencesError -> BatchItemError
$sel:deviceId:BatchEvaluateGeofencesError' :: BatchEvaluateGeofencesError -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
deviceId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` BatchItemError
error
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ISO8601
sampleTime
instance Prelude.NFData BatchEvaluateGeofencesError where
rnf :: BatchEvaluateGeofencesError -> ()
rnf BatchEvaluateGeofencesError' {Text
ISO8601
BatchItemError
sampleTime :: ISO8601
error :: BatchItemError
deviceId :: Text
$sel:sampleTime:BatchEvaluateGeofencesError' :: BatchEvaluateGeofencesError -> ISO8601
$sel:error:BatchEvaluateGeofencesError' :: BatchEvaluateGeofencesError -> BatchItemError
$sel:deviceId:BatchEvaluateGeofencesError' :: BatchEvaluateGeofencesError -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
deviceId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf BatchItemError
error
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ISO8601
sampleTime