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