module Stratosphere.PCS.ComputeNodeGroup.SlurmConfigurationProperty (
module Exports, SlurmConfigurationProperty(..),
mkSlurmConfigurationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.PCS.ComputeNodeGroup.SlurmCustomSettingProperty as Exports
import Stratosphere.ResourceProperties
data SlurmConfigurationProperty
=
SlurmConfigurationProperty {SlurmConfigurationProperty -> ()
haddock_workaround_ :: (),
SlurmConfigurationProperty -> Maybe [SlurmCustomSettingProperty]
slurmCustomSettings :: (Prelude.Maybe [SlurmCustomSettingProperty])}
deriving stock (SlurmConfigurationProperty -> SlurmConfigurationProperty -> Bool
(SlurmConfigurationProperty -> SlurmConfigurationProperty -> Bool)
-> (SlurmConfigurationProperty
-> SlurmConfigurationProperty -> Bool)
-> Eq SlurmConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SlurmConfigurationProperty -> SlurmConfigurationProperty -> Bool
== :: SlurmConfigurationProperty -> SlurmConfigurationProperty -> Bool
$c/= :: SlurmConfigurationProperty -> SlurmConfigurationProperty -> Bool
/= :: SlurmConfigurationProperty -> SlurmConfigurationProperty -> Bool
Prelude.Eq, Int -> SlurmConfigurationProperty -> ShowS
[SlurmConfigurationProperty] -> ShowS
SlurmConfigurationProperty -> String
(Int -> SlurmConfigurationProperty -> ShowS)
-> (SlurmConfigurationProperty -> String)
-> ([SlurmConfigurationProperty] -> ShowS)
-> Show SlurmConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SlurmConfigurationProperty -> ShowS
showsPrec :: Int -> SlurmConfigurationProperty -> ShowS
$cshow :: SlurmConfigurationProperty -> String
show :: SlurmConfigurationProperty -> String
$cshowList :: [SlurmConfigurationProperty] -> ShowS
showList :: [SlurmConfigurationProperty] -> ShowS
Prelude.Show)
mkSlurmConfigurationProperty :: SlurmConfigurationProperty
mkSlurmConfigurationProperty :: SlurmConfigurationProperty
mkSlurmConfigurationProperty
= SlurmConfigurationProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), slurmCustomSettings :: Maybe [SlurmCustomSettingProperty]
slurmCustomSettings = Maybe [SlurmCustomSettingProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties SlurmConfigurationProperty where
toResourceProperties :: SlurmConfigurationProperty -> ResourceProperties
toResourceProperties SlurmConfigurationProperty {Maybe [SlurmCustomSettingProperty]
()
haddock_workaround_ :: SlurmConfigurationProperty -> ()
slurmCustomSettings :: SlurmConfigurationProperty -> Maybe [SlurmCustomSettingProperty]
haddock_workaround_ :: ()
slurmCustomSettings :: Maybe [SlurmCustomSettingProperty]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::PCS::ComputeNodeGroup.SlurmConfiguration",
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 -> [SlurmCustomSettingProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SlurmCustomSettings" ([SlurmCustomSettingProperty] -> (Key, Value))
-> Maybe [SlurmCustomSettingProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [SlurmCustomSettingProperty]
slurmCustomSettings])}
instance JSON.ToJSON SlurmConfigurationProperty where
toJSON :: SlurmConfigurationProperty -> Value
toJSON SlurmConfigurationProperty {Maybe [SlurmCustomSettingProperty]
()
haddock_workaround_ :: SlurmConfigurationProperty -> ()
slurmCustomSettings :: SlurmConfigurationProperty -> Maybe [SlurmCustomSettingProperty]
haddock_workaround_ :: ()
slurmCustomSettings :: Maybe [SlurmCustomSettingProperty]
..}
= [(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 -> [SlurmCustomSettingProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SlurmCustomSettings" ([SlurmCustomSettingProperty] -> (Key, Value))
-> Maybe [SlurmCustomSettingProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [SlurmCustomSettingProperty]
slurmCustomSettings]))
instance Property "SlurmCustomSettings" SlurmConfigurationProperty where
type PropertyType "SlurmCustomSettings" SlurmConfigurationProperty = [SlurmCustomSettingProperty]
set :: PropertyType "SlurmCustomSettings" SlurmConfigurationProperty
-> SlurmConfigurationProperty -> SlurmConfigurationProperty
set PropertyType "SlurmCustomSettings" SlurmConfigurationProperty
newValue SlurmConfigurationProperty {Maybe [SlurmCustomSettingProperty]
()
haddock_workaround_ :: SlurmConfigurationProperty -> ()
slurmCustomSettings :: SlurmConfigurationProperty -> Maybe [SlurmCustomSettingProperty]
haddock_workaround_ :: ()
slurmCustomSettings :: Maybe [SlurmCustomSettingProperty]
..}
= SlurmConfigurationProperty
{slurmCustomSettings :: Maybe [SlurmCustomSettingProperty]
slurmCustomSettings = [SlurmCustomSettingProperty] -> Maybe [SlurmCustomSettingProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [SlurmCustomSettingProperty]
PropertyType "SlurmCustomSettings" SlurmConfigurationProperty
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}