{-# 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.Discovery.Types.BatchDeleteImportDataError where
import qualified Amazonka.Core as Core
import Amazonka.Discovery.Types.BatchDeleteImportDataErrorCode
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data BatchDeleteImportDataError = BatchDeleteImportDataError'
{
BatchDeleteImportDataError -> Maybe Text
importTaskId :: Prelude.Maybe Prelude.Text,
BatchDeleteImportDataError -> Maybe BatchDeleteImportDataErrorCode
errorCode :: Prelude.Maybe BatchDeleteImportDataErrorCode,
BatchDeleteImportDataError -> Maybe Text
errorDescription :: Prelude.Maybe Prelude.Text
}
deriving (BatchDeleteImportDataError -> BatchDeleteImportDataError -> Bool
(BatchDeleteImportDataError -> BatchDeleteImportDataError -> Bool)
-> (BatchDeleteImportDataError
-> BatchDeleteImportDataError -> Bool)
-> Eq BatchDeleteImportDataError
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchDeleteImportDataError -> BatchDeleteImportDataError -> Bool
$c/= :: BatchDeleteImportDataError -> BatchDeleteImportDataError -> Bool
== :: BatchDeleteImportDataError -> BatchDeleteImportDataError -> Bool
$c== :: BatchDeleteImportDataError -> BatchDeleteImportDataError -> Bool
Prelude.Eq, ReadPrec [BatchDeleteImportDataError]
ReadPrec BatchDeleteImportDataError
Int -> ReadS BatchDeleteImportDataError
ReadS [BatchDeleteImportDataError]
(Int -> ReadS BatchDeleteImportDataError)
-> ReadS [BatchDeleteImportDataError]
-> ReadPrec BatchDeleteImportDataError
-> ReadPrec [BatchDeleteImportDataError]
-> Read BatchDeleteImportDataError
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchDeleteImportDataError]
$creadListPrec :: ReadPrec [BatchDeleteImportDataError]
readPrec :: ReadPrec BatchDeleteImportDataError
$creadPrec :: ReadPrec BatchDeleteImportDataError
readList :: ReadS [BatchDeleteImportDataError]
$creadList :: ReadS [BatchDeleteImportDataError]
readsPrec :: Int -> ReadS BatchDeleteImportDataError
$creadsPrec :: Int -> ReadS BatchDeleteImportDataError
Prelude.Read, Int -> BatchDeleteImportDataError -> ShowS
[BatchDeleteImportDataError] -> ShowS
BatchDeleteImportDataError -> String
(Int -> BatchDeleteImportDataError -> ShowS)
-> (BatchDeleteImportDataError -> String)
-> ([BatchDeleteImportDataError] -> ShowS)
-> Show BatchDeleteImportDataError
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchDeleteImportDataError] -> ShowS
$cshowList :: [BatchDeleteImportDataError] -> ShowS
show :: BatchDeleteImportDataError -> String
$cshow :: BatchDeleteImportDataError -> String
showsPrec :: Int -> BatchDeleteImportDataError -> ShowS
$cshowsPrec :: Int -> BatchDeleteImportDataError -> ShowS
Prelude.Show, (forall x.
BatchDeleteImportDataError -> Rep BatchDeleteImportDataError x)
-> (forall x.
Rep BatchDeleteImportDataError x -> BatchDeleteImportDataError)
-> Generic BatchDeleteImportDataError
forall x.
Rep BatchDeleteImportDataError x -> BatchDeleteImportDataError
forall x.
BatchDeleteImportDataError -> Rep BatchDeleteImportDataError x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchDeleteImportDataError x -> BatchDeleteImportDataError
$cfrom :: forall x.
BatchDeleteImportDataError -> Rep BatchDeleteImportDataError x
Prelude.Generic)
newBatchDeleteImportDataError ::
BatchDeleteImportDataError
newBatchDeleteImportDataError :: BatchDeleteImportDataError
newBatchDeleteImportDataError =
BatchDeleteImportDataError' :: Maybe Text
-> Maybe BatchDeleteImportDataErrorCode
-> Maybe Text
-> BatchDeleteImportDataError
BatchDeleteImportDataError'
{ $sel:importTaskId:BatchDeleteImportDataError' :: Maybe Text
importTaskId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:errorCode:BatchDeleteImportDataError' :: Maybe BatchDeleteImportDataErrorCode
errorCode = Maybe BatchDeleteImportDataErrorCode
forall a. Maybe a
Prelude.Nothing,
$sel:errorDescription:BatchDeleteImportDataError' :: Maybe Text
errorDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
batchDeleteImportDataError_importTaskId :: Lens.Lens' BatchDeleteImportDataError (Prelude.Maybe Prelude.Text)
batchDeleteImportDataError_importTaskId :: (Maybe Text -> f (Maybe Text))
-> BatchDeleteImportDataError -> f BatchDeleteImportDataError
batchDeleteImportDataError_importTaskId = (BatchDeleteImportDataError -> Maybe Text)
-> (BatchDeleteImportDataError
-> Maybe Text -> BatchDeleteImportDataError)
-> Lens
BatchDeleteImportDataError
BatchDeleteImportDataError
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDeleteImportDataError' {Maybe Text
importTaskId :: Maybe Text
$sel:importTaskId:BatchDeleteImportDataError' :: BatchDeleteImportDataError -> Maybe Text
importTaskId} -> Maybe Text
importTaskId) (\s :: BatchDeleteImportDataError
s@BatchDeleteImportDataError' {} Maybe Text
a -> BatchDeleteImportDataError
s {$sel:importTaskId:BatchDeleteImportDataError' :: Maybe Text
importTaskId = Maybe Text
a} :: BatchDeleteImportDataError)
batchDeleteImportDataError_errorCode :: Lens.Lens' BatchDeleteImportDataError (Prelude.Maybe BatchDeleteImportDataErrorCode)
batchDeleteImportDataError_errorCode :: (Maybe BatchDeleteImportDataErrorCode
-> f (Maybe BatchDeleteImportDataErrorCode))
-> BatchDeleteImportDataError -> f BatchDeleteImportDataError
batchDeleteImportDataError_errorCode = (BatchDeleteImportDataError
-> Maybe BatchDeleteImportDataErrorCode)
-> (BatchDeleteImportDataError
-> Maybe BatchDeleteImportDataErrorCode
-> BatchDeleteImportDataError)
-> Lens
BatchDeleteImportDataError
BatchDeleteImportDataError
(Maybe BatchDeleteImportDataErrorCode)
(Maybe BatchDeleteImportDataErrorCode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDeleteImportDataError' {Maybe BatchDeleteImportDataErrorCode
errorCode :: Maybe BatchDeleteImportDataErrorCode
$sel:errorCode:BatchDeleteImportDataError' :: BatchDeleteImportDataError -> Maybe BatchDeleteImportDataErrorCode
errorCode} -> Maybe BatchDeleteImportDataErrorCode
errorCode) (\s :: BatchDeleteImportDataError
s@BatchDeleteImportDataError' {} Maybe BatchDeleteImportDataErrorCode
a -> BatchDeleteImportDataError
s {$sel:errorCode:BatchDeleteImportDataError' :: Maybe BatchDeleteImportDataErrorCode
errorCode = Maybe BatchDeleteImportDataErrorCode
a} :: BatchDeleteImportDataError)
batchDeleteImportDataError_errorDescription :: Lens.Lens' BatchDeleteImportDataError (Prelude.Maybe Prelude.Text)
batchDeleteImportDataError_errorDescription :: (Maybe Text -> f (Maybe Text))
-> BatchDeleteImportDataError -> f BatchDeleteImportDataError
batchDeleteImportDataError_errorDescription = (BatchDeleteImportDataError -> Maybe Text)
-> (BatchDeleteImportDataError
-> Maybe Text -> BatchDeleteImportDataError)
-> Lens
BatchDeleteImportDataError
BatchDeleteImportDataError
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDeleteImportDataError' {Maybe Text
errorDescription :: Maybe Text
$sel:errorDescription:BatchDeleteImportDataError' :: BatchDeleteImportDataError -> Maybe Text
errorDescription} -> Maybe Text
errorDescription) (\s :: BatchDeleteImportDataError
s@BatchDeleteImportDataError' {} Maybe Text
a -> BatchDeleteImportDataError
s {$sel:errorDescription:BatchDeleteImportDataError' :: Maybe Text
errorDescription = Maybe Text
a} :: BatchDeleteImportDataError)
instance Core.FromJSON BatchDeleteImportDataError where
parseJSON :: Value -> Parser BatchDeleteImportDataError
parseJSON =
String
-> (Object -> Parser BatchDeleteImportDataError)
-> Value
-> Parser BatchDeleteImportDataError
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"BatchDeleteImportDataError"
( \Object
x ->
Maybe Text
-> Maybe BatchDeleteImportDataErrorCode
-> Maybe Text
-> BatchDeleteImportDataError
BatchDeleteImportDataError'
(Maybe Text
-> Maybe BatchDeleteImportDataErrorCode
-> Maybe Text
-> BatchDeleteImportDataError)
-> Parser (Maybe Text)
-> Parser
(Maybe BatchDeleteImportDataErrorCode
-> Maybe Text -> BatchDeleteImportDataError)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"importTaskId")
Parser
(Maybe BatchDeleteImportDataErrorCode
-> Maybe Text -> BatchDeleteImportDataError)
-> Parser (Maybe BatchDeleteImportDataErrorCode)
-> Parser (Maybe Text -> BatchDeleteImportDataError)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe BatchDeleteImportDataErrorCode)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"errorCode")
Parser (Maybe Text -> BatchDeleteImportDataError)
-> Parser (Maybe Text) -> Parser BatchDeleteImportDataError
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"errorDescription")
)
instance Prelude.Hashable BatchDeleteImportDataError
instance Prelude.NFData BatchDeleteImportDataError