module Stratosphere.EMR.Cluster.SpotProvisioningSpecificationProperty (
SpotProvisioningSpecificationProperty(..),
mkSpotProvisioningSpecificationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data SpotProvisioningSpecificationProperty
=
SpotProvisioningSpecificationProperty {SpotProvisioningSpecificationProperty -> ()
haddock_workaround_ :: (),
SpotProvisioningSpecificationProperty -> Maybe (Value Text)
allocationStrategy :: (Prelude.Maybe (Value Prelude.Text)),
SpotProvisioningSpecificationProperty -> Maybe (Value Integer)
blockDurationMinutes :: (Prelude.Maybe (Value Prelude.Integer)),
SpotProvisioningSpecificationProperty -> Value Text
timeoutAction :: (Value Prelude.Text),
SpotProvisioningSpecificationProperty -> Value Integer
timeoutDurationMinutes :: (Value Prelude.Integer)}
deriving stock (SpotProvisioningSpecificationProperty
-> SpotProvisioningSpecificationProperty -> Bool
(SpotProvisioningSpecificationProperty
-> SpotProvisioningSpecificationProperty -> Bool)
-> (SpotProvisioningSpecificationProperty
-> SpotProvisioningSpecificationProperty -> Bool)
-> Eq SpotProvisioningSpecificationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SpotProvisioningSpecificationProperty
-> SpotProvisioningSpecificationProperty -> Bool
== :: SpotProvisioningSpecificationProperty
-> SpotProvisioningSpecificationProperty -> Bool
$c/= :: SpotProvisioningSpecificationProperty
-> SpotProvisioningSpecificationProperty -> Bool
/= :: SpotProvisioningSpecificationProperty
-> SpotProvisioningSpecificationProperty -> Bool
Prelude.Eq, Int -> SpotProvisioningSpecificationProperty -> ShowS
[SpotProvisioningSpecificationProperty] -> ShowS
SpotProvisioningSpecificationProperty -> String
(Int -> SpotProvisioningSpecificationProperty -> ShowS)
-> (SpotProvisioningSpecificationProperty -> String)
-> ([SpotProvisioningSpecificationProperty] -> ShowS)
-> Show SpotProvisioningSpecificationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SpotProvisioningSpecificationProperty -> ShowS
showsPrec :: Int -> SpotProvisioningSpecificationProperty -> ShowS
$cshow :: SpotProvisioningSpecificationProperty -> String
show :: SpotProvisioningSpecificationProperty -> String
$cshowList :: [SpotProvisioningSpecificationProperty] -> ShowS
showList :: [SpotProvisioningSpecificationProperty] -> ShowS
Prelude.Show)
mkSpotProvisioningSpecificationProperty ::
Value Prelude.Text
-> Value Prelude.Integer -> SpotProvisioningSpecificationProperty
mkSpotProvisioningSpecificationProperty :: Value Text
-> Value Integer -> SpotProvisioningSpecificationProperty
mkSpotProvisioningSpecificationProperty
Value Text
timeoutAction
Value Integer
timeoutDurationMinutes
= SpotProvisioningSpecificationProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), timeoutAction :: Value Text
timeoutAction = Value Text
timeoutAction,
timeoutDurationMinutes :: Value Integer
timeoutDurationMinutes = Value Integer
timeoutDurationMinutes,
allocationStrategy :: Maybe (Value Text)
allocationStrategy = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
blockDurationMinutes :: Maybe (Value Integer)
blockDurationMinutes = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties SpotProvisioningSpecificationProperty where
toResourceProperties :: SpotProvisioningSpecificationProperty -> ResourceProperties
toResourceProperties SpotProvisioningSpecificationProperty {Maybe (Value Integer)
Maybe (Value Text)
()
Value Integer
Value Text
haddock_workaround_ :: SpotProvisioningSpecificationProperty -> ()
allocationStrategy :: SpotProvisioningSpecificationProperty -> Maybe (Value Text)
blockDurationMinutes :: SpotProvisioningSpecificationProperty -> Maybe (Value Integer)
timeoutAction :: SpotProvisioningSpecificationProperty -> Value Text
timeoutDurationMinutes :: SpotProvisioningSpecificationProperty -> Value Integer
haddock_workaround_ :: ()
allocationStrategy :: Maybe (Value Text)
blockDurationMinutes :: Maybe (Value Integer)
timeoutAction :: Value Text
timeoutDurationMinutes :: Value Integer
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::EMR::Cluster.SpotProvisioningSpecification",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
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
"TimeoutAction" 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
timeoutAction,
Key
"TimeoutDurationMinutes" Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Integer
timeoutDurationMinutes]
([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
"AllocationStrategy" (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)
allocationStrategy,
Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"BlockDurationMinutes"
(Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
blockDurationMinutes]))}
instance JSON.ToJSON SpotProvisioningSpecificationProperty where
toJSON :: SpotProvisioningSpecificationProperty -> Value
toJSON SpotProvisioningSpecificationProperty {Maybe (Value Integer)
Maybe (Value Text)
()
Value Integer
Value Text
haddock_workaround_ :: SpotProvisioningSpecificationProperty -> ()
allocationStrategy :: SpotProvisioningSpecificationProperty -> Maybe (Value Text)
blockDurationMinutes :: SpotProvisioningSpecificationProperty -> Maybe (Value Integer)
timeoutAction :: SpotProvisioningSpecificationProperty -> Value Text
timeoutDurationMinutes :: SpotProvisioningSpecificationProperty -> Value Integer
haddock_workaround_ :: ()
allocationStrategy :: Maybe (Value Text)
blockDurationMinutes :: Maybe (Value Integer)
timeoutAction :: Value Text
timeoutDurationMinutes :: Value Integer
..}
= [(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
"TimeoutAction" 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
timeoutAction,
Key
"TimeoutDurationMinutes" Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Integer
timeoutDurationMinutes]
([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
"AllocationStrategy" (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)
allocationStrategy,
Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"BlockDurationMinutes"
(Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
blockDurationMinutes])))
instance Property "AllocationStrategy" SpotProvisioningSpecificationProperty where
type PropertyType "AllocationStrategy" SpotProvisioningSpecificationProperty = Value Prelude.Text
set :: PropertyType
"AllocationStrategy" SpotProvisioningSpecificationProperty
-> SpotProvisioningSpecificationProperty
-> SpotProvisioningSpecificationProperty
set PropertyType
"AllocationStrategy" SpotProvisioningSpecificationProperty
newValue SpotProvisioningSpecificationProperty {Maybe (Value Integer)
Maybe (Value Text)
()
Value Integer
Value Text
haddock_workaround_ :: SpotProvisioningSpecificationProperty -> ()
allocationStrategy :: SpotProvisioningSpecificationProperty -> Maybe (Value Text)
blockDurationMinutes :: SpotProvisioningSpecificationProperty -> Maybe (Value Integer)
timeoutAction :: SpotProvisioningSpecificationProperty -> Value Text
timeoutDurationMinutes :: SpotProvisioningSpecificationProperty -> Value Integer
haddock_workaround_ :: ()
allocationStrategy :: Maybe (Value Text)
blockDurationMinutes :: Maybe (Value Integer)
timeoutAction :: Value Text
timeoutDurationMinutes :: Value Integer
..}
= SpotProvisioningSpecificationProperty
{allocationStrategy :: Maybe (Value Text)
allocationStrategy = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
"AllocationStrategy" SpotProvisioningSpecificationProperty
Value Text
newValue, Maybe (Value Integer)
()
Value Integer
Value Text
haddock_workaround_ :: ()
blockDurationMinutes :: Maybe (Value Integer)
timeoutAction :: Value Text
timeoutDurationMinutes :: Value Integer
haddock_workaround_ :: ()
blockDurationMinutes :: Maybe (Value Integer)
timeoutAction :: Value Text
timeoutDurationMinutes :: Value Integer
..}
instance Property "BlockDurationMinutes" SpotProvisioningSpecificationProperty where
type PropertyType "BlockDurationMinutes" SpotProvisioningSpecificationProperty = Value Prelude.Integer
set :: PropertyType
"BlockDurationMinutes" SpotProvisioningSpecificationProperty
-> SpotProvisioningSpecificationProperty
-> SpotProvisioningSpecificationProperty
set PropertyType
"BlockDurationMinutes" SpotProvisioningSpecificationProperty
newValue SpotProvisioningSpecificationProperty {Maybe (Value Integer)
Maybe (Value Text)
()
Value Integer
Value Text
haddock_workaround_ :: SpotProvisioningSpecificationProperty -> ()
allocationStrategy :: SpotProvisioningSpecificationProperty -> Maybe (Value Text)
blockDurationMinutes :: SpotProvisioningSpecificationProperty -> Maybe (Value Integer)
timeoutAction :: SpotProvisioningSpecificationProperty -> Value Text
timeoutDurationMinutes :: SpotProvisioningSpecificationProperty -> Value Integer
haddock_workaround_ :: ()
allocationStrategy :: Maybe (Value Text)
blockDurationMinutes :: Maybe (Value Integer)
timeoutAction :: Value Text
timeoutDurationMinutes :: Value Integer
..}
= SpotProvisioningSpecificationProperty
{blockDurationMinutes :: Maybe (Value Integer)
blockDurationMinutes = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
"BlockDurationMinutes" SpotProvisioningSpecificationProperty
Value Integer
newValue, Maybe (Value Text)
()
Value Integer
Value Text
haddock_workaround_ :: ()
allocationStrategy :: Maybe (Value Text)
timeoutAction :: Value Text
timeoutDurationMinutes :: Value Integer
haddock_workaround_ :: ()
allocationStrategy :: Maybe (Value Text)
timeoutAction :: Value Text
timeoutDurationMinutes :: Value Integer
..}
instance Property "TimeoutAction" SpotProvisioningSpecificationProperty where
type PropertyType "TimeoutAction" SpotProvisioningSpecificationProperty = Value Prelude.Text
set :: PropertyType "TimeoutAction" SpotProvisioningSpecificationProperty
-> SpotProvisioningSpecificationProperty
-> SpotProvisioningSpecificationProperty
set PropertyType "TimeoutAction" SpotProvisioningSpecificationProperty
newValue SpotProvisioningSpecificationProperty {Maybe (Value Integer)
Maybe (Value Text)
()
Value Integer
Value Text
haddock_workaround_ :: SpotProvisioningSpecificationProperty -> ()
allocationStrategy :: SpotProvisioningSpecificationProperty -> Maybe (Value Text)
blockDurationMinutes :: SpotProvisioningSpecificationProperty -> Maybe (Value Integer)
timeoutAction :: SpotProvisioningSpecificationProperty -> Value Text
timeoutDurationMinutes :: SpotProvisioningSpecificationProperty -> Value Integer
haddock_workaround_ :: ()
allocationStrategy :: Maybe (Value Text)
blockDurationMinutes :: Maybe (Value Integer)
timeoutAction :: Value Text
timeoutDurationMinutes :: Value Integer
..}
= SpotProvisioningSpecificationProperty
{timeoutAction :: Value Text
timeoutAction = PropertyType "TimeoutAction" SpotProvisioningSpecificationProperty
Value Text
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
Value Integer
haddock_workaround_ :: ()
allocationStrategy :: Maybe (Value Text)
blockDurationMinutes :: Maybe (Value Integer)
timeoutDurationMinutes :: Value Integer
haddock_workaround_ :: ()
allocationStrategy :: Maybe (Value Text)
blockDurationMinutes :: Maybe (Value Integer)
timeoutDurationMinutes :: Value Integer
..}
instance Property "TimeoutDurationMinutes" SpotProvisioningSpecificationProperty where
type PropertyType "TimeoutDurationMinutes" SpotProvisioningSpecificationProperty = Value Prelude.Integer
set :: PropertyType
"TimeoutDurationMinutes" SpotProvisioningSpecificationProperty
-> SpotProvisioningSpecificationProperty
-> SpotProvisioningSpecificationProperty
set PropertyType
"TimeoutDurationMinutes" SpotProvisioningSpecificationProperty
newValue SpotProvisioningSpecificationProperty {Maybe (Value Integer)
Maybe (Value Text)
()
Value Integer
Value Text
haddock_workaround_ :: SpotProvisioningSpecificationProperty -> ()
allocationStrategy :: SpotProvisioningSpecificationProperty -> Maybe (Value Text)
blockDurationMinutes :: SpotProvisioningSpecificationProperty -> Maybe (Value Integer)
timeoutAction :: SpotProvisioningSpecificationProperty -> Value Text
timeoutDurationMinutes :: SpotProvisioningSpecificationProperty -> Value Integer
haddock_workaround_ :: ()
allocationStrategy :: Maybe (Value Text)
blockDurationMinutes :: Maybe (Value Integer)
timeoutAction :: Value Text
timeoutDurationMinutes :: Value Integer
..}
= SpotProvisioningSpecificationProperty
{timeoutDurationMinutes :: Value Integer
timeoutDurationMinutes = PropertyType
"TimeoutDurationMinutes" SpotProvisioningSpecificationProperty
Value Integer
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
allocationStrategy :: Maybe (Value Text)
blockDurationMinutes :: Maybe (Value Integer)
timeoutAction :: Value Text
haddock_workaround_ :: ()
allocationStrategy :: Maybe (Value Text)
blockDurationMinutes :: Maybe (Value Integer)
timeoutAction :: Value Text
..}