{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Location.Types.BatchItemError
import qualified Amazonka.Prelude as Prelude
data BatchUpdateDevicePositionError = BatchUpdateDevicePositionError'
{
BatchUpdateDevicePositionError -> Text
deviceId :: Prelude.Text,
BatchUpdateDevicePositionError -> BatchItemError
error :: BatchItemError,
BatchUpdateDevicePositionError -> ISO8601
sampleTime :: Data.ISO8601
}
deriving (BatchUpdateDevicePositionError
-> BatchUpdateDevicePositionError -> Bool
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]
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
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.
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'
{ $sel:deviceId:BatchUpdateDevicePositionError' :: Text
deviceId =
Text
pDeviceId_,
$sel:error:BatchUpdateDevicePositionError' :: BatchItemError
error = BatchItemError
pError_,
$sel:sampleTime:BatchUpdateDevicePositionError' :: ISO8601
sampleTime = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pSampleTime_
}
batchUpdateDevicePositionError_deviceId :: Lens.Lens' BatchUpdateDevicePositionError Prelude.Text
batchUpdateDevicePositionError_deviceId :: Lens' BatchUpdateDevicePositionError Text
batchUpdateDevicePositionError_deviceId = 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 :: Lens' BatchUpdateDevicePositionError BatchItemError
batchUpdateDevicePositionError_error = 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 :: Lens' BatchUpdateDevicePositionError UTCTime
batchUpdateDevicePositionError_sampleTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchUpdateDevicePositionError' {ISO8601
sampleTime :: ISO8601
$sel:sampleTime:BatchUpdateDevicePositionError' :: BatchUpdateDevicePositionError -> ISO8601
sampleTime} -> ISO8601
sampleTime) (\s :: BatchUpdateDevicePositionError
s@BatchUpdateDevicePositionError' {} ISO8601
a -> BatchUpdateDevicePositionError
s {$sel:sampleTime:BatchUpdateDevicePositionError' :: ISO8601
sampleTime = ISO8601
a} :: BatchUpdateDevicePositionError) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
instance Data.FromJSON BatchUpdateDevicePositionError where
parseJSON :: Value -> Parser BatchUpdateDevicePositionError
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"BatchUpdateDevicePositionError"
( \Object
x ->
Text -> BatchItemError -> ISO8601 -> BatchUpdateDevicePositionError
BatchUpdateDevicePositionError'
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
BatchUpdateDevicePositionError
where
hashWithSalt :: Int -> BatchUpdateDevicePositionError -> Int
hashWithSalt
Int
_salt
BatchUpdateDevicePositionError' {Text
ISO8601
BatchItemError
sampleTime :: ISO8601
error :: BatchItemError
deviceId :: Text
$sel:sampleTime:BatchUpdateDevicePositionError' :: BatchUpdateDevicePositionError -> ISO8601
$sel:error:BatchUpdateDevicePositionError' :: BatchUpdateDevicePositionError -> BatchItemError
$sel:deviceId:BatchUpdateDevicePositionError' :: BatchUpdateDevicePositionError -> 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
BatchUpdateDevicePositionError
where
rnf :: BatchUpdateDevicePositionError -> ()
rnf BatchUpdateDevicePositionError' {Text
ISO8601
BatchItemError
sampleTime :: ISO8601
error :: BatchItemError
deviceId :: Text
$sel:sampleTime:BatchUpdateDevicePositionError' :: BatchUpdateDevicePositionError -> ISO8601
$sel:error:BatchUpdateDevicePositionError' :: BatchUpdateDevicePositionError -> BatchItemError
$sel:deviceId:BatchUpdateDevicePositionError' :: BatchUpdateDevicePositionError -> 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