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