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