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