module Stratosphere.IAM.InstanceProfile (
InstanceProfile(..), mkInstanceProfile
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data InstanceProfile
=
InstanceProfile {InstanceProfile -> ()
haddock_workaround_ :: (),
InstanceProfile -> Maybe (Value Text)
instanceProfileName :: (Prelude.Maybe (Value Prelude.Text)),
InstanceProfile -> Maybe (Value Text)
path :: (Prelude.Maybe (Value Prelude.Text)),
InstanceProfile -> ValueList Text
roles :: (ValueList Prelude.Text)}
deriving stock (InstanceProfile -> InstanceProfile -> Bool
(InstanceProfile -> InstanceProfile -> Bool)
-> (InstanceProfile -> InstanceProfile -> Bool)
-> Eq InstanceProfile
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: InstanceProfile -> InstanceProfile -> Bool
== :: InstanceProfile -> InstanceProfile -> Bool
$c/= :: InstanceProfile -> InstanceProfile -> Bool
/= :: InstanceProfile -> InstanceProfile -> Bool
Prelude.Eq, Int -> InstanceProfile -> ShowS
[InstanceProfile] -> ShowS
InstanceProfile -> String
(Int -> InstanceProfile -> ShowS)
-> (InstanceProfile -> String)
-> ([InstanceProfile] -> ShowS)
-> Show InstanceProfile
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> InstanceProfile -> ShowS
showsPrec :: Int -> InstanceProfile -> ShowS
$cshow :: InstanceProfile -> String
show :: InstanceProfile -> String
$cshowList :: [InstanceProfile] -> ShowS
showList :: [InstanceProfile] -> ShowS
Prelude.Show)
mkInstanceProfile :: ValueList Prelude.Text -> InstanceProfile
mkInstanceProfile :: ValueList Text -> InstanceProfile
mkInstanceProfile ValueList Text
roles
= InstanceProfile
{haddock_workaround_ :: ()
haddock_workaround_ = (), roles :: ValueList Text
roles = ValueList Text
roles,
instanceProfileName :: Maybe (Value Text)
instanceProfileName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, path :: Maybe (Value Text)
path = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties InstanceProfile where
toResourceProperties :: InstanceProfile -> ResourceProperties
toResourceProperties InstanceProfile {Maybe (Value Text)
()
ValueList Text
haddock_workaround_ :: InstanceProfile -> ()
instanceProfileName :: InstanceProfile -> Maybe (Value Text)
path :: InstanceProfile -> Maybe (Value Text)
roles :: InstanceProfile -> ValueList Text
haddock_workaround_ :: ()
instanceProfileName :: Maybe (Value Text)
path :: Maybe (Value Text)
roles :: ValueList Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::IAM::InstanceProfile",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"Roles" Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ValueList Text
roles]
([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
"InstanceProfileName" (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)
instanceProfileName,
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
"Path" (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)
path]))}
instance JSON.ToJSON InstanceProfile where
toJSON :: InstanceProfile -> Value
toJSON InstanceProfile {Maybe (Value Text)
()
ValueList Text
haddock_workaround_ :: InstanceProfile -> ()
instanceProfileName :: InstanceProfile -> Maybe (Value Text)
path :: InstanceProfile -> Maybe (Value Text)
roles :: InstanceProfile -> ValueList Text
haddock_workaround_ :: ()
instanceProfileName :: Maybe (Value Text)
path :: Maybe (Value Text)
roles :: ValueList Text
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"Roles" Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ValueList Text
roles]
([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
"InstanceProfileName" (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)
instanceProfileName,
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
"Path" (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)
path])))
instance Property "InstanceProfileName" InstanceProfile where
type PropertyType "InstanceProfileName" InstanceProfile = Value Prelude.Text
set :: PropertyType "InstanceProfileName" InstanceProfile
-> InstanceProfile -> InstanceProfile
set PropertyType "InstanceProfileName" InstanceProfile
newValue InstanceProfile {Maybe (Value Text)
()
ValueList Text
haddock_workaround_ :: InstanceProfile -> ()
instanceProfileName :: InstanceProfile -> Maybe (Value Text)
path :: InstanceProfile -> Maybe (Value Text)
roles :: InstanceProfile -> ValueList Text
haddock_workaround_ :: ()
instanceProfileName :: Maybe (Value Text)
path :: Maybe (Value Text)
roles :: ValueList Text
..}
= InstanceProfile {instanceProfileName :: Maybe (Value Text)
instanceProfileName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "InstanceProfileName" InstanceProfile
Value Text
newValue, Maybe (Value Text)
()
ValueList Text
haddock_workaround_ :: ()
path :: Maybe (Value Text)
roles :: ValueList Text
haddock_workaround_ :: ()
path :: Maybe (Value Text)
roles :: ValueList Text
..}
instance Property "Path" InstanceProfile where
type PropertyType "Path" InstanceProfile = Value Prelude.Text
set :: PropertyType "Path" InstanceProfile
-> InstanceProfile -> InstanceProfile
set PropertyType "Path" InstanceProfile
newValue InstanceProfile {Maybe (Value Text)
()
ValueList Text
haddock_workaround_ :: InstanceProfile -> ()
instanceProfileName :: InstanceProfile -> Maybe (Value Text)
path :: InstanceProfile -> Maybe (Value Text)
roles :: InstanceProfile -> ValueList Text
haddock_workaround_ :: ()
instanceProfileName :: Maybe (Value Text)
path :: Maybe (Value Text)
roles :: ValueList Text
..}
= InstanceProfile {path :: Maybe (Value Text)
path = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Path" InstanceProfile
Value Text
newValue, Maybe (Value Text)
()
ValueList Text
haddock_workaround_ :: ()
instanceProfileName :: Maybe (Value Text)
roles :: ValueList Text
haddock_workaround_ :: ()
instanceProfileName :: Maybe (Value Text)
roles :: ValueList Text
..}
instance Property "Roles" InstanceProfile where
type PropertyType "Roles" InstanceProfile = ValueList Prelude.Text
set :: PropertyType "Roles" InstanceProfile
-> InstanceProfile -> InstanceProfile
set PropertyType "Roles" InstanceProfile
newValue InstanceProfile {Maybe (Value Text)
()
ValueList Text
haddock_workaround_ :: InstanceProfile -> ()
instanceProfileName :: InstanceProfile -> Maybe (Value Text)
path :: InstanceProfile -> Maybe (Value Text)
roles :: InstanceProfile -> ValueList Text
haddock_workaround_ :: ()
instanceProfileName :: Maybe (Value Text)
path :: Maybe (Value Text)
roles :: ValueList Text
..}
= InstanceProfile {roles :: ValueList Text
roles = PropertyType "Roles" InstanceProfile
ValueList Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
instanceProfileName :: Maybe (Value Text)
path :: Maybe (Value Text)
haddock_workaround_ :: ()
instanceProfileName :: Maybe (Value Text)
path :: Maybe (Value Text)
..}