{-# 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.CustomDataIdentifiersDetections where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SecurityHub.Types.Occurrences
data CustomDataIdentifiersDetections = CustomDataIdentifiersDetections'
{
CustomDataIdentifiersDetections -> Maybe Occurrences
occurrences :: Prelude.Maybe Occurrences,
CustomDataIdentifiersDetections -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
CustomDataIdentifiersDetections -> Maybe Integer
count :: Prelude.Maybe Prelude.Integer,
CustomDataIdentifiersDetections -> Maybe Text
name :: Prelude.Maybe Prelude.Text
}
deriving (CustomDataIdentifiersDetections
-> CustomDataIdentifiersDetections -> Bool
(CustomDataIdentifiersDetections
-> CustomDataIdentifiersDetections -> Bool)
-> (CustomDataIdentifiersDetections
-> CustomDataIdentifiersDetections -> Bool)
-> Eq CustomDataIdentifiersDetections
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CustomDataIdentifiersDetections
-> CustomDataIdentifiersDetections -> Bool
$c/= :: CustomDataIdentifiersDetections
-> CustomDataIdentifiersDetections -> Bool
== :: CustomDataIdentifiersDetections
-> CustomDataIdentifiersDetections -> Bool
$c== :: CustomDataIdentifiersDetections
-> CustomDataIdentifiersDetections -> Bool
Prelude.Eq, ReadPrec [CustomDataIdentifiersDetections]
ReadPrec CustomDataIdentifiersDetections
Int -> ReadS CustomDataIdentifiersDetections
ReadS [CustomDataIdentifiersDetections]
(Int -> ReadS CustomDataIdentifiersDetections)
-> ReadS [CustomDataIdentifiersDetections]
-> ReadPrec CustomDataIdentifiersDetections
-> ReadPrec [CustomDataIdentifiersDetections]
-> Read CustomDataIdentifiersDetections
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CustomDataIdentifiersDetections]
$creadListPrec :: ReadPrec [CustomDataIdentifiersDetections]
readPrec :: ReadPrec CustomDataIdentifiersDetections
$creadPrec :: ReadPrec CustomDataIdentifiersDetections
readList :: ReadS [CustomDataIdentifiersDetections]
$creadList :: ReadS [CustomDataIdentifiersDetections]
readsPrec :: Int -> ReadS CustomDataIdentifiersDetections
$creadsPrec :: Int -> ReadS CustomDataIdentifiersDetections
Prelude.Read, Int -> CustomDataIdentifiersDetections -> ShowS
[CustomDataIdentifiersDetections] -> ShowS
CustomDataIdentifiersDetections -> String
(Int -> CustomDataIdentifiersDetections -> ShowS)
-> (CustomDataIdentifiersDetections -> String)
-> ([CustomDataIdentifiersDetections] -> ShowS)
-> Show CustomDataIdentifiersDetections
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CustomDataIdentifiersDetections] -> ShowS
$cshowList :: [CustomDataIdentifiersDetections] -> ShowS
show :: CustomDataIdentifiersDetections -> String
$cshow :: CustomDataIdentifiersDetections -> String
showsPrec :: Int -> CustomDataIdentifiersDetections -> ShowS
$cshowsPrec :: Int -> CustomDataIdentifiersDetections -> ShowS
Prelude.Show, (forall x.
CustomDataIdentifiersDetections
-> Rep CustomDataIdentifiersDetections x)
-> (forall x.
Rep CustomDataIdentifiersDetections x
-> CustomDataIdentifiersDetections)
-> Generic CustomDataIdentifiersDetections
forall x.
Rep CustomDataIdentifiersDetections x
-> CustomDataIdentifiersDetections
forall x.
CustomDataIdentifiersDetections
-> Rep CustomDataIdentifiersDetections x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CustomDataIdentifiersDetections x
-> CustomDataIdentifiersDetections
$cfrom :: forall x.
CustomDataIdentifiersDetections
-> Rep CustomDataIdentifiersDetections x
Prelude.Generic)
newCustomDataIdentifiersDetections ::
CustomDataIdentifiersDetections
newCustomDataIdentifiersDetections :: CustomDataIdentifiersDetections
newCustomDataIdentifiersDetections =
CustomDataIdentifiersDetections' :: Maybe Occurrences
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> CustomDataIdentifiersDetections
CustomDataIdentifiersDetections'
{ $sel:occurrences:CustomDataIdentifiersDetections' :: Maybe Occurrences
occurrences =
Maybe Occurrences
forall a. Maybe a
Prelude.Nothing,
$sel:arn:CustomDataIdentifiersDetections' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:count:CustomDataIdentifiersDetections' :: Maybe Integer
count = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:name:CustomDataIdentifiersDetections' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
customDataIdentifiersDetections_occurrences :: Lens.Lens' CustomDataIdentifiersDetections (Prelude.Maybe Occurrences)
customDataIdentifiersDetections_occurrences :: (Maybe Occurrences -> f (Maybe Occurrences))
-> CustomDataIdentifiersDetections
-> f CustomDataIdentifiersDetections
customDataIdentifiersDetections_occurrences = (CustomDataIdentifiersDetections -> Maybe Occurrences)
-> (CustomDataIdentifiersDetections
-> Maybe Occurrences -> CustomDataIdentifiersDetections)
-> Lens
CustomDataIdentifiersDetections
CustomDataIdentifiersDetections
(Maybe Occurrences)
(Maybe Occurrences)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomDataIdentifiersDetections' {Maybe Occurrences
occurrences :: Maybe Occurrences
$sel:occurrences:CustomDataIdentifiersDetections' :: CustomDataIdentifiersDetections -> Maybe Occurrences
occurrences} -> Maybe Occurrences
occurrences) (\s :: CustomDataIdentifiersDetections
s@CustomDataIdentifiersDetections' {} Maybe Occurrences
a -> CustomDataIdentifiersDetections
s {$sel:occurrences:CustomDataIdentifiersDetections' :: Maybe Occurrences
occurrences = Maybe Occurrences
a} :: CustomDataIdentifiersDetections)
customDataIdentifiersDetections_arn :: Lens.Lens' CustomDataIdentifiersDetections (Prelude.Maybe Prelude.Text)
customDataIdentifiersDetections_arn :: (Maybe Text -> f (Maybe Text))
-> CustomDataIdentifiersDetections
-> f CustomDataIdentifiersDetections
customDataIdentifiersDetections_arn = (CustomDataIdentifiersDetections -> Maybe Text)
-> (CustomDataIdentifiersDetections
-> Maybe Text -> CustomDataIdentifiersDetections)
-> Lens
CustomDataIdentifiersDetections
CustomDataIdentifiersDetections
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomDataIdentifiersDetections' {Maybe Text
arn :: Maybe Text
$sel:arn:CustomDataIdentifiersDetections' :: CustomDataIdentifiersDetections -> Maybe Text
arn} -> Maybe Text
arn) (\s :: CustomDataIdentifiersDetections
s@CustomDataIdentifiersDetections' {} Maybe Text
a -> CustomDataIdentifiersDetections
s {$sel:arn:CustomDataIdentifiersDetections' :: Maybe Text
arn = Maybe Text
a} :: CustomDataIdentifiersDetections)
customDataIdentifiersDetections_count :: Lens.Lens' CustomDataIdentifiersDetections (Prelude.Maybe Prelude.Integer)
customDataIdentifiersDetections_count :: (Maybe Integer -> f (Maybe Integer))
-> CustomDataIdentifiersDetections
-> f CustomDataIdentifiersDetections
customDataIdentifiersDetections_count = (CustomDataIdentifiersDetections -> Maybe Integer)
-> (CustomDataIdentifiersDetections
-> Maybe Integer -> CustomDataIdentifiersDetections)
-> Lens
CustomDataIdentifiersDetections
CustomDataIdentifiersDetections
(Maybe Integer)
(Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomDataIdentifiersDetections' {Maybe Integer
count :: Maybe Integer
$sel:count:CustomDataIdentifiersDetections' :: CustomDataIdentifiersDetections -> Maybe Integer
count} -> Maybe Integer
count) (\s :: CustomDataIdentifiersDetections
s@CustomDataIdentifiersDetections' {} Maybe Integer
a -> CustomDataIdentifiersDetections
s {$sel:count:CustomDataIdentifiersDetections' :: Maybe Integer
count = Maybe Integer
a} :: CustomDataIdentifiersDetections)
customDataIdentifiersDetections_name :: Lens.Lens' CustomDataIdentifiersDetections (Prelude.Maybe Prelude.Text)
customDataIdentifiersDetections_name :: (Maybe Text -> f (Maybe Text))
-> CustomDataIdentifiersDetections
-> f CustomDataIdentifiersDetections
customDataIdentifiersDetections_name = (CustomDataIdentifiersDetections -> Maybe Text)
-> (CustomDataIdentifiersDetections
-> Maybe Text -> CustomDataIdentifiersDetections)
-> Lens
CustomDataIdentifiersDetections
CustomDataIdentifiersDetections
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomDataIdentifiersDetections' {Maybe Text
name :: Maybe Text
$sel:name:CustomDataIdentifiersDetections' :: CustomDataIdentifiersDetections -> Maybe Text
name} -> Maybe Text
name) (\s :: CustomDataIdentifiersDetections
s@CustomDataIdentifiersDetections' {} Maybe Text
a -> CustomDataIdentifiersDetections
s {$sel:name:CustomDataIdentifiersDetections' :: Maybe Text
name = Maybe Text
a} :: CustomDataIdentifiersDetections)
instance
Core.FromJSON
CustomDataIdentifiersDetections
where
parseJSON :: Value -> Parser CustomDataIdentifiersDetections
parseJSON =
String
-> (Object -> Parser CustomDataIdentifiersDetections)
-> Value
-> Parser CustomDataIdentifiersDetections
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"CustomDataIdentifiersDetections"
( \Object
x ->
Maybe Occurrences
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> CustomDataIdentifiersDetections
CustomDataIdentifiersDetections'
(Maybe Occurrences
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> CustomDataIdentifiersDetections)
-> Parser (Maybe Occurrences)
-> Parser
(Maybe Text
-> Maybe Integer -> Maybe Text -> CustomDataIdentifiersDetections)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Occurrences)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Occurrences")
Parser
(Maybe Text
-> Maybe Integer -> Maybe Text -> CustomDataIdentifiersDetections)
-> Parser (Maybe Text)
-> Parser
(Maybe Integer -> Maybe Text -> CustomDataIdentifiersDetections)
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
"Arn")
Parser
(Maybe Integer -> Maybe Text -> CustomDataIdentifiersDetections)
-> Parser (Maybe Integer)
-> Parser (Maybe Text -> CustomDataIdentifiersDetections)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Count")
Parser (Maybe Text -> CustomDataIdentifiersDetections)
-> Parser (Maybe Text) -> Parser CustomDataIdentifiersDetections
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
"Name")
)
instance
Prelude.Hashable
CustomDataIdentifiersDetections
instance
Prelude.NFData
CustomDataIdentifiersDetections
instance Core.ToJSON CustomDataIdentifiersDetections where
toJSON :: CustomDataIdentifiersDetections -> Value
toJSON CustomDataIdentifiersDetections' {Maybe Integer
Maybe Text
Maybe Occurrences
name :: Maybe Text
count :: Maybe Integer
arn :: Maybe Text
occurrences :: Maybe Occurrences
$sel:name:CustomDataIdentifiersDetections' :: CustomDataIdentifiersDetections -> Maybe Text
$sel:count:CustomDataIdentifiersDetections' :: CustomDataIdentifiersDetections -> Maybe Integer
$sel:arn:CustomDataIdentifiersDetections' :: CustomDataIdentifiersDetections -> Maybe Text
$sel:occurrences:CustomDataIdentifiersDetections' :: CustomDataIdentifiersDetections -> Maybe Occurrences
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"Occurrences" Text -> Occurrences -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Occurrences -> Pair) -> Maybe Occurrences -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Occurrences
occurrences,
(Text
"Arn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
arn,
(Text
"Count" Text -> Integer -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Integer -> Pair) -> Maybe Integer -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Integer
count,
(Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
name
]
)