module Stratosphere.IAM.User.PolicyProperty (
PolicyProperty(..), mkPolicyProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data PolicyProperty
=
PolicyProperty {PolicyProperty -> ()
haddock_workaround_ :: (),
PolicyProperty -> Object
policyDocument :: JSON.Object,
PolicyProperty -> Value Text
policyName :: (Value Prelude.Text)}
deriving stock (PolicyProperty -> PolicyProperty -> Bool
(PolicyProperty -> PolicyProperty -> Bool)
-> (PolicyProperty -> PolicyProperty -> Bool) -> Eq PolicyProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PolicyProperty -> PolicyProperty -> Bool
== :: PolicyProperty -> PolicyProperty -> Bool
$c/= :: PolicyProperty -> PolicyProperty -> Bool
/= :: PolicyProperty -> PolicyProperty -> Bool
Prelude.Eq, Int -> PolicyProperty -> ShowS
[PolicyProperty] -> ShowS
PolicyProperty -> String
(Int -> PolicyProperty -> ShowS)
-> (PolicyProperty -> String)
-> ([PolicyProperty] -> ShowS)
-> Show PolicyProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PolicyProperty -> ShowS
showsPrec :: Int -> PolicyProperty -> ShowS
$cshow :: PolicyProperty -> String
show :: PolicyProperty -> String
$cshowList :: [PolicyProperty] -> ShowS
showList :: [PolicyProperty] -> ShowS
Prelude.Show)
mkPolicyProperty ::
JSON.Object -> Value Prelude.Text -> PolicyProperty
mkPolicyProperty :: Object -> Value Text -> PolicyProperty
mkPolicyProperty Object
policyDocument Value Text
policyName
= PolicyProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), policyDocument :: Object
policyDocument = Object
policyDocument,
policyName :: Value Text
policyName = Value Text
policyName}
instance ToResourceProperties PolicyProperty where
toResourceProperties :: PolicyProperty -> ResourceProperties
toResourceProperties PolicyProperty {()
Object
Value Text
haddock_workaround_ :: PolicyProperty -> ()
policyDocument :: PolicyProperty -> Object
policyName :: PolicyProperty -> Value Text
haddock_workaround_ :: ()
policyDocument :: Object
policyName :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::IAM::User.Policy", supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Key
"PolicyDocument" Key -> Object -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Object
policyDocument,
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]}
instance JSON.ToJSON PolicyProperty where
toJSON :: PolicyProperty -> Value
toJSON PolicyProperty {()
Object
Value Text
haddock_workaround_ :: PolicyProperty -> ()
policyDocument :: PolicyProperty -> Object
policyName :: PolicyProperty -> Value Text
haddock_workaround_ :: ()
policyDocument :: Object
policyName :: Value Text
..}
= [(Key, Value)] -> Value
JSON.object
[Key
"PolicyDocument" Key -> Object -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Object
policyDocument,
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]
instance Property "PolicyDocument" PolicyProperty where
type PropertyType "PolicyDocument" PolicyProperty = JSON.Object
set :: PropertyType "PolicyDocument" PolicyProperty
-> PolicyProperty -> PolicyProperty
set PropertyType "PolicyDocument" PolicyProperty
newValue PolicyProperty {()
Object
Value Text
haddock_workaround_ :: PolicyProperty -> ()
policyDocument :: PolicyProperty -> Object
policyName :: PolicyProperty -> Value Text
haddock_workaround_ :: ()
policyDocument :: Object
policyName :: Value Text
..}
= PolicyProperty {policyDocument :: Object
policyDocument = Object
PropertyType "PolicyDocument" PolicyProperty
newValue, ()
Value Text
haddock_workaround_ :: ()
policyName :: Value Text
haddock_workaround_ :: ()
policyName :: Value Text
..}
instance Property "PolicyName" PolicyProperty where
type PropertyType "PolicyName" PolicyProperty = Value Prelude.Text
set :: PropertyType "PolicyName" PolicyProperty
-> PolicyProperty -> PolicyProperty
set PropertyType "PolicyName" PolicyProperty
newValue PolicyProperty {()
Object
Value Text
haddock_workaround_ :: PolicyProperty -> ()
policyDocument :: PolicyProperty -> Object
policyName :: PolicyProperty -> Value Text
haddock_workaround_ :: ()
policyDocument :: Object
policyName :: Value Text
..}
= PolicyProperty {policyName :: Value Text
policyName = PropertyType "PolicyName" PolicyProperty
Value Text
newValue, ()
Object
haddock_workaround_ :: ()
policyDocument :: Object
haddock_workaround_ :: ()
policyDocument :: Object
..}