{-# 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.BatchUpdateDevicePositionError 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 BatchUpdateDevicePositionError = BatchUpdateDevicePositionError'
{
BatchUpdateDevicePositionError -> Text
deviceId :: Prelude.Text,
BatchUpdateDevicePositionError -> BatchItemError
error :: BatchItemError,
BatchUpdateDevicePositionError -> POSIX
sampleTime :: Core.POSIX
}
deriving (BatchUpdateDevicePositionError
-> BatchUpdateDevicePositionError -> Bool
(BatchUpdateDevicePositionError
-> BatchUpdateDevicePositionError -> Bool)
-> (BatchUpdateDevicePositionError
-> BatchUpdateDevicePositionError -> Bool)
-> Eq BatchUpdateDevicePositionError
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchUpdateDevicePositionError
-> BatchUpdateDevicePositionError -> Bool
$c/= :: BatchUpdateDevicePositionError
-> BatchUpdateDevicePositionError -> Bool
== :: BatchUpdateDevicePositionError
-> BatchUpdateDevicePositionError -> Bool
$c== :: BatchUpdateDevicePositionError
-> BatchUpdateDevicePositionError -> Bool
Prelude.Eq, ReadPrec [BatchUpdateDevicePositionError]
ReadPrec BatchUpdateDevicePositionError
Int -> ReadS BatchUpdateDevicePositionError
ReadS [BatchUpdateDevicePositionError]
(Int -> ReadS BatchUpdateDevicePositionError)
-> ReadS [BatchUpdateDevicePositionError]
-> ReadPrec BatchUpdateDevicePositionError
-> ReadPrec [BatchUpdateDevicePositionError]
-> Read BatchUpdateDevicePositionError
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchUpdateDevicePositionError]
$creadListPrec :: ReadPrec [BatchUpdateDevicePositionError]
readPrec :: ReadPrec BatchUpdateDevicePositionError
$creadPrec :: ReadPrec BatchUpdateDevicePositionError
readList :: ReadS [BatchUpdateDevicePositionError]
$creadList :: ReadS [BatchUpdateDevicePositionError]
readsPrec :: Int -> ReadS BatchUpdateDevicePositionError
$creadsPrec :: Int -> ReadS BatchUpdateDevicePositionError
Prelude.Read, Int -> BatchUpdateDevicePositionError -> ShowS
[BatchUpdateDevicePositionError] -> ShowS
BatchUpdateDevicePositionError -> String
(Int -> BatchUpdateDevicePositionError -> ShowS)
-> (BatchUpdateDevicePositionError -> String)
-> ([BatchUpdateDevicePositionError] -> ShowS)
-> Show BatchUpdateDevicePositionError
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchUpdateDevicePositionError] -> ShowS
$cshowList :: [BatchUpdateDevicePositionError] -> ShowS
show :: BatchUpdateDevicePositionError -> String
$cshow :: BatchUpdateDevicePositionError -> String
showsPrec :: Int -> BatchUpdateDevicePositionError -> ShowS
$cshowsPrec :: Int -> BatchUpdateDevicePositionError -> ShowS
Prelude.Show, (forall x.
BatchUpdateDevicePositionError
-> Rep BatchUpdateDevicePositionError x)
-> (forall x.
Rep BatchUpdateDevicePositionError x
-> BatchUpdateDevicePositionError)
-> Generic BatchUpdateDevicePositionError
forall x.
Rep BatchUpdateDevicePositionError x
-> BatchUpdateDevicePositionError
forall x.
BatchUpdateDevicePositionError
-> Rep BatchUpdateDevicePositionError x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchUpdateDevicePositionError x
-> BatchUpdateDevicePositionError
$cfrom :: forall x.
BatchUpdateDevicePositionError
-> Rep BatchUpdateDevicePositionError x
Prelude.Generic)
newBatchUpdateDevicePositionError ::
Prelude.Text ->
BatchItemError ->
Prelude.UTCTime ->
BatchUpdateDevicePositionError
newBatchUpdateDevicePositionError :: Text -> BatchItemError -> UTCTime -> BatchUpdateDevicePositionError
newBatchUpdateDevicePositionError
Text
pDeviceId_
BatchItemError
pError_
UTCTime
pSampleTime_ =
BatchUpdateDevicePositionError' :: Text -> BatchItemError -> POSIX -> BatchUpdateDevicePositionError
BatchUpdateDevicePositionError'
{ $sel:deviceId:BatchUpdateDevicePositionError' :: Text
deviceId =
Text
pDeviceId_,
$sel:error:BatchUpdateDevicePositionError' :: BatchItemError
error = BatchItemError
pError_,
$sel:sampleTime:BatchUpdateDevicePositionError' :: 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_
}
batchUpdateDevicePositionError_deviceId :: Lens.Lens' BatchUpdateDevicePositionError Prelude.Text
batchUpdateDevicePositionError_deviceId :: (Text -> f Text)
-> BatchUpdateDevicePositionError
-> f BatchUpdateDevicePositionError
batchUpdateDevicePositionError_deviceId = (BatchUpdateDevicePositionError -> Text)
-> (BatchUpdateDevicePositionError
-> Text -> BatchUpdateDevicePositionError)
-> Lens
BatchUpdateDevicePositionError
BatchUpdateDevicePositionError
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchUpdateDevicePositionError' {Text
deviceId :: Text
$sel:deviceId:BatchUpdateDevicePositionError' :: BatchUpdateDevicePositionError -> Text
deviceId} -> Text
deviceId) (\s :: BatchUpdateDevicePositionError
s@BatchUpdateDevicePositionError' {} Text
a -> BatchUpdateDevicePositionError
s {$sel:deviceId:BatchUpdateDevicePositionError' :: Text
deviceId = Text
a} :: BatchUpdateDevicePositionError)
batchUpdateDevicePositionError_error :: Lens.Lens' BatchUpdateDevicePositionError BatchItemError
batchUpdateDevicePositionError_error :: (BatchItemError -> f BatchItemError)
-> BatchUpdateDevicePositionError
-> f BatchUpdateDevicePositionError
batchUpdateDevicePositionError_error = (BatchUpdateDevicePositionError -> BatchItemError)
-> (BatchUpdateDevicePositionError
-> BatchItemError -> BatchUpdateDevicePositionError)
-> Lens
BatchUpdateDevicePositionError
BatchUpdateDevicePositionError
BatchItemError
BatchItemError
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchUpdateDevicePositionError' {BatchItemError
error :: BatchItemError
$sel:error:BatchUpdateDevicePositionError' :: BatchUpdateDevicePositionError -> BatchItemError
error} -> BatchItemError
error) (\s :: BatchUpdateDevicePositionError
s@BatchUpdateDevicePositionError' {} BatchItemError
a -> BatchUpdateDevicePositionError
s {$sel:error:BatchUpdateDevicePositionError' :: BatchItemError
error = BatchItemError
a} :: BatchUpdateDevicePositionError)
batchUpdateDevicePositionError_sampleTime :: Lens.Lens' BatchUpdateDevicePositionError Prelude.UTCTime
batchUpdateDevicePositionError_sampleTime :: (UTCTime -> f UTCTime)
-> BatchUpdateDevicePositionError
-> f BatchUpdateDevicePositionError
batchUpdateDevicePositionError_sampleTime = (BatchUpdateDevicePositionError -> POSIX)
-> (BatchUpdateDevicePositionError
-> POSIX -> BatchUpdateDevicePositionError)
-> Lens
BatchUpdateDevicePositionError
BatchUpdateDevicePositionError
POSIX
POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchUpdateDevicePositionError' {POSIX
sampleTime :: POSIX
$sel:sampleTime:BatchUpdateDevicePositionError' :: BatchUpdateDevicePositionError -> POSIX
sampleTime} -> POSIX
sampleTime) (\s :: BatchUpdateDevicePositionError
s@BatchUpdateDevicePositionError' {} POSIX
a -> BatchUpdateDevicePositionError
s {$sel:sampleTime:BatchUpdateDevicePositionError' :: POSIX
sampleTime = POSIX
a} :: BatchUpdateDevicePositionError) ((POSIX -> f POSIX)
-> BatchUpdateDevicePositionError
-> f BatchUpdateDevicePositionError)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> BatchUpdateDevicePositionError
-> f BatchUpdateDevicePositionError
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 BatchUpdateDevicePositionError where
parseJSON :: Value -> Parser BatchUpdateDevicePositionError
parseJSON =
String
-> (Object -> Parser BatchUpdateDevicePositionError)
-> Value
-> Parser BatchUpdateDevicePositionError
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"BatchUpdateDevicePositionError"
( \Object
x ->
Text -> BatchItemError -> POSIX -> BatchUpdateDevicePositionError
BatchUpdateDevicePositionError'
(Text -> BatchItemError -> POSIX -> BatchUpdateDevicePositionError)
-> Parser Text
-> Parser
(BatchItemError -> POSIX -> BatchUpdateDevicePositionError)
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 -> BatchUpdateDevicePositionError)
-> Parser BatchItemError
-> Parser (POSIX -> BatchUpdateDevicePositionError)
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 -> BatchUpdateDevicePositionError)
-> Parser POSIX -> Parser BatchUpdateDevicePositionError
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
BatchUpdateDevicePositionError
instance
Prelude.NFData
BatchUpdateDevicePositionError