module Stratosphere.AppRunner.Service.InstanceConfigurationProperty (
        InstanceConfigurationProperty(..), mkInstanceConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data InstanceConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-instanceconfiguration.html>
    InstanceConfigurationProperty {InstanceConfigurationProperty -> ()
haddock_workaround_ :: (),
                                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-instanceconfiguration.html#cfn-apprunner-service-instanceconfiguration-cpu>
                                   InstanceConfigurationProperty -> Maybe (Value Text)
cpu :: (Prelude.Maybe (Value Prelude.Text)),
                                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-instanceconfiguration.html#cfn-apprunner-service-instanceconfiguration-instancerolearn>
                                   InstanceConfigurationProperty -> Maybe (Value Text)
instanceRoleArn :: (Prelude.Maybe (Value Prelude.Text)),
                                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-instanceconfiguration.html#cfn-apprunner-service-instanceconfiguration-memory>
                                   InstanceConfigurationProperty -> Maybe (Value Text)
memory :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (InstanceConfigurationProperty
-> InstanceConfigurationProperty -> Bool
(InstanceConfigurationProperty
 -> InstanceConfigurationProperty -> Bool)
-> (InstanceConfigurationProperty
    -> InstanceConfigurationProperty -> Bool)
-> Eq InstanceConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: InstanceConfigurationProperty
-> InstanceConfigurationProperty -> Bool
== :: InstanceConfigurationProperty
-> InstanceConfigurationProperty -> Bool
$c/= :: InstanceConfigurationProperty
-> InstanceConfigurationProperty -> Bool
/= :: InstanceConfigurationProperty
-> InstanceConfigurationProperty -> Bool
Prelude.Eq, Int -> InstanceConfigurationProperty -> ShowS
[InstanceConfigurationProperty] -> ShowS
InstanceConfigurationProperty -> String
(Int -> InstanceConfigurationProperty -> ShowS)
-> (InstanceConfigurationProperty -> String)
-> ([InstanceConfigurationProperty] -> ShowS)
-> Show InstanceConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> InstanceConfigurationProperty -> ShowS
showsPrec :: Int -> InstanceConfigurationProperty -> ShowS
$cshow :: InstanceConfigurationProperty -> String
show :: InstanceConfigurationProperty -> String
$cshowList :: [InstanceConfigurationProperty] -> ShowS
showList :: [InstanceConfigurationProperty] -> ShowS
Prelude.Show)
mkInstanceConfigurationProperty :: InstanceConfigurationProperty
mkInstanceConfigurationProperty :: InstanceConfigurationProperty
mkInstanceConfigurationProperty
  = InstanceConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), cpu :: Maybe (Value Text)
cpu = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       instanceRoleArn :: Maybe (Value Text)
instanceRoleArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, memory :: Maybe (Value Text)
memory = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties InstanceConfigurationProperty where
  toResourceProperties :: InstanceConfigurationProperty -> ResourceProperties
toResourceProperties InstanceConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: InstanceConfigurationProperty -> ()
cpu :: InstanceConfigurationProperty -> Maybe (Value Text)
instanceRoleArn :: InstanceConfigurationProperty -> Maybe (Value Text)
memory :: InstanceConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
cpu :: Maybe (Value Text)
instanceRoleArn :: Maybe (Value Text)
memory :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::AppRunner::Service.InstanceConfiguration",
         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
"Cpu" (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)
cpu,
                            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
"InstanceRoleArn" (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)
instanceRoleArn,
                            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
"Memory" (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)
memory])}
instance JSON.ToJSON InstanceConfigurationProperty where
  toJSON :: InstanceConfigurationProperty -> Value
toJSON InstanceConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: InstanceConfigurationProperty -> ()
cpu :: InstanceConfigurationProperty -> Maybe (Value Text)
instanceRoleArn :: InstanceConfigurationProperty -> Maybe (Value Text)
memory :: InstanceConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
cpu :: Maybe (Value Text)
instanceRoleArn :: Maybe (Value Text)
memory :: 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
"Cpu" (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)
cpu,
               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
"InstanceRoleArn" (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)
instanceRoleArn,
               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
"Memory" (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)
memory]))
instance Property "Cpu" InstanceConfigurationProperty where
  type PropertyType "Cpu" InstanceConfigurationProperty = Value Prelude.Text
  set :: PropertyType "Cpu" InstanceConfigurationProperty
-> InstanceConfigurationProperty -> InstanceConfigurationProperty
set PropertyType "Cpu" InstanceConfigurationProperty
newValue InstanceConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: InstanceConfigurationProperty -> ()
cpu :: InstanceConfigurationProperty -> Maybe (Value Text)
instanceRoleArn :: InstanceConfigurationProperty -> Maybe (Value Text)
memory :: InstanceConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
cpu :: Maybe (Value Text)
instanceRoleArn :: Maybe (Value Text)
memory :: Maybe (Value Text)
..}
    = InstanceConfigurationProperty {cpu :: Maybe (Value Text)
cpu = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Cpu" InstanceConfigurationProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
instanceRoleArn :: Maybe (Value Text)
memory :: Maybe (Value Text)
haddock_workaround_ :: ()
instanceRoleArn :: Maybe (Value Text)
memory :: Maybe (Value Text)
..}
instance Property "InstanceRoleArn" InstanceConfigurationProperty where
  type PropertyType "InstanceRoleArn" InstanceConfigurationProperty = Value Prelude.Text
  set :: PropertyType "InstanceRoleArn" InstanceConfigurationProperty
-> InstanceConfigurationProperty -> InstanceConfigurationProperty
set PropertyType "InstanceRoleArn" InstanceConfigurationProperty
newValue InstanceConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: InstanceConfigurationProperty -> ()
cpu :: InstanceConfigurationProperty -> Maybe (Value Text)
instanceRoleArn :: InstanceConfigurationProperty -> Maybe (Value Text)
memory :: InstanceConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
cpu :: Maybe (Value Text)
instanceRoleArn :: Maybe (Value Text)
memory :: Maybe (Value Text)
..}
    = InstanceConfigurationProperty
        {instanceRoleArn :: Maybe (Value Text)
instanceRoleArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "InstanceRoleArn" InstanceConfigurationProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
cpu :: Maybe (Value Text)
memory :: Maybe (Value Text)
haddock_workaround_ :: ()
cpu :: Maybe (Value Text)
memory :: Maybe (Value Text)
..}
instance Property "Memory" InstanceConfigurationProperty where
  type PropertyType "Memory" InstanceConfigurationProperty = Value Prelude.Text
  set :: PropertyType "Memory" InstanceConfigurationProperty
-> InstanceConfigurationProperty -> InstanceConfigurationProperty
set PropertyType "Memory" InstanceConfigurationProperty
newValue InstanceConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: InstanceConfigurationProperty -> ()
cpu :: InstanceConfigurationProperty -> Maybe (Value Text)
instanceRoleArn :: InstanceConfigurationProperty -> Maybe (Value Text)
memory :: InstanceConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
cpu :: Maybe (Value Text)
instanceRoleArn :: Maybe (Value Text)
memory :: Maybe (Value Text)
..}
    = InstanceConfigurationProperty
        {memory :: Maybe (Value Text)
memory = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Memory" InstanceConfigurationProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
cpu :: Maybe (Value Text)
instanceRoleArn :: Maybe (Value Text)
haddock_workaround_ :: ()
cpu :: Maybe (Value Text)
instanceRoleArn :: Maybe (Value Text)
..}