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