module Stratosphere.ImageBuilder.LifecyclePolicy.ResourceSelectionProperty (
        module Exports, ResourceSelectionProperty(..),
        mkResourceSelectionProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.ImageBuilder.LifecyclePolicy.RecipeSelectionProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ResourceSelectionProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-imagebuilder-lifecyclepolicy-resourceselection.html>
    ResourceSelectionProperty {ResourceSelectionProperty -> ()
haddock_workaround_ :: (),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-imagebuilder-lifecyclepolicy-resourceselection.html#cfn-imagebuilder-lifecyclepolicy-resourceselection-recipes>
                               ResourceSelectionProperty -> Maybe [RecipeSelectionProperty]
recipes :: (Prelude.Maybe [RecipeSelectionProperty]),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-imagebuilder-lifecyclepolicy-resourceselection.html#cfn-imagebuilder-lifecyclepolicy-resourceselection-tagmap>
                               ResourceSelectionProperty -> Maybe (Map Text (Value Text))
tagMap :: (Prelude.Maybe (Prelude.Map Prelude.Text (Value Prelude.Text)))}
  deriving stock (ResourceSelectionProperty -> ResourceSelectionProperty -> Bool
(ResourceSelectionProperty -> ResourceSelectionProperty -> Bool)
-> (ResourceSelectionProperty -> ResourceSelectionProperty -> Bool)
-> Eq ResourceSelectionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ResourceSelectionProperty -> ResourceSelectionProperty -> Bool
== :: ResourceSelectionProperty -> ResourceSelectionProperty -> Bool
$c/= :: ResourceSelectionProperty -> ResourceSelectionProperty -> Bool
/= :: ResourceSelectionProperty -> ResourceSelectionProperty -> Bool
Prelude.Eq, Int -> ResourceSelectionProperty -> ShowS
[ResourceSelectionProperty] -> ShowS
ResourceSelectionProperty -> String
(Int -> ResourceSelectionProperty -> ShowS)
-> (ResourceSelectionProperty -> String)
-> ([ResourceSelectionProperty] -> ShowS)
-> Show ResourceSelectionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ResourceSelectionProperty -> ShowS
showsPrec :: Int -> ResourceSelectionProperty -> ShowS
$cshow :: ResourceSelectionProperty -> String
show :: ResourceSelectionProperty -> String
$cshowList :: [ResourceSelectionProperty] -> ShowS
showList :: [ResourceSelectionProperty] -> ShowS
Prelude.Show)
mkResourceSelectionProperty :: ResourceSelectionProperty
mkResourceSelectionProperty :: ResourceSelectionProperty
mkResourceSelectionProperty
  = ResourceSelectionProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), recipes :: Maybe [RecipeSelectionProperty]
recipes = Maybe [RecipeSelectionProperty]
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 ResourceSelectionProperty where
  toResourceProperties :: ResourceSelectionProperty -> ResourceProperties
toResourceProperties ResourceSelectionProperty {Maybe [RecipeSelectionProperty]
Maybe (Map Text (Value Text))
()
haddock_workaround_ :: ResourceSelectionProperty -> ()
recipes :: ResourceSelectionProperty -> Maybe [RecipeSelectionProperty]
tagMap :: ResourceSelectionProperty -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
recipes :: Maybe [RecipeSelectionProperty]
tagMap :: Maybe (Map Text (Value Text))
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ImageBuilder::LifecyclePolicy.ResourceSelection",
         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 -> [RecipeSelectionProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Recipes" ([RecipeSelectionProperty] -> (Key, Value))
-> Maybe [RecipeSelectionProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [RecipeSelectionProperty]
recipes,
                            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 ResourceSelectionProperty where
  toJSON :: ResourceSelectionProperty -> Value
toJSON ResourceSelectionProperty {Maybe [RecipeSelectionProperty]
Maybe (Map Text (Value Text))
()
haddock_workaround_ :: ResourceSelectionProperty -> ()
recipes :: ResourceSelectionProperty -> Maybe [RecipeSelectionProperty]
tagMap :: ResourceSelectionProperty -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
recipes :: Maybe [RecipeSelectionProperty]
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 -> [RecipeSelectionProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Recipes" ([RecipeSelectionProperty] -> (Key, Value))
-> Maybe [RecipeSelectionProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [RecipeSelectionProperty]
recipes,
               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 "Recipes" ResourceSelectionProperty where
  type PropertyType "Recipes" ResourceSelectionProperty = [RecipeSelectionProperty]
  set :: PropertyType "Recipes" ResourceSelectionProperty
-> ResourceSelectionProperty -> ResourceSelectionProperty
set PropertyType "Recipes" ResourceSelectionProperty
newValue ResourceSelectionProperty {Maybe [RecipeSelectionProperty]
Maybe (Map Text (Value Text))
()
haddock_workaround_ :: ResourceSelectionProperty -> ()
recipes :: ResourceSelectionProperty -> Maybe [RecipeSelectionProperty]
tagMap :: ResourceSelectionProperty -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
recipes :: Maybe [RecipeSelectionProperty]
tagMap :: Maybe (Map Text (Value Text))
..}
    = ResourceSelectionProperty {recipes :: Maybe [RecipeSelectionProperty]
recipes = [RecipeSelectionProperty] -> Maybe [RecipeSelectionProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [RecipeSelectionProperty]
PropertyType "Recipes" ResourceSelectionProperty
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" ResourceSelectionProperty where
  type PropertyType "TagMap" ResourceSelectionProperty = Prelude.Map Prelude.Text (Value Prelude.Text)
  set :: PropertyType "TagMap" ResourceSelectionProperty
-> ResourceSelectionProperty -> ResourceSelectionProperty
set PropertyType "TagMap" ResourceSelectionProperty
newValue ResourceSelectionProperty {Maybe [RecipeSelectionProperty]
Maybe (Map Text (Value Text))
()
haddock_workaround_ :: ResourceSelectionProperty -> ()
recipes :: ResourceSelectionProperty -> Maybe [RecipeSelectionProperty]
tagMap :: ResourceSelectionProperty -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
recipes :: Maybe [RecipeSelectionProperty]
tagMap :: Maybe (Map Text (Value Text))
..}
    = ResourceSelectionProperty {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" ResourceSelectionProperty
newValue, Maybe [RecipeSelectionProperty]
()
haddock_workaround_ :: ()
recipes :: Maybe [RecipeSelectionProperty]
haddock_workaround_ :: ()
recipes :: Maybe [RecipeSelectionProperty]
..}