module Stratosphere.EMR.InstanceFleetConfig.SpotResizingSpecificationProperty (
        SpotResizingSpecificationProperty(..),
        mkSpotResizingSpecificationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data SpotResizingSpecificationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-instancefleetconfig-spotresizingspecification.html>
    SpotResizingSpecificationProperty {SpotResizingSpecificationProperty -> ()
haddock_workaround_ :: (),
                                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-instancefleetconfig-spotresizingspecification.html#cfn-elasticmapreduce-instancefleetconfig-spotresizingspecification-allocationstrategy>
                                       SpotResizingSpecificationProperty -> Maybe (Value Text)
allocationStrategy :: (Prelude.Maybe (Value Prelude.Text)),
                                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-instancefleetconfig-spotresizingspecification.html#cfn-elasticmapreduce-instancefleetconfig-spotresizingspecification-timeoutdurationminutes>
                                       SpotResizingSpecificationProperty -> Maybe (Value Integer)
timeoutDurationMinutes :: (Prelude.Maybe (Value Prelude.Integer))}
  deriving stock (SpotResizingSpecificationProperty
-> SpotResizingSpecificationProperty -> Bool
(SpotResizingSpecificationProperty
 -> SpotResizingSpecificationProperty -> Bool)
-> (SpotResizingSpecificationProperty
    -> SpotResizingSpecificationProperty -> Bool)
-> Eq SpotResizingSpecificationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SpotResizingSpecificationProperty
-> SpotResizingSpecificationProperty -> Bool
== :: SpotResizingSpecificationProperty
-> SpotResizingSpecificationProperty -> Bool
$c/= :: SpotResizingSpecificationProperty
-> SpotResizingSpecificationProperty -> Bool
/= :: SpotResizingSpecificationProperty
-> SpotResizingSpecificationProperty -> Bool
Prelude.Eq, Int -> SpotResizingSpecificationProperty -> ShowS
[SpotResizingSpecificationProperty] -> ShowS
SpotResizingSpecificationProperty -> String
(Int -> SpotResizingSpecificationProperty -> ShowS)
-> (SpotResizingSpecificationProperty -> String)
-> ([SpotResizingSpecificationProperty] -> ShowS)
-> Show SpotResizingSpecificationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SpotResizingSpecificationProperty -> ShowS
showsPrec :: Int -> SpotResizingSpecificationProperty -> ShowS
$cshow :: SpotResizingSpecificationProperty -> String
show :: SpotResizingSpecificationProperty -> String
$cshowList :: [SpotResizingSpecificationProperty] -> ShowS
showList :: [SpotResizingSpecificationProperty] -> ShowS
Prelude.Show)
mkSpotResizingSpecificationProperty ::
  SpotResizingSpecificationProperty
mkSpotResizingSpecificationProperty :: SpotResizingSpecificationProperty
mkSpotResizingSpecificationProperty
  = SpotResizingSpecificationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), allocationStrategy :: Maybe (Value Text)
allocationStrategy = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       timeoutDurationMinutes :: Maybe (Value Integer)
timeoutDurationMinutes = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties SpotResizingSpecificationProperty where
  toResourceProperties :: SpotResizingSpecificationProperty -> ResourceProperties
toResourceProperties SpotResizingSpecificationProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: SpotResizingSpecificationProperty -> ()
allocationStrategy :: SpotResizingSpecificationProperty -> Maybe (Value Text)
timeoutDurationMinutes :: SpotResizingSpecificationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
allocationStrategy :: Maybe (Value Text)
timeoutDurationMinutes :: Maybe (Value Integer)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::EMR::InstanceFleetConfig.SpotResizingSpecification",
         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 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
"TimeoutDurationMinutes"
                              (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)
timeoutDurationMinutes])}
instance JSON.ToJSON SpotResizingSpecificationProperty where
  toJSON :: SpotResizingSpecificationProperty -> Value
toJSON SpotResizingSpecificationProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: SpotResizingSpecificationProperty -> ()
allocationStrategy :: SpotResizingSpecificationProperty -> Maybe (Value Text)
timeoutDurationMinutes :: SpotResizingSpecificationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
allocationStrategy :: Maybe (Value Text)
timeoutDurationMinutes :: Maybe (Value Integer)
..}
    = [(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 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
"TimeoutDurationMinutes"
                 (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)
timeoutDurationMinutes]))
instance Property "AllocationStrategy" SpotResizingSpecificationProperty where
  type PropertyType "AllocationStrategy" SpotResizingSpecificationProperty = Value Prelude.Text
  set :: PropertyType "AllocationStrategy" SpotResizingSpecificationProperty
-> SpotResizingSpecificationProperty
-> SpotResizingSpecificationProperty
set PropertyType "AllocationStrategy" SpotResizingSpecificationProperty
newValue SpotResizingSpecificationProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: SpotResizingSpecificationProperty -> ()
allocationStrategy :: SpotResizingSpecificationProperty -> Maybe (Value Text)
timeoutDurationMinutes :: SpotResizingSpecificationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
allocationStrategy :: Maybe (Value Text)
timeoutDurationMinutes :: Maybe (Value Integer)
..}
    = SpotResizingSpecificationProperty
        {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" SpotResizingSpecificationProperty
Value Text
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
timeoutDurationMinutes :: Maybe (Value Integer)
haddock_workaround_ :: ()
timeoutDurationMinutes :: Maybe (Value Integer)
..}
instance Property "TimeoutDurationMinutes" SpotResizingSpecificationProperty where
  type PropertyType "TimeoutDurationMinutes" SpotResizingSpecificationProperty = Value Prelude.Integer
  set :: PropertyType
  "TimeoutDurationMinutes" SpotResizingSpecificationProperty
-> SpotResizingSpecificationProperty
-> SpotResizingSpecificationProperty
set PropertyType
  "TimeoutDurationMinutes" SpotResizingSpecificationProperty
newValue SpotResizingSpecificationProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: SpotResizingSpecificationProperty -> ()
allocationStrategy :: SpotResizingSpecificationProperty -> Maybe (Value Text)
timeoutDurationMinutes :: SpotResizingSpecificationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
allocationStrategy :: Maybe (Value Text)
timeoutDurationMinutes :: Maybe (Value Integer)
..}
    = SpotResizingSpecificationProperty
        {timeoutDurationMinutes :: Maybe (Value Integer)
timeoutDurationMinutes = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "TimeoutDurationMinutes" SpotResizingSpecificationProperty
Value Integer
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
allocationStrategy :: Maybe (Value Text)
haddock_workaround_ :: ()
allocationStrategy :: Maybe (Value Text)
..}