{-# 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.BatchPutGeofenceError 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 BatchPutGeofenceError = BatchPutGeofenceError'
{
BatchPutGeofenceError -> BatchItemError
error :: BatchItemError,
BatchPutGeofenceError -> Text
geofenceId :: Prelude.Text
}
deriving (BatchPutGeofenceError -> BatchPutGeofenceError -> Bool
(BatchPutGeofenceError -> BatchPutGeofenceError -> Bool)
-> (BatchPutGeofenceError -> BatchPutGeofenceError -> Bool)
-> Eq BatchPutGeofenceError
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchPutGeofenceError -> BatchPutGeofenceError -> Bool
$c/= :: BatchPutGeofenceError -> BatchPutGeofenceError -> Bool
== :: BatchPutGeofenceError -> BatchPutGeofenceError -> Bool
$c== :: BatchPutGeofenceError -> BatchPutGeofenceError -> Bool
Prelude.Eq, ReadPrec [BatchPutGeofenceError]
ReadPrec BatchPutGeofenceError
Int -> ReadS BatchPutGeofenceError
ReadS [BatchPutGeofenceError]
(Int -> ReadS BatchPutGeofenceError)
-> ReadS [BatchPutGeofenceError]
-> ReadPrec BatchPutGeofenceError
-> ReadPrec [BatchPutGeofenceError]
-> Read BatchPutGeofenceError
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchPutGeofenceError]
$creadListPrec :: ReadPrec [BatchPutGeofenceError]
readPrec :: ReadPrec BatchPutGeofenceError
$creadPrec :: ReadPrec BatchPutGeofenceError
readList :: ReadS [BatchPutGeofenceError]
$creadList :: ReadS [BatchPutGeofenceError]
readsPrec :: Int -> ReadS BatchPutGeofenceError
$creadsPrec :: Int -> ReadS BatchPutGeofenceError
Prelude.Read, Int -> BatchPutGeofenceError -> ShowS
[BatchPutGeofenceError] -> ShowS
BatchPutGeofenceError -> String
(Int -> BatchPutGeofenceError -> ShowS)
-> (BatchPutGeofenceError -> String)
-> ([BatchPutGeofenceError] -> ShowS)
-> Show BatchPutGeofenceError
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchPutGeofenceError] -> ShowS
$cshowList :: [BatchPutGeofenceError] -> ShowS
show :: BatchPutGeofenceError -> String
$cshow :: BatchPutGeofenceError -> String
showsPrec :: Int -> BatchPutGeofenceError -> ShowS
$cshowsPrec :: Int -> BatchPutGeofenceError -> ShowS
Prelude.Show, (forall x. BatchPutGeofenceError -> Rep BatchPutGeofenceError x)
-> (forall x. Rep BatchPutGeofenceError x -> BatchPutGeofenceError)
-> Generic BatchPutGeofenceError
forall x. Rep BatchPutGeofenceError x -> BatchPutGeofenceError
forall x. BatchPutGeofenceError -> Rep BatchPutGeofenceError x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BatchPutGeofenceError x -> BatchPutGeofenceError
$cfrom :: forall x. BatchPutGeofenceError -> Rep BatchPutGeofenceError x
Prelude.Generic)
newBatchPutGeofenceError ::
BatchItemError ->
Prelude.Text ->
BatchPutGeofenceError
newBatchPutGeofenceError :: BatchItemError -> Text -> BatchPutGeofenceError
newBatchPutGeofenceError BatchItemError
pError_ Text
pGeofenceId_ =
BatchPutGeofenceError' :: BatchItemError -> Text -> BatchPutGeofenceError
BatchPutGeofenceError'
{ $sel:error:BatchPutGeofenceError' :: BatchItemError
error = BatchItemError
pError_,
$sel:geofenceId:BatchPutGeofenceError' :: Text
geofenceId = Text
pGeofenceId_
}
batchPutGeofenceError_error :: Lens.Lens' BatchPutGeofenceError BatchItemError
batchPutGeofenceError_error :: (BatchItemError -> f BatchItemError)
-> BatchPutGeofenceError -> f BatchPutGeofenceError
batchPutGeofenceError_error = (BatchPutGeofenceError -> BatchItemError)
-> (BatchPutGeofenceError
-> BatchItemError -> BatchPutGeofenceError)
-> Lens
BatchPutGeofenceError
BatchPutGeofenceError
BatchItemError
BatchItemError
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchPutGeofenceError' {BatchItemError
error :: BatchItemError
$sel:error:BatchPutGeofenceError' :: BatchPutGeofenceError -> BatchItemError
error} -> BatchItemError
error) (\s :: BatchPutGeofenceError
s@BatchPutGeofenceError' {} BatchItemError
a -> BatchPutGeofenceError
s {$sel:error:BatchPutGeofenceError' :: BatchItemError
error = BatchItemError
a} :: BatchPutGeofenceError)
batchPutGeofenceError_geofenceId :: Lens.Lens' BatchPutGeofenceError Prelude.Text
batchPutGeofenceError_geofenceId :: (Text -> f Text)
-> BatchPutGeofenceError -> f BatchPutGeofenceError
batchPutGeofenceError_geofenceId = (BatchPutGeofenceError -> Text)
-> (BatchPutGeofenceError -> Text -> BatchPutGeofenceError)
-> Lens BatchPutGeofenceError BatchPutGeofenceError Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchPutGeofenceError' {Text
geofenceId :: Text
$sel:geofenceId:BatchPutGeofenceError' :: BatchPutGeofenceError -> Text
geofenceId} -> Text
geofenceId) (\s :: BatchPutGeofenceError
s@BatchPutGeofenceError' {} Text
a -> BatchPutGeofenceError
s {$sel:geofenceId:BatchPutGeofenceError' :: Text
geofenceId = Text
a} :: BatchPutGeofenceError)
instance Core.FromJSON BatchPutGeofenceError where
parseJSON :: Value -> Parser BatchPutGeofenceError
parseJSON =
String
-> (Object -> Parser BatchPutGeofenceError)
-> Value
-> Parser BatchPutGeofenceError
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"BatchPutGeofenceError"
( \Object
x ->
BatchItemError -> Text -> BatchPutGeofenceError
BatchPutGeofenceError'
(BatchItemError -> Text -> BatchPutGeofenceError)
-> Parser BatchItemError -> Parser (Text -> BatchPutGeofenceError)
forall (f :: * -> *) a b. Functor 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 (Text -> BatchPutGeofenceError)
-> Parser Text -> Parser BatchPutGeofenceError
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"GeofenceId")
)
instance Prelude.Hashable BatchPutGeofenceError
instance Prelude.NFData BatchPutGeofenceError