module Stratosphere.EC2.LaunchTemplate.IamInstanceProfileProperty (
IamInstanceProfileProperty(..), mkIamInstanceProfileProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data IamInstanceProfileProperty
=
IamInstanceProfileProperty {IamInstanceProfileProperty -> ()
haddock_workaround_ :: (),
IamInstanceProfileProperty -> Maybe (Value Text)
arn :: (Prelude.Maybe (Value Prelude.Text)),
IamInstanceProfileProperty -> Maybe (Value Text)
name :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (IamInstanceProfileProperty -> IamInstanceProfileProperty -> Bool
(IamInstanceProfileProperty -> IamInstanceProfileProperty -> Bool)
-> (IamInstanceProfileProperty
-> IamInstanceProfileProperty -> Bool)
-> Eq IamInstanceProfileProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: IamInstanceProfileProperty -> IamInstanceProfileProperty -> Bool
== :: IamInstanceProfileProperty -> IamInstanceProfileProperty -> Bool
$c/= :: IamInstanceProfileProperty -> IamInstanceProfileProperty -> Bool
/= :: IamInstanceProfileProperty -> IamInstanceProfileProperty -> Bool
Prelude.Eq, Int -> IamInstanceProfileProperty -> ShowS
[IamInstanceProfileProperty] -> ShowS
IamInstanceProfileProperty -> String
(Int -> IamInstanceProfileProperty -> ShowS)
-> (IamInstanceProfileProperty -> String)
-> ([IamInstanceProfileProperty] -> ShowS)
-> Show IamInstanceProfileProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> IamInstanceProfileProperty -> ShowS
showsPrec :: Int -> IamInstanceProfileProperty -> ShowS
$cshow :: IamInstanceProfileProperty -> String
show :: IamInstanceProfileProperty -> String
$cshowList :: [IamInstanceProfileProperty] -> ShowS
showList :: [IamInstanceProfileProperty] -> ShowS
Prelude.Show)
mkIamInstanceProfileProperty :: IamInstanceProfileProperty
mkIamInstanceProfileProperty :: IamInstanceProfileProperty
mkIamInstanceProfileProperty
= IamInstanceProfileProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), arn :: Maybe (Value Text)
arn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
name :: Maybe (Value Text)
name = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties IamInstanceProfileProperty where
toResourceProperties :: IamInstanceProfileProperty -> ResourceProperties
toResourceProperties IamInstanceProfileProperty {Maybe (Value Text)
()
haddock_workaround_ :: IamInstanceProfileProperty -> ()
arn :: IamInstanceProfileProperty -> Maybe (Value Text)
name :: IamInstanceProfileProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
arn :: Maybe (Value Text)
name :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::EC2::LaunchTemplate.IamInstanceProfile",
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,
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
"Name" (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)
name])}
instance JSON.ToJSON IamInstanceProfileProperty where
toJSON :: IamInstanceProfileProperty -> Value
toJSON IamInstanceProfileProperty {Maybe (Value Text)
()
haddock_workaround_ :: IamInstanceProfileProperty -> ()
arn :: IamInstanceProfileProperty -> Maybe (Value Text)
name :: IamInstanceProfileProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
arn :: Maybe (Value Text)
name :: 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,
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
"Name" (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)
name]))
instance Property "Arn" IamInstanceProfileProperty where
type PropertyType "Arn" IamInstanceProfileProperty = Value Prelude.Text
set :: PropertyType "Arn" IamInstanceProfileProperty
-> IamInstanceProfileProperty -> IamInstanceProfileProperty
set PropertyType "Arn" IamInstanceProfileProperty
newValue IamInstanceProfileProperty {Maybe (Value Text)
()
haddock_workaround_ :: IamInstanceProfileProperty -> ()
arn :: IamInstanceProfileProperty -> Maybe (Value Text)
name :: IamInstanceProfileProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
arn :: Maybe (Value Text)
name :: Maybe (Value Text)
..}
= IamInstanceProfileProperty {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" IamInstanceProfileProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
name :: Maybe (Value Text)
haddock_workaround_ :: ()
name :: Maybe (Value Text)
..}
instance Property "Name" IamInstanceProfileProperty where
type PropertyType "Name" IamInstanceProfileProperty = Value Prelude.Text
set :: PropertyType "Name" IamInstanceProfileProperty
-> IamInstanceProfileProperty -> IamInstanceProfileProperty
set PropertyType "Name" IamInstanceProfileProperty
newValue IamInstanceProfileProperty {Maybe (Value Text)
()
haddock_workaround_ :: IamInstanceProfileProperty -> ()
arn :: IamInstanceProfileProperty -> Maybe (Value Text)
name :: IamInstanceProfileProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
arn :: Maybe (Value Text)
name :: Maybe (Value Text)
..}
= IamInstanceProfileProperty {name :: Maybe (Value Text)
name = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Name" IamInstanceProfileProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
arn :: Maybe (Value Text)
haddock_workaround_ :: ()
arn :: Maybe (Value Text)
..}