module Stratosphere.SecurityHub.PolicyAssociation (
        PolicyAssociation(..), mkPolicyAssociation
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data PolicyAssociation
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-securityhub-policyassociation.html>
    PolicyAssociation {PolicyAssociation -> ()
haddock_workaround_ :: (),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-securityhub-policyassociation.html#cfn-securityhub-policyassociation-configurationpolicyid>
                       PolicyAssociation -> Value Text
configurationPolicyId :: (Value Prelude.Text),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-securityhub-policyassociation.html#cfn-securityhub-policyassociation-targetid>
                       PolicyAssociation -> Value Text
targetId :: (Value Prelude.Text),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-securityhub-policyassociation.html#cfn-securityhub-policyassociation-targettype>
                       PolicyAssociation -> Value Text
targetType :: (Value Prelude.Text)}
  deriving stock (PolicyAssociation -> PolicyAssociation -> Bool
(PolicyAssociation -> PolicyAssociation -> Bool)
-> (PolicyAssociation -> PolicyAssociation -> Bool)
-> Eq PolicyAssociation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PolicyAssociation -> PolicyAssociation -> Bool
== :: PolicyAssociation -> PolicyAssociation -> Bool
$c/= :: PolicyAssociation -> PolicyAssociation -> Bool
/= :: PolicyAssociation -> PolicyAssociation -> Bool
Prelude.Eq, Int -> PolicyAssociation -> ShowS
[PolicyAssociation] -> ShowS
PolicyAssociation -> String
(Int -> PolicyAssociation -> ShowS)
-> (PolicyAssociation -> String)
-> ([PolicyAssociation] -> ShowS)
-> Show PolicyAssociation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PolicyAssociation -> ShowS
showsPrec :: Int -> PolicyAssociation -> ShowS
$cshow :: PolicyAssociation -> String
show :: PolicyAssociation -> String
$cshowList :: [PolicyAssociation] -> ShowS
showList :: [PolicyAssociation] -> ShowS
Prelude.Show)
mkPolicyAssociation ::
  Value Prelude.Text
  -> Value Prelude.Text -> Value Prelude.Text -> PolicyAssociation
mkPolicyAssociation :: Value Text -> Value Text -> Value Text -> PolicyAssociation
mkPolicyAssociation Value Text
configurationPolicyId Value Text
targetId Value Text
targetType
  = PolicyAssociation
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       configurationPolicyId :: Value Text
configurationPolicyId = Value Text
configurationPolicyId, targetId :: Value Text
targetId = Value Text
targetId,
       targetType :: Value Text
targetType = Value Text
targetType}
instance ToResourceProperties PolicyAssociation where
  toResourceProperties :: PolicyAssociation -> ResourceProperties
toResourceProperties PolicyAssociation {()
Value Text
haddock_workaround_ :: PolicyAssociation -> ()
configurationPolicyId :: PolicyAssociation -> Value Text
targetId :: PolicyAssociation -> Value Text
targetType :: PolicyAssociation -> Value Text
haddock_workaround_ :: ()
configurationPolicyId :: Value Text
targetId :: Value Text
targetType :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::SecurityHub::PolicyAssociation",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Key
"ConfigurationPolicyId"
                         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
configurationPolicyId,
                       Key
"TargetId" 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
targetId, Key
"TargetType" 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
targetType]}
instance JSON.ToJSON PolicyAssociation where
  toJSON :: PolicyAssociation -> Value
toJSON PolicyAssociation {()
Value Text
haddock_workaround_ :: PolicyAssociation -> ()
configurationPolicyId :: PolicyAssociation -> Value Text
targetId :: PolicyAssociation -> Value Text
targetType :: PolicyAssociation -> Value Text
haddock_workaround_ :: ()
configurationPolicyId :: Value Text
targetId :: Value Text
targetType :: Value Text
..}
    = [(Key, Value)] -> Value
JSON.object
        [Key
"ConfigurationPolicyId" 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
configurationPolicyId,
         Key
"TargetId" 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
targetId, Key
"TargetType" 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
targetType]
instance Property "ConfigurationPolicyId" PolicyAssociation where
  type PropertyType "ConfigurationPolicyId" PolicyAssociation = Value Prelude.Text
  set :: PropertyType "ConfigurationPolicyId" PolicyAssociation
-> PolicyAssociation -> PolicyAssociation
set PropertyType "ConfigurationPolicyId" PolicyAssociation
newValue PolicyAssociation {()
Value Text
haddock_workaround_ :: PolicyAssociation -> ()
configurationPolicyId :: PolicyAssociation -> Value Text
targetId :: PolicyAssociation -> Value Text
targetType :: PolicyAssociation -> Value Text
haddock_workaround_ :: ()
configurationPolicyId :: Value Text
targetId :: Value Text
targetType :: Value Text
..}
    = PolicyAssociation {configurationPolicyId :: Value Text
configurationPolicyId = PropertyType "ConfigurationPolicyId" PolicyAssociation
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
targetId :: Value Text
targetType :: Value Text
haddock_workaround_ :: ()
targetId :: Value Text
targetType :: Value Text
..}
instance Property "TargetId" PolicyAssociation where
  type PropertyType "TargetId" PolicyAssociation = Value Prelude.Text
  set :: PropertyType "TargetId" PolicyAssociation
-> PolicyAssociation -> PolicyAssociation
set PropertyType "TargetId" PolicyAssociation
newValue PolicyAssociation {()
Value Text
haddock_workaround_ :: PolicyAssociation -> ()
configurationPolicyId :: PolicyAssociation -> Value Text
targetId :: PolicyAssociation -> Value Text
targetType :: PolicyAssociation -> Value Text
haddock_workaround_ :: ()
configurationPolicyId :: Value Text
targetId :: Value Text
targetType :: Value Text
..}
    = PolicyAssociation {targetId :: Value Text
targetId = PropertyType "TargetId" PolicyAssociation
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
configurationPolicyId :: Value Text
targetType :: Value Text
haddock_workaround_ :: ()
configurationPolicyId :: Value Text
targetType :: Value Text
..}
instance Property "TargetType" PolicyAssociation where
  type PropertyType "TargetType" PolicyAssociation = Value Prelude.Text
  set :: PropertyType "TargetType" PolicyAssociation
-> PolicyAssociation -> PolicyAssociation
set PropertyType "TargetType" PolicyAssociation
newValue PolicyAssociation {()
Value Text
haddock_workaround_ :: PolicyAssociation -> ()
configurationPolicyId :: PolicyAssociation -> Value Text
targetId :: PolicyAssociation -> Value Text
targetType :: PolicyAssociation -> Value Text
haddock_workaround_ :: ()
configurationPolicyId :: Value Text
targetId :: Value Text
targetType :: Value Text
..}
    = PolicyAssociation {targetType :: Value Text
targetType = PropertyType "TargetType" PolicyAssociation
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
configurationPolicyId :: Value Text
targetId :: Value Text
haddock_workaround_ :: ()
configurationPolicyId :: Value Text
targetId :: Value Text
..}