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