module Stratosphere.IoTSiteWise.AccessPolicy.IamRoleProperty (
        IamRoleProperty(..), mkIamRoleProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data IamRoleProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-accesspolicy-iamrole.html>
    IamRoleProperty {IamRoleProperty -> ()
haddock_workaround_ :: (),
                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotsitewise-accesspolicy-iamrole.html#cfn-iotsitewise-accesspolicy-iamrole-arn>
                     IamRoleProperty -> Maybe (Value Text)
arn :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (IamRoleProperty -> IamRoleProperty -> Bool
(IamRoleProperty -> IamRoleProperty -> Bool)
-> (IamRoleProperty -> IamRoleProperty -> Bool)
-> Eq IamRoleProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: IamRoleProperty -> IamRoleProperty -> Bool
== :: IamRoleProperty -> IamRoleProperty -> Bool
$c/= :: IamRoleProperty -> IamRoleProperty -> Bool
/= :: IamRoleProperty -> IamRoleProperty -> Bool
Prelude.Eq, Int -> IamRoleProperty -> ShowS
[IamRoleProperty] -> ShowS
IamRoleProperty -> String
(Int -> IamRoleProperty -> ShowS)
-> (IamRoleProperty -> String)
-> ([IamRoleProperty] -> ShowS)
-> Show IamRoleProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> IamRoleProperty -> ShowS
showsPrec :: Int -> IamRoleProperty -> ShowS
$cshow :: IamRoleProperty -> String
show :: IamRoleProperty -> String
$cshowList :: [IamRoleProperty] -> ShowS
showList :: [IamRoleProperty] -> ShowS
Prelude.Show)
mkIamRoleProperty :: IamRoleProperty
mkIamRoleProperty :: IamRoleProperty
mkIamRoleProperty
  = IamRoleProperty {haddock_workaround_ :: ()
haddock_workaround_ = (), arn :: Maybe (Value Text)
arn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties IamRoleProperty where
  toResourceProperties :: IamRoleProperty -> ResourceProperties
toResourceProperties IamRoleProperty {Maybe (Value Text)
()
haddock_workaround_ :: IamRoleProperty -> ()
arn :: IamRoleProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
arn :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::IoTSiteWise::AccessPolicy.IamRole",
         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
"arn" (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)
arn])}
instance JSON.ToJSON IamRoleProperty where
  toJSON :: IamRoleProperty -> Value
toJSON IamRoleProperty {Maybe (Value Text)
()
haddock_workaround_ :: IamRoleProperty -> ()
arn :: IamRoleProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
arn :: Maybe (Value 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
"arn" (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)
arn]))
instance Property "arn" IamRoleProperty where
  type PropertyType "arn" IamRoleProperty = Value Prelude.Text
  set :: PropertyType "arn" IamRoleProperty
-> IamRoleProperty -> IamRoleProperty
set PropertyType "arn" IamRoleProperty
newValue IamRoleProperty {Maybe (Value Text)
()
haddock_workaround_ :: IamRoleProperty -> ()
arn :: IamRoleProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
arn :: Maybe (Value Text)
..}
    = IamRoleProperty {arn :: Maybe (Value Text)
arn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "arn" IamRoleProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}