module Stratosphere.PCS.Cluster (
module Exports, Cluster(..), mkCluster
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.PCS.Cluster.NetworkingProperty as Exports
import {-# SOURCE #-} Stratosphere.PCS.Cluster.SchedulerProperty as Exports
import {-# SOURCE #-} Stratosphere.PCS.Cluster.SlurmConfigurationProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data Cluster
=
Cluster {Cluster -> ()
haddock_workaround_ :: (),
Cluster -> Maybe (Value Text)
name :: (Prelude.Maybe (Value Prelude.Text)),
Cluster -> NetworkingProperty
networking :: NetworkingProperty,
Cluster -> SchedulerProperty
scheduler :: SchedulerProperty,
Cluster -> Value Text
size :: (Value Prelude.Text),
Cluster -> Maybe SlurmConfigurationProperty
slurmConfiguration :: (Prelude.Maybe SlurmConfigurationProperty),
Cluster -> Maybe (Map Text (Value Text))
tags :: (Prelude.Maybe (Prelude.Map Prelude.Text (Value Prelude.Text)))}
deriving stock (Cluster -> Cluster -> Bool
(Cluster -> Cluster -> Bool)
-> (Cluster -> Cluster -> Bool) -> Eq Cluster
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Cluster -> Cluster -> Bool
== :: Cluster -> Cluster -> Bool
$c/= :: Cluster -> Cluster -> Bool
/= :: Cluster -> Cluster -> Bool
Prelude.Eq, Int -> Cluster -> ShowS
[Cluster] -> ShowS
Cluster -> String
(Int -> Cluster -> ShowS)
-> (Cluster -> String) -> ([Cluster] -> ShowS) -> Show Cluster
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Cluster -> ShowS
showsPrec :: Int -> Cluster -> ShowS
$cshow :: Cluster -> String
show :: Cluster -> String
$cshowList :: [Cluster] -> ShowS
showList :: [Cluster] -> ShowS
Prelude.Show)
mkCluster ::
NetworkingProperty
-> SchedulerProperty -> Value Prelude.Text -> Cluster
mkCluster :: NetworkingProperty -> SchedulerProperty -> Value Text -> Cluster
mkCluster NetworkingProperty
networking SchedulerProperty
scheduler Value Text
size
= Cluster
{haddock_workaround_ :: ()
haddock_workaround_ = (), networking :: NetworkingProperty
networking = NetworkingProperty
networking,
scheduler :: SchedulerProperty
scheduler = SchedulerProperty
scheduler, size :: Value Text
size = Value Text
size, name :: Maybe (Value Text)
name = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
slurmConfiguration :: Maybe SlurmConfigurationProperty
slurmConfiguration = Maybe SlurmConfigurationProperty
forall a. Maybe a
Prelude.Nothing, tags :: Maybe (Map Text (Value Text))
tags = Maybe (Map Text (Value Text))
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Cluster where
toResourceProperties :: Cluster -> ResourceProperties
toResourceProperties Cluster {Maybe (Map Text (Value Text))
Maybe (Value Text)
Maybe SlurmConfigurationProperty
()
Value Text
NetworkingProperty
SchedulerProperty
haddock_workaround_ :: Cluster -> ()
name :: Cluster -> Maybe (Value Text)
networking :: Cluster -> NetworkingProperty
scheduler :: Cluster -> SchedulerProperty
size :: Cluster -> Value Text
slurmConfiguration :: Cluster -> Maybe SlurmConfigurationProperty
tags :: Cluster -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
name :: Maybe (Value Text)
networking :: NetworkingProperty
scheduler :: SchedulerProperty
size :: Value Text
slurmConfiguration :: Maybe SlurmConfigurationProperty
tags :: Maybe (Map Text (Value Text))
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::PCS::Cluster", supportsTags :: Bool
supportsTags = Bool
Prelude.True,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"Networking" Key -> NetworkingProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= NetworkingProperty
networking, Key
"Scheduler" Key -> SchedulerProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= SchedulerProperty
scheduler,
Key
"Size" 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..= Value Text
size]
([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
"Name" (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)
name,
Key -> SlurmConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SlurmConfiguration" (SlurmConfigurationProperty -> (Key, Value))
-> Maybe SlurmConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SlurmConfigurationProperty
slurmConfiguration,
Key -> Map Text (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
"Tags" (Map Text (Value Text) -> (Key, Value))
-> Maybe (Map Text (Value Text)) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text (Value Text))
tags]))}
instance JSON.ToJSON Cluster where
toJSON :: Cluster -> Value
toJSON Cluster {Maybe (Map Text (Value Text))
Maybe (Value Text)
Maybe SlurmConfigurationProperty
()
Value Text
NetworkingProperty
SchedulerProperty
haddock_workaround_ :: Cluster -> ()
name :: Cluster -> Maybe (Value Text)
networking :: Cluster -> NetworkingProperty
scheduler :: Cluster -> SchedulerProperty
size :: Cluster -> Value Text
slurmConfiguration :: Cluster -> Maybe SlurmConfigurationProperty
tags :: Cluster -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
name :: Maybe (Value Text)
networking :: NetworkingProperty
scheduler :: SchedulerProperty
size :: Value Text
slurmConfiguration :: Maybe SlurmConfigurationProperty
tags :: Maybe (Map Text (Value Text))
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"Networking" Key -> NetworkingProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= NetworkingProperty
networking, Key
"Scheduler" Key -> SchedulerProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= SchedulerProperty
scheduler,
Key
"Size" 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..= Value Text
size]
([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
"Name" (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)
name,
Key -> SlurmConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SlurmConfiguration" (SlurmConfigurationProperty -> (Key, Value))
-> Maybe SlurmConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SlurmConfigurationProperty
slurmConfiguration,
Key -> Map Text (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
"Tags" (Map Text (Value Text) -> (Key, Value))
-> Maybe (Map Text (Value Text)) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text (Value Text))
tags])))
instance Property "Name" Cluster where
type PropertyType "Name" Cluster = Value Prelude.Text
set :: PropertyType "Name" Cluster -> Cluster -> Cluster
set PropertyType "Name" Cluster
newValue Cluster {Maybe (Map Text (Value Text))
Maybe (Value Text)
Maybe SlurmConfigurationProperty
()
Value Text
NetworkingProperty
SchedulerProperty
haddock_workaround_ :: Cluster -> ()
name :: Cluster -> Maybe (Value Text)
networking :: Cluster -> NetworkingProperty
scheduler :: Cluster -> SchedulerProperty
size :: Cluster -> Value Text
slurmConfiguration :: Cluster -> Maybe SlurmConfigurationProperty
tags :: Cluster -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
name :: Maybe (Value Text)
networking :: NetworkingProperty
scheduler :: SchedulerProperty
size :: Value Text
slurmConfiguration :: Maybe SlurmConfigurationProperty
tags :: Maybe (Map Text (Value Text))
..}
= Cluster {name :: Maybe (Value Text)
name = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Name" Cluster
Value Text
newValue, Maybe (Map Text (Value Text))
Maybe SlurmConfigurationProperty
()
Value Text
NetworkingProperty
SchedulerProperty
haddock_workaround_ :: ()
networking :: NetworkingProperty
scheduler :: SchedulerProperty
size :: Value Text
slurmConfiguration :: Maybe SlurmConfigurationProperty
tags :: Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
networking :: NetworkingProperty
scheduler :: SchedulerProperty
size :: Value Text
slurmConfiguration :: Maybe SlurmConfigurationProperty
tags :: Maybe (Map Text (Value Text))
..}
instance Property "Networking" Cluster where
type PropertyType "Networking" Cluster = NetworkingProperty
set :: PropertyType "Networking" Cluster -> Cluster -> Cluster
set PropertyType "Networking" Cluster
newValue Cluster {Maybe (Map Text (Value Text))
Maybe (Value Text)
Maybe SlurmConfigurationProperty
()
Value Text
NetworkingProperty
SchedulerProperty
haddock_workaround_ :: Cluster -> ()
name :: Cluster -> Maybe (Value Text)
networking :: Cluster -> NetworkingProperty
scheduler :: Cluster -> SchedulerProperty
size :: Cluster -> Value Text
slurmConfiguration :: Cluster -> Maybe SlurmConfigurationProperty
tags :: Cluster -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
name :: Maybe (Value Text)
networking :: NetworkingProperty
scheduler :: SchedulerProperty
size :: Value Text
slurmConfiguration :: Maybe SlurmConfigurationProperty
tags :: Maybe (Map Text (Value Text))
..} = Cluster {networking :: NetworkingProperty
networking = PropertyType "Networking" Cluster
NetworkingProperty
newValue, Maybe (Map Text (Value Text))
Maybe (Value Text)
Maybe SlurmConfigurationProperty
()
Value Text
SchedulerProperty
haddock_workaround_ :: ()
name :: Maybe (Value Text)
scheduler :: SchedulerProperty
size :: Value Text
slurmConfiguration :: Maybe SlurmConfigurationProperty
tags :: Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
name :: Maybe (Value Text)
scheduler :: SchedulerProperty
size :: Value Text
slurmConfiguration :: Maybe SlurmConfigurationProperty
tags :: Maybe (Map Text (Value Text))
..}
instance Property "Scheduler" Cluster where
type PropertyType "Scheduler" Cluster = SchedulerProperty
set :: PropertyType "Scheduler" Cluster -> Cluster -> Cluster
set PropertyType "Scheduler" Cluster
newValue Cluster {Maybe (Map Text (Value Text))
Maybe (Value Text)
Maybe SlurmConfigurationProperty
()
Value Text
NetworkingProperty
SchedulerProperty
haddock_workaround_ :: Cluster -> ()
name :: Cluster -> Maybe (Value Text)
networking :: Cluster -> NetworkingProperty
scheduler :: Cluster -> SchedulerProperty
size :: Cluster -> Value Text
slurmConfiguration :: Cluster -> Maybe SlurmConfigurationProperty
tags :: Cluster -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
name :: Maybe (Value Text)
networking :: NetworkingProperty
scheduler :: SchedulerProperty
size :: Value Text
slurmConfiguration :: Maybe SlurmConfigurationProperty
tags :: Maybe (Map Text (Value Text))
..} = Cluster {scheduler :: SchedulerProperty
scheduler = PropertyType "Scheduler" Cluster
SchedulerProperty
newValue, Maybe (Map Text (Value Text))
Maybe (Value Text)
Maybe SlurmConfigurationProperty
()
Value Text
NetworkingProperty
haddock_workaround_ :: ()
name :: Maybe (Value Text)
networking :: NetworkingProperty
size :: Value Text
slurmConfiguration :: Maybe SlurmConfigurationProperty
tags :: Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
name :: Maybe (Value Text)
networking :: NetworkingProperty
size :: Value Text
slurmConfiguration :: Maybe SlurmConfigurationProperty
tags :: Maybe (Map Text (Value Text))
..}
instance Property "Size" Cluster where
type PropertyType "Size" Cluster = Value Prelude.Text
set :: PropertyType "Size" Cluster -> Cluster -> Cluster
set PropertyType "Size" Cluster
newValue Cluster {Maybe (Map Text (Value Text))
Maybe (Value Text)
Maybe SlurmConfigurationProperty
()
Value Text
NetworkingProperty
SchedulerProperty
haddock_workaround_ :: Cluster -> ()
name :: Cluster -> Maybe (Value Text)
networking :: Cluster -> NetworkingProperty
scheduler :: Cluster -> SchedulerProperty
size :: Cluster -> Value Text
slurmConfiguration :: Cluster -> Maybe SlurmConfigurationProperty
tags :: Cluster -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
name :: Maybe (Value Text)
networking :: NetworkingProperty
scheduler :: SchedulerProperty
size :: Value Text
slurmConfiguration :: Maybe SlurmConfigurationProperty
tags :: Maybe (Map Text (Value Text))
..} = Cluster {size :: Value Text
size = PropertyType "Size" Cluster
Value Text
newValue, Maybe (Map Text (Value Text))
Maybe (Value Text)
Maybe SlurmConfigurationProperty
()
NetworkingProperty
SchedulerProperty
haddock_workaround_ :: ()
name :: Maybe (Value Text)
networking :: NetworkingProperty
scheduler :: SchedulerProperty
slurmConfiguration :: Maybe SlurmConfigurationProperty
tags :: Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
name :: Maybe (Value Text)
networking :: NetworkingProperty
scheduler :: SchedulerProperty
slurmConfiguration :: Maybe SlurmConfigurationProperty
tags :: Maybe (Map Text (Value Text))
..}
instance Property "SlurmConfiguration" Cluster where
type PropertyType "SlurmConfiguration" Cluster = SlurmConfigurationProperty
set :: PropertyType "SlurmConfiguration" Cluster -> Cluster -> Cluster
set PropertyType "SlurmConfiguration" Cluster
newValue Cluster {Maybe (Map Text (Value Text))
Maybe (Value Text)
Maybe SlurmConfigurationProperty
()
Value Text
NetworkingProperty
SchedulerProperty
haddock_workaround_ :: Cluster -> ()
name :: Cluster -> Maybe (Value Text)
networking :: Cluster -> NetworkingProperty
scheduler :: Cluster -> SchedulerProperty
size :: Cluster -> Value Text
slurmConfiguration :: Cluster -> Maybe SlurmConfigurationProperty
tags :: Cluster -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
name :: Maybe (Value Text)
networking :: NetworkingProperty
scheduler :: SchedulerProperty
size :: Value Text
slurmConfiguration :: Maybe SlurmConfigurationProperty
tags :: Maybe (Map Text (Value Text))
..}
= Cluster {slurmConfiguration :: Maybe SlurmConfigurationProperty
slurmConfiguration = SlurmConfigurationProperty -> Maybe SlurmConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SlurmConfiguration" Cluster
SlurmConfigurationProperty
newValue, Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
NetworkingProperty
SchedulerProperty
haddock_workaround_ :: ()
name :: Maybe (Value Text)
networking :: NetworkingProperty
scheduler :: SchedulerProperty
size :: Value Text
tags :: Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
name :: Maybe (Value Text)
networking :: NetworkingProperty
scheduler :: SchedulerProperty
size :: Value Text
tags :: Maybe (Map Text (Value Text))
..}
instance Property "Tags" Cluster where
type PropertyType "Tags" Cluster = Prelude.Map Prelude.Text (Value Prelude.Text)
set :: PropertyType "Tags" Cluster -> Cluster -> Cluster
set PropertyType "Tags" Cluster
newValue Cluster {Maybe (Map Text (Value Text))
Maybe (Value Text)
Maybe SlurmConfigurationProperty
()
Value Text
NetworkingProperty
SchedulerProperty
haddock_workaround_ :: Cluster -> ()
name :: Cluster -> Maybe (Value Text)
networking :: Cluster -> NetworkingProperty
scheduler :: Cluster -> SchedulerProperty
size :: Cluster -> Value Text
slurmConfiguration :: Cluster -> Maybe SlurmConfigurationProperty
tags :: Cluster -> Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
name :: Maybe (Value Text)
networking :: NetworkingProperty
scheduler :: SchedulerProperty
size :: Value Text
slurmConfiguration :: Maybe SlurmConfigurationProperty
tags :: Maybe (Map Text (Value Text))
..}
= Cluster {tags :: Maybe (Map Text (Value Text))
tags = Map Text (Value Text) -> Maybe (Map Text (Value Text))
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure Map Text (Value Text)
PropertyType "Tags" Cluster
newValue, Maybe (Value Text)
Maybe SlurmConfigurationProperty
()
Value Text
NetworkingProperty
SchedulerProperty
haddock_workaround_ :: ()
name :: Maybe (Value Text)
networking :: NetworkingProperty
scheduler :: SchedulerProperty
size :: Value Text
slurmConfiguration :: Maybe SlurmConfigurationProperty
haddock_workaround_ :: ()
name :: Maybe (Value Text)
networking :: NetworkingProperty
scheduler :: SchedulerProperty
size :: Value Text
slurmConfiguration :: Maybe SlurmConfigurationProperty
..}