{-# 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.Lens as Lens
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
(BatchGetDevicePositionError
-> BatchGetDevicePositionError -> Bool)
-> (BatchGetDevicePositionError
-> BatchGetDevicePositionError -> Bool)
-> Eq BatchGetDevicePositionError
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]
(Int -> ReadS BatchGetDevicePositionError)
-> ReadS [BatchGetDevicePositionError]
-> ReadPrec BatchGetDevicePositionError
-> ReadPrec [BatchGetDevicePositionError]
-> Read 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
(Int -> BatchGetDevicePositionError -> ShowS)
-> (BatchGetDevicePositionError -> String)
-> ([BatchGetDevicePositionError] -> ShowS)
-> Show BatchGetDevicePositionError
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.
BatchGetDevicePositionError -> Rep BatchGetDevicePositionError x)
-> (forall x.
Rep BatchGetDevicePositionError x -> BatchGetDevicePositionError)
-> Generic BatchGetDevicePositionError
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' :: Text -> BatchItemError -> BatchGetDevicePositionError
BatchGetDevicePositionError'
{ $sel:deviceId:BatchGetDevicePositionError' :: Text
deviceId = Text
pDeviceId_,
$sel:error:BatchGetDevicePositionError' :: BatchItemError
error = BatchItemError
pError_
}
batchGetDevicePositionError_deviceId :: Lens.Lens' BatchGetDevicePositionError Prelude.Text
batchGetDevicePositionError_deviceId :: (Text -> f Text)
-> BatchGetDevicePositionError -> f BatchGetDevicePositionError
batchGetDevicePositionError_deviceId = (BatchGetDevicePositionError -> Text)
-> (BatchGetDevicePositionError
-> Text -> BatchGetDevicePositionError)
-> Lens
BatchGetDevicePositionError BatchGetDevicePositionError Text Text
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 :: (BatchItemError -> f BatchItemError)
-> BatchGetDevicePositionError -> f BatchGetDevicePositionError
batchGetDevicePositionError_error = (BatchGetDevicePositionError -> BatchItemError)
-> (BatchGetDevicePositionError
-> BatchItemError -> BatchGetDevicePositionError)
-> Lens
BatchGetDevicePositionError
BatchGetDevicePositionError
BatchItemError
BatchItemError
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 Core.FromJSON BatchGetDevicePositionError where
parseJSON :: Value -> Parser BatchGetDevicePositionError
parseJSON =
String
-> (Object -> Parser BatchGetDevicePositionError)
-> Value
-> Parser BatchGetDevicePositionError
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"BatchGetDevicePositionError"
( \Object
x ->
Text -> BatchItemError -> BatchGetDevicePositionError
BatchGetDevicePositionError'
(Text -> BatchItemError -> BatchGetDevicePositionError)
-> Parser Text
-> Parser (BatchItemError -> BatchGetDevicePositionError)
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 -> BatchGetDevicePositionError)
-> Parser BatchItemError -> Parser BatchGetDevicePositionError
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")
)
instance Prelude.Hashable BatchGetDevicePositionError
instance Prelude.NFData BatchGetDevicePositionError