module Stratosphere.IoTSiteWise.AccessPolicy.IamUserProperty (
IamUserProperty(..), mkIamUserProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data IamUserProperty
=
IamUserProperty {IamUserProperty -> ()
haddock_workaround_ :: (),
IamUserProperty -> Maybe (Value Text)
arn :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (IamUserProperty -> IamUserProperty -> Bool
(IamUserProperty -> IamUserProperty -> Bool)
-> (IamUserProperty -> IamUserProperty -> Bool)
-> Eq IamUserProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: IamUserProperty -> IamUserProperty -> Bool
== :: IamUserProperty -> IamUserProperty -> Bool
$c/= :: IamUserProperty -> IamUserProperty -> Bool
/= :: IamUserProperty -> IamUserProperty -> Bool
Prelude.Eq, Int -> IamUserProperty -> ShowS
[IamUserProperty] -> ShowS
IamUserProperty -> String
(Int -> IamUserProperty -> ShowS)
-> (IamUserProperty -> String)
-> ([IamUserProperty] -> ShowS)
-> Show IamUserProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> IamUserProperty -> ShowS
showsPrec :: Int -> IamUserProperty -> ShowS
$cshow :: IamUserProperty -> String
show :: IamUserProperty -> String
$cshowList :: [IamUserProperty] -> ShowS
showList :: [IamUserProperty] -> ShowS
Prelude.Show)
mkIamUserProperty :: IamUserProperty
mkIamUserProperty :: IamUserProperty
mkIamUserProperty
= IamUserProperty {haddock_workaround_ :: ()
haddock_workaround_ = (), arn :: Maybe (Value Text)
arn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties IamUserProperty where
toResourceProperties :: IamUserProperty -> ResourceProperties
toResourceProperties IamUserProperty {Maybe (Value Text)
()
haddock_workaround_ :: IamUserProperty -> ()
arn :: IamUserProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
arn :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::IoTSiteWise::AccessPolicy.IamUser",
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 IamUserProperty where
toJSON :: IamUserProperty -> Value
toJSON IamUserProperty {Maybe (Value Text)
()
haddock_workaround_ :: IamUserProperty -> ()
arn :: IamUserProperty -> 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" IamUserProperty where
type PropertyType "arn" IamUserProperty = Value Prelude.Text
set :: PropertyType "arn" IamUserProperty
-> IamUserProperty -> IamUserProperty
set PropertyType "arn" IamUserProperty
newValue IamUserProperty {Maybe (Value Text)
()
haddock_workaround_ :: IamUserProperty -> ()
arn :: IamUserProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
arn :: Maybe (Value Text)
..}
= IamUserProperty {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" IamUserProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}