module Stratosphere.Macie.AllowList (
module Exports, AllowList(..), mkAllowList
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Macie.AllowList.CriteriaProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data AllowList
=
AllowList {AllowList -> ()
haddock_workaround_ :: (),
AllowList -> CriteriaProperty
criteria :: CriteriaProperty,
AllowList -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
AllowList -> Value Text
name :: (Value Prelude.Text),
AllowList -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
deriving stock (AllowList -> AllowList -> Bool
(AllowList -> AllowList -> Bool)
-> (AllowList -> AllowList -> Bool) -> Eq AllowList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AllowList -> AllowList -> Bool
== :: AllowList -> AllowList -> Bool
$c/= :: AllowList -> AllowList -> Bool
/= :: AllowList -> AllowList -> Bool
Prelude.Eq, Int -> AllowList -> ShowS
[AllowList] -> ShowS
AllowList -> String
(Int -> AllowList -> ShowS)
-> (AllowList -> String)
-> ([AllowList] -> ShowS)
-> Show AllowList
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AllowList -> ShowS
showsPrec :: Int -> AllowList -> ShowS
$cshow :: AllowList -> String
show :: AllowList -> String
$cshowList :: [AllowList] -> ShowS
showList :: [AllowList] -> ShowS
Prelude.Show)
mkAllowList :: CriteriaProperty -> Value Prelude.Text -> AllowList
mkAllowList :: CriteriaProperty -> Value Text -> AllowList
mkAllowList CriteriaProperty
criteria Value Text
name
= AllowList
{haddock_workaround_ :: ()
haddock_workaround_ = (), criteria :: CriteriaProperty
criteria = CriteriaProperty
criteria, name :: Value Text
name = Value Text
name,
description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties AllowList where
toResourceProperties :: AllowList -> ResourceProperties
toResourceProperties AllowList {Maybe [Tag]
Maybe (Value Text)
()
Value Text
CriteriaProperty
haddock_workaround_ :: AllowList -> ()
criteria :: AllowList -> CriteriaProperty
description :: AllowList -> Maybe (Value Text)
name :: AllowList -> Value Text
tags :: AllowList -> Maybe [Tag]
haddock_workaround_ :: ()
criteria :: CriteriaProperty
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe [Tag]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Macie::AllowList", supportsTags :: Bool
supportsTags = Bool
Prelude.True,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"Criteria" Key -> CriteriaProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= CriteriaProperty
criteria, Key
"Name" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
name]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Description" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
description,
Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags]))}
instance JSON.ToJSON AllowList where
toJSON :: AllowList -> Value
toJSON AllowList {Maybe [Tag]
Maybe (Value Text)
()
Value Text
CriteriaProperty
haddock_workaround_ :: AllowList -> ()
criteria :: AllowList -> CriteriaProperty
description :: AllowList -> Maybe (Value Text)
name :: AllowList -> Value Text
tags :: AllowList -> Maybe [Tag]
haddock_workaround_ :: ()
criteria :: CriteriaProperty
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe [Tag]
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"Criteria" Key -> CriteriaProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= CriteriaProperty
criteria, Key
"Name" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
name]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Description" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
description,
Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags])))
instance Property "Criteria" AllowList where
type PropertyType "Criteria" AllowList = CriteriaProperty
set :: PropertyType "Criteria" AllowList -> AllowList -> AllowList
set PropertyType "Criteria" AllowList
newValue AllowList {Maybe [Tag]
Maybe (Value Text)
()
Value Text
CriteriaProperty
haddock_workaround_ :: AllowList -> ()
criteria :: AllowList -> CriteriaProperty
description :: AllowList -> Maybe (Value Text)
name :: AllowList -> Value Text
tags :: AllowList -> Maybe [Tag]
haddock_workaround_ :: ()
criteria :: CriteriaProperty
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe [Tag]
..} = AllowList {criteria :: CriteriaProperty
criteria = PropertyType "Criteria" AllowList
CriteriaProperty
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Description" AllowList where
type PropertyType "Description" AllowList = Value Prelude.Text
set :: PropertyType "Description" AllowList -> AllowList -> AllowList
set PropertyType "Description" AllowList
newValue AllowList {Maybe [Tag]
Maybe (Value Text)
()
Value Text
CriteriaProperty
haddock_workaround_ :: AllowList -> ()
criteria :: AllowList -> CriteriaProperty
description :: AllowList -> Maybe (Value Text)
name :: AllowList -> Value Text
tags :: AllowList -> Maybe [Tag]
haddock_workaround_ :: ()
criteria :: CriteriaProperty
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe [Tag]
..}
= AllowList {description :: Maybe (Value Text)
description = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Description" AllowList
Value Text
newValue, Maybe [Tag]
()
Value Text
CriteriaProperty
haddock_workaround_ :: ()
criteria :: CriteriaProperty
name :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
criteria :: CriteriaProperty
name :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Name" AllowList where
type PropertyType "Name" AllowList = Value Prelude.Text
set :: PropertyType "Name" AllowList -> AllowList -> AllowList
set PropertyType "Name" AllowList
newValue AllowList {Maybe [Tag]
Maybe (Value Text)
()
Value Text
CriteriaProperty
haddock_workaround_ :: AllowList -> ()
criteria :: AllowList -> CriteriaProperty
description :: AllowList -> Maybe (Value Text)
name :: AllowList -> Value Text
tags :: AllowList -> Maybe [Tag]
haddock_workaround_ :: ()
criteria :: CriteriaProperty
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe [Tag]
..} = AllowList {name :: Value Text
name = PropertyType "Name" AllowList
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
CriteriaProperty
haddock_workaround_ :: ()
criteria :: CriteriaProperty
description :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
criteria :: CriteriaProperty
description :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "Tags" AllowList where
type PropertyType "Tags" AllowList = [Tag]
set :: PropertyType "Tags" AllowList -> AllowList -> AllowList
set PropertyType "Tags" AllowList
newValue AllowList {Maybe [Tag]
Maybe (Value Text)
()
Value Text
CriteriaProperty
haddock_workaround_ :: AllowList -> ()
criteria :: AllowList -> CriteriaProperty
description :: AllowList -> Maybe (Value Text)
name :: AllowList -> Value Text
tags :: AllowList -> Maybe [Tag]
haddock_workaround_ :: ()
criteria :: CriteriaProperty
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe [Tag]
..}
= AllowList {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" AllowList
newValue, Maybe (Value Text)
()
Value Text
CriteriaProperty
haddock_workaround_ :: ()
criteria :: CriteriaProperty
description :: Maybe (Value Text)
name :: Value Text
haddock_workaround_ :: ()
criteria :: CriteriaProperty
description :: Maybe (Value Text)
name :: Value Text
..}