{-# 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.MacieV2.Types.AllowListSummary 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
data AllowListSummary = AllowListSummary'
{
AllowListSummary -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
AllowListSummary -> Maybe ISO8601
createdAt :: Prelude.Maybe Data.ISO8601,
AllowListSummary -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
AllowListSummary -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
AllowListSummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
AllowListSummary -> Maybe ISO8601
updatedAt :: Prelude.Maybe Data.ISO8601
}
deriving (AllowListSummary -> AllowListSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AllowListSummary -> AllowListSummary -> Bool
$c/= :: AllowListSummary -> AllowListSummary -> Bool
== :: AllowListSummary -> AllowListSummary -> Bool
$c== :: AllowListSummary -> AllowListSummary -> Bool
Prelude.Eq, ReadPrec [AllowListSummary]
ReadPrec AllowListSummary
Int -> ReadS AllowListSummary
ReadS [AllowListSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AllowListSummary]
$creadListPrec :: ReadPrec [AllowListSummary]
readPrec :: ReadPrec AllowListSummary
$creadPrec :: ReadPrec AllowListSummary
readList :: ReadS [AllowListSummary]
$creadList :: ReadS [AllowListSummary]
readsPrec :: Int -> ReadS AllowListSummary
$creadsPrec :: Int -> ReadS AllowListSummary
Prelude.Read, Int -> AllowListSummary -> ShowS
[AllowListSummary] -> ShowS
AllowListSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AllowListSummary] -> ShowS
$cshowList :: [AllowListSummary] -> ShowS
show :: AllowListSummary -> String
$cshow :: AllowListSummary -> String
showsPrec :: Int -> AllowListSummary -> ShowS
$cshowsPrec :: Int -> AllowListSummary -> ShowS
Prelude.Show, forall x. Rep AllowListSummary x -> AllowListSummary
forall x. AllowListSummary -> Rep AllowListSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AllowListSummary x -> AllowListSummary
$cfrom :: forall x. AllowListSummary -> Rep AllowListSummary x
Prelude.Generic)
newAllowListSummary ::
AllowListSummary
newAllowListSummary :: AllowListSummary
newAllowListSummary =
AllowListSummary'
{ $sel:arn:AllowListSummary' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
$sel:createdAt:AllowListSummary' :: Maybe ISO8601
createdAt = forall a. Maybe a
Prelude.Nothing,
$sel:description:AllowListSummary' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:id:AllowListSummary' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
$sel:name:AllowListSummary' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:updatedAt:AllowListSummary' :: Maybe ISO8601
updatedAt = forall a. Maybe a
Prelude.Nothing
}
allowListSummary_arn :: Lens.Lens' AllowListSummary (Prelude.Maybe Prelude.Text)
allowListSummary_arn :: Lens' AllowListSummary (Maybe Text)
allowListSummary_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AllowListSummary' {Maybe Text
arn :: Maybe Text
$sel:arn:AllowListSummary' :: AllowListSummary -> Maybe Text
arn} -> Maybe Text
arn) (\s :: AllowListSummary
s@AllowListSummary' {} Maybe Text
a -> AllowListSummary
s {$sel:arn:AllowListSummary' :: Maybe Text
arn = Maybe Text
a} :: AllowListSummary)
allowListSummary_createdAt :: Lens.Lens' AllowListSummary (Prelude.Maybe Prelude.UTCTime)
allowListSummary_createdAt :: Lens' AllowListSummary (Maybe UTCTime)
allowListSummary_createdAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AllowListSummary' {Maybe ISO8601
createdAt :: Maybe ISO8601
$sel:createdAt:AllowListSummary' :: AllowListSummary -> Maybe ISO8601
createdAt} -> Maybe ISO8601
createdAt) (\s :: AllowListSummary
s@AllowListSummary' {} Maybe ISO8601
a -> AllowListSummary
s {$sel:createdAt:AllowListSummary' :: Maybe ISO8601
createdAt = Maybe ISO8601
a} :: AllowListSummary) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time
allowListSummary_description :: Lens.Lens' AllowListSummary (Prelude.Maybe Prelude.Text)
allowListSummary_description :: Lens' AllowListSummary (Maybe Text)
allowListSummary_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AllowListSummary' {Maybe Text
description :: Maybe Text
$sel:description:AllowListSummary' :: AllowListSummary -> Maybe Text
description} -> Maybe Text
description) (\s :: AllowListSummary
s@AllowListSummary' {} Maybe Text
a -> AllowListSummary
s {$sel:description:AllowListSummary' :: Maybe Text
description = Maybe Text
a} :: AllowListSummary)
allowListSummary_id :: Lens.Lens' AllowListSummary (Prelude.Maybe Prelude.Text)
allowListSummary_id :: Lens' AllowListSummary (Maybe Text)
allowListSummary_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AllowListSummary' {Maybe Text
id :: Maybe Text
$sel:id:AllowListSummary' :: AllowListSummary -> Maybe Text
id} -> Maybe Text
id) (\s :: AllowListSummary
s@AllowListSummary' {} Maybe Text
a -> AllowListSummary
s {$sel:id:AllowListSummary' :: Maybe Text
id = Maybe Text
a} :: AllowListSummary)
allowListSummary_name :: Lens.Lens' AllowListSummary (Prelude.Maybe Prelude.Text)
allowListSummary_name :: Lens' AllowListSummary (Maybe Text)
allowListSummary_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AllowListSummary' {Maybe Text
name :: Maybe Text
$sel:name:AllowListSummary' :: AllowListSummary -> Maybe Text
name} -> Maybe Text
name) (\s :: AllowListSummary
s@AllowListSummary' {} Maybe Text
a -> AllowListSummary
s {$sel:name:AllowListSummary' :: Maybe Text
name = Maybe Text
a} :: AllowListSummary)
allowListSummary_updatedAt :: Lens.Lens' AllowListSummary (Prelude.Maybe Prelude.UTCTime)
allowListSummary_updatedAt :: Lens' AllowListSummary (Maybe UTCTime)
allowListSummary_updatedAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AllowListSummary' {Maybe ISO8601
updatedAt :: Maybe ISO8601
$sel:updatedAt:AllowListSummary' :: AllowListSummary -> Maybe ISO8601
updatedAt} -> Maybe ISO8601
updatedAt) (\s :: AllowListSummary
s@AllowListSummary' {} Maybe ISO8601
a -> AllowListSummary
s {$sel:updatedAt:AllowListSummary' :: Maybe ISO8601
updatedAt = Maybe ISO8601
a} :: AllowListSummary) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time
instance Data.FromJSON AllowListSummary where
parseJSON :: Value -> Parser AllowListSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"AllowListSummary"
( \Object
x ->
Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> AllowListSummary
AllowListSummary'
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
"arn")
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
"createdAt")
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
"description")
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
"id")
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
"name")
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
"updatedAt")
)
instance Prelude.Hashable AllowListSummary where
hashWithSalt :: Int -> AllowListSummary -> Int
hashWithSalt Int
_salt AllowListSummary' {Maybe Text
Maybe ISO8601
updatedAt :: Maybe ISO8601
name :: Maybe Text
id :: Maybe Text
description :: Maybe Text
createdAt :: Maybe ISO8601
arn :: Maybe Text
$sel:updatedAt:AllowListSummary' :: AllowListSummary -> Maybe ISO8601
$sel:name:AllowListSummary' :: AllowListSummary -> Maybe Text
$sel:id:AllowListSummary' :: AllowListSummary -> Maybe Text
$sel:description:AllowListSummary' :: AllowListSummary -> Maybe Text
$sel:createdAt:AllowListSummary' :: AllowListSummary -> Maybe ISO8601
$sel:arn:AllowListSummary' :: AllowListSummary -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
createdAt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
id
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
updatedAt
instance Prelude.NFData AllowListSummary where
rnf :: AllowListSummary -> ()
rnf AllowListSummary' {Maybe Text
Maybe ISO8601
updatedAt :: Maybe ISO8601
name :: Maybe Text
id :: Maybe Text
description :: Maybe Text
createdAt :: Maybe ISO8601
arn :: Maybe Text
$sel:updatedAt:AllowListSummary' :: AllowListSummary -> Maybe ISO8601
$sel:name:AllowListSummary' :: AllowListSummary -> Maybe Text
$sel:id:AllowListSummary' :: AllowListSummary -> Maybe Text
$sel:description:AllowListSummary' :: AllowListSummary -> Maybe Text
$sel:createdAt:AllowListSummary' :: AllowListSummary -> Maybe ISO8601
$sel:arn:AllowListSummary' :: AllowListSummary -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
createdAt
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
id
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
updatedAt