module Stratosphere.WorkspacesInstances.WorkspaceInstance (
        module Exports, WorkspaceInstance(..), mkWorkspaceInstance
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.WorkspacesInstances.WorkspaceInstance.ManagedInstanceProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
data WorkspaceInstance
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-workspacesinstances-workspaceinstance.html>
    WorkspaceInstance {WorkspaceInstance -> ()
haddock_workaround_ :: (),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-workspacesinstances-workspaceinstance.html#cfn-workspacesinstances-workspaceinstance-managedinstance>
                       WorkspaceInstance -> Maybe ManagedInstanceProperty
managedInstance :: (Prelude.Maybe ManagedInstanceProperty),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-workspacesinstances-workspaceinstance.html#cfn-workspacesinstances-workspaceinstance-tags>
                       WorkspaceInstance -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
  deriving stock (WorkspaceInstance -> WorkspaceInstance -> Bool
(WorkspaceInstance -> WorkspaceInstance -> Bool)
-> (WorkspaceInstance -> WorkspaceInstance -> Bool)
-> Eq WorkspaceInstance
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: WorkspaceInstance -> WorkspaceInstance -> Bool
== :: WorkspaceInstance -> WorkspaceInstance -> Bool
$c/= :: WorkspaceInstance -> WorkspaceInstance -> Bool
/= :: WorkspaceInstance -> WorkspaceInstance -> Bool
Prelude.Eq, Int -> WorkspaceInstance -> ShowS
[WorkspaceInstance] -> ShowS
WorkspaceInstance -> String
(Int -> WorkspaceInstance -> ShowS)
-> (WorkspaceInstance -> String)
-> ([WorkspaceInstance] -> ShowS)
-> Show WorkspaceInstance
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> WorkspaceInstance -> ShowS
showsPrec :: Int -> WorkspaceInstance -> ShowS
$cshow :: WorkspaceInstance -> String
show :: WorkspaceInstance -> String
$cshowList :: [WorkspaceInstance] -> ShowS
showList :: [WorkspaceInstance] -> ShowS
Prelude.Show)
mkWorkspaceInstance :: WorkspaceInstance
mkWorkspaceInstance :: WorkspaceInstance
mkWorkspaceInstance
  = WorkspaceInstance
      {haddock_workaround_ :: ()
haddock_workaround_ = (), managedInstance :: Maybe ManagedInstanceProperty
managedInstance = Maybe ManagedInstanceProperty
forall a. Maybe a
Prelude.Nothing,
       tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties WorkspaceInstance where
  toResourceProperties :: WorkspaceInstance -> ResourceProperties
toResourceProperties WorkspaceInstance {Maybe [Tag]
Maybe ManagedInstanceProperty
()
haddock_workaround_ :: WorkspaceInstance -> ()
managedInstance :: WorkspaceInstance -> Maybe ManagedInstanceProperty
tags :: WorkspaceInstance -> Maybe [Tag]
haddock_workaround_ :: ()
managedInstance :: Maybe ManagedInstanceProperty
tags :: Maybe [Tag]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::WorkspacesInstances::WorkspaceInstance",
         supportsTags :: Bool
supportsTags = Bool
Prelude.True,
         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 -> ManagedInstanceProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ManagedInstance" (ManagedInstanceProperty -> (Key, Value))
-> Maybe ManagedInstanceProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ManagedInstanceProperty
managedInstance,
                            Key -> [Tag] -> (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" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags])}
instance JSON.ToJSON WorkspaceInstance where
  toJSON :: WorkspaceInstance -> Value
toJSON WorkspaceInstance {Maybe [Tag]
Maybe ManagedInstanceProperty
()
haddock_workaround_ :: WorkspaceInstance -> ()
managedInstance :: WorkspaceInstance -> Maybe ManagedInstanceProperty
tags :: WorkspaceInstance -> Maybe [Tag]
haddock_workaround_ :: ()
managedInstance :: Maybe ManagedInstanceProperty
tags :: Maybe [Tag]
..}
    = [(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 -> ManagedInstanceProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ManagedInstance" (ManagedInstanceProperty -> (Key, Value))
-> Maybe ManagedInstanceProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ManagedInstanceProperty
managedInstance,
               Key -> [Tag] -> (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" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags]))
instance Property "ManagedInstance" WorkspaceInstance where
  type PropertyType "ManagedInstance" WorkspaceInstance = ManagedInstanceProperty
  set :: PropertyType "ManagedInstance" WorkspaceInstance
-> WorkspaceInstance -> WorkspaceInstance
set PropertyType "ManagedInstance" WorkspaceInstance
newValue WorkspaceInstance {Maybe [Tag]
Maybe ManagedInstanceProperty
()
haddock_workaround_ :: WorkspaceInstance -> ()
managedInstance :: WorkspaceInstance -> Maybe ManagedInstanceProperty
tags :: WorkspaceInstance -> Maybe [Tag]
haddock_workaround_ :: ()
managedInstance :: Maybe ManagedInstanceProperty
tags :: Maybe [Tag]
..}
    = WorkspaceInstance {managedInstance :: Maybe ManagedInstanceProperty
managedInstance = ManagedInstanceProperty -> Maybe ManagedInstanceProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ManagedInstance" WorkspaceInstance
ManagedInstanceProperty
newValue, Maybe [Tag]
()
haddock_workaround_ :: ()
tags :: Maybe [Tag]
haddock_workaround_ :: ()
tags :: Maybe [Tag]
..}
instance Property "Tags" WorkspaceInstance where
  type PropertyType "Tags" WorkspaceInstance = [Tag]
  set :: PropertyType "Tags" WorkspaceInstance
-> WorkspaceInstance -> WorkspaceInstance
set PropertyType "Tags" WorkspaceInstance
newValue WorkspaceInstance {Maybe [Tag]
Maybe ManagedInstanceProperty
()
haddock_workaround_ :: WorkspaceInstance -> ()
managedInstance :: WorkspaceInstance -> Maybe ManagedInstanceProperty
tags :: WorkspaceInstance -> Maybe [Tag]
haddock_workaround_ :: ()
managedInstance :: Maybe ManagedInstanceProperty
tags :: Maybe [Tag]
..}
    = WorkspaceInstance {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" WorkspaceInstance
newValue, Maybe ManagedInstanceProperty
()
haddock_workaround_ :: ()
managedInstance :: Maybe ManagedInstanceProperty
haddock_workaround_ :: ()
managedInstance :: Maybe ManagedInstanceProperty
..}