module Stratosphere.ImageBuilder.LifecyclePolicy.ExclusionRulesProperty (
module Exports, ExclusionRulesProperty(..),
mkExclusionRulesProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.ImageBuilder.LifecyclePolicy.AmiExclusionRulesProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ExclusionRulesProperty
=
ExclusionRulesProperty {ExclusionRulesProperty -> ()
haddock_workaround_ :: (),
ExclusionRulesProperty -> Maybe AmiExclusionRulesProperty
amis :: (Prelude.Maybe AmiExclusionRulesProperty),
ExclusionRulesProperty -> Maybe (Map Text (Value Text))
tagMap :: (Prelude.Maybe (Prelude.Map Prelude.Text (Value Prelude.Text)))}
deriving stock (ExclusionRulesProperty -> ExclusionRulesProperty -> Bool
(ExclusionRulesProperty -> ExclusionRulesProperty -> Bool)
-> (ExclusionRulesProperty -> ExclusionRulesProperty -> Bool)
-> Eq ExclusionRulesProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ExclusionRulesProperty -> ExclusionRulesProperty -> Bool
== :: ExclusionRulesProperty -> ExclusionRulesProperty -> Bool
$c/= :: ExclusionRulesProperty -> ExclusionRulesProperty -> Bool
/= :: ExclusionRulesProperty -> ExclusionRulesProperty -> Bool
Prelude.Eq, Int -> ExclusionRulesProperty -> ShowS
[ExclusionRulesProperty] -> ShowS
ExclusionRulesProperty -> String
(Int -> ExclusionRulesProperty -> ShowS)
-> (ExclusionRulesProperty -> String)
-> ([ExclusionRulesProperty] -> ShowS)
-> Show ExclusionRulesProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ExclusionRulesProperty -> ShowS
showsPrec :: Int -> ExclusionRulesProperty -> ShowS
$cshow :: ExclusionRulesProperty -> String
show :: ExclusionRulesProperty -> String
$cshowList :: [ExclusionRulesProperty] -> ShowS
showList :: [ExclusionRulesProperty] -> ShowS
Prelude.Show)
mkExclusionRulesProperty :: ExclusionRulesProperty
mkExclusionRulesProperty :: ExclusionRulesProperty
mkExclusionRulesProperty
= ExclusionRulesProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), amis :: Maybe AmiExclusionRulesProperty
amis = Maybe AmiExclusionRulesProperty
forall a. Maybe a
Prelude.Nothing,
tagMap :: Maybe (Map Text (Value Text))
tagMap = Maybe (Map Text (Value Text))
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ExclusionRulesProperty where
toResourceProperties :: ExclusionRulesProperty -> ResourceProperties
toResourceProperties ExclusionRulesProperty {Maybe (Map Text (Value Text))
Maybe AmiExclusionRulesProperty
()
haddock_workaround_ :: ExclusionRulesProperty -> ()
amis :: ExclusionRulesProperty -> Maybe AmiExclusionRulesProperty
tagMap :: ExclusionRulesProperty -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
amis :: Maybe AmiExclusionRulesProperty
tagMap :: Maybe (Map Text (Value Text))
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::ImageBuilder::LifecyclePolicy.ExclusionRules",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> AmiExclusionRulesProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Amis" (AmiExclusionRulesProperty -> (Key, Value))
-> Maybe AmiExclusionRulesProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AmiExclusionRulesProperty
amis,
Key -> Map Text (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
"TagMap" (Map Text (Value Text) -> (Key, Value))
-> Maybe (Map Text (Value Text)) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text (Value Text))
tagMap])}
instance JSON.ToJSON ExclusionRulesProperty where
toJSON :: ExclusionRulesProperty -> Value
toJSON ExclusionRulesProperty {Maybe (Map Text (Value Text))
Maybe AmiExclusionRulesProperty
()
haddock_workaround_ :: ExclusionRulesProperty -> ()
amis :: ExclusionRulesProperty -> Maybe AmiExclusionRulesProperty
tagMap :: ExclusionRulesProperty -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
amis :: Maybe AmiExclusionRulesProperty
tagMap :: Maybe (Map Text (Value Text))
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> AmiExclusionRulesProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Amis" (AmiExclusionRulesProperty -> (Key, Value))
-> Maybe AmiExclusionRulesProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AmiExclusionRulesProperty
amis,
Key -> Map Text (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
"TagMap" (Map Text (Value Text) -> (Key, Value))
-> Maybe (Map Text (Value Text)) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text (Value Text))
tagMap]))
instance Property "Amis" ExclusionRulesProperty where
type PropertyType "Amis" ExclusionRulesProperty = AmiExclusionRulesProperty
set :: PropertyType "Amis" ExclusionRulesProperty
-> ExclusionRulesProperty -> ExclusionRulesProperty
set PropertyType "Amis" ExclusionRulesProperty
newValue ExclusionRulesProperty {Maybe (Map Text (Value Text))
Maybe AmiExclusionRulesProperty
()
haddock_workaround_ :: ExclusionRulesProperty -> ()
amis :: ExclusionRulesProperty -> Maybe AmiExclusionRulesProperty
tagMap :: ExclusionRulesProperty -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
amis :: Maybe AmiExclusionRulesProperty
tagMap :: Maybe (Map Text (Value Text))
..}
= ExclusionRulesProperty {amis :: Maybe AmiExclusionRulesProperty
amis = AmiExclusionRulesProperty -> Maybe AmiExclusionRulesProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Amis" ExclusionRulesProperty
AmiExclusionRulesProperty
newValue, Maybe (Map Text (Value Text))
()
haddock_workaround_ :: ()
tagMap :: Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
tagMap :: Maybe (Map Text (Value Text))
..}
instance Property "TagMap" ExclusionRulesProperty where
type PropertyType "TagMap" ExclusionRulesProperty = Prelude.Map Prelude.Text (Value Prelude.Text)
set :: PropertyType "TagMap" ExclusionRulesProperty
-> ExclusionRulesProperty -> ExclusionRulesProperty
set PropertyType "TagMap" ExclusionRulesProperty
newValue ExclusionRulesProperty {Maybe (Map Text (Value Text))
Maybe AmiExclusionRulesProperty
()
haddock_workaround_ :: ExclusionRulesProperty -> ()
amis :: ExclusionRulesProperty -> Maybe AmiExclusionRulesProperty
tagMap :: ExclusionRulesProperty -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
amis :: Maybe AmiExclusionRulesProperty
tagMap :: Maybe (Map Text (Value Text))
..}
= ExclusionRulesProperty {tagMap :: Maybe (Map Text (Value Text))
tagMap = Map Text (Value Text) -> Maybe (Map Text (Value Text))
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure Map Text (Value Text)
PropertyType "TagMap" ExclusionRulesProperty
newValue, Maybe AmiExclusionRulesProperty
()
haddock_workaround_ :: ()
amis :: Maybe AmiExclusionRulesProperty
haddock_workaround_ :: ()
amis :: Maybe AmiExclusionRulesProperty
..}