{-# 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.SecurityHub.Types.ImportFindingsError where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ImportFindingsError = ImportFindingsError'
{
ImportFindingsError -> Text
id :: Prelude.Text,
ImportFindingsError -> Text
errorCode :: Prelude.Text,
ImportFindingsError -> Text
errorMessage :: Prelude.Text
}
deriving (ImportFindingsError -> ImportFindingsError -> Bool
(ImportFindingsError -> ImportFindingsError -> Bool)
-> (ImportFindingsError -> ImportFindingsError -> Bool)
-> Eq ImportFindingsError
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ImportFindingsError -> ImportFindingsError -> Bool
$c/= :: ImportFindingsError -> ImportFindingsError -> Bool
== :: ImportFindingsError -> ImportFindingsError -> Bool
$c== :: ImportFindingsError -> ImportFindingsError -> Bool
Prelude.Eq, ReadPrec [ImportFindingsError]
ReadPrec ImportFindingsError
Int -> ReadS ImportFindingsError
ReadS [ImportFindingsError]
(Int -> ReadS ImportFindingsError)
-> ReadS [ImportFindingsError]
-> ReadPrec ImportFindingsError
-> ReadPrec [ImportFindingsError]
-> Read ImportFindingsError
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ImportFindingsError]
$creadListPrec :: ReadPrec [ImportFindingsError]
readPrec :: ReadPrec ImportFindingsError
$creadPrec :: ReadPrec ImportFindingsError
readList :: ReadS [ImportFindingsError]
$creadList :: ReadS [ImportFindingsError]
readsPrec :: Int -> ReadS ImportFindingsError
$creadsPrec :: Int -> ReadS ImportFindingsError
Prelude.Read, Int -> ImportFindingsError -> ShowS
[ImportFindingsError] -> ShowS
ImportFindingsError -> String
(Int -> ImportFindingsError -> ShowS)
-> (ImportFindingsError -> String)
-> ([ImportFindingsError] -> ShowS)
-> Show ImportFindingsError
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ImportFindingsError] -> ShowS
$cshowList :: [ImportFindingsError] -> ShowS
show :: ImportFindingsError -> String
$cshow :: ImportFindingsError -> String
showsPrec :: Int -> ImportFindingsError -> ShowS
$cshowsPrec :: Int -> ImportFindingsError -> ShowS
Prelude.Show, (forall x. ImportFindingsError -> Rep ImportFindingsError x)
-> (forall x. Rep ImportFindingsError x -> ImportFindingsError)
-> Generic ImportFindingsError
forall x. Rep ImportFindingsError x -> ImportFindingsError
forall x. ImportFindingsError -> Rep ImportFindingsError x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ImportFindingsError x -> ImportFindingsError
$cfrom :: forall x. ImportFindingsError -> Rep ImportFindingsError x
Prelude.Generic)
newImportFindingsError ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
ImportFindingsError
newImportFindingsError :: Text -> Text -> Text -> ImportFindingsError
newImportFindingsError
Text
pId_
Text
pErrorCode_
Text
pErrorMessage_ =
ImportFindingsError' :: Text -> Text -> Text -> ImportFindingsError
ImportFindingsError'
{ $sel:id:ImportFindingsError' :: Text
id = Text
pId_,
$sel:errorCode:ImportFindingsError' :: Text
errorCode = Text
pErrorCode_,
$sel:errorMessage:ImportFindingsError' :: Text
errorMessage = Text
pErrorMessage_
}
importFindingsError_id :: Lens.Lens' ImportFindingsError Prelude.Text
importFindingsError_id :: (Text -> f Text) -> ImportFindingsError -> f ImportFindingsError
importFindingsError_id = (ImportFindingsError -> Text)
-> (ImportFindingsError -> Text -> ImportFindingsError)
-> Lens ImportFindingsError ImportFindingsError Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportFindingsError' {Text
id :: Text
$sel:id:ImportFindingsError' :: ImportFindingsError -> Text
id} -> Text
id) (\s :: ImportFindingsError
s@ImportFindingsError' {} Text
a -> ImportFindingsError
s {$sel:id:ImportFindingsError' :: Text
id = Text
a} :: ImportFindingsError)
importFindingsError_errorCode :: Lens.Lens' ImportFindingsError Prelude.Text
importFindingsError_errorCode :: (Text -> f Text) -> ImportFindingsError -> f ImportFindingsError
importFindingsError_errorCode = (ImportFindingsError -> Text)
-> (ImportFindingsError -> Text -> ImportFindingsError)
-> Lens ImportFindingsError ImportFindingsError Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportFindingsError' {Text
errorCode :: Text
$sel:errorCode:ImportFindingsError' :: ImportFindingsError -> Text
errorCode} -> Text
errorCode) (\s :: ImportFindingsError
s@ImportFindingsError' {} Text
a -> ImportFindingsError
s {$sel:errorCode:ImportFindingsError' :: Text
errorCode = Text
a} :: ImportFindingsError)
importFindingsError_errorMessage :: Lens.Lens' ImportFindingsError Prelude.Text
importFindingsError_errorMessage :: (Text -> f Text) -> ImportFindingsError -> f ImportFindingsError
importFindingsError_errorMessage = (ImportFindingsError -> Text)
-> (ImportFindingsError -> Text -> ImportFindingsError)
-> Lens ImportFindingsError ImportFindingsError Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportFindingsError' {Text
errorMessage :: Text
$sel:errorMessage:ImportFindingsError' :: ImportFindingsError -> Text
errorMessage} -> Text
errorMessage) (\s :: ImportFindingsError
s@ImportFindingsError' {} Text
a -> ImportFindingsError
s {$sel:errorMessage:ImportFindingsError' :: Text
errorMessage = Text
a} :: ImportFindingsError)
instance Core.FromJSON ImportFindingsError where
parseJSON :: Value -> Parser ImportFindingsError
parseJSON =
String
-> (Object -> Parser ImportFindingsError)
-> Value
-> Parser ImportFindingsError
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ImportFindingsError"
( \Object
x ->
Text -> Text -> Text -> ImportFindingsError
ImportFindingsError'
(Text -> Text -> Text -> ImportFindingsError)
-> Parser Text -> Parser (Text -> Text -> ImportFindingsError)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Id")
Parser (Text -> Text -> ImportFindingsError)
-> Parser Text -> Parser (Text -> ImportFindingsError)
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
"ErrorCode")
Parser (Text -> ImportFindingsError)
-> Parser Text -> Parser ImportFindingsError
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
"ErrorMessage")
)
instance Prelude.Hashable ImportFindingsError
instance Prelude.NFData ImportFindingsError