{-# 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.AMP.Types.RuleGroupsNamespaceSummary where
import Amazonka.AMP.Types.RuleGroupsNamespaceStatus
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data RuleGroupsNamespaceSummary = RuleGroupsNamespaceSummary'
{
RuleGroupsNamespaceSummary -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
RuleGroupsNamespaceSummary -> Text
arn :: Prelude.Text,
RuleGroupsNamespaceSummary -> POSIX
createdAt :: Core.POSIX,
RuleGroupsNamespaceSummary -> POSIX
modifiedAt :: Core.POSIX,
RuleGroupsNamespaceSummary -> Text
name :: Prelude.Text,
RuleGroupsNamespaceSummary -> RuleGroupsNamespaceStatus
status :: RuleGroupsNamespaceStatus
}
deriving (RuleGroupsNamespaceSummary -> RuleGroupsNamespaceSummary -> Bool
(RuleGroupsNamespaceSummary -> RuleGroupsNamespaceSummary -> Bool)
-> (RuleGroupsNamespaceSummary
-> RuleGroupsNamespaceSummary -> Bool)
-> Eq RuleGroupsNamespaceSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RuleGroupsNamespaceSummary -> RuleGroupsNamespaceSummary -> Bool
$c/= :: RuleGroupsNamespaceSummary -> RuleGroupsNamespaceSummary -> Bool
== :: RuleGroupsNamespaceSummary -> RuleGroupsNamespaceSummary -> Bool
$c== :: RuleGroupsNamespaceSummary -> RuleGroupsNamespaceSummary -> Bool
Prelude.Eq, ReadPrec [RuleGroupsNamespaceSummary]
ReadPrec RuleGroupsNamespaceSummary
Int -> ReadS RuleGroupsNamespaceSummary
ReadS [RuleGroupsNamespaceSummary]
(Int -> ReadS RuleGroupsNamespaceSummary)
-> ReadS [RuleGroupsNamespaceSummary]
-> ReadPrec RuleGroupsNamespaceSummary
-> ReadPrec [RuleGroupsNamespaceSummary]
-> Read RuleGroupsNamespaceSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RuleGroupsNamespaceSummary]
$creadListPrec :: ReadPrec [RuleGroupsNamespaceSummary]
readPrec :: ReadPrec RuleGroupsNamespaceSummary
$creadPrec :: ReadPrec RuleGroupsNamespaceSummary
readList :: ReadS [RuleGroupsNamespaceSummary]
$creadList :: ReadS [RuleGroupsNamespaceSummary]
readsPrec :: Int -> ReadS RuleGroupsNamespaceSummary
$creadsPrec :: Int -> ReadS RuleGroupsNamespaceSummary
Prelude.Read, Int -> RuleGroupsNamespaceSummary -> ShowS
[RuleGroupsNamespaceSummary] -> ShowS
RuleGroupsNamespaceSummary -> String
(Int -> RuleGroupsNamespaceSummary -> ShowS)
-> (RuleGroupsNamespaceSummary -> String)
-> ([RuleGroupsNamespaceSummary] -> ShowS)
-> Show RuleGroupsNamespaceSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RuleGroupsNamespaceSummary] -> ShowS
$cshowList :: [RuleGroupsNamespaceSummary] -> ShowS
show :: RuleGroupsNamespaceSummary -> String
$cshow :: RuleGroupsNamespaceSummary -> String
showsPrec :: Int -> RuleGroupsNamespaceSummary -> ShowS
$cshowsPrec :: Int -> RuleGroupsNamespaceSummary -> ShowS
Prelude.Show, (forall x.
RuleGroupsNamespaceSummary -> Rep RuleGroupsNamespaceSummary x)
-> (forall x.
Rep RuleGroupsNamespaceSummary x -> RuleGroupsNamespaceSummary)
-> Generic RuleGroupsNamespaceSummary
forall x.
Rep RuleGroupsNamespaceSummary x -> RuleGroupsNamespaceSummary
forall x.
RuleGroupsNamespaceSummary -> Rep RuleGroupsNamespaceSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RuleGroupsNamespaceSummary x -> RuleGroupsNamespaceSummary
$cfrom :: forall x.
RuleGroupsNamespaceSummary -> Rep RuleGroupsNamespaceSummary x
Prelude.Generic)
newRuleGroupsNamespaceSummary ::
Prelude.Text ->
Prelude.UTCTime ->
Prelude.UTCTime ->
Prelude.Text ->
RuleGroupsNamespaceStatus ->
RuleGroupsNamespaceSummary
newRuleGroupsNamespaceSummary :: Text
-> UTCTime
-> UTCTime
-> Text
-> RuleGroupsNamespaceStatus
-> RuleGroupsNamespaceSummary
newRuleGroupsNamespaceSummary
Text
pArn_
UTCTime
pCreatedAt_
UTCTime
pModifiedAt_
Text
pName_
RuleGroupsNamespaceStatus
pStatus_ =
RuleGroupsNamespaceSummary' :: Maybe (HashMap Text Text)
-> Text
-> POSIX
-> POSIX
-> Text
-> RuleGroupsNamespaceStatus
-> RuleGroupsNamespaceSummary
RuleGroupsNamespaceSummary'
{ $sel:tags:RuleGroupsNamespaceSummary' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:arn:RuleGroupsNamespaceSummary' :: Text
arn = Text
pArn_,
$sel:createdAt:RuleGroupsNamespaceSummary' :: POSIX
createdAt = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
-> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreatedAt_,
$sel:modifiedAt:RuleGroupsNamespaceSummary' :: POSIX
modifiedAt = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
-> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pModifiedAt_,
$sel:name:RuleGroupsNamespaceSummary' :: Text
name = Text
pName_,
$sel:status:RuleGroupsNamespaceSummary' :: RuleGroupsNamespaceStatus
status = RuleGroupsNamespaceStatus
pStatus_
}
ruleGroupsNamespaceSummary_tags :: Lens.Lens' RuleGroupsNamespaceSummary (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
ruleGroupsNamespaceSummary_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> RuleGroupsNamespaceSummary -> f RuleGroupsNamespaceSummary
ruleGroupsNamespaceSummary_tags = (RuleGroupsNamespaceSummary -> Maybe (HashMap Text Text))
-> (RuleGroupsNamespaceSummary
-> Maybe (HashMap Text Text) -> RuleGroupsNamespaceSummary)
-> Lens
RuleGroupsNamespaceSummary
RuleGroupsNamespaceSummary
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RuleGroupsNamespaceSummary' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:RuleGroupsNamespaceSummary' :: RuleGroupsNamespaceSummary -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: RuleGroupsNamespaceSummary
s@RuleGroupsNamespaceSummary' {} Maybe (HashMap Text Text)
a -> RuleGroupsNamespaceSummary
s {$sel:tags:RuleGroupsNamespaceSummary' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: RuleGroupsNamespaceSummary) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> RuleGroupsNamespaceSummary -> f RuleGroupsNamespaceSummary)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> RuleGroupsNamespaceSummary
-> f RuleGroupsNamespaceSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
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 AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
ruleGroupsNamespaceSummary_arn :: Lens.Lens' RuleGroupsNamespaceSummary Prelude.Text
ruleGroupsNamespaceSummary_arn :: (Text -> f Text)
-> RuleGroupsNamespaceSummary -> f RuleGroupsNamespaceSummary
ruleGroupsNamespaceSummary_arn = (RuleGroupsNamespaceSummary -> Text)
-> (RuleGroupsNamespaceSummary
-> Text -> RuleGroupsNamespaceSummary)
-> Lens
RuleGroupsNamespaceSummary RuleGroupsNamespaceSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RuleGroupsNamespaceSummary' {Text
arn :: Text
$sel:arn:RuleGroupsNamespaceSummary' :: RuleGroupsNamespaceSummary -> Text
arn} -> Text
arn) (\s :: RuleGroupsNamespaceSummary
s@RuleGroupsNamespaceSummary' {} Text
a -> RuleGroupsNamespaceSummary
s {$sel:arn:RuleGroupsNamespaceSummary' :: Text
arn = Text
a} :: RuleGroupsNamespaceSummary)
ruleGroupsNamespaceSummary_createdAt :: Lens.Lens' RuleGroupsNamespaceSummary Prelude.UTCTime
ruleGroupsNamespaceSummary_createdAt :: (UTCTime -> f UTCTime)
-> RuleGroupsNamespaceSummary -> f RuleGroupsNamespaceSummary
ruleGroupsNamespaceSummary_createdAt = (RuleGroupsNamespaceSummary -> POSIX)
-> (RuleGroupsNamespaceSummary
-> POSIX -> RuleGroupsNamespaceSummary)
-> Lens
RuleGroupsNamespaceSummary RuleGroupsNamespaceSummary POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RuleGroupsNamespaceSummary' {POSIX
createdAt :: POSIX
$sel:createdAt:RuleGroupsNamespaceSummary' :: RuleGroupsNamespaceSummary -> POSIX
createdAt} -> POSIX
createdAt) (\s :: RuleGroupsNamespaceSummary
s@RuleGroupsNamespaceSummary' {} POSIX
a -> RuleGroupsNamespaceSummary
s {$sel:createdAt:RuleGroupsNamespaceSummary' :: POSIX
createdAt = POSIX
a} :: RuleGroupsNamespaceSummary) ((POSIX -> f POSIX)
-> RuleGroupsNamespaceSummary -> f RuleGroupsNamespaceSummary)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> RuleGroupsNamespaceSummary
-> f RuleGroupsNamespaceSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
ruleGroupsNamespaceSummary_modifiedAt :: Lens.Lens' RuleGroupsNamespaceSummary Prelude.UTCTime
ruleGroupsNamespaceSummary_modifiedAt :: (UTCTime -> f UTCTime)
-> RuleGroupsNamespaceSummary -> f RuleGroupsNamespaceSummary
ruleGroupsNamespaceSummary_modifiedAt = (RuleGroupsNamespaceSummary -> POSIX)
-> (RuleGroupsNamespaceSummary
-> POSIX -> RuleGroupsNamespaceSummary)
-> Lens
RuleGroupsNamespaceSummary RuleGroupsNamespaceSummary POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RuleGroupsNamespaceSummary' {POSIX
modifiedAt :: POSIX
$sel:modifiedAt:RuleGroupsNamespaceSummary' :: RuleGroupsNamespaceSummary -> POSIX
modifiedAt} -> POSIX
modifiedAt) (\s :: RuleGroupsNamespaceSummary
s@RuleGroupsNamespaceSummary' {} POSIX
a -> RuleGroupsNamespaceSummary
s {$sel:modifiedAt:RuleGroupsNamespaceSummary' :: POSIX
modifiedAt = POSIX
a} :: RuleGroupsNamespaceSummary) ((POSIX -> f POSIX)
-> RuleGroupsNamespaceSummary -> f RuleGroupsNamespaceSummary)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> RuleGroupsNamespaceSummary
-> f RuleGroupsNamespaceSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
ruleGroupsNamespaceSummary_name :: Lens.Lens' RuleGroupsNamespaceSummary Prelude.Text
ruleGroupsNamespaceSummary_name :: (Text -> f Text)
-> RuleGroupsNamespaceSummary -> f RuleGroupsNamespaceSummary
ruleGroupsNamespaceSummary_name = (RuleGroupsNamespaceSummary -> Text)
-> (RuleGroupsNamespaceSummary
-> Text -> RuleGroupsNamespaceSummary)
-> Lens
RuleGroupsNamespaceSummary RuleGroupsNamespaceSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RuleGroupsNamespaceSummary' {Text
name :: Text
$sel:name:RuleGroupsNamespaceSummary' :: RuleGroupsNamespaceSummary -> Text
name} -> Text
name) (\s :: RuleGroupsNamespaceSummary
s@RuleGroupsNamespaceSummary' {} Text
a -> RuleGroupsNamespaceSummary
s {$sel:name:RuleGroupsNamespaceSummary' :: Text
name = Text
a} :: RuleGroupsNamespaceSummary)
ruleGroupsNamespaceSummary_status :: Lens.Lens' RuleGroupsNamespaceSummary RuleGroupsNamespaceStatus
ruleGroupsNamespaceSummary_status :: (RuleGroupsNamespaceStatus -> f RuleGroupsNamespaceStatus)
-> RuleGroupsNamespaceSummary -> f RuleGroupsNamespaceSummary
ruleGroupsNamespaceSummary_status = (RuleGroupsNamespaceSummary -> RuleGroupsNamespaceStatus)
-> (RuleGroupsNamespaceSummary
-> RuleGroupsNamespaceStatus -> RuleGroupsNamespaceSummary)
-> Lens
RuleGroupsNamespaceSummary
RuleGroupsNamespaceSummary
RuleGroupsNamespaceStatus
RuleGroupsNamespaceStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RuleGroupsNamespaceSummary' {RuleGroupsNamespaceStatus
status :: RuleGroupsNamespaceStatus
$sel:status:RuleGroupsNamespaceSummary' :: RuleGroupsNamespaceSummary -> RuleGroupsNamespaceStatus
status} -> RuleGroupsNamespaceStatus
status) (\s :: RuleGroupsNamespaceSummary
s@RuleGroupsNamespaceSummary' {} RuleGroupsNamespaceStatus
a -> RuleGroupsNamespaceSummary
s {$sel:status:RuleGroupsNamespaceSummary' :: RuleGroupsNamespaceStatus
status = RuleGroupsNamespaceStatus
a} :: RuleGroupsNamespaceSummary)
instance Core.FromJSON RuleGroupsNamespaceSummary where
parseJSON :: Value -> Parser RuleGroupsNamespaceSummary
parseJSON =
String
-> (Object -> Parser RuleGroupsNamespaceSummary)
-> Value
-> Parser RuleGroupsNamespaceSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"RuleGroupsNamespaceSummary"
( \Object
x ->
Maybe (HashMap Text Text)
-> Text
-> POSIX
-> POSIX
-> Text
-> RuleGroupsNamespaceStatus
-> RuleGroupsNamespaceSummary
RuleGroupsNamespaceSummary'
(Maybe (HashMap Text Text)
-> Text
-> POSIX
-> POSIX
-> Text
-> RuleGroupsNamespaceStatus
-> RuleGroupsNamespaceSummary)
-> Parser (Maybe (HashMap Text Text))
-> Parser
(Text
-> POSIX
-> POSIX
-> Text
-> RuleGroupsNamespaceStatus
-> RuleGroupsNamespaceSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tags" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
Parser
(Text
-> POSIX
-> POSIX
-> Text
-> RuleGroupsNamespaceStatus
-> RuleGroupsNamespaceSummary)
-> Parser Text
-> Parser
(POSIX
-> POSIX
-> Text
-> RuleGroupsNamespaceStatus
-> RuleGroupsNamespaceSummary)
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
"arn")
Parser
(POSIX
-> POSIX
-> Text
-> RuleGroupsNamespaceStatus
-> RuleGroupsNamespaceSummary)
-> Parser POSIX
-> Parser
(POSIX
-> Text -> RuleGroupsNamespaceStatus -> RuleGroupsNamespaceSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"createdAt")
Parser
(POSIX
-> Text -> RuleGroupsNamespaceStatus -> RuleGroupsNamespaceSummary)
-> Parser POSIX
-> Parser
(Text -> RuleGroupsNamespaceStatus -> RuleGroupsNamespaceSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"modifiedAt")
Parser
(Text -> RuleGroupsNamespaceStatus -> RuleGroupsNamespaceSummary)
-> Parser Text
-> Parser (RuleGroupsNamespaceStatus -> RuleGroupsNamespaceSummary)
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
"name")
Parser (RuleGroupsNamespaceStatus -> RuleGroupsNamespaceSummary)
-> Parser RuleGroupsNamespaceStatus
-> Parser RuleGroupsNamespaceSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser RuleGroupsNamespaceStatus
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"status")
)
instance Prelude.Hashable RuleGroupsNamespaceSummary
instance Prelude.NFData RuleGroupsNamespaceSummary