module Stratosphere.SSM.PatchBaseline.PatchFilterGroupProperty (
        module Exports, PatchFilterGroupProperty(..),
        mkPatchFilterGroupProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.SSM.PatchBaseline.PatchFilterProperty as Exports
import Stratosphere.ResourceProperties
data PatchFilterGroupProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssm-patchbaseline-patchfiltergroup.html>
    PatchFilterGroupProperty {PatchFilterGroupProperty -> ()
haddock_workaround_ :: (),
                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssm-patchbaseline-patchfiltergroup.html#cfn-ssm-patchbaseline-patchfiltergroup-patchfilters>
                              PatchFilterGroupProperty -> Maybe [PatchFilterProperty]
patchFilters :: (Prelude.Maybe [PatchFilterProperty])}
  deriving stock (PatchFilterGroupProperty -> PatchFilterGroupProperty -> Bool
(PatchFilterGroupProperty -> PatchFilterGroupProperty -> Bool)
-> (PatchFilterGroupProperty -> PatchFilterGroupProperty -> Bool)
-> Eq PatchFilterGroupProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PatchFilterGroupProperty -> PatchFilterGroupProperty -> Bool
== :: PatchFilterGroupProperty -> PatchFilterGroupProperty -> Bool
$c/= :: PatchFilterGroupProperty -> PatchFilterGroupProperty -> Bool
/= :: PatchFilterGroupProperty -> PatchFilterGroupProperty -> Bool
Prelude.Eq, Int -> PatchFilterGroupProperty -> ShowS
[PatchFilterGroupProperty] -> ShowS
PatchFilterGroupProperty -> String
(Int -> PatchFilterGroupProperty -> ShowS)
-> (PatchFilterGroupProperty -> String)
-> ([PatchFilterGroupProperty] -> ShowS)
-> Show PatchFilterGroupProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PatchFilterGroupProperty -> ShowS
showsPrec :: Int -> PatchFilterGroupProperty -> ShowS
$cshow :: PatchFilterGroupProperty -> String
show :: PatchFilterGroupProperty -> String
$cshowList :: [PatchFilterGroupProperty] -> ShowS
showList :: [PatchFilterGroupProperty] -> ShowS
Prelude.Show)
mkPatchFilterGroupProperty :: PatchFilterGroupProperty
mkPatchFilterGroupProperty :: PatchFilterGroupProperty
mkPatchFilterGroupProperty
  = PatchFilterGroupProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), patchFilters :: Maybe [PatchFilterProperty]
patchFilters = Maybe [PatchFilterProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties PatchFilterGroupProperty where
  toResourceProperties :: PatchFilterGroupProperty -> ResourceProperties
toResourceProperties PatchFilterGroupProperty {Maybe [PatchFilterProperty]
()
haddock_workaround_ :: PatchFilterGroupProperty -> ()
patchFilters :: PatchFilterGroupProperty -> Maybe [PatchFilterProperty]
haddock_workaround_ :: ()
patchFilters :: Maybe [PatchFilterProperty]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::SSM::PatchBaseline.PatchFilterGroup",
         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 -> [PatchFilterProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PatchFilters" ([PatchFilterProperty] -> (Key, Value))
-> Maybe [PatchFilterProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [PatchFilterProperty]
patchFilters])}
instance JSON.ToJSON PatchFilterGroupProperty where
  toJSON :: PatchFilterGroupProperty -> Value
toJSON PatchFilterGroupProperty {Maybe [PatchFilterProperty]
()
haddock_workaround_ :: PatchFilterGroupProperty -> ()
patchFilters :: PatchFilterGroupProperty -> Maybe [PatchFilterProperty]
haddock_workaround_ :: ()
patchFilters :: Maybe [PatchFilterProperty]
..}
    = [(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 -> [PatchFilterProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PatchFilters" ([PatchFilterProperty] -> (Key, Value))
-> Maybe [PatchFilterProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [PatchFilterProperty]
patchFilters]))
instance Property "PatchFilters" PatchFilterGroupProperty where
  type PropertyType "PatchFilters" PatchFilterGroupProperty = [PatchFilterProperty]
  set :: PropertyType "PatchFilters" PatchFilterGroupProperty
-> PatchFilterGroupProperty -> PatchFilterGroupProperty
set PropertyType "PatchFilters" PatchFilterGroupProperty
newValue PatchFilterGroupProperty {Maybe [PatchFilterProperty]
()
haddock_workaround_ :: PatchFilterGroupProperty -> ()
patchFilters :: PatchFilterGroupProperty -> Maybe [PatchFilterProperty]
haddock_workaround_ :: ()
patchFilters :: Maybe [PatchFilterProperty]
..}
    = PatchFilterGroupProperty
        {patchFilters :: Maybe [PatchFilterProperty]
patchFilters = [PatchFilterProperty] -> Maybe [PatchFilterProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [PatchFilterProperty]
PropertyType "PatchFilters" PatchFilterGroupProperty
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}