{-# 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.BatchGetDevicePositionError 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 BatchGetDevicePositionError = BatchGetDevicePositionError'
{
BatchGetDevicePositionError -> Text
deviceId :: Prelude.Text,
BatchGetDevicePositionError -> BatchItemError
error :: BatchItemError
}
deriving (BatchGetDevicePositionError -> BatchGetDevicePositionError -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchGetDevicePositionError -> BatchGetDevicePositionError -> Bool
$c/= :: BatchGetDevicePositionError -> BatchGetDevicePositionError -> Bool
== :: BatchGetDevicePositionError -> BatchGetDevicePositionError -> Bool
$c== :: BatchGetDevicePositionError -> BatchGetDevicePositionError -> Bool
Prelude.Eq, ReadPrec [BatchGetDevicePositionError]
ReadPrec BatchGetDevicePositionError
Int -> ReadS BatchGetDevicePositionError
ReadS [BatchGetDevicePositionError]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchGetDevicePositionError]
$creadListPrec :: ReadPrec [BatchGetDevicePositionError]
readPrec :: ReadPrec BatchGetDevicePositionError
$creadPrec :: ReadPrec BatchGetDevicePositionError
readList :: ReadS [BatchGetDevicePositionError]
$creadList :: ReadS [BatchGetDevicePositionError]
readsPrec :: Int -> ReadS BatchGetDevicePositionError
$creadsPrec :: Int -> ReadS BatchGetDevicePositionError
Prelude.Read, Int -> BatchGetDevicePositionError -> ShowS
[BatchGetDevicePositionError] -> ShowS
BatchGetDevicePositionError -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchGetDevicePositionError] -> ShowS
$cshowList :: [BatchGetDevicePositionError] -> ShowS
show :: BatchGetDevicePositionError -> String
$cshow :: BatchGetDevicePositionError -> String
showsPrec :: Int -> BatchGetDevicePositionError -> ShowS
$cshowsPrec :: Int -> BatchGetDevicePositionError -> ShowS
Prelude.Show, forall x.
Rep BatchGetDevicePositionError x -> BatchGetDevicePositionError
forall x.
BatchGetDevicePositionError -> Rep BatchGetDevicePositionError x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchGetDevicePositionError x -> BatchGetDevicePositionError
$cfrom :: forall x.
BatchGetDevicePositionError -> Rep BatchGetDevicePositionError x
Prelude.Generic)
newBatchGetDevicePositionError ::
Prelude.Text ->
BatchItemError ->
BatchGetDevicePositionError
newBatchGetDevicePositionError :: Text -> BatchItemError -> BatchGetDevicePositionError
newBatchGetDevicePositionError Text
pDeviceId_ BatchItemError
pError_ =
BatchGetDevicePositionError'
{ $sel:deviceId:BatchGetDevicePositionError' :: Text
deviceId = Text
pDeviceId_,
$sel:error:BatchGetDevicePositionError' :: BatchItemError
error = BatchItemError
pError_
}
batchGetDevicePositionError_deviceId :: Lens.Lens' BatchGetDevicePositionError Prelude.Text
batchGetDevicePositionError_deviceId :: Lens' BatchGetDevicePositionError Text
batchGetDevicePositionError_deviceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetDevicePositionError' {Text
deviceId :: Text
$sel:deviceId:BatchGetDevicePositionError' :: BatchGetDevicePositionError -> Text
deviceId} -> Text
deviceId) (\s :: BatchGetDevicePositionError
s@BatchGetDevicePositionError' {} Text
a -> BatchGetDevicePositionError
s {$sel:deviceId:BatchGetDevicePositionError' :: Text
deviceId = Text
a} :: BatchGetDevicePositionError)
batchGetDevicePositionError_error :: Lens.Lens' BatchGetDevicePositionError BatchItemError
batchGetDevicePositionError_error :: Lens' BatchGetDevicePositionError BatchItemError
batchGetDevicePositionError_error = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetDevicePositionError' {BatchItemError
error :: BatchItemError
$sel:error:BatchGetDevicePositionError' :: BatchGetDevicePositionError -> BatchItemError
error} -> BatchItemError
error) (\s :: BatchGetDevicePositionError
s@BatchGetDevicePositionError' {} BatchItemError
a -> BatchGetDevicePositionError
s {$sel:error:BatchGetDevicePositionError' :: BatchItemError
error = BatchItemError
a} :: BatchGetDevicePositionError)
instance Data.FromJSON BatchGetDevicePositionError where
parseJSON :: Value -> Parser BatchGetDevicePositionError
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"BatchGetDevicePositionError"
( \Object
x ->
Text -> BatchItemError -> BatchGetDevicePositionError
BatchGetDevicePositionError'
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")
)
instance Prelude.Hashable BatchGetDevicePositionError where
hashWithSalt :: Int -> BatchGetDevicePositionError -> Int
hashWithSalt Int
_salt BatchGetDevicePositionError' {Text
BatchItemError
error :: BatchItemError
deviceId :: Text
$sel:error:BatchGetDevicePositionError' :: BatchGetDevicePositionError -> BatchItemError
$sel:deviceId:BatchGetDevicePositionError' :: BatchGetDevicePositionError -> 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
instance Prelude.NFData BatchGetDevicePositionError where
rnf :: BatchGetDevicePositionError -> ()
rnf BatchGetDevicePositionError' {Text
BatchItemError
error :: BatchItemError
deviceId :: Text
$sel:error:BatchGetDevicePositionError' :: BatchGetDevicePositionError -> BatchItemError
$sel:deviceId:BatchGetDevicePositionError' :: BatchGetDevicePositionError -> 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