module Stratosphere.EC2.Instance.SsmAssociationProperty (
        module Exports, SsmAssociationProperty(..),
        mkSsmAssociationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.EC2.Instance.AssociationParameterProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data SsmAssociationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-ssmassociation.html>
    SsmAssociationProperty {SsmAssociationProperty -> ()
haddock_workaround_ :: (),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-ssmassociation.html#cfn-ec2-instance-ssmassociation-associationparameters>
                            SsmAssociationProperty -> Maybe [AssociationParameterProperty]
associationParameters :: (Prelude.Maybe [AssociationParameterProperty]),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-ssmassociation.html#cfn-ec2-instance-ssmassociation-documentname>
                            SsmAssociationProperty -> Value Text
documentName :: (Value Prelude.Text)}
  deriving stock (SsmAssociationProperty -> SsmAssociationProperty -> Bool
(SsmAssociationProperty -> SsmAssociationProperty -> Bool)
-> (SsmAssociationProperty -> SsmAssociationProperty -> Bool)
-> Eq SsmAssociationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SsmAssociationProperty -> SsmAssociationProperty -> Bool
== :: SsmAssociationProperty -> SsmAssociationProperty -> Bool
$c/= :: SsmAssociationProperty -> SsmAssociationProperty -> Bool
/= :: SsmAssociationProperty -> SsmAssociationProperty -> Bool
Prelude.Eq, Int -> SsmAssociationProperty -> ShowS
[SsmAssociationProperty] -> ShowS
SsmAssociationProperty -> String
(Int -> SsmAssociationProperty -> ShowS)
-> (SsmAssociationProperty -> String)
-> ([SsmAssociationProperty] -> ShowS)
-> Show SsmAssociationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SsmAssociationProperty -> ShowS
showsPrec :: Int -> SsmAssociationProperty -> ShowS
$cshow :: SsmAssociationProperty -> String
show :: SsmAssociationProperty -> String
$cshowList :: [SsmAssociationProperty] -> ShowS
showList :: [SsmAssociationProperty] -> ShowS
Prelude.Show)
mkSsmAssociationProperty ::
  Value Prelude.Text -> SsmAssociationProperty
mkSsmAssociationProperty :: Value Text -> SsmAssociationProperty
mkSsmAssociationProperty Value Text
documentName
  = SsmAssociationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), documentName :: Value Text
documentName = Value Text
documentName,
       associationParameters :: Maybe [AssociationParameterProperty]
associationParameters = Maybe [AssociationParameterProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties SsmAssociationProperty where
  toResourceProperties :: SsmAssociationProperty -> ResourceProperties
toResourceProperties SsmAssociationProperty {Maybe [AssociationParameterProperty]
()
Value Text
haddock_workaround_ :: SsmAssociationProperty -> ()
associationParameters :: SsmAssociationProperty -> Maybe [AssociationParameterProperty]
documentName :: SsmAssociationProperty -> Value Text
haddock_workaround_ :: ()
associationParameters :: Maybe [AssociationParameterProperty]
documentName :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::EC2::Instance.SsmAssociation",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
                           [Key
"DocumentName" 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..= Value Text
documentName]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> [AssociationParameterProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AssociationParameters"
                                 ([AssociationParameterProperty] -> (Key, Value))
-> Maybe [AssociationParameterProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [AssociationParameterProperty]
associationParameters]))}
instance JSON.ToJSON SsmAssociationProperty where
  toJSON :: SsmAssociationProperty -> Value
toJSON SsmAssociationProperty {Maybe [AssociationParameterProperty]
()
Value Text
haddock_workaround_ :: SsmAssociationProperty -> ()
associationParameters :: SsmAssociationProperty -> Maybe [AssociationParameterProperty]
documentName :: SsmAssociationProperty -> Value Text
haddock_workaround_ :: ()
associationParameters :: Maybe [AssociationParameterProperty]
documentName :: Value Text
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
              [Key
"DocumentName" 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..= Value Text
documentName]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> [AssociationParameterProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AssociationParameters"
                    ([AssociationParameterProperty] -> (Key, Value))
-> Maybe [AssociationParameterProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [AssociationParameterProperty]
associationParameters])))
instance Property "AssociationParameters" SsmAssociationProperty where
  type PropertyType "AssociationParameters" SsmAssociationProperty = [AssociationParameterProperty]
  set :: PropertyType "AssociationParameters" SsmAssociationProperty
-> SsmAssociationProperty -> SsmAssociationProperty
set PropertyType "AssociationParameters" SsmAssociationProperty
newValue SsmAssociationProperty {Maybe [AssociationParameterProperty]
()
Value Text
haddock_workaround_ :: SsmAssociationProperty -> ()
associationParameters :: SsmAssociationProperty -> Maybe [AssociationParameterProperty]
documentName :: SsmAssociationProperty -> Value Text
haddock_workaround_ :: ()
associationParameters :: Maybe [AssociationParameterProperty]
documentName :: Value Text
..}
    = SsmAssociationProperty
        {associationParameters :: Maybe [AssociationParameterProperty]
associationParameters = [AssociationParameterProperty]
-> Maybe [AssociationParameterProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [AssociationParameterProperty]
PropertyType "AssociationParameters" SsmAssociationProperty
newValue, ()
Value Text
haddock_workaround_ :: ()
documentName :: Value Text
haddock_workaround_ :: ()
documentName :: Value Text
..}
instance Property "DocumentName" SsmAssociationProperty where
  type PropertyType "DocumentName" SsmAssociationProperty = Value Prelude.Text
  set :: PropertyType "DocumentName" SsmAssociationProperty
-> SsmAssociationProperty -> SsmAssociationProperty
set PropertyType "DocumentName" SsmAssociationProperty
newValue SsmAssociationProperty {Maybe [AssociationParameterProperty]
()
Value Text
haddock_workaround_ :: SsmAssociationProperty -> ()
associationParameters :: SsmAssociationProperty -> Maybe [AssociationParameterProperty]
documentName :: SsmAssociationProperty -> Value Text
haddock_workaround_ :: ()
associationParameters :: Maybe [AssociationParameterProperty]
documentName :: Value Text
..}
    = SsmAssociationProperty {documentName :: Value Text
documentName = PropertyType "DocumentName" SsmAssociationProperty
Value Text
newValue, Maybe [AssociationParameterProperty]
()
haddock_workaround_ :: ()
associationParameters :: Maybe [AssociationParameterProperty]
haddock_workaround_ :: ()
associationParameters :: Maybe [AssociationParameterProperty]
..}