module Stratosphere.EKS.Cluster.ComputeConfigProperty (
        ComputeConfigProperty(..), mkComputeConfigProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ComputeConfigProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-cluster-computeconfig.html>
    ComputeConfigProperty {ComputeConfigProperty -> ()
haddock_workaround_ :: (),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-cluster-computeconfig.html#cfn-eks-cluster-computeconfig-enabled>
                           ComputeConfigProperty -> Maybe (Value Bool)
enabled :: (Prelude.Maybe (Value Prelude.Bool)),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-cluster-computeconfig.html#cfn-eks-cluster-computeconfig-nodepools>
                           ComputeConfigProperty -> Maybe (ValueList Text)
nodePools :: (Prelude.Maybe (ValueList Prelude.Text)),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-cluster-computeconfig.html#cfn-eks-cluster-computeconfig-noderolearn>
                           ComputeConfigProperty -> Maybe (Value Text)
nodeRoleArn :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (ComputeConfigProperty -> ComputeConfigProperty -> Bool
(ComputeConfigProperty -> ComputeConfigProperty -> Bool)
-> (ComputeConfigProperty -> ComputeConfigProperty -> Bool)
-> Eq ComputeConfigProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ComputeConfigProperty -> ComputeConfigProperty -> Bool
== :: ComputeConfigProperty -> ComputeConfigProperty -> Bool
$c/= :: ComputeConfigProperty -> ComputeConfigProperty -> Bool
/= :: ComputeConfigProperty -> ComputeConfigProperty -> Bool
Prelude.Eq, Int -> ComputeConfigProperty -> ShowS
[ComputeConfigProperty] -> ShowS
ComputeConfigProperty -> String
(Int -> ComputeConfigProperty -> ShowS)
-> (ComputeConfigProperty -> String)
-> ([ComputeConfigProperty] -> ShowS)
-> Show ComputeConfigProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ComputeConfigProperty -> ShowS
showsPrec :: Int -> ComputeConfigProperty -> ShowS
$cshow :: ComputeConfigProperty -> String
show :: ComputeConfigProperty -> String
$cshowList :: [ComputeConfigProperty] -> ShowS
showList :: [ComputeConfigProperty] -> ShowS
Prelude.Show)
mkComputeConfigProperty :: ComputeConfigProperty
mkComputeConfigProperty :: ComputeConfigProperty
mkComputeConfigProperty
  = ComputeConfigProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), enabled :: Maybe (Value Bool)
enabled = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing,
       nodePools :: Maybe (ValueList Text)
nodePools = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing, nodeRoleArn :: Maybe (Value Text)
nodeRoleArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ComputeConfigProperty where
  toResourceProperties :: ComputeConfigProperty -> ResourceProperties
toResourceProperties ComputeConfigProperty {Maybe (ValueList Text)
Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ComputeConfigProperty -> ()
enabled :: ComputeConfigProperty -> Maybe (Value Bool)
nodePools :: ComputeConfigProperty -> Maybe (ValueList Text)
nodeRoleArn :: ComputeConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
nodePools :: Maybe (ValueList Text)
nodeRoleArn :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::EKS::Cluster.ComputeConfig",
         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 Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Enabled" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
enabled,
                            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..=) Key
"NodePools" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
nodePools,
                            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
"NodeRoleArn" (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)
nodeRoleArn])}
instance JSON.ToJSON ComputeConfigProperty where
  toJSON :: ComputeConfigProperty -> Value
toJSON ComputeConfigProperty {Maybe (ValueList Text)
Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ComputeConfigProperty -> ()
enabled :: ComputeConfigProperty -> Maybe (Value Bool)
nodePools :: ComputeConfigProperty -> Maybe (ValueList Text)
nodeRoleArn :: ComputeConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
nodePools :: Maybe (ValueList Text)
nodeRoleArn :: 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 Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Enabled" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
enabled,
               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..=) Key
"NodePools" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
nodePools,
               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
"NodeRoleArn" (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)
nodeRoleArn]))
instance Property "Enabled" ComputeConfigProperty where
  type PropertyType "Enabled" ComputeConfigProperty = Value Prelude.Bool
  set :: PropertyType "Enabled" ComputeConfigProperty
-> ComputeConfigProperty -> ComputeConfigProperty
set PropertyType "Enabled" ComputeConfigProperty
newValue ComputeConfigProperty {Maybe (ValueList Text)
Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ComputeConfigProperty -> ()
enabled :: ComputeConfigProperty -> Maybe (Value Bool)
nodePools :: ComputeConfigProperty -> Maybe (ValueList Text)
nodeRoleArn :: ComputeConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
nodePools :: Maybe (ValueList Text)
nodeRoleArn :: Maybe (Value Text)
..}
    = ComputeConfigProperty {enabled :: Maybe (Value Bool)
enabled = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Enabled" ComputeConfigProperty
Value Bool
newValue, Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: ()
nodePools :: Maybe (ValueList Text)
nodeRoleArn :: Maybe (Value Text)
haddock_workaround_ :: ()
nodePools :: Maybe (ValueList Text)
nodeRoleArn :: Maybe (Value Text)
..}
instance Property "NodePools" ComputeConfigProperty where
  type PropertyType "NodePools" ComputeConfigProperty = ValueList Prelude.Text
  set :: PropertyType "NodePools" ComputeConfigProperty
-> ComputeConfigProperty -> ComputeConfigProperty
set PropertyType "NodePools" ComputeConfigProperty
newValue ComputeConfigProperty {Maybe (ValueList Text)
Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ComputeConfigProperty -> ()
enabled :: ComputeConfigProperty -> Maybe (Value Bool)
nodePools :: ComputeConfigProperty -> Maybe (ValueList Text)
nodeRoleArn :: ComputeConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
nodePools :: Maybe (ValueList Text)
nodeRoleArn :: Maybe (Value Text)
..}
    = ComputeConfigProperty {nodePools :: Maybe (ValueList Text)
nodePools = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "NodePools" ComputeConfigProperty
ValueList Text
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
nodeRoleArn :: Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
nodeRoleArn :: Maybe (Value Text)
..}
instance Property "NodeRoleArn" ComputeConfigProperty where
  type PropertyType "NodeRoleArn" ComputeConfigProperty = Value Prelude.Text
  set :: PropertyType "NodeRoleArn" ComputeConfigProperty
-> ComputeConfigProperty -> ComputeConfigProperty
set PropertyType "NodeRoleArn" ComputeConfigProperty
newValue ComputeConfigProperty {Maybe (ValueList Text)
Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ComputeConfigProperty -> ()
enabled :: ComputeConfigProperty -> Maybe (Value Bool)
nodePools :: ComputeConfigProperty -> Maybe (ValueList Text)
nodeRoleArn :: ComputeConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
nodePools :: Maybe (ValueList Text)
nodeRoleArn :: Maybe (Value Text)
..}
    = ComputeConfigProperty {nodeRoleArn :: Maybe (Value Text)
nodeRoleArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "NodeRoleArn" ComputeConfigProperty
Value Text
newValue, Maybe (ValueList Text)
Maybe (Value Bool)
()
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
nodePools :: Maybe (ValueList Text)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
nodePools :: Maybe (ValueList Text)
..}