{-# 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.RuleGroupsNamespaceDescription where
import Amazonka.AMP.Types.RuleGroupsNamespaceStatus
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 RuleGroupsNamespaceDescription = RuleGroupsNamespaceDescription'
{
RuleGroupsNamespaceDescription -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
RuleGroupsNamespaceDescription -> Text
arn :: Prelude.Text,
RuleGroupsNamespaceDescription -> POSIX
createdAt :: Data.POSIX,
RuleGroupsNamespaceDescription -> Base64
data' :: Data.Base64,
RuleGroupsNamespaceDescription -> POSIX
modifiedAt :: Data.POSIX,
RuleGroupsNamespaceDescription -> Text
name :: Prelude.Text,
RuleGroupsNamespaceDescription -> RuleGroupsNamespaceStatus
status :: RuleGroupsNamespaceStatus
}
deriving (RuleGroupsNamespaceDescription
-> RuleGroupsNamespaceDescription -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RuleGroupsNamespaceDescription
-> RuleGroupsNamespaceDescription -> Bool
$c/= :: RuleGroupsNamespaceDescription
-> RuleGroupsNamespaceDescription -> Bool
== :: RuleGroupsNamespaceDescription
-> RuleGroupsNamespaceDescription -> Bool
$c== :: RuleGroupsNamespaceDescription
-> RuleGroupsNamespaceDescription -> Bool
Prelude.Eq, ReadPrec [RuleGroupsNamespaceDescription]
ReadPrec RuleGroupsNamespaceDescription
Int -> ReadS RuleGroupsNamespaceDescription
ReadS [RuleGroupsNamespaceDescription]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RuleGroupsNamespaceDescription]
$creadListPrec :: ReadPrec [RuleGroupsNamespaceDescription]
readPrec :: ReadPrec RuleGroupsNamespaceDescription
$creadPrec :: ReadPrec RuleGroupsNamespaceDescription
readList :: ReadS [RuleGroupsNamespaceDescription]
$creadList :: ReadS [RuleGroupsNamespaceDescription]
readsPrec :: Int -> ReadS RuleGroupsNamespaceDescription
$creadsPrec :: Int -> ReadS RuleGroupsNamespaceDescription
Prelude.Read, Int -> RuleGroupsNamespaceDescription -> ShowS
[RuleGroupsNamespaceDescription] -> ShowS
RuleGroupsNamespaceDescription -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RuleGroupsNamespaceDescription] -> ShowS
$cshowList :: [RuleGroupsNamespaceDescription] -> ShowS
show :: RuleGroupsNamespaceDescription -> String
$cshow :: RuleGroupsNamespaceDescription -> String
showsPrec :: Int -> RuleGroupsNamespaceDescription -> ShowS
$cshowsPrec :: Int -> RuleGroupsNamespaceDescription -> ShowS
Prelude.Show, forall x.
Rep RuleGroupsNamespaceDescription x
-> RuleGroupsNamespaceDescription
forall x.
RuleGroupsNamespaceDescription
-> Rep RuleGroupsNamespaceDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RuleGroupsNamespaceDescription x
-> RuleGroupsNamespaceDescription
$cfrom :: forall x.
RuleGroupsNamespaceDescription
-> Rep RuleGroupsNamespaceDescription x
Prelude.Generic)
newRuleGroupsNamespaceDescription ::
Prelude.Text ->
Prelude.UTCTime ->
Prelude.ByteString ->
Prelude.UTCTime ->
Prelude.Text ->
RuleGroupsNamespaceStatus ->
RuleGroupsNamespaceDescription
newRuleGroupsNamespaceDescription :: Text
-> UTCTime
-> ByteString
-> UTCTime
-> Text
-> RuleGroupsNamespaceStatus
-> RuleGroupsNamespaceDescription
newRuleGroupsNamespaceDescription
Text
pArn_
UTCTime
pCreatedAt_
ByteString
pData_
UTCTime
pModifiedAt_
Text
pName_
RuleGroupsNamespaceStatus
pStatus_ =
RuleGroupsNamespaceDescription'
{ $sel:tags:RuleGroupsNamespaceDescription' :: Maybe (HashMap Text Text)
tags =
forall a. Maybe a
Prelude.Nothing,
$sel:arn:RuleGroupsNamespaceDescription' :: Text
arn = Text
pArn_,
$sel:createdAt:RuleGroupsNamespaceDescription' :: POSIX
createdAt = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreatedAt_,
$sel:data':RuleGroupsNamespaceDescription' :: Base64
data' = Iso' Base64 ByteString
Data._Base64 forall t b. AReview t b -> b -> t
Lens.# ByteString
pData_,
$sel:modifiedAt:RuleGroupsNamespaceDescription' :: POSIX
modifiedAt = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pModifiedAt_,
$sel:name:RuleGroupsNamespaceDescription' :: Text
name = Text
pName_,
$sel:status:RuleGroupsNamespaceDescription' :: RuleGroupsNamespaceStatus
status = RuleGroupsNamespaceStatus
pStatus_
}
ruleGroupsNamespaceDescription_tags :: Lens.Lens' RuleGroupsNamespaceDescription (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
ruleGroupsNamespaceDescription_tags :: Lens' RuleGroupsNamespaceDescription (Maybe (HashMap Text Text))
ruleGroupsNamespaceDescription_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RuleGroupsNamespaceDescription' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:RuleGroupsNamespaceDescription' :: RuleGroupsNamespaceDescription -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: RuleGroupsNamespaceDescription
s@RuleGroupsNamespaceDescription' {} Maybe (HashMap Text Text)
a -> RuleGroupsNamespaceDescription
s {$sel:tags:RuleGroupsNamespaceDescription' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: RuleGroupsNamespaceDescription) 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
ruleGroupsNamespaceDescription_arn :: Lens.Lens' RuleGroupsNamespaceDescription Prelude.Text
ruleGroupsNamespaceDescription_arn :: Lens' RuleGroupsNamespaceDescription Text
ruleGroupsNamespaceDescription_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RuleGroupsNamespaceDescription' {Text
arn :: Text
$sel:arn:RuleGroupsNamespaceDescription' :: RuleGroupsNamespaceDescription -> Text
arn} -> Text
arn) (\s :: RuleGroupsNamespaceDescription
s@RuleGroupsNamespaceDescription' {} Text
a -> RuleGroupsNamespaceDescription
s {$sel:arn:RuleGroupsNamespaceDescription' :: Text
arn = Text
a} :: RuleGroupsNamespaceDescription)
ruleGroupsNamespaceDescription_createdAt :: Lens.Lens' RuleGroupsNamespaceDescription Prelude.UTCTime
ruleGroupsNamespaceDescription_createdAt :: Lens' RuleGroupsNamespaceDescription UTCTime
ruleGroupsNamespaceDescription_createdAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RuleGroupsNamespaceDescription' {POSIX
createdAt :: POSIX
$sel:createdAt:RuleGroupsNamespaceDescription' :: RuleGroupsNamespaceDescription -> POSIX
createdAt} -> POSIX
createdAt) (\s :: RuleGroupsNamespaceDescription
s@RuleGroupsNamespaceDescription' {} POSIX
a -> RuleGroupsNamespaceDescription
s {$sel:createdAt:RuleGroupsNamespaceDescription' :: POSIX
createdAt = POSIX
a} :: RuleGroupsNamespaceDescription) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
ruleGroupsNamespaceDescription_data :: Lens.Lens' RuleGroupsNamespaceDescription Prelude.ByteString
ruleGroupsNamespaceDescription_data :: Lens' RuleGroupsNamespaceDescription ByteString
ruleGroupsNamespaceDescription_data = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RuleGroupsNamespaceDescription' {Base64
data' :: Base64
$sel:data':RuleGroupsNamespaceDescription' :: RuleGroupsNamespaceDescription -> Base64
data'} -> Base64
data') (\s :: RuleGroupsNamespaceDescription
s@RuleGroupsNamespaceDescription' {} Base64
a -> RuleGroupsNamespaceDescription
s {$sel:data':RuleGroupsNamespaceDescription' :: Base64
data' = Base64
a} :: RuleGroupsNamespaceDescription) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Iso' Base64 ByteString
Data._Base64
ruleGroupsNamespaceDescription_modifiedAt :: Lens.Lens' RuleGroupsNamespaceDescription Prelude.UTCTime
ruleGroupsNamespaceDescription_modifiedAt :: Lens' RuleGroupsNamespaceDescription UTCTime
ruleGroupsNamespaceDescription_modifiedAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RuleGroupsNamespaceDescription' {POSIX
modifiedAt :: POSIX
$sel:modifiedAt:RuleGroupsNamespaceDescription' :: RuleGroupsNamespaceDescription -> POSIX
modifiedAt} -> POSIX
modifiedAt) (\s :: RuleGroupsNamespaceDescription
s@RuleGroupsNamespaceDescription' {} POSIX
a -> RuleGroupsNamespaceDescription
s {$sel:modifiedAt:RuleGroupsNamespaceDescription' :: POSIX
modifiedAt = POSIX
a} :: RuleGroupsNamespaceDescription) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
ruleGroupsNamespaceDescription_name :: Lens.Lens' RuleGroupsNamespaceDescription Prelude.Text
ruleGroupsNamespaceDescription_name :: Lens' RuleGroupsNamespaceDescription Text
ruleGroupsNamespaceDescription_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RuleGroupsNamespaceDescription' {Text
name :: Text
$sel:name:RuleGroupsNamespaceDescription' :: RuleGroupsNamespaceDescription -> Text
name} -> Text
name) (\s :: RuleGroupsNamespaceDescription
s@RuleGroupsNamespaceDescription' {} Text
a -> RuleGroupsNamespaceDescription
s {$sel:name:RuleGroupsNamespaceDescription' :: Text
name = Text
a} :: RuleGroupsNamespaceDescription)
ruleGroupsNamespaceDescription_status :: Lens.Lens' RuleGroupsNamespaceDescription RuleGroupsNamespaceStatus
ruleGroupsNamespaceDescription_status :: Lens' RuleGroupsNamespaceDescription RuleGroupsNamespaceStatus
ruleGroupsNamespaceDescription_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RuleGroupsNamespaceDescription' {RuleGroupsNamespaceStatus
status :: RuleGroupsNamespaceStatus
$sel:status:RuleGroupsNamespaceDescription' :: RuleGroupsNamespaceDescription -> RuleGroupsNamespaceStatus
status} -> RuleGroupsNamespaceStatus
status) (\s :: RuleGroupsNamespaceDescription
s@RuleGroupsNamespaceDescription' {} RuleGroupsNamespaceStatus
a -> RuleGroupsNamespaceDescription
s {$sel:status:RuleGroupsNamespaceDescription' :: RuleGroupsNamespaceStatus
status = RuleGroupsNamespaceStatus
a} :: RuleGroupsNamespaceDescription)
instance Data.FromJSON RuleGroupsNamespaceDescription where
parseJSON :: Value -> Parser RuleGroupsNamespaceDescription
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"RuleGroupsNamespaceDescription"
( \Object
x ->
Maybe (HashMap Text Text)
-> Text
-> POSIX
-> Base64
-> POSIX
-> Text
-> RuleGroupsNamespaceStatus
-> RuleGroupsNamespaceDescription
RuleGroupsNamespaceDescription'
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
"tags" 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 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 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 a
Data..: Key
"data")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"modifiedAt")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser 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 a
Data..: Key
"status")
)
instance
Prelude.Hashable
RuleGroupsNamespaceDescription
where
hashWithSalt :: Int -> RuleGroupsNamespaceDescription -> Int
hashWithSalt
Int
_salt
RuleGroupsNamespaceDescription' {Maybe (HashMap Text Text)
Text
Base64
POSIX
RuleGroupsNamespaceStatus
status :: RuleGroupsNamespaceStatus
name :: Text
modifiedAt :: POSIX
data' :: Base64
createdAt :: POSIX
arn :: Text
tags :: Maybe (HashMap Text Text)
$sel:status:RuleGroupsNamespaceDescription' :: RuleGroupsNamespaceDescription -> RuleGroupsNamespaceStatus
$sel:name:RuleGroupsNamespaceDescription' :: RuleGroupsNamespaceDescription -> Text
$sel:modifiedAt:RuleGroupsNamespaceDescription' :: RuleGroupsNamespaceDescription -> POSIX
$sel:data':RuleGroupsNamespaceDescription' :: RuleGroupsNamespaceDescription -> Base64
$sel:createdAt:RuleGroupsNamespaceDescription' :: RuleGroupsNamespaceDescription -> POSIX
$sel:arn:RuleGroupsNamespaceDescription' :: RuleGroupsNamespaceDescription -> Text
$sel:tags:RuleGroupsNamespaceDescription' :: RuleGroupsNamespaceDescription -> Maybe (HashMap Text Text)
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
arn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
createdAt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Base64
data'
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
modifiedAt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` RuleGroupsNamespaceStatus
status
instance
Prelude.NFData
RuleGroupsNamespaceDescription
where
rnf :: RuleGroupsNamespaceDescription -> ()
rnf RuleGroupsNamespaceDescription' {Maybe (HashMap Text Text)
Text
Base64
POSIX
RuleGroupsNamespaceStatus
status :: RuleGroupsNamespaceStatus
name :: Text
modifiedAt :: POSIX
data' :: Base64
createdAt :: POSIX
arn :: Text
tags :: Maybe (HashMap Text Text)
$sel:status:RuleGroupsNamespaceDescription' :: RuleGroupsNamespaceDescription -> RuleGroupsNamespaceStatus
$sel:name:RuleGroupsNamespaceDescription' :: RuleGroupsNamespaceDescription -> Text
$sel:modifiedAt:RuleGroupsNamespaceDescription' :: RuleGroupsNamespaceDescription -> POSIX
$sel:data':RuleGroupsNamespaceDescription' :: RuleGroupsNamespaceDescription -> Base64
$sel:createdAt:RuleGroupsNamespaceDescription' :: RuleGroupsNamespaceDescription -> POSIX
$sel:arn:RuleGroupsNamespaceDescription' :: RuleGroupsNamespaceDescription -> Text
$sel:tags:RuleGroupsNamespaceDescription' :: RuleGroupsNamespaceDescription -> Maybe (HashMap Text Text)
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
arn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
createdAt
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Base64
data'
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
modifiedAt
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf RuleGroupsNamespaceStatus
status