module Stratosphere.WorkspacesInstances.WorkspaceInstance.EC2ManagedInstanceProperty (
EC2ManagedInstanceProperty(..), mkEC2ManagedInstanceProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data EC2ManagedInstanceProperty
=
EC2ManagedInstanceProperty {EC2ManagedInstanceProperty -> ()
haddock_workaround_ :: (),
EC2ManagedInstanceProperty -> Maybe (Value Text)
instanceId :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (EC2ManagedInstanceProperty -> EC2ManagedInstanceProperty -> Bool
(EC2ManagedInstanceProperty -> EC2ManagedInstanceProperty -> Bool)
-> (EC2ManagedInstanceProperty
-> EC2ManagedInstanceProperty -> Bool)
-> Eq EC2ManagedInstanceProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: EC2ManagedInstanceProperty -> EC2ManagedInstanceProperty -> Bool
== :: EC2ManagedInstanceProperty -> EC2ManagedInstanceProperty -> Bool
$c/= :: EC2ManagedInstanceProperty -> EC2ManagedInstanceProperty -> Bool
/= :: EC2ManagedInstanceProperty -> EC2ManagedInstanceProperty -> Bool
Prelude.Eq, Int -> EC2ManagedInstanceProperty -> ShowS
[EC2ManagedInstanceProperty] -> ShowS
EC2ManagedInstanceProperty -> String
(Int -> EC2ManagedInstanceProperty -> ShowS)
-> (EC2ManagedInstanceProperty -> String)
-> ([EC2ManagedInstanceProperty] -> ShowS)
-> Show EC2ManagedInstanceProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> EC2ManagedInstanceProperty -> ShowS
showsPrec :: Int -> EC2ManagedInstanceProperty -> ShowS
$cshow :: EC2ManagedInstanceProperty -> String
show :: EC2ManagedInstanceProperty -> String
$cshowList :: [EC2ManagedInstanceProperty] -> ShowS
showList :: [EC2ManagedInstanceProperty] -> ShowS
Prelude.Show)
mkEC2ManagedInstanceProperty :: EC2ManagedInstanceProperty
mkEC2ManagedInstanceProperty :: EC2ManagedInstanceProperty
mkEC2ManagedInstanceProperty
= EC2ManagedInstanceProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), instanceId :: Maybe (Value Text)
instanceId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties EC2ManagedInstanceProperty where
toResourceProperties :: EC2ManagedInstanceProperty -> ResourceProperties
toResourceProperties EC2ManagedInstanceProperty {Maybe (Value Text)
()
haddock_workaround_ :: EC2ManagedInstanceProperty -> ()
instanceId :: EC2ManagedInstanceProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
instanceId :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::WorkspacesInstances::WorkspaceInstance.EC2ManagedInstance",
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
"InstanceId" (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)
instanceId])}
instance JSON.ToJSON EC2ManagedInstanceProperty where
toJSON :: EC2ManagedInstanceProperty -> Value
toJSON EC2ManagedInstanceProperty {Maybe (Value Text)
()
haddock_workaround_ :: EC2ManagedInstanceProperty -> ()
instanceId :: EC2ManagedInstanceProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
instanceId :: Maybe (Value Text)
..}
= [(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
"InstanceId" (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)
instanceId]))
instance Property "InstanceId" EC2ManagedInstanceProperty where
type PropertyType "InstanceId" EC2ManagedInstanceProperty = Value Prelude.Text
set :: PropertyType "InstanceId" EC2ManagedInstanceProperty
-> EC2ManagedInstanceProperty -> EC2ManagedInstanceProperty
set PropertyType "InstanceId" EC2ManagedInstanceProperty
newValue EC2ManagedInstanceProperty {Maybe (Value Text)
()
haddock_workaround_ :: EC2ManagedInstanceProperty -> ()
instanceId :: EC2ManagedInstanceProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
instanceId :: Maybe (Value Text)
..}
= EC2ManagedInstanceProperty
{instanceId :: Maybe (Value Text)
instanceId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "InstanceId" EC2ManagedInstanceProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}