{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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
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]
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
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.
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'
{ $sel:error:BatchDeleteGeofenceError' :: BatchItemError
error = BatchItemError
pError_,
$sel:geofenceId:BatchDeleteGeofenceError' :: Text
geofenceId = Text
pGeofenceId_
}
batchDeleteGeofenceError_error :: Lens.Lens' BatchDeleteGeofenceError BatchItemError
batchDeleteGeofenceError_error :: Lens' BatchDeleteGeofenceError BatchItemError
batchDeleteGeofenceError_error = 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 :: Lens' BatchDeleteGeofenceError Text
batchDeleteGeofenceError_geofenceId = 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 Data.FromJSON BatchDeleteGeofenceError where
parseJSON :: Value -> Parser BatchDeleteGeofenceError
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"BatchDeleteGeofenceError"
( \Object
x ->
BatchItemError -> Text -> BatchDeleteGeofenceError
BatchDeleteGeofenceError'
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
"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
"GeofenceId")
)
instance Prelude.Hashable BatchDeleteGeofenceError where
hashWithSalt :: Int -> BatchDeleteGeofenceError -> Int
hashWithSalt Int
_salt BatchDeleteGeofenceError' {Text
BatchItemError
geofenceId :: Text
error :: BatchItemError
$sel:geofenceId:BatchDeleteGeofenceError' :: BatchDeleteGeofenceError -> Text
$sel:error:BatchDeleteGeofenceError' :: BatchDeleteGeofenceError -> BatchItemError
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` BatchItemError
error
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
geofenceId
instance Prelude.NFData BatchDeleteGeofenceError where
rnf :: BatchDeleteGeofenceError -> ()
rnf BatchDeleteGeofenceError' {Text
BatchItemError
geofenceId :: Text
error :: BatchItemError
$sel:geofenceId:BatchDeleteGeofenceError' :: BatchDeleteGeofenceError -> Text
$sel:error:BatchDeleteGeofenceError' :: BatchDeleteGeofenceError -> BatchItemError
..} =
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 Text
geofenceId