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