{-# 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.SecurityLake.Types.FailuresResponse where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.SecurityLake.Types.Failures
data FailuresResponse = FailuresResponse'
{
FailuresResponse -> Maybe [Failures]
failures :: Prelude.Maybe [Failures],
FailuresResponse -> Maybe Text
region :: Prelude.Maybe Prelude.Text
}
deriving (FailuresResponse -> FailuresResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FailuresResponse -> FailuresResponse -> Bool
$c/= :: FailuresResponse -> FailuresResponse -> Bool
== :: FailuresResponse -> FailuresResponse -> Bool
$c== :: FailuresResponse -> FailuresResponse -> Bool
Prelude.Eq, ReadPrec [FailuresResponse]
ReadPrec FailuresResponse
Int -> ReadS FailuresResponse
ReadS [FailuresResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FailuresResponse]
$creadListPrec :: ReadPrec [FailuresResponse]
readPrec :: ReadPrec FailuresResponse
$creadPrec :: ReadPrec FailuresResponse
readList :: ReadS [FailuresResponse]
$creadList :: ReadS [FailuresResponse]
readsPrec :: Int -> ReadS FailuresResponse
$creadsPrec :: Int -> ReadS FailuresResponse
Prelude.Read, Int -> FailuresResponse -> ShowS
[FailuresResponse] -> ShowS
FailuresResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FailuresResponse] -> ShowS
$cshowList :: [FailuresResponse] -> ShowS
show :: FailuresResponse -> String
$cshow :: FailuresResponse -> String
showsPrec :: Int -> FailuresResponse -> ShowS
$cshowsPrec :: Int -> FailuresResponse -> ShowS
Prelude.Show, forall x. Rep FailuresResponse x -> FailuresResponse
forall x. FailuresResponse -> Rep FailuresResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep FailuresResponse x -> FailuresResponse
$cfrom :: forall x. FailuresResponse -> Rep FailuresResponse x
Prelude.Generic)
newFailuresResponse ::
FailuresResponse
newFailuresResponse :: FailuresResponse
newFailuresResponse =
FailuresResponse'
{ $sel:failures:FailuresResponse' :: Maybe [Failures]
failures = forall a. Maybe a
Prelude.Nothing,
$sel:region:FailuresResponse' :: Maybe Text
region = forall a. Maybe a
Prelude.Nothing
}
failuresResponse_failures :: Lens.Lens' FailuresResponse (Prelude.Maybe [Failures])
failuresResponse_failures :: Lens' FailuresResponse (Maybe [Failures])
failuresResponse_failures = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FailuresResponse' {Maybe [Failures]
failures :: Maybe [Failures]
$sel:failures:FailuresResponse' :: FailuresResponse -> Maybe [Failures]
failures} -> Maybe [Failures]
failures) (\s :: FailuresResponse
s@FailuresResponse' {} Maybe [Failures]
a -> FailuresResponse
s {$sel:failures:FailuresResponse' :: Maybe [Failures]
failures = Maybe [Failures]
a} :: FailuresResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
failuresResponse_region :: Lens.Lens' FailuresResponse (Prelude.Maybe Prelude.Text)
failuresResponse_region :: Lens' FailuresResponse (Maybe Text)
failuresResponse_region = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FailuresResponse' {Maybe Text
region :: Maybe Text
$sel:region:FailuresResponse' :: FailuresResponse -> Maybe Text
region} -> Maybe Text
region) (\s :: FailuresResponse
s@FailuresResponse' {} Maybe Text
a -> FailuresResponse
s {$sel:region:FailuresResponse' :: Maybe Text
region = Maybe Text
a} :: FailuresResponse)
instance Data.FromJSON FailuresResponse where
parseJSON :: Value -> Parser FailuresResponse
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"FailuresResponse"
( \Object
x ->
Maybe [Failures] -> Maybe Text -> FailuresResponse
FailuresResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"failures" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"region")
)
instance Prelude.Hashable FailuresResponse where
hashWithSalt :: Int -> FailuresResponse -> Int
hashWithSalt Int
_salt FailuresResponse' {Maybe [Failures]
Maybe Text
region :: Maybe Text
failures :: Maybe [Failures]
$sel:region:FailuresResponse' :: FailuresResponse -> Maybe Text
$sel:failures:FailuresResponse' :: FailuresResponse -> Maybe [Failures]
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Failures]
failures
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
region
instance Prelude.NFData FailuresResponse where
rnf :: FailuresResponse -> ()
rnf FailuresResponse' {Maybe [Failures]
Maybe Text
region :: Maybe Text
failures :: Maybe [Failures]
$sel:region:FailuresResponse' :: FailuresResponse -> Maybe Text
$sel:failures:FailuresResponse' :: FailuresResponse -> Maybe [Failures]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [Failures]
failures
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
region