module Stratosphere.IoT.PolicyPrincipalAttachment (
        PolicyPrincipalAttachment(..), mkPolicyPrincipalAttachment
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data PolicyPrincipalAttachment
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-policyprincipalattachment.html>
    PolicyPrincipalAttachment {PolicyPrincipalAttachment -> ()
haddock_workaround_ :: (),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-policyprincipalattachment.html#cfn-iot-policyprincipalattachment-policyname>
                               PolicyPrincipalAttachment -> Value Text
policyName :: (Value Prelude.Text),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-policyprincipalattachment.html#cfn-iot-policyprincipalattachment-principal>
                               PolicyPrincipalAttachment -> Value Text
principal :: (Value Prelude.Text)}
  deriving stock (PolicyPrincipalAttachment -> PolicyPrincipalAttachment -> Bool
(PolicyPrincipalAttachment -> PolicyPrincipalAttachment -> Bool)
-> (PolicyPrincipalAttachment -> PolicyPrincipalAttachment -> Bool)
-> Eq PolicyPrincipalAttachment
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PolicyPrincipalAttachment -> PolicyPrincipalAttachment -> Bool
== :: PolicyPrincipalAttachment -> PolicyPrincipalAttachment -> Bool
$c/= :: PolicyPrincipalAttachment -> PolicyPrincipalAttachment -> Bool
/= :: PolicyPrincipalAttachment -> PolicyPrincipalAttachment -> Bool
Prelude.Eq, Int -> PolicyPrincipalAttachment -> ShowS
[PolicyPrincipalAttachment] -> ShowS
PolicyPrincipalAttachment -> String
(Int -> PolicyPrincipalAttachment -> ShowS)
-> (PolicyPrincipalAttachment -> String)
-> ([PolicyPrincipalAttachment] -> ShowS)
-> Show PolicyPrincipalAttachment
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PolicyPrincipalAttachment -> ShowS
showsPrec :: Int -> PolicyPrincipalAttachment -> ShowS
$cshow :: PolicyPrincipalAttachment -> String
show :: PolicyPrincipalAttachment -> String
$cshowList :: [PolicyPrincipalAttachment] -> ShowS
showList :: [PolicyPrincipalAttachment] -> ShowS
Prelude.Show)
mkPolicyPrincipalAttachment ::
  Value Prelude.Text
  -> Value Prelude.Text -> PolicyPrincipalAttachment
mkPolicyPrincipalAttachment :: Value Text -> Value Text -> PolicyPrincipalAttachment
mkPolicyPrincipalAttachment Value Text
policyName Value Text
principal
  = PolicyPrincipalAttachment
      {haddock_workaround_ :: ()
haddock_workaround_ = (), policyName :: Value Text
policyName = Value Text
policyName,
       principal :: Value Text
principal = Value Text
principal}
instance ToResourceProperties PolicyPrincipalAttachment where
  toResourceProperties :: PolicyPrincipalAttachment -> ResourceProperties
toResourceProperties PolicyPrincipalAttachment {()
Value Text
haddock_workaround_ :: PolicyPrincipalAttachment -> ()
policyName :: PolicyPrincipalAttachment -> Value Text
principal :: PolicyPrincipalAttachment -> Value Text
haddock_workaround_ :: ()
policyName :: Value Text
principal :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::IoT::PolicyPrincipalAttachment",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Key
"PolicyName" 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
policyName,
                       Key
"Principal" 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
principal]}
instance JSON.ToJSON PolicyPrincipalAttachment where
  toJSON :: PolicyPrincipalAttachment -> Value
toJSON PolicyPrincipalAttachment {()
Value Text
haddock_workaround_ :: PolicyPrincipalAttachment -> ()
policyName :: PolicyPrincipalAttachment -> Value Text
principal :: PolicyPrincipalAttachment -> Value Text
haddock_workaround_ :: ()
policyName :: Value Text
principal :: Value Text
..}
    = [(Key, Value)] -> Value
JSON.object
        [Key
"PolicyName" 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
policyName, Key
"Principal" 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
principal]
instance Property "PolicyName" PolicyPrincipalAttachment where
  type PropertyType "PolicyName" PolicyPrincipalAttachment = Value Prelude.Text
  set :: PropertyType "PolicyName" PolicyPrincipalAttachment
-> PolicyPrincipalAttachment -> PolicyPrincipalAttachment
set PropertyType "PolicyName" PolicyPrincipalAttachment
newValue PolicyPrincipalAttachment {()
Value Text
haddock_workaround_ :: PolicyPrincipalAttachment -> ()
policyName :: PolicyPrincipalAttachment -> Value Text
principal :: PolicyPrincipalAttachment -> Value Text
haddock_workaround_ :: ()
policyName :: Value Text
principal :: Value Text
..}
    = PolicyPrincipalAttachment {policyName :: Value Text
policyName = PropertyType "PolicyName" PolicyPrincipalAttachment
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
principal :: Value Text
haddock_workaround_ :: ()
principal :: Value Text
..}
instance Property "Principal" PolicyPrincipalAttachment where
  type PropertyType "Principal" PolicyPrincipalAttachment = Value Prelude.Text
  set :: PropertyType "Principal" PolicyPrincipalAttachment
-> PolicyPrincipalAttachment -> PolicyPrincipalAttachment
set PropertyType "Principal" PolicyPrincipalAttachment
newValue PolicyPrincipalAttachment {()
Value Text
haddock_workaround_ :: PolicyPrincipalAttachment -> ()
policyName :: PolicyPrincipalAttachment -> Value Text
principal :: PolicyPrincipalAttachment -> Value Text
haddock_workaround_ :: ()
policyName :: Value Text
principal :: Value Text
..}
    = PolicyPrincipalAttachment {principal :: Value Text
principal = PropertyType "Principal" PolicyPrincipalAttachment
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
policyName :: Value Text
haddock_workaround_ :: ()
policyName :: Value Text
..}