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